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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ea12c92da2b449caa0ee5a9fe5202657df1bfa5f | composer.json | composer.json | {
"name": "datachore/datachore",
"type": "library",
"description": "Datachore is a Query Builder and ORM for Google Appengine's Datastore",
"keywords": ["appengine", "datastore"],
"homepage": "http://pwhelan.github.io",
"license": "MIT",
"authors": [
{
"name": "Phillip Whelan",
"email": "pwhelan@mixxx.org"
}
],
"require": {
"php": ">=5.4.0",
"illuminate/support": "~4.2"
},
"require-dev": {
"phpunit/phpunit": "4.4.*",
"slim/slim": "2.3.5",
"guzzlehttp/guzzle": "4.2",
"satooshi/php-coveralls": "dev-master"
},
"autoload": {
"psr-4": {
"Datachore\\": "src/"
}
}
}
| {
"name": "datachore/datachore",
"type": "library",
"description": "Datachore is a Query Builder and ORM for Google Appengine's Datastore",
"keywords": ["appengine", "datastore"],
"homepage": "http://pwhelan.github.io",
"license": "MIT",
"authors": [
{
"name": "Phillip Whelan",
"email": "pwhelan@mixxx.org"
}
],
"require": {
"php": ">=5.4.0",
"illuminate/support": "~4.2|~5.1"
},
"require-dev": {
"phpunit/phpunit": "4.4.*",
"slim/slim": "2.3.5",
"guzzlehttp/guzzle": "4.2",
"satooshi/php-coveralls": "dev-master"
},
"autoload": {
"psr-4": {
"Datachore\\": "src/"
}
}
}
| Allow usage of illuminate v5 components | [TASK] Allow usage of illuminate v5 components
| JSON | mit | pwhelan/datachore | json | ## Code Before:
{
"name": "datachore/datachore",
"type": "library",
"description": "Datachore is a Query Builder and ORM for Google Appengine's Datastore",
"keywords": ["appengine", "datastore"],
"homepage": "http://pwhelan.github.io",
"license": "MIT",
"authors": [
{
"name": "Phillip Whelan",
"email": "pwhelan@mixxx.org"
}
],
"require": {
"php": ">=5.4.0",
"illuminate/support": "~4.2"
},
"require-dev": {
"phpunit/phpunit": "4.4.*",
"slim/slim": "2.3.5",
"guzzlehttp/guzzle": "4.2",
"satooshi/php-coveralls": "dev-master"
},
"autoload": {
"psr-4": {
"Datachore\\": "src/"
}
}
}
## Instruction:
[TASK] Allow usage of illuminate v5 components
## Code After:
{
"name": "datachore/datachore",
"type": "library",
"description": "Datachore is a Query Builder and ORM for Google Appengine's Datastore",
"keywords": ["appengine", "datastore"],
"homepage": "http://pwhelan.github.io",
"license": "MIT",
"authors": [
{
"name": "Phillip Whelan",
"email": "pwhelan@mixxx.org"
}
],
"require": {
"php": ">=5.4.0",
"illuminate/support": "~4.2|~5.1"
},
"require-dev": {
"phpunit/phpunit": "4.4.*",
"slim/slim": "2.3.5",
"guzzlehttp/guzzle": "4.2",
"satooshi/php-coveralls": "dev-master"
},
"autoload": {
"psr-4": {
"Datachore\\": "src/"
}
}
}
| {
"name": "datachore/datachore",
"type": "library",
"description": "Datachore is a Query Builder and ORM for Google Appengine's Datastore",
"keywords": ["appengine", "datastore"],
"homepage": "http://pwhelan.github.io",
"license": "MIT",
-
+
"authors": [
{
"name": "Phillip Whelan",
"email": "pwhelan@mixxx.org"
}
],
-
+
"require": {
"php": ">=5.4.0",
- "illuminate/support": "~4.2"
+ "illuminate/support": "~4.2|~5.1"
? +++++
},
-
+
"require-dev": {
"phpunit/phpunit": "4.4.*",
"slim/slim": "2.3.5",
"guzzlehttp/guzzle": "4.2",
"satooshi/php-coveralls": "dev-master"
},
-
+
"autoload": {
"psr-4": {
"Datachore\\": "src/"
}
}
-
+
} | 12 | 0.352941 | 6 | 6 |
c62d4123ef06c8eac2c57ee4a7336156d80214f5 | app/views/spree/products/recently_viewed.html.erb | app/views/spree/products/recently_viewed.html.erb | <% if cached_recently_viewed_products.any? %>
<div id="recently_viewed" data-hook>
<h3 class="product-section-title"><%= Spree.t(:recently_viewed_products) %></h3>
<ul id="recently_viewed_products" class="list-group">
<% cached_recently_viewed_products.each do |product| %>
<li class="list-group-item"><%= link_to product.name, product %></li>
<% end %>
</ul>
</div>
<% end %>
| <% if cached_recently_viewed_products.any? %>
<div id="recently_viewed" class="mt-4" data-hook>
<h3 class="product-section-title"><%= Spree.t(:recently_viewed_products) %></h3>
<ul id="recently_viewed_products" class="list-group">
<% cached_recently_viewed_products.each do |product| %>
<li class="list-group-item"><%= link_to product.name, product %></li>
<% end %>
</ul>
</div>
<% end %>
| Update classes to use bootstrap-4 | Update classes to use bootstrap-4
| HTML+ERB | bsd-3-clause | spree-contrib/spree_recently_viewed,spree-contrib/spree_recently_viewed,spree-contrib/spree_recently_viewed | html+erb | ## Code Before:
<% if cached_recently_viewed_products.any? %>
<div id="recently_viewed" data-hook>
<h3 class="product-section-title"><%= Spree.t(:recently_viewed_products) %></h3>
<ul id="recently_viewed_products" class="list-group">
<% cached_recently_viewed_products.each do |product| %>
<li class="list-group-item"><%= link_to product.name, product %></li>
<% end %>
</ul>
</div>
<% end %>
## Instruction:
Update classes to use bootstrap-4
## Code After:
<% if cached_recently_viewed_products.any? %>
<div id="recently_viewed" class="mt-4" data-hook>
<h3 class="product-section-title"><%= Spree.t(:recently_viewed_products) %></h3>
<ul id="recently_viewed_products" class="list-group">
<% cached_recently_viewed_products.each do |product| %>
<li class="list-group-item"><%= link_to product.name, product %></li>
<% end %>
</ul>
</div>
<% end %>
| <% if cached_recently_viewed_products.any? %>
- <div id="recently_viewed" data-hook>
+ <div id="recently_viewed" class="mt-4" data-hook>
? +++++++++++++
<h3 class="product-section-title"><%= Spree.t(:recently_viewed_products) %></h3>
<ul id="recently_viewed_products" class="list-group">
<% cached_recently_viewed_products.each do |product| %>
<li class="list-group-item"><%= link_to product.name, product %></li>
<% end %>
</ul>
</div>
<% end %> | 2 | 0.181818 | 1 | 1 |
a9bcc1388143c86f8ac6d5afcfe0b8cb376b8de7 | src/main/webapp/resources/dev/js/singleUser.js | src/main/webapp/resources/dev/js/singleUser.js | /**
* Author: Josh Adam <josh.adam@phac-aspc.gc.ca>
* Date: 2013-04-17
* Time: 9:41 AM
*/
var username = $('#username').text();
function Project (data) {
"use strict";
this.name = data.name;
}
function UserViewModel () {
"use strict";
self.projects = ko.observableArray([]);
function getUserProjects () {
"use strict";
$.getJSON('/users/' + username + '/projects', function (allData) {
var mappedProjects = $.map(allData.projectList, function (item) {
return new Project(item)
});
self.projects(mappedProjects);
});
}
getUserProjects();
}
$.ajaxSetup({ cache: false });
ko.applyBindings(new UserViewModel()); | /**
* Author: Josh Adam <josh.adam@phac-aspc.gc.ca>
* Date: 2013-04-17
* Time: 9:41 AM
*/
var username = $('#username').text();
function Project (data) {
"use strict";
this.name = data.name;
}
function UserViewModel () {
"use strict";
self.projects = ko.observableArray([]);
function getUserProjects () {
"use strict";
$.getJSON('/users/' + username + '/projects', function (allData) {
var mappedProjects = $.map(allData.projectResources.projects, function (item) {
return new Project(item)
});
self.projects(mappedProjects);
});
}
getUserProjects();
}
$.ajaxSetup({ cache: false });
ko.applyBindings(new UserViewModel()); | Change the expected JSON format for user projects. | Change the expected JSON format for user projects.
| JavaScript | 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 | javascript | ## Code Before:
/**
* Author: Josh Adam <josh.adam@phac-aspc.gc.ca>
* Date: 2013-04-17
* Time: 9:41 AM
*/
var username = $('#username').text();
function Project (data) {
"use strict";
this.name = data.name;
}
function UserViewModel () {
"use strict";
self.projects = ko.observableArray([]);
function getUserProjects () {
"use strict";
$.getJSON('/users/' + username + '/projects', function (allData) {
var mappedProjects = $.map(allData.projectList, function (item) {
return new Project(item)
});
self.projects(mappedProjects);
});
}
getUserProjects();
}
$.ajaxSetup({ cache: false });
ko.applyBindings(new UserViewModel());
## Instruction:
Change the expected JSON format for user projects.
## Code After:
/**
* Author: Josh Adam <josh.adam@phac-aspc.gc.ca>
* Date: 2013-04-17
* Time: 9:41 AM
*/
var username = $('#username').text();
function Project (data) {
"use strict";
this.name = data.name;
}
function UserViewModel () {
"use strict";
self.projects = ko.observableArray([]);
function getUserProjects () {
"use strict";
$.getJSON('/users/' + username + '/projects', function (allData) {
var mappedProjects = $.map(allData.projectResources.projects, function (item) {
return new Project(item)
});
self.projects(mappedProjects);
});
}
getUserProjects();
}
$.ajaxSetup({ cache: false });
ko.applyBindings(new UserViewModel()); | /**
* Author: Josh Adam <josh.adam@phac-aspc.gc.ca>
* Date: 2013-04-17
* Time: 9:41 AM
*/
var username = $('#username').text();
function Project (data) {
"use strict";
this.name = data.name;
}
function UserViewModel () {
"use strict";
self.projects = ko.observableArray([]);
function getUserProjects () {
"use strict";
$.getJSON('/users/' + username + '/projects', function (allData) {
- var mappedProjects = $.map(allData.projectList, function (item) {
? ^^
+ var mappedProjects = $.map(allData.projectResources.projects, function (item) {
? ^^ +++++++++++++ +
return new Project(item)
});
self.projects(mappedProjects);
});
}
getUserProjects();
}
$.ajaxSetup({ cache: false });
ko.applyBindings(new UserViewModel()); | 2 | 0.060606 | 1 | 1 |
c2747312789de3008c36ab656eb9b22c6db7d697 | .travis.yml | .travis.yml | language: ruby
sudo: false
cache: bundler
rvm:
- 2.0.0
- 2.1
- 2.2
env:
matrix:
- SPROCKETS_VERSION="~> 3.3.0"
- SPROCKETS_VERSION="~> 3.4.0"
- SPROCKETS_VERSION="~> 3.5.0"
| language: ruby
sudo: false
cache: bundler
rvm:
- 2.0.0
- 2.1
- 2.2.4
- 2.3.0
env:
matrix:
- SPROCKETS_VERSION="~> 3.3.0"
- SPROCKETS_VERSION="~> 3.4.0"
- SPROCKETS_VERSION="~> 3.5.0"
| Test against Ruby 2.3.0 on Travis CI | Test against Ruby 2.3.0 on Travis CI
| YAML | mit | tricknotes/ember-handlebars-template,tricknotes/ember-handlebars-template | yaml | ## Code Before:
language: ruby
sudo: false
cache: bundler
rvm:
- 2.0.0
- 2.1
- 2.2
env:
matrix:
- SPROCKETS_VERSION="~> 3.3.0"
- SPROCKETS_VERSION="~> 3.4.0"
- SPROCKETS_VERSION="~> 3.5.0"
## Instruction:
Test against Ruby 2.3.0 on Travis CI
## Code After:
language: ruby
sudo: false
cache: bundler
rvm:
- 2.0.0
- 2.1
- 2.2.4
- 2.3.0
env:
matrix:
- SPROCKETS_VERSION="~> 3.3.0"
- SPROCKETS_VERSION="~> 3.4.0"
- SPROCKETS_VERSION="~> 3.5.0"
| language: ruby
sudo: false
cache: bundler
rvm:
- 2.0.0
- 2.1
- - 2.2
+ - 2.2.4
? ++
+ - 2.3.0
env:
matrix:
- SPROCKETS_VERSION="~> 3.3.0"
- SPROCKETS_VERSION="~> 3.4.0"
- SPROCKETS_VERSION="~> 3.5.0" | 3 | 0.25 | 2 | 1 |
1cb63523ac8294182c425df7bf3d239b2be7c8c5 | src/scroll-top.css | src/scroll-top.css | .scroll-up {
position: fixed;
bottom: 1rem;
right: 2rem;
display: inline-block;
width: 3.75rem;
height: 3.75rem;
border-radius: 50%;
overflow: hidden;
}
.scroll-up:before {
content: "\25B2";
display: block;
color: white;
position: absolute;
font-size: 2.2rem;
width: 3.75rem;
height: 3.75rem;
background: #568eca;
text-align: center;
line-height: 3.75rem;
}
.scroll-up__text {
display: none;
} | .scroll-up {
font-family: arial, verdana, sans-serif;
position: fixed;
bottom: 1rem;
right: 2rem;
display: inline-block;
width: 3.75rem;
height: 3.75rem;
border-radius: 50%;
overflow: hidden;
}
.scroll-up:before {
content: "\25B2";
display: block;
color: white;
position: absolute;
font-size: 2.2rem;
width: 3.75rem;
height: 3.75rem;
background: #568eca;
text-align: center;
line-height: 1.6;
}
.scroll-up__text {
display: none;
} | Update css to work better with Firefox | Update css to work better with Firefox
The widget css was a bit off with firefox (compared to chrome).
Problem was the line height and the default font that was set.
This is fixed by specifying a font family (seems that both arial &
verdana are cross-platform) and use e relative line height instead of a
rem unit.
| CSS | mit | betaweb-be/scroll-top-widget,betaweb-be/scroll-top-widget | css | ## Code Before:
.scroll-up {
position: fixed;
bottom: 1rem;
right: 2rem;
display: inline-block;
width: 3.75rem;
height: 3.75rem;
border-radius: 50%;
overflow: hidden;
}
.scroll-up:before {
content: "\25B2";
display: block;
color: white;
position: absolute;
font-size: 2.2rem;
width: 3.75rem;
height: 3.75rem;
background: #568eca;
text-align: center;
line-height: 3.75rem;
}
.scroll-up__text {
display: none;
}
## Instruction:
Update css to work better with Firefox
The widget css was a bit off with firefox (compared to chrome).
Problem was the line height and the default font that was set.
This is fixed by specifying a font family (seems that both arial &
verdana are cross-platform) and use e relative line height instead of a
rem unit.
## Code After:
.scroll-up {
font-family: arial, verdana, sans-serif;
position: fixed;
bottom: 1rem;
right: 2rem;
display: inline-block;
width: 3.75rem;
height: 3.75rem;
border-radius: 50%;
overflow: hidden;
}
.scroll-up:before {
content: "\25B2";
display: block;
color: white;
position: absolute;
font-size: 2.2rem;
width: 3.75rem;
height: 3.75rem;
background: #568eca;
text-align: center;
line-height: 1.6;
}
.scroll-up__text {
display: none;
} | .scroll-up {
+ font-family: arial, verdana, sans-serif;
position: fixed;
bottom: 1rem;
right: 2rem;
display: inline-block;
width: 3.75rem;
height: 3.75rem;
border-radius: 50%;
overflow: hidden;
}
.scroll-up:before {
content: "\25B2";
display: block;
color: white;
position: absolute;
font-size: 2.2rem;
width: 3.75rem;
height: 3.75rem;
background: #568eca;
text-align: center;
- line-height: 3.75rem;
? ^ ^^^^^
+ line-height: 1.6;
? ^ ^
}
.scroll-up__text {
display: none;
} | 3 | 0.111111 | 2 | 1 |
a5a99e61083ecb09905b4eade143c222a702b7ce | src/Cacheable.php | src/Cacheable.php | <?php
namespace Laracasts\Matryoshka;
trait Cacheable
{
/**
* Calculate a unique cache key for the model instance.
*/
public function getCacheKey()
{
return sprintf("%s/%s-%s",
get_class($this),
$this->id,
$this->updated_at->timestamp
);
}
}
| <?php
namespace Laracasts\Matryoshka;
trait Cacheable
{
/**
* Calculate a unique cache key for the model instance.
*/
public function getCacheKey()
{
return sprintf("%s/%s-%s",
get_class($this),
$this->getKey(),
$this->updated_at->timestamp
);
}
}
| Use more safer getKey() method instead of assumption that key is named id | Use more safer getKey() method instead of assumption that key is named id
| PHP | mit | laracasts/matryoshka | php | ## Code Before:
<?php
namespace Laracasts\Matryoshka;
trait Cacheable
{
/**
* Calculate a unique cache key for the model instance.
*/
public function getCacheKey()
{
return sprintf("%s/%s-%s",
get_class($this),
$this->id,
$this->updated_at->timestamp
);
}
}
## Instruction:
Use more safer getKey() method instead of assumption that key is named id
## Code After:
<?php
namespace Laracasts\Matryoshka;
trait Cacheable
{
/**
* Calculate a unique cache key for the model instance.
*/
public function getCacheKey()
{
return sprintf("%s/%s-%s",
get_class($this),
$this->getKey(),
$this->updated_at->timestamp
);
}
}
| <?php
namespace Laracasts\Matryoshka;
trait Cacheable
{
/**
* Calculate a unique cache key for the model instance.
*/
public function getCacheKey()
{
- return sprintf("%s/%s-%s",
? -
+ return sprintf("%s/%s-%s",
get_class($this),
- $this->id,
? ^^
+ $this->getKey(),
? ^^^^^^^^
$this->updated_at->timestamp
);
}
}
- | 5 | 0.263158 | 2 | 3 |
5cc217b853eb0c65e74127b33ba38c52eb93b688 | api/services/Cron.js | api/services/Cron.js | // Cron.js - in api/services
"use strict";
const CronJob = require('cron').CronJob;
const _ = require('lodash');
const crons = [];
module.exports = {
start: () => {
sails.config.scientilla.crons.forEach(cron =>
crons.push(new CronJob(cron.time, async cron => {
if (!cron.enabled) {
return;
}
sails.log.info('Cron ' + cron.name + ' started at ' + new Date().toISOString());
await GruntTaskRunner.run('Cron:' + cron.name);
sails.log.info('Cron ' + cron.name + ' finished at ' + new Date().toISOString());
}, null, false, 'Europe/Rome'))
);
crons.forEach(cron => cron.start());
},
stop: () => {
crons.forEach(cron => cron.stop());
}
}; | // Cron.js - in api/services
"use strict";
const CronJob = require('cron').CronJob;
const _ = require('lodash');
const crons = [];
module.exports = {
start: () => {
sails.config.scientilla.crons.forEach(cron => {
crons.push(new CronJob(cron.time, onTick(cron), null, false, 'Europe/Rome'))
});
crons.forEach(cron => cron.start());
},
stop: () => {
crons.forEach(cron => cron.stop());
}
};
function onTick(cron) {
return async function () {
if (!cron.enabled) {
return;
}
sails.log.info('Cron ' + cron.name + ' started at ' + new Date().toISOString());
await GruntTaskRunner.run('cron:' + cron.name);
sails.log.info('Cron ' + cron.name + ' finished at ' + new Date().toISOString());
}
} | Change onTick function cron jobs | Change onTick function cron jobs
| JavaScript | mit | scientilla/scientilla,scientilla/scientilla,scientilla/scientilla | javascript | ## Code Before:
// Cron.js - in api/services
"use strict";
const CronJob = require('cron').CronJob;
const _ = require('lodash');
const crons = [];
module.exports = {
start: () => {
sails.config.scientilla.crons.forEach(cron =>
crons.push(new CronJob(cron.time, async cron => {
if (!cron.enabled) {
return;
}
sails.log.info('Cron ' + cron.name + ' started at ' + new Date().toISOString());
await GruntTaskRunner.run('Cron:' + cron.name);
sails.log.info('Cron ' + cron.name + ' finished at ' + new Date().toISOString());
}, null, false, 'Europe/Rome'))
);
crons.forEach(cron => cron.start());
},
stop: () => {
crons.forEach(cron => cron.stop());
}
};
## Instruction:
Change onTick function cron jobs
## Code After:
// Cron.js - in api/services
"use strict";
const CronJob = require('cron').CronJob;
const _ = require('lodash');
const crons = [];
module.exports = {
start: () => {
sails.config.scientilla.crons.forEach(cron => {
crons.push(new CronJob(cron.time, onTick(cron), null, false, 'Europe/Rome'))
});
crons.forEach(cron => cron.start());
},
stop: () => {
crons.forEach(cron => cron.stop());
}
};
function onTick(cron) {
return async function () {
if (!cron.enabled) {
return;
}
sails.log.info('Cron ' + cron.name + ' started at ' + new Date().toISOString());
await GruntTaskRunner.run('cron:' + cron.name);
sails.log.info('Cron ' + cron.name + ' finished at ' + new Date().toISOString());
}
} | // Cron.js - in api/services
"use strict";
const CronJob = require('cron').CronJob;
const _ = require('lodash');
const crons = [];
module.exports = {
start: () => {
- sails.config.scientilla.crons.forEach(cron =>
+ sails.config.scientilla.crons.forEach(cron => {
? ++
+ crons.push(new CronJob(cron.time, onTick(cron), null, false, 'Europe/Rome'))
- crons.push(new CronJob(cron.time, async cron => {
- if (!cron.enabled) {
- return;
- }
-
- sails.log.info('Cron ' + cron.name + ' started at ' + new Date().toISOString());
-
- await GruntTaskRunner.run('Cron:' + cron.name);
-
- sails.log.info('Cron ' + cron.name + ' finished at ' + new Date().toISOString());
- }, null, false, 'Europe/Rome'))
- );
+ });
? +
crons.forEach(cron => cron.start());
},
stop: () => {
crons.forEach(cron => cron.stop());
}
};
+
+ function onTick(cron) {
+ return async function () {
+ if (!cron.enabled) {
+ return;
+ }
+
+ sails.log.info('Cron ' + cron.name + ' started at ' + new Date().toISOString());
+
+ await GruntTaskRunner.run('cron:' + cron.name);
+
+ sails.log.info('Cron ' + cron.name + ' finished at ' + new Date().toISOString());
+ }
+ } | 30 | 1.034483 | 17 | 13 |
1ce2ed61a8840c00525d4974399c49e803e5b752 | .travis.yml | .travis.yml | language: php
php:
- 5.6
- 7
mysql:
database: activecollab_database_object_test
username: root
encoding: utf8mb4
before_install:
# INSTALL MYSQL 5.6
# (https://github.com/piwik/piwik/commit/20bd2e1c24e5d673dce3feb256204ad48c29f160)
# TODO: Remove when mysql 5.6 is provided by travis.
# Otherwise, our migrations will raise a syntax error.
- "sudo apt-get remove mysql-common mysql-server-5.5 mysql-server-core-5.5 mysql-client-5.5 mysql-client-core-5.5"
- "sudo apt-get autoremove"
- "sudo apt-get install libaio1"
- "wget -O mysql-5.6.14.deb http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.14-debian6.0-x86_64.deb/from/http://cdn.mysql.com/"
- "sudo dpkg -i mysql-5.6.14.deb"
- "sudo cp /opt/mysql/server-5.6/support-files/mysql.server /etc/init.d/mysql.server"
- "sudo ln -s /opt/mysql/server-5.6/bin/* /usr/bin/"
- "sudo sed -i'' 's/table_cache/table_open_cache/' /etc/mysql/my.cnf"
- "sudo sed -i'' 's/log_slow_queries/slow_query_log/' /etc/mysql/my.cnf"
- "sudo sed -i'' 's/basedir[^=]\\+=.*$/basedir = \\/opt\\/mysql\\/server-5.6/' /etc/mysql/my.cnf"
- "sudo /etc/init.d/mysql.server start"
- mysql --version
- mysql -e "SELECT VERSION();"
# /END MYSQL 5.6
- composer self-update
install: composer install --dev
before_script:
- mysql -e 'create database activecollab_database_object_test'
script: phpunit -c test/phpunit.xml
| dist: trusty
sudo: required
language: php
php:
- 5.6
- 7
addons:
apt:
packages:
- mysql-server-5.6
- mysql-client-core-5.6
- mysql-client-5.6
mysql:
database: activecollab_database_object_test
username: root
encoding: utf8mb4
before_install:
- composer self-update
install: composer install --dev
before_script:
- mysql -u root -e 'create database activecollab_database_object_test'
script: phpunit -c test/phpunit.xml
| Use recommended way to get MySQL 5.6 on Travis | Use recommended way to get MySQL 5.6 on Travis
| YAML | mit | activecollab/databaseobject | yaml | ## Code Before:
language: php
php:
- 5.6
- 7
mysql:
database: activecollab_database_object_test
username: root
encoding: utf8mb4
before_install:
# INSTALL MYSQL 5.6
# (https://github.com/piwik/piwik/commit/20bd2e1c24e5d673dce3feb256204ad48c29f160)
# TODO: Remove when mysql 5.6 is provided by travis.
# Otherwise, our migrations will raise a syntax error.
- "sudo apt-get remove mysql-common mysql-server-5.5 mysql-server-core-5.5 mysql-client-5.5 mysql-client-core-5.5"
- "sudo apt-get autoremove"
- "sudo apt-get install libaio1"
- "wget -O mysql-5.6.14.deb http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.14-debian6.0-x86_64.deb/from/http://cdn.mysql.com/"
- "sudo dpkg -i mysql-5.6.14.deb"
- "sudo cp /opt/mysql/server-5.6/support-files/mysql.server /etc/init.d/mysql.server"
- "sudo ln -s /opt/mysql/server-5.6/bin/* /usr/bin/"
- "sudo sed -i'' 's/table_cache/table_open_cache/' /etc/mysql/my.cnf"
- "sudo sed -i'' 's/log_slow_queries/slow_query_log/' /etc/mysql/my.cnf"
- "sudo sed -i'' 's/basedir[^=]\\+=.*$/basedir = \\/opt\\/mysql\\/server-5.6/' /etc/mysql/my.cnf"
- "sudo /etc/init.d/mysql.server start"
- mysql --version
- mysql -e "SELECT VERSION();"
# /END MYSQL 5.6
- composer self-update
install: composer install --dev
before_script:
- mysql -e 'create database activecollab_database_object_test'
script: phpunit -c test/phpunit.xml
## Instruction:
Use recommended way to get MySQL 5.6 on Travis
## Code After:
dist: trusty
sudo: required
language: php
php:
- 5.6
- 7
addons:
apt:
packages:
- mysql-server-5.6
- mysql-client-core-5.6
- mysql-client-5.6
mysql:
database: activecollab_database_object_test
username: root
encoding: utf8mb4
before_install:
- composer self-update
install: composer install --dev
before_script:
- mysql -u root -e 'create database activecollab_database_object_test'
script: phpunit -c test/phpunit.xml
| + dist: trusty
+ sudo: required
language: php
php:
- 5.6
- 7
+ addons:
+ apt:
+ packages:
+ - mysql-server-5.6
+ - mysql-client-core-5.6
+ - mysql-client-5.6
mysql:
database: activecollab_database_object_test
username: root
encoding: utf8mb4
before_install:
- # INSTALL MYSQL 5.6
- # (https://github.com/piwik/piwik/commit/20bd2e1c24e5d673dce3feb256204ad48c29f160)
- # TODO: Remove when mysql 5.6 is provided by travis.
- # Otherwise, our migrations will raise a syntax error.
- - "sudo apt-get remove mysql-common mysql-server-5.5 mysql-server-core-5.5 mysql-client-5.5 mysql-client-core-5.5"
- - "sudo apt-get autoremove"
- - "sudo apt-get install libaio1"
- - "wget -O mysql-5.6.14.deb http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.14-debian6.0-x86_64.deb/from/http://cdn.mysql.com/"
- - "sudo dpkg -i mysql-5.6.14.deb"
- - "sudo cp /opt/mysql/server-5.6/support-files/mysql.server /etc/init.d/mysql.server"
- - "sudo ln -s /opt/mysql/server-5.6/bin/* /usr/bin/"
- - "sudo sed -i'' 's/table_cache/table_open_cache/' /etc/mysql/my.cnf"
- - "sudo sed -i'' 's/log_slow_queries/slow_query_log/' /etc/mysql/my.cnf"
- - "sudo sed -i'' 's/basedir[^=]\\+=.*$/basedir = \\/opt\\/mysql\\/server-5.6/' /etc/mysql/my.cnf"
- - "sudo /etc/init.d/mysql.server start"
- - mysql --version
- - mysql -e "SELECT VERSION();"
- # /END MYSQL 5.6
- composer self-update
install: composer install --dev
before_script:
- - mysql -e 'create database activecollab_database_object_test'
+ - mysql -u root -e 'create database activecollab_database_object_test'
? ++++++++
script: phpunit -c test/phpunit.xml | 28 | 0.875 | 9 | 19 |
1a07a4abbc433fac7a0822c96f4f39a68665286c | README.md | README.md | basearch
========
Base architecture for bootstrapping simple Java web apps
Uses: Spring MVC, Spring Security, EclipseLink, Thymeleaf
Built with Gradle
Run the test cases with "gradlew test" or start with "gradlew classes run" and hit "http://localhost:8080/index.page" on a browser
[](https://travis-ci.org/hectorlf/basearch)
| basearch
========
Base architecture for bootstrapping simple Java web apps
Uses: Spring MVC, Spring Security, EclipseLink, Thymeleaf
Built with Gradle
Run the test cases with "gradlew test" or start with "gradlew classes run" and hit "http://localhost:8080/index.page" on a browser
[](https://travis-ci.org/hectorlf/basearch-current)
| Update travis-ci path to reflect project name change | Update travis-ci path to reflect project name change
[ci skip] | Markdown | mit | hectorlf/basearch-current,hectorlf/basearch-current,hectorlf/basearch,hectorlf/basearch | markdown | ## Code Before:
basearch
========
Base architecture for bootstrapping simple Java web apps
Uses: Spring MVC, Spring Security, EclipseLink, Thymeleaf
Built with Gradle
Run the test cases with "gradlew test" or start with "gradlew classes run" and hit "http://localhost:8080/index.page" on a browser
[](https://travis-ci.org/hectorlf/basearch)
## Instruction:
Update travis-ci path to reflect project name change
[ci skip]
## Code After:
basearch
========
Base architecture for bootstrapping simple Java web apps
Uses: Spring MVC, Spring Security, EclipseLink, Thymeleaf
Built with Gradle
Run the test cases with "gradlew test" or start with "gradlew classes run" and hit "http://localhost:8080/index.page" on a browser
[](https://travis-ci.org/hectorlf/basearch-current)
| basearch
========
Base architecture for bootstrapping simple Java web apps
Uses: Spring MVC, Spring Security, EclipseLink, Thymeleaf
Built with Gradle
Run the test cases with "gradlew test" or start with "gradlew classes run" and hit "http://localhost:8080/index.page" on a browser
- [](https://travis-ci.org/hectorlf/basearch)
+ [](https://travis-ci.org/hectorlf/basearch-current)
? ++++++++ ++++++++
| 2 | 0.166667 | 1 | 1 |
1c10dd7e5ebdc3434ccb6bb2b42ab46325b1e991 | lib/shared/addon/helpers/maybe-t.js | lib/shared/addon/helpers/maybe-t.js | import { inject as service } from '@ember/service';
import { get } from '@ember/object';
import Helper from '@ember/component/helper';
export default Helper.extend({
intl: service(),
compute(params) {
const key = params[0];
const fallback = params[1];
const intl = get(this, 'intl');
if ( key && intl.exists(key) ) {
return intl.t(key);
} else if ( key && !fallback ) {
return key;
} else {
return fallback;
}
}
});
| import { inject as service } from '@ember/service';
import { get, observer } from '@ember/object';
import Helper from '@ember/component/helper';
export default Helper.extend({
intl: service(),
compute(params) {
const key = params[0];
const fallback = params[1];
const intl = get(this, 'intl');
if ( key && intl.locale && intl.exists(key) ) {
return intl.t(key);
} else if ( key && !fallback ) {
return key;
} else {
return fallback;
}
},
onRecompute: observer('intl.locale', function() {
this.recompute()
}),
});
| Fix default locale is lost | Fix default locale is lost
https://github.com/rancher/rancher/issues/20790
| JavaScript | apache-2.0 | vincent99/ui,rancherio/ui,rancher/ui,lvuch/ui,westlywright/ui,rancher/ui,lvuch/ui,westlywright/ui,vincent99/ui,rancher/ui,lvuch/ui,rancherio/ui,westlywright/ui,vincent99/ui,rancherio/ui | javascript | ## Code Before:
import { inject as service } from '@ember/service';
import { get } from '@ember/object';
import Helper from '@ember/component/helper';
export default Helper.extend({
intl: service(),
compute(params) {
const key = params[0];
const fallback = params[1];
const intl = get(this, 'intl');
if ( key && intl.exists(key) ) {
return intl.t(key);
} else if ( key && !fallback ) {
return key;
} else {
return fallback;
}
}
});
## Instruction:
Fix default locale is lost
https://github.com/rancher/rancher/issues/20790
## Code After:
import { inject as service } from '@ember/service';
import { get, observer } from '@ember/object';
import Helper from '@ember/component/helper';
export default Helper.extend({
intl: service(),
compute(params) {
const key = params[0];
const fallback = params[1];
const intl = get(this, 'intl');
if ( key && intl.locale && intl.exists(key) ) {
return intl.t(key);
} else if ( key && !fallback ) {
return key;
} else {
return fallback;
}
},
onRecompute: observer('intl.locale', function() {
this.recompute()
}),
});
| import { inject as service } from '@ember/service';
- import { get } from '@ember/object';
+ import { get, observer } from '@ember/object';
? ++++++++++
import Helper from '@ember/component/helper';
export default Helper.extend({
intl: service(),
compute(params) {
const key = params[0];
const fallback = params[1];
const intl = get(this, 'intl');
- if ( key && intl.exists(key) ) {
+ if ( key && intl.locale && intl.exists(key) ) {
? +++++++++++++++
return intl.t(key);
} else if ( key && !fallback ) {
return key;
} else {
return fallback;
}
- }
+ },
? +
+
+ onRecompute: observer('intl.locale', function() {
+ this.recompute()
+ }),
}); | 10 | 0.454545 | 7 | 3 |
2d836425e9a2057c71f81cd91ca0da5ca01cd815 | router/index.js | router/index.js | var render = require('../application/render');
var Backbone = require('backbone');
module.exports = Backbone.Router.extend({
/**
* Render the compoennt into the page content.
*/
_pageContent(component, options){
return render(component, '[data-focus="page-content"]', options);
}
});
| var render = require('../application/render');
var Backbone = require('backbone');
var ArgumentNullException = require('../exception/ArgumentNullException');
var message = require('../message');
var userHelper = require('../user');
module.exports = Backbone.Router.extend({
noRoleRoute: 'home',
route(route, name, callback) {
var router = this;
if (!callback){
callback = this[name];
}
if(callback === undefined || callback === null){
throw new ArgumentNullException(`The route callback seems to be undefined, please check your router file for your route: ${name}`);
}
var customWrapperAroundCallback = ()=>{
var currentRoute = route;
//The default route is the noRoleRoute by default
if(currentRoute === ''){
currentRoute = router.noRoleRoute;
}
var routeName = '';//siteDescriptionBuilder.findRouteName(currentRoute);
var routeDescciption = {roles: ['DEFAULT_ROLE']};//siteDescriptionBuilder.getRoute(routeName);
if((routeDescciption === undefined && currentRoute !== '') || !userHelper.hasRole(routeDescciption.roles)){
message.addErrorMessage('application.noRights');
return Backbone.history.navigate('', true);
}else {
//Rendre all the notifications in the stack.
backboneNotification.renderNotifications();
}
//console.log('routeObject', siteDescriptionBuilder.getRoute(n));
callback.apply(router, arguments);
};
return Backbone.Router.prototype.route.call(this, route, name, customWrapperAroundCallback);
},
/**
* Render the compoennt into the page content.
*/
_pageContent(component, options){
return render(component, '[data-focus="page-content"]', options);
}
});
| Add error messages when the route is unknown | [router] Add error messages when the route is unknown
| JavaScript | mit | Jerom138/focus,Jerom138/focus,Jerom138/focus,KleeGroup/focus-core | javascript | ## Code Before:
var render = require('../application/render');
var Backbone = require('backbone');
module.exports = Backbone.Router.extend({
/**
* Render the compoennt into the page content.
*/
_pageContent(component, options){
return render(component, '[data-focus="page-content"]', options);
}
});
## Instruction:
[router] Add error messages when the route is unknown
## Code After:
var render = require('../application/render');
var Backbone = require('backbone');
var ArgumentNullException = require('../exception/ArgumentNullException');
var message = require('../message');
var userHelper = require('../user');
module.exports = Backbone.Router.extend({
noRoleRoute: 'home',
route(route, name, callback) {
var router = this;
if (!callback){
callback = this[name];
}
if(callback === undefined || callback === null){
throw new ArgumentNullException(`The route callback seems to be undefined, please check your router file for your route: ${name}`);
}
var customWrapperAroundCallback = ()=>{
var currentRoute = route;
//The default route is the noRoleRoute by default
if(currentRoute === ''){
currentRoute = router.noRoleRoute;
}
var routeName = '';//siteDescriptionBuilder.findRouteName(currentRoute);
var routeDescciption = {roles: ['DEFAULT_ROLE']};//siteDescriptionBuilder.getRoute(routeName);
if((routeDescciption === undefined && currentRoute !== '') || !userHelper.hasRole(routeDescciption.roles)){
message.addErrorMessage('application.noRights');
return Backbone.history.navigate('', true);
}else {
//Rendre all the notifications in the stack.
backboneNotification.renderNotifications();
}
//console.log('routeObject', siteDescriptionBuilder.getRoute(n));
callback.apply(router, arguments);
};
return Backbone.Router.prototype.route.call(this, route, name, customWrapperAroundCallback);
},
/**
* Render the compoennt into the page content.
*/
_pageContent(component, options){
return render(component, '[data-focus="page-content"]', options);
}
});
| var render = require('../application/render');
var Backbone = require('backbone');
+ var ArgumentNullException = require('../exception/ArgumentNullException');
+ var message = require('../message');
+ var userHelper = require('../user');
module.exports = Backbone.Router.extend({
+ noRoleRoute: 'home',
+ route(route, name, callback) {
+ var router = this;
+ if (!callback){
+ callback = this[name];
+ }
+ if(callback === undefined || callback === null){
+ throw new ArgumentNullException(`The route callback seems to be undefined, please check your router file for your route: ${name}`);
+ }
+ var customWrapperAroundCallback = ()=>{
+ var currentRoute = route;
+ //The default route is the noRoleRoute by default
+ if(currentRoute === ''){
+ currentRoute = router.noRoleRoute;
+ }
+ var routeName = '';//siteDescriptionBuilder.findRouteName(currentRoute);
+ var routeDescciption = {roles: ['DEFAULT_ROLE']};//siteDescriptionBuilder.getRoute(routeName);
+ if((routeDescciption === undefined && currentRoute !== '') || !userHelper.hasRole(routeDescciption.roles)){
+ message.addErrorMessage('application.noRights');
+ return Backbone.history.navigate('', true);
+ }else {
+ //Rendre all the notifications in the stack.
+ backboneNotification.renderNotifications();
+ }
+ //console.log('routeObject', siteDescriptionBuilder.getRoute(n));
+ callback.apply(router, arguments);
+
+ };
+ return Backbone.Router.prototype.route.call(this, route, name, customWrapperAroundCallback);
+ },
/**
* Render the compoennt into the page content.
*/
_pageContent(component, options){
return render(component, '[data-focus="page-content"]', options);
}
}); | 33 | 3.3 | 33 | 0 |
da11663e76f638c346a7b4c5a6131a7f8c4e4b9b | lib/smartdown/api/previous_question.rb | lib/smartdown/api/previous_question.rb | module Smartdown
module Api
class PreviousQuestion
extend Forwardable
def_delegators :@question, :title, :options
attr_reader :response
def initialize(elements, response)
@response = response
if elements.find{|element| element.is_a? Smartdown::Model::Element::Question::MultipleChoice}
@question = MultipleChoice.new(elements)
elsif elements.find{|element| element.is_a? Smartdown::Model::Element::Question::Date}
@question = DateQuestion.new(elements)
end
end
end
end
end
| module Smartdown
module Api
class PreviousQuestion
extend Forwardable
def_delegators :@question, :title, :options
attr_reader :response, :question
def initialize(elements, response)
@response = response
if elements.find{|element| element.is_a? Smartdown::Model::Element::Question::MultipleChoice}
@question = MultipleChoice.new(elements)
elsif elements.find{|element| element.is_a? Smartdown::Model::Element::Question::Date}
@question = DateQuestion.new(elements)
end
end
end
end
end
| Make question available on previousquestion | Make question available on previousquestion
| Ruby | mit | ministryofjustice/smartdown,alphagov/smartdown,alphagov/smartdown,ministryofjustice/smartdown | ruby | ## Code Before:
module Smartdown
module Api
class PreviousQuestion
extend Forwardable
def_delegators :@question, :title, :options
attr_reader :response
def initialize(elements, response)
@response = response
if elements.find{|element| element.is_a? Smartdown::Model::Element::Question::MultipleChoice}
@question = MultipleChoice.new(elements)
elsif elements.find{|element| element.is_a? Smartdown::Model::Element::Question::Date}
@question = DateQuestion.new(elements)
end
end
end
end
end
## Instruction:
Make question available on previousquestion
## Code After:
module Smartdown
module Api
class PreviousQuestion
extend Forwardable
def_delegators :@question, :title, :options
attr_reader :response, :question
def initialize(elements, response)
@response = response
if elements.find{|element| element.is_a? Smartdown::Model::Element::Question::MultipleChoice}
@question = MultipleChoice.new(elements)
elsif elements.find{|element| element.is_a? Smartdown::Model::Element::Question::Date}
@question = DateQuestion.new(elements)
end
end
end
end
end
| module Smartdown
module Api
class PreviousQuestion
extend Forwardable
def_delegators :@question, :title, :options
- attr_reader :response
+ attr_reader :response, :question
? +++++++++++
def initialize(elements, response)
@response = response
if elements.find{|element| element.is_a? Smartdown::Model::Element::Question::MultipleChoice}
@question = MultipleChoice.new(elements)
elsif elements.find{|element| element.is_a? Smartdown::Model::Element::Question::Date}
@question = DateQuestion.new(elements)
end
end
end
end
end | 2 | 0.095238 | 1 | 1 |
23cbc09b4dd047a93e81be6185d41eb8118c5ad4 | .zuul.yaml | .zuul.yaml | - job:
name: vitrage-dashboard-integration-tests
parent: horizon-integration-tests
required-projects:
- name: openstack/horizon
- name: openstack/vitrage
- name: openstack/python-vitrageclient
- name: openstack/vitrage-dashboard
roles:
- zuul: openstack-infra/devstack
- zuul: openstack/horizon
irrelevant-files:
- ^.*\.rst$
- ^doc/.*$
- ^releasenotes/.*$
vars:
devstack_plugins:
vitrage: https://opendev.org/openstack/vitrage
vitrage-dashboard: https://opendev.org/openstack/vitrage-dashboard
devstack_services:
horizon: true
tox_envlist: integration
- project:
templates:
- horizon-nodejs10-jobs-nonvoting
- openstack-python-jobs-horizon
- openstack-python36-jobs-horizon
- openstack-python37-jobs-horizon
- publish-openstack-docs-pti
- check-requirements
- release-notes-jobs-python3
check:
jobs:
- vitrage-dashboard-integration-tests:
voting: false
| - job:
name: vitrage-dashboard-integration-tests
parent: horizon-integration-tests
required-projects:
- name: openstack/horizon
- name: openstack/vitrage
- name: openstack/python-vitrageclient
- name: openstack/vitrage-dashboard
roles:
- zuul: openstack-infra/devstack
- zuul: openstack/horizon
irrelevant-files:
- ^.*\.rst$
- ^doc/.*$
- ^releasenotes/.*$
vars:
devstack_plugins:
vitrage: https://opendev.org/openstack/vitrage
vitrage-dashboard: https://opendev.org/openstack/vitrage-dashboard
devstack_services:
horizon: true
tox_envlist: integration
- project:
templates:
- horizon-nodejs10-jobs-nonvoting
- openstack-python-jobs-horizon
- openstack-python3-train-jobs
- publish-openstack-docs-pti
- check-requirements
- release-notes-jobs-python3
check:
jobs:
- vitrage-dashboard-integration-tests:
voting: false
| Add Python 3 Train unit tests | Add Python 3 Train unit tests
See the Train python3-updates goal document for details:
https://governance.openstack.org/tc/goals/train/python3-updates.html
Change-Id: Ic509bdfc23d95d709db8b534827ab141e3d2a0b0
| YAML | apache-2.0 | openstack/vitrage-dashboard,openstack/vitrage-dashboard,openstack/vitrage-dashboard,openstack/vitrage-dashboard | yaml | ## Code Before:
- job:
name: vitrage-dashboard-integration-tests
parent: horizon-integration-tests
required-projects:
- name: openstack/horizon
- name: openstack/vitrage
- name: openstack/python-vitrageclient
- name: openstack/vitrage-dashboard
roles:
- zuul: openstack-infra/devstack
- zuul: openstack/horizon
irrelevant-files:
- ^.*\.rst$
- ^doc/.*$
- ^releasenotes/.*$
vars:
devstack_plugins:
vitrage: https://opendev.org/openstack/vitrage
vitrage-dashboard: https://opendev.org/openstack/vitrage-dashboard
devstack_services:
horizon: true
tox_envlist: integration
- project:
templates:
- horizon-nodejs10-jobs-nonvoting
- openstack-python-jobs-horizon
- openstack-python36-jobs-horizon
- openstack-python37-jobs-horizon
- publish-openstack-docs-pti
- check-requirements
- release-notes-jobs-python3
check:
jobs:
- vitrage-dashboard-integration-tests:
voting: false
## Instruction:
Add Python 3 Train unit tests
See the Train python3-updates goal document for details:
https://governance.openstack.org/tc/goals/train/python3-updates.html
Change-Id: Ic509bdfc23d95d709db8b534827ab141e3d2a0b0
## Code After:
- job:
name: vitrage-dashboard-integration-tests
parent: horizon-integration-tests
required-projects:
- name: openstack/horizon
- name: openstack/vitrage
- name: openstack/python-vitrageclient
- name: openstack/vitrage-dashboard
roles:
- zuul: openstack-infra/devstack
- zuul: openstack/horizon
irrelevant-files:
- ^.*\.rst$
- ^doc/.*$
- ^releasenotes/.*$
vars:
devstack_plugins:
vitrage: https://opendev.org/openstack/vitrage
vitrage-dashboard: https://opendev.org/openstack/vitrage-dashboard
devstack_services:
horizon: true
tox_envlist: integration
- project:
templates:
- horizon-nodejs10-jobs-nonvoting
- openstack-python-jobs-horizon
- openstack-python3-train-jobs
- publish-openstack-docs-pti
- check-requirements
- release-notes-jobs-python3
check:
jobs:
- vitrage-dashboard-integration-tests:
voting: false
| - job:
name: vitrage-dashboard-integration-tests
parent: horizon-integration-tests
required-projects:
- name: openstack/horizon
- name: openstack/vitrage
- name: openstack/python-vitrageclient
- name: openstack/vitrage-dashboard
roles:
- zuul: openstack-infra/devstack
- zuul: openstack/horizon
irrelevant-files:
- ^.*\.rst$
- ^doc/.*$
- ^releasenotes/.*$
vars:
devstack_plugins:
vitrage: https://opendev.org/openstack/vitrage
vitrage-dashboard: https://opendev.org/openstack/vitrage-dashboard
devstack_services:
horizon: true
tox_envlist: integration
- project:
templates:
- horizon-nodejs10-jobs-nonvoting
- openstack-python-jobs-horizon
- - openstack-python36-jobs-horizon
? ^ --------
+ - openstack-python3-train-jobs
? ^^^^^^
- - openstack-python37-jobs-horizon
- publish-openstack-docs-pti
- check-requirements
- release-notes-jobs-python3
check:
jobs:
- vitrage-dashboard-integration-tests:
voting: false
| 3 | 0.081081 | 1 | 2 |
62047ea08b22e5f6e957d963c982885d74f7f65a | omf/init.fish | omf/init.fish | set -gx BROWSER open
set -gx EDITOR vim
set -gx PAGER less
set -gx MANPAGER $PAGER
# fish greeting
set -gx fish_greeting ""
## ALIASES
# navigation
alias .. "cd .."
alias ... "cd ../.."
alias .... "cd ../../.."
# ls
alias l "ls -F"
alias la "ls -AF"
alias ll "ls -lF"
alias lla "ls -AlF"
alias lal lla
# apps
alias bo bower
alias bu bundler
alias g git
alias gu gulp
alias no node
alias np npm
alias r rails
## RBENV
set -gx PATH $PATH ~/.rbenv/bin ~/.rbenv/shims
rbenv rhash > /dev/null ^&1
| set -gx BROWSER open
set -gx EDITOR vim
set -gx PAGER less
set -gx MANPAGER $PAGER
# fish greeting
set -gx fish_greeting ""
## ALIASES
# navigation
alias .. "cd .."
alias ... "cd ../.."
alias .... "cd ../../.."
# ls
alias l "ls -F"
alias la "ls -AF"
alias ll "ls -lF"
alias lla "ls -AlF"
alias lal lla
# apps
alias a atom
alias bo bower
alias bu bundler
alias g git
alias gu gulp
alias r rails
## RBENV
set -gx PATH $PATH ~/.rbenv/bin ~/.rbenv/shims
rbenv rhash > /dev/null ^&1
| Add atom alias and remove npm and node | Add atom alias and remove npm and node
| fish | mit | chuckeles/dotfiles | fish | ## Code Before:
set -gx BROWSER open
set -gx EDITOR vim
set -gx PAGER less
set -gx MANPAGER $PAGER
# fish greeting
set -gx fish_greeting ""
## ALIASES
# navigation
alias .. "cd .."
alias ... "cd ../.."
alias .... "cd ../../.."
# ls
alias l "ls -F"
alias la "ls -AF"
alias ll "ls -lF"
alias lla "ls -AlF"
alias lal lla
# apps
alias bo bower
alias bu bundler
alias g git
alias gu gulp
alias no node
alias np npm
alias r rails
## RBENV
set -gx PATH $PATH ~/.rbenv/bin ~/.rbenv/shims
rbenv rhash > /dev/null ^&1
## Instruction:
Add atom alias and remove npm and node
## Code After:
set -gx BROWSER open
set -gx EDITOR vim
set -gx PAGER less
set -gx MANPAGER $PAGER
# fish greeting
set -gx fish_greeting ""
## ALIASES
# navigation
alias .. "cd .."
alias ... "cd ../.."
alias .... "cd ../../.."
# ls
alias l "ls -F"
alias la "ls -AF"
alias ll "ls -lF"
alias lla "ls -AlF"
alias lal lla
# apps
alias a atom
alias bo bower
alias bu bundler
alias g git
alias gu gulp
alias r rails
## RBENV
set -gx PATH $PATH ~/.rbenv/bin ~/.rbenv/shims
rbenv rhash > /dev/null ^&1
| set -gx BROWSER open
set -gx EDITOR vim
set -gx PAGER less
set -gx MANPAGER $PAGER
# fish greeting
set -gx fish_greeting ""
## ALIASES
# navigation
alias .. "cd .."
alias ... "cd ../.."
alias .... "cd ../../.."
# ls
alias l "ls -F"
alias la "ls -AF"
alias ll "ls -lF"
alias lla "ls -AlF"
alias lal lla
# apps
+ alias a atom
alias bo bower
alias bu bundler
alias g git
alias gu gulp
- alias no node
- alias np npm
alias r rails
## RBENV
set -gx PATH $PATH ~/.rbenv/bin ~/.rbenv/shims
rbenv rhash > /dev/null ^&1
| 3 | 0.083333 | 1 | 2 |
e8111b5f255fe140d88d0e2fe3e56eece6fff4b1 | resources/views/tea-party/datatables/club.blade.php | resources/views/tea-party/datatables/club.blade.php | @if($teaParty->club)
<a href="{{ route('clubs.show', $teaParty->club) }}">
{!! $teaParty->club->display_name !!}
</a>
@endif
| {!! $teaParty->club->display_name !!}
| Remove club link in TeaParty list to prevent misclick | Remove club link in TeaParty list to prevent misclick
| PHP | mit | HackerSir/CheckIn2017,HackerSir/CheckIn2017,HackerSir/CheckIn,HackerSir/CheckIn,HackerSir/CheckIn2017 | php | ## Code Before:
@if($teaParty->club)
<a href="{{ route('clubs.show', $teaParty->club) }}">
{!! $teaParty->club->display_name !!}
</a>
@endif
## Instruction:
Remove club link in TeaParty list to prevent misclick
## Code After:
{!! $teaParty->club->display_name !!}
| - @if($teaParty->club)
- <a href="{{ route('clubs.show', $teaParty->club) }}">
- {!! $teaParty->club->display_name !!}
? --------
+ {!! $teaParty->club->display_name !!}
- </a>
- @endif | 6 | 1.2 | 1 | 5 |
a598b6c77747dcc881b83e3c628ffde8edfd0846 | plugin/src/core/task/restart/RestartAppTask.java | plugin/src/core/task/restart/RestartAppTask.java | package core.task.restart;
import core.command.CommandExecutor;
import core.message.DeployMessage;
import core.message.RestartAppMessage;
import core.task.Task;
import core.task.TaskPurpose;
import core.telemetry.Telemetry;
public class RestartAppTask implements Task<DeployMessage, RestartAppMessage> {
private final String androidSdkPath;
private final String appPackage;
private final String mainActivity;
public RestartAppTask(String androidSdkPath, String appPackage, String mainActivity) {
this.androidSdkPath = androidSdkPath;
this.appPackage = appPackage;
this.mainActivity = mainActivity;
}
@Override
public TaskPurpose getPurpose() {
return TaskPurpose.RESTART_APPLICATION;
}
@Override
public RestartAppMessage exec(Telemetry telemetry, DeployMessage message) {
telemetry.message("Application package: %s", appPackage);
telemetry.message("Application launcher activity: %s", mainActivity);
telemetry.message("Restarting...");
String cmdForceStop = String.format("adb shell am force-stop %s", appPackage);
String cmdStart = String.format("adb shell am start -n \"%s/%s\" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER", appPackage, mainActivity);
CommandExecutor.exec(cmdForceStop);
CommandExecutor.exec(cmdStart);
return null;
}
}
| package core.task.restart;
import core.command.CommandExecutor;
import core.message.DeployMessage;
import core.message.RestartAppMessage;
import core.task.Task;
import core.task.TaskPurpose;
import core.telemetry.Telemetry;
public class RestartAppTask implements Task<DeployMessage, RestartAppMessage> {
private final String androidSdkPath;
private final String appPackage;
private final String mainActivity;
public RestartAppTask(String androidSdkPath, String appPackage, String mainActivity) {
this.androidSdkPath = androidSdkPath;
this.appPackage = appPackage;
this.mainActivity = mainActivity;
}
@Override
public TaskPurpose getPurpose() {
return TaskPurpose.RESTART_APPLICATION;
}
@Override
public RestartAppMessage exec(Telemetry telemetry, DeployMessage message) {
telemetry.message("Application package: %s", appPackage);
telemetry.message("Application launcher activity: %s", mainActivity);
telemetry.message("Restarting...");
String adbFilePath = androidSdkPath + "/platform-tools/adb";
String action = "android.intent.action.MAIN";
String category = "android.intent.category.LAUNCHER";
String cmdForceStop = String.format("%s shell am force-stop %s", adbFilePath, appPackage);
String cmdStart = String.format("%s shell am start -n \"%s/%s\" -a %s -c %s", adbFilePath, appPackage, mainActivity, action, category);
CommandExecutor.exec(cmdForceStop);
CommandExecutor.exec(cmdStart);
return null;
}
}
| Fix for running adb tool. | Fix for running adb tool.
| Java | apache-2.0 | andreyfomenkov/green-cat,andreyfomenkov/green-cat | java | ## Code Before:
package core.task.restart;
import core.command.CommandExecutor;
import core.message.DeployMessage;
import core.message.RestartAppMessage;
import core.task.Task;
import core.task.TaskPurpose;
import core.telemetry.Telemetry;
public class RestartAppTask implements Task<DeployMessage, RestartAppMessage> {
private final String androidSdkPath;
private final String appPackage;
private final String mainActivity;
public RestartAppTask(String androidSdkPath, String appPackage, String mainActivity) {
this.androidSdkPath = androidSdkPath;
this.appPackage = appPackage;
this.mainActivity = mainActivity;
}
@Override
public TaskPurpose getPurpose() {
return TaskPurpose.RESTART_APPLICATION;
}
@Override
public RestartAppMessage exec(Telemetry telemetry, DeployMessage message) {
telemetry.message("Application package: %s", appPackage);
telemetry.message("Application launcher activity: %s", mainActivity);
telemetry.message("Restarting...");
String cmdForceStop = String.format("adb shell am force-stop %s", appPackage);
String cmdStart = String.format("adb shell am start -n \"%s/%s\" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER", appPackage, mainActivity);
CommandExecutor.exec(cmdForceStop);
CommandExecutor.exec(cmdStart);
return null;
}
}
## Instruction:
Fix for running adb tool.
## Code After:
package core.task.restart;
import core.command.CommandExecutor;
import core.message.DeployMessage;
import core.message.RestartAppMessage;
import core.task.Task;
import core.task.TaskPurpose;
import core.telemetry.Telemetry;
public class RestartAppTask implements Task<DeployMessage, RestartAppMessage> {
private final String androidSdkPath;
private final String appPackage;
private final String mainActivity;
public RestartAppTask(String androidSdkPath, String appPackage, String mainActivity) {
this.androidSdkPath = androidSdkPath;
this.appPackage = appPackage;
this.mainActivity = mainActivity;
}
@Override
public TaskPurpose getPurpose() {
return TaskPurpose.RESTART_APPLICATION;
}
@Override
public RestartAppMessage exec(Telemetry telemetry, DeployMessage message) {
telemetry.message("Application package: %s", appPackage);
telemetry.message("Application launcher activity: %s", mainActivity);
telemetry.message("Restarting...");
String adbFilePath = androidSdkPath + "/platform-tools/adb";
String action = "android.intent.action.MAIN";
String category = "android.intent.category.LAUNCHER";
String cmdForceStop = String.format("%s shell am force-stop %s", adbFilePath, appPackage);
String cmdStart = String.format("%s shell am start -n \"%s/%s\" -a %s -c %s", adbFilePath, appPackage, mainActivity, action, category);
CommandExecutor.exec(cmdForceStop);
CommandExecutor.exec(cmdStart);
return null;
}
}
| package core.task.restart;
import core.command.CommandExecutor;
import core.message.DeployMessage;
import core.message.RestartAppMessage;
import core.task.Task;
import core.task.TaskPurpose;
import core.telemetry.Telemetry;
public class RestartAppTask implements Task<DeployMessage, RestartAppMessage> {
private final String androidSdkPath;
private final String appPackage;
private final String mainActivity;
public RestartAppTask(String androidSdkPath, String appPackage, String mainActivity) {
this.androidSdkPath = androidSdkPath;
this.appPackage = appPackage;
this.mainActivity = mainActivity;
}
@Override
public TaskPurpose getPurpose() {
return TaskPurpose.RESTART_APPLICATION;
}
@Override
public RestartAppMessage exec(Telemetry telemetry, DeployMessage message) {
telemetry.message("Application package: %s", appPackage);
telemetry.message("Application launcher activity: %s", mainActivity);
telemetry.message("Restarting...");
+ String adbFilePath = androidSdkPath + "/platform-tools/adb";
+ String action = "android.intent.action.MAIN";
+ String category = "android.intent.category.LAUNCHER";
- String cmdForceStop = String.format("adb shell am force-stop %s", appPackage);
? ^^^
+ String cmdForceStop = String.format("%s shell am force-stop %s", adbFilePath, appPackage);
? ^^ +++++++++++++
- String cmdStart = String.format("adb shell am start -n \"%s/%s\" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER", appPackage, mainActivity);
+ String cmdStart = String.format("%s shell am start -n \"%s/%s\" -a %s -c %s", adbFilePath, appPackage, mainActivity, action, category);
CommandExecutor.exec(cmdForceStop);
CommandExecutor.exec(cmdStart);
return null;
}
} | 7 | 0.179487 | 5 | 2 |
f74b305006c8698e50a79024919274927b67f938 | README.md | README.md |

Great scott! Delorean(tm) is the hottest time travel rideshare startup in
town. However, its engineers are suffering a serious case of the
blues with this bad boy of a monolith.
All hope is not lost, though! With the powers of Domain Driven
Design, we're going to work through this idiomatic Rails ball of mud and
push it far, far into the future.
Generated with [Raygun](https://github.com/carbonfive/raygun).
## Legacy monolith is on [`monolith`](https://github.com/andrewhao/delorean/tree/monolith) branch
[Compare the two systems!](https://github.com/andrewhao/delorean/compare/monolith...master)
## Development
### Rails-ERD
Generate an ERD diagram by running:
$ bundle exec erd
The asset is generated in the `doc/` directory.
|
Be sure to watch my Railsconf 2017 talk (https://www.youtube.com/watch?v=52qChRS4M0Y) on DDD and Rails, then come back to this repository to see some of those ideas in action.
---

Great scott! Delorean(tm) is the hottest time travel rideshare startup in
town. However, its engineers are suffering a serious case of the
blues with this bad boy of a monolith.
All hope is not lost, though! With the powers of Domain Driven
Design, we're going to work through this idiomatic Rails ball of mud and
push it far, far into the future.
Generated with [Raygun](https://github.com/carbonfive/raygun).
## Legacy monolith is on [`monolith`](https://github.com/andrewhao/delorean/tree/monolith) branch
[Compare the two systems!](https://github.com/andrewhao/delorean/compare/monolith...master)
## Development
### Rails-ERD
Generate an ERD diagram by running:
$ bundle exec erd
The asset is generated in the `doc/` directory.
| Update readme with Railsconf video | Update readme with Railsconf video | Markdown | mit | andrewhao/delorean,andrewhao/delorean,andrewhao/delorean,andrewhao/delorean | markdown | ## Code Before:

Great scott! Delorean(tm) is the hottest time travel rideshare startup in
town. However, its engineers are suffering a serious case of the
blues with this bad boy of a monolith.
All hope is not lost, though! With the powers of Domain Driven
Design, we're going to work through this idiomatic Rails ball of mud and
push it far, far into the future.
Generated with [Raygun](https://github.com/carbonfive/raygun).
## Legacy monolith is on [`monolith`](https://github.com/andrewhao/delorean/tree/monolith) branch
[Compare the two systems!](https://github.com/andrewhao/delorean/compare/monolith...master)
## Development
### Rails-ERD
Generate an ERD diagram by running:
$ bundle exec erd
The asset is generated in the `doc/` directory.
## Instruction:
Update readme with Railsconf video
## Code After:
Be sure to watch my Railsconf 2017 talk (https://www.youtube.com/watch?v=52qChRS4M0Y) on DDD and Rails, then come back to this repository to see some of those ideas in action.
---

Great scott! Delorean(tm) is the hottest time travel rideshare startup in
town. However, its engineers are suffering a serious case of the
blues with this bad boy of a monolith.
All hope is not lost, though! With the powers of Domain Driven
Design, we're going to work through this idiomatic Rails ball of mud and
push it far, far into the future.
Generated with [Raygun](https://github.com/carbonfive/raygun).
## Legacy monolith is on [`monolith`](https://github.com/andrewhao/delorean/tree/monolith) branch
[Compare the two systems!](https://github.com/andrewhao/delorean/compare/monolith...master)
## Development
### Rails-ERD
Generate an ERD diagram by running:
$ bundle exec erd
The asset is generated in the `doc/` directory.
| +
+ Be sure to watch my Railsconf 2017 talk (https://www.youtube.com/watch?v=52qChRS4M0Y) on DDD and Rails, then come back to this repository to see some of those ideas in action.
+
+ ---

Great scott! Delorean(tm) is the hottest time travel rideshare startup in
town. However, its engineers are suffering a serious case of the
blues with this bad boy of a monolith.
All hope is not lost, though! With the powers of Domain Driven
Design, we're going to work through this idiomatic Rails ball of mud and
push it far, far into the future.
Generated with [Raygun](https://github.com/carbonfive/raygun).
## Legacy monolith is on [`monolith`](https://github.com/andrewhao/delorean/tree/monolith) branch
[Compare the two systems!](https://github.com/andrewhao/delorean/compare/monolith...master)
## Development
### Rails-ERD
Generate an ERD diagram by running:
$ bundle exec erd
The asset is generated in the `doc/` directory. | 4 | 0.153846 | 4 | 0 |
daab05c323f20cc1ed8e047d1947d1fafdc45b2c | src/Support/Traits/Versionable.php | src/Support/Traits/Versionable.php | <?php
namespace ProAI\Datamapper\Support\Traits;
use ProAI\Datamapper\Annotations as ORM;
trait Versionable
{
/**
* @ORM\Column(type="integer", unsigned=true)
*/
protected $latestVersion;
/**
* @ORM\Column(type="integer", unsigned=true, primary=true)
* @ORM\Versioned
*/
protected $version;
}
| <?php
namespace ProAI\Datamapper\Support\Traits;
use ProAI\Datamapper\Annotations as ORM;
trait Versionable
{
/**
* @ORM\Column(type="integer", unsigned=true)
*/
protected $latestVersion;
/**
* @ORM\Id
* @ORM\Column(type="integer", unsigned=true, primary=true)
* @ORM\Versioned
*/
protected $version;
/**
* @return string
*/
public function latestVersion()
{
return $this->latestVersion->version();
}
/**
* @return string
*/
public function version()
{
return $this->version->version();
}
}
| Fix primary key for version column | Fix primary key for version column
| PHP | mit | ProAI/laravel-datamapper | php | ## Code Before:
<?php
namespace ProAI\Datamapper\Support\Traits;
use ProAI\Datamapper\Annotations as ORM;
trait Versionable
{
/**
* @ORM\Column(type="integer", unsigned=true)
*/
protected $latestVersion;
/**
* @ORM\Column(type="integer", unsigned=true, primary=true)
* @ORM\Versioned
*/
protected $version;
}
## Instruction:
Fix primary key for version column
## Code After:
<?php
namespace ProAI\Datamapper\Support\Traits;
use ProAI\Datamapper\Annotations as ORM;
trait Versionable
{
/**
* @ORM\Column(type="integer", unsigned=true)
*/
protected $latestVersion;
/**
* @ORM\Id
* @ORM\Column(type="integer", unsigned=true, primary=true)
* @ORM\Versioned
*/
protected $version;
/**
* @return string
*/
public function latestVersion()
{
return $this->latestVersion->version();
}
/**
* @return string
*/
public function version()
{
return $this->version->version();
}
}
| <?php
namespace ProAI\Datamapper\Support\Traits;
use ProAI\Datamapper\Annotations as ORM;
trait Versionable
{
/**
* @ORM\Column(type="integer", unsigned=true)
*/
protected $latestVersion;
/**
+ * @ORM\Id
* @ORM\Column(type="integer", unsigned=true, primary=true)
* @ORM\Versioned
*/
protected $version;
+
+ /**
+ * @return string
+ */
+ public function latestVersion()
+ {
+ return $this->latestVersion->version();
+ }
+
+ /**
+ * @return string
+ */
+ public function version()
+ {
+ return $this->version->version();
+ }
} | 17 | 0.894737 | 17 | 0 |
945041d60a1773f0dda8931d6561143eb5b9cae5 | INSTALL.txt | INSTALL.txt | Thanks for downloading django-currencies.
To install it, run the following command inside this directory:
python setup.py install
If you have the Python ``easy_install`` utility available, you can
also type the following to download and install in one step::
easy_install django-currencies
Or if you're using ``pip``::
pip install django-currencies
For install latest Git version use this command:
pip install -e git+git://github.com/Adys/django-currencies.git#egg=django-currencies
Or if you'd prefer you can simply place the included ``currencies``
directory somewhere on your Python path, or symlink to it from
somewhere on your Python path; this is useful if you're working from a
checkout.
Note that this application requires Python 2.3 or later, and a
functional installation of Django 1.0 or newer. You can obtain Python
from http://www.python.org/ and Django from
http://www.djangoproject.com/.
| Thanks for downloading django-currencies.
To install it, run the following command inside this directory:
python setup.py install
If you have the Python ``easy_install`` utility available, you can
also type the following to download and install in one step::
easy_install django-currencies
Or if you're using ``pip``::
pip install django-currencies
Or if you'd prefer you can simply place the included ``currencies``
directory somewhere on your Python path, or symlink to it from
somewhere on your Python path; this is useful if you're working from a
checkout.
Note that this application requires Python 2.3 or later, and a
functional installation of Django 1.0 or newer. You can obtain Python
from http://www.python.org/ and Django from
http://www.djangoproject.com/.
| Remove git install instructions as they don't point to the right repo | Remove git install instructions as they don't point to the right repo
| Text | bsd-3-clause | mysociety/django-currencies,marcosalcazar/django-currencies,mysociety/django-currencies,marcosalcazar/django-currencies | text | ## Code Before:
Thanks for downloading django-currencies.
To install it, run the following command inside this directory:
python setup.py install
If you have the Python ``easy_install`` utility available, you can
also type the following to download and install in one step::
easy_install django-currencies
Or if you're using ``pip``::
pip install django-currencies
For install latest Git version use this command:
pip install -e git+git://github.com/Adys/django-currencies.git#egg=django-currencies
Or if you'd prefer you can simply place the included ``currencies``
directory somewhere on your Python path, or symlink to it from
somewhere on your Python path; this is useful if you're working from a
checkout.
Note that this application requires Python 2.3 or later, and a
functional installation of Django 1.0 or newer. You can obtain Python
from http://www.python.org/ and Django from
http://www.djangoproject.com/.
## Instruction:
Remove git install instructions as they don't point to the right repo
## Code After:
Thanks for downloading django-currencies.
To install it, run the following command inside this directory:
python setup.py install
If you have the Python ``easy_install`` utility available, you can
also type the following to download and install in one step::
easy_install django-currencies
Or if you're using ``pip``::
pip install django-currencies
Or if you'd prefer you can simply place the included ``currencies``
directory somewhere on your Python path, or symlink to it from
somewhere on your Python path; this is useful if you're working from a
checkout.
Note that this application requires Python 2.3 or later, and a
functional installation of Django 1.0 or newer. You can obtain Python
from http://www.python.org/ and Django from
http://www.djangoproject.com/.
| Thanks for downloading django-currencies.
To install it, run the following command inside this directory:
python setup.py install
If you have the Python ``easy_install`` utility available, you can
also type the following to download and install in one step::
easy_install django-currencies
Or if you're using ``pip``::
pip install django-currencies
- For install latest Git version use this command:
-
- pip install -e git+git://github.com/Adys/django-currencies.git#egg=django-currencies
-
Or if you'd prefer you can simply place the included ``currencies``
directory somewhere on your Python path, or symlink to it from
somewhere on your Python path; this is useful if you're working from a
checkout.
Note that this application requires Python 2.3 or later, and a
functional installation of Django 1.0 or newer. You can obtain Python
from http://www.python.org/ and Django from
http://www.djangoproject.com/. | 4 | 0.142857 | 0 | 4 |
5415af3528b9c90508fbac0c572dd70d0947b1b7 | core/float/shared/to_i.rb | core/float/shared/to_i.rb | describe :float_to_i, shared: true do
it "returns self truncated to an Integer" do
-> { (0.0 / 0.0).send(@method) }.should raise_error(FloatDomainError)
899.2.send(@method).should eql(899)
-1.122256e-45.send(@method).should eql(0)
5_213_451.9201.send(@method).should eql(5213451)
1.233450999123389e+12.send(@method).should eql(1233450999123)
-9223372036854775808.1.send(@method).should eql(-9223372036854775808)
9223372036854775808.1.send(@method).should eql(9223372036854775808)
end
end
| describe :float_to_i, shared: true do
it "returns self truncated to an Integer" do
899.2.send(@method).should eql(899)
-1.122256e-45.send(@method).should eql(0)
5_213_451.9201.send(@method).should eql(5213451)
1.233450999123389e+12.send(@method).should eql(1233450999123)
-9223372036854775808.1.send(@method).should eql(-9223372036854775808)
9223372036854775808.1.send(@method).should eql(9223372036854775808)
end
it "raises a FloatDomainError for NaN" do
-> { nan_value.send(@method) }.should raise_error(FloatDomainError)
end
end
| Move case to its own example and use nan_value helper | Move case to its own example and use nan_value helper
| Ruby | mit | ruby/spec,ruby/spec,ruby/spec | ruby | ## Code Before:
describe :float_to_i, shared: true do
it "returns self truncated to an Integer" do
-> { (0.0 / 0.0).send(@method) }.should raise_error(FloatDomainError)
899.2.send(@method).should eql(899)
-1.122256e-45.send(@method).should eql(0)
5_213_451.9201.send(@method).should eql(5213451)
1.233450999123389e+12.send(@method).should eql(1233450999123)
-9223372036854775808.1.send(@method).should eql(-9223372036854775808)
9223372036854775808.1.send(@method).should eql(9223372036854775808)
end
end
## Instruction:
Move case to its own example and use nan_value helper
## Code After:
describe :float_to_i, shared: true do
it "returns self truncated to an Integer" do
899.2.send(@method).should eql(899)
-1.122256e-45.send(@method).should eql(0)
5_213_451.9201.send(@method).should eql(5213451)
1.233450999123389e+12.send(@method).should eql(1233450999123)
-9223372036854775808.1.send(@method).should eql(-9223372036854775808)
9223372036854775808.1.send(@method).should eql(9223372036854775808)
end
it "raises a FloatDomainError for NaN" do
-> { nan_value.send(@method) }.should raise_error(FloatDomainError)
end
end
| describe :float_to_i, shared: true do
it "returns self truncated to an Integer" do
- -> { (0.0 / 0.0).send(@method) }.should raise_error(FloatDomainError)
899.2.send(@method).should eql(899)
-1.122256e-45.send(@method).should eql(0)
5_213_451.9201.send(@method).should eql(5213451)
1.233450999123389e+12.send(@method).should eql(1233450999123)
-9223372036854775808.1.send(@method).should eql(-9223372036854775808)
9223372036854775808.1.send(@method).should eql(9223372036854775808)
end
+
+ it "raises a FloatDomainError for NaN" do
+ -> { nan_value.send(@method) }.should raise_error(FloatDomainError)
+ end
end | 5 | 0.454545 | 4 | 1 |
08247c2d4cb3cf1879b568697d7888728ebb1c3b | parse_rest/role.py | parse_rest/role.py |
from parse_rest.connection import API_ROOT
from parse_rest.datatypes import ParseResource
from parse_rest.query import QueryManager
class Role(ParseResource):
'''
A Role is like a regular Parse object (can be modified and saved) but
it requires additional methods and functionality
'''
ENDPOINT_ROOT = '/'.join([API_ROOT, 'roles'])
@property
def className(self):
return '_Role'
def __repr__(self):
return '<Role:%s (Id %s)>' % (getattr(self, 'name', None), self.objectId)
Role.Query = QueryManager(Role)
|
from parse_rest.connection import API_ROOT
from parse_rest.datatypes import ParseResource
from parse_rest.query import QueryManager
class Role(ParseResource):
'''
A Role is like a regular Parse object (can be modified and saved) but
it requires additional methods and functionality
'''
ENDPOINT_ROOT = '/'.join([API_ROOT, 'roles'])
@property
def className(self):
return '_Role'
def __repr__(self):
return '<Role:%s (Id %s)>' % (getattr(self, 'name', None), self.objectId)
def removeRelation(self, key, className, objectsId):
self.manageRelation('RemoveRelation', key, className, objectsId)
def addRelation(self, key, className, objectsId):
self.manageRelation('AddRelation', key, className, objectsId)
def manageRelation(self, action, key, className, objectsId):
objects = [{
"__type": "Pointer",
"className": className,
"objectId": objectId
} for objectId in objectsId]
payload = {
key: {
"__op": action,
"objects": objects
}
}
self.__class__.PUT(self._absolute_url, **payload)
self.__dict__[key] = ''
Role.Query = QueryManager(Role)
| Handle adding and removing relations from Roles. | Handle adding and removing relations from Roles.
This adds addRelation and removeRelation capabilities to Role, making it possible to add users to the users column and roles to the roles column in a Role object, for example. This prevents the error of Role not having the attribute addRelation or removeRelation when trying to add users or roles to a Role, which is critical for Role functionality. | Python | mit | alacroix/ParsePy,milesrichardson/ParsePy,milesrichardson/ParsePy,alacroix/ParsePy | python | ## Code Before:
from parse_rest.connection import API_ROOT
from parse_rest.datatypes import ParseResource
from parse_rest.query import QueryManager
class Role(ParseResource):
'''
A Role is like a regular Parse object (can be modified and saved) but
it requires additional methods and functionality
'''
ENDPOINT_ROOT = '/'.join([API_ROOT, 'roles'])
@property
def className(self):
return '_Role'
def __repr__(self):
return '<Role:%s (Id %s)>' % (getattr(self, 'name', None), self.objectId)
Role.Query = QueryManager(Role)
## Instruction:
Handle adding and removing relations from Roles.
This adds addRelation and removeRelation capabilities to Role, making it possible to add users to the users column and roles to the roles column in a Role object, for example. This prevents the error of Role not having the attribute addRelation or removeRelation when trying to add users or roles to a Role, which is critical for Role functionality.
## Code After:
from parse_rest.connection import API_ROOT
from parse_rest.datatypes import ParseResource
from parse_rest.query import QueryManager
class Role(ParseResource):
'''
A Role is like a regular Parse object (can be modified and saved) but
it requires additional methods and functionality
'''
ENDPOINT_ROOT = '/'.join([API_ROOT, 'roles'])
@property
def className(self):
return '_Role'
def __repr__(self):
return '<Role:%s (Id %s)>' % (getattr(self, 'name', None), self.objectId)
def removeRelation(self, key, className, objectsId):
self.manageRelation('RemoveRelation', key, className, objectsId)
def addRelation(self, key, className, objectsId):
self.manageRelation('AddRelation', key, className, objectsId)
def manageRelation(self, action, key, className, objectsId):
objects = [{
"__type": "Pointer",
"className": className,
"objectId": objectId
} for objectId in objectsId]
payload = {
key: {
"__op": action,
"objects": objects
}
}
self.__class__.PUT(self._absolute_url, **payload)
self.__dict__[key] = ''
Role.Query = QueryManager(Role)
|
from parse_rest.connection import API_ROOT
from parse_rest.datatypes import ParseResource
from parse_rest.query import QueryManager
class Role(ParseResource):
'''
A Role is like a regular Parse object (can be modified and saved) but
it requires additional methods and functionality
'''
ENDPOINT_ROOT = '/'.join([API_ROOT, 'roles'])
@property
def className(self):
return '_Role'
def __repr__(self):
return '<Role:%s (Id %s)>' % (getattr(self, 'name', None), self.objectId)
+
+ def removeRelation(self, key, className, objectsId):
+ self.manageRelation('RemoveRelation', key, className, objectsId)
+
+ def addRelation(self, key, className, objectsId):
+ self.manageRelation('AddRelation', key, className, objectsId)
+
+ def manageRelation(self, action, key, className, objectsId):
+ objects = [{
+ "__type": "Pointer",
+ "className": className,
+ "objectId": objectId
+ } for objectId in objectsId]
+
+ payload = {
+ key: {
+ "__op": action,
+ "objects": objects
+ }
+ }
+ self.__class__.PUT(self._absolute_url, **payload)
+ self.__dict__[key] = ''
Role.Query = QueryManager(Role) | 22 | 0.956522 | 22 | 0 |
2c974663728c09ed94bac1ec1de64572b70e6ee4 | .travis.yml | .travis.yml | language: python
matrix:
include:
- sudo: required
services:
- docker
env:
- RELEASE=trusty
- sudo: required
env:
- RELEASE=precise
env:
global:
- VERSION='3.6-dev'
- ALIAS='nightly'
install:
- pushd /opt/pyenv/
- sudo git checkout master
- sudo git pull
- popd
before_script:
- 'export INSTALL_DEST=${INSTALL_DEST:-/opt/python}'
- 'export LSB_RELEASE=${LSB_RELEASE:-$(lsb_release -rs)}'
- 'export PACKAGES=${PACKAGES:-pip numpy nose pytest mock wheel}'
script: ./build-python
after_success: ./create-archive
after_failure:
- cat /tmp/python-build.*.log
addons:
artifacts:
paths:
- $LSB_RELEASE/
target_paths:
- /$LSB_RELEASE
| language: python
matrix:
include:
- sudo: required
services:
- docker
env:
- RELEASE=trusty
- sudo: required
env:
- RELEASE=precise
env:
global:
- VERSION='3.6-dev'
- ALIAS='nightly'
install:
- pushd /opt/pyenv/
- sudo git checkout master
- sudo git pull
- popd
before_script:
- 'export INSTALL_DEST=${INSTALL_DEST:-/opt/python}'
- 'export LSB_RELEASE=${LSB_RELEASE:-$(lsb_release -rs || echo ${$(sw_vers -productVersion)%*.*})}'
- 'export OS_NAME=${OS_NAME:-$(lsb_release -is | tr "A-Z" "a-z" || "osx")}'
- 'export ARCH=${ARCH:-$(uname -m)}'
- 'export PACKAGES=${PACKAGES:-pip numpy nose pytest mock wheel}'
script: ./build-python
after_success: ./create-archive
after_failure:
- cat /tmp/python-build.*.log
addons:
artifacts:
paths:
- $LSB_RELEASE/
target_paths:
- /binaries/$OS_NAME/$LSB_RELEASE/$ARCH
| Set upload target with OS_NAME and ARCH | Set upload target with OS_NAME and ARCH
| YAML | mit | travis-ci/cpython-builder | yaml | ## Code Before:
language: python
matrix:
include:
- sudo: required
services:
- docker
env:
- RELEASE=trusty
- sudo: required
env:
- RELEASE=precise
env:
global:
- VERSION='3.6-dev'
- ALIAS='nightly'
install:
- pushd /opt/pyenv/
- sudo git checkout master
- sudo git pull
- popd
before_script:
- 'export INSTALL_DEST=${INSTALL_DEST:-/opt/python}'
- 'export LSB_RELEASE=${LSB_RELEASE:-$(lsb_release -rs)}'
- 'export PACKAGES=${PACKAGES:-pip numpy nose pytest mock wheel}'
script: ./build-python
after_success: ./create-archive
after_failure:
- cat /tmp/python-build.*.log
addons:
artifacts:
paths:
- $LSB_RELEASE/
target_paths:
- /$LSB_RELEASE
## Instruction:
Set upload target with OS_NAME and ARCH
## Code After:
language: python
matrix:
include:
- sudo: required
services:
- docker
env:
- RELEASE=trusty
- sudo: required
env:
- RELEASE=precise
env:
global:
- VERSION='3.6-dev'
- ALIAS='nightly'
install:
- pushd /opt/pyenv/
- sudo git checkout master
- sudo git pull
- popd
before_script:
- 'export INSTALL_DEST=${INSTALL_DEST:-/opt/python}'
- 'export LSB_RELEASE=${LSB_RELEASE:-$(lsb_release -rs || echo ${$(sw_vers -productVersion)%*.*})}'
- 'export OS_NAME=${OS_NAME:-$(lsb_release -is | tr "A-Z" "a-z" || "osx")}'
- 'export ARCH=${ARCH:-$(uname -m)}'
- 'export PACKAGES=${PACKAGES:-pip numpy nose pytest mock wheel}'
script: ./build-python
after_success: ./create-archive
after_failure:
- cat /tmp/python-build.*.log
addons:
artifacts:
paths:
- $LSB_RELEASE/
target_paths:
- /binaries/$OS_NAME/$LSB_RELEASE/$ARCH
| language: python
matrix:
include:
- sudo: required
services:
- docker
env:
- RELEASE=trusty
- sudo: required
env:
- RELEASE=precise
env:
global:
- VERSION='3.6-dev'
- ALIAS='nightly'
install:
- pushd /opt/pyenv/
- sudo git checkout master
- sudo git pull
- popd
before_script:
- 'export INSTALL_DEST=${INSTALL_DEST:-/opt/python}'
- - 'export LSB_RELEASE=${LSB_RELEASE:-$(lsb_release -rs)}'
+ - 'export LSB_RELEASE=${LSB_RELEASE:-$(lsb_release -rs || echo ${$(sw_vers -productVersion)%*.*})}'
+ - 'export OS_NAME=${OS_NAME:-$(lsb_release -is | tr "A-Z" "a-z" || "osx")}'
+ - 'export ARCH=${ARCH:-$(uname -m)}'
- 'export PACKAGES=${PACKAGES:-pip numpy nose pytest mock wheel}'
script: ./build-python
after_success: ./create-archive
after_failure:
- cat /tmp/python-build.*.log
addons:
artifacts:
paths:
- $LSB_RELEASE/
target_paths:
- - /$LSB_RELEASE
+ - /binaries/$OS_NAME/$LSB_RELEASE/$ARCH | 6 | 0.142857 | 4 | 2 |
49c5ed40c883656bbc701c4ff23ce4e690b02952 | .travis.yml | .travis.yml | language: node_js
sudo: required
dist: trusty
node_js: stable
before_install:
- export CHROME_BIN=/usr/bin/google-chrome
- sudo apt-get update
- sudo apt-get install -y libappindicator1 fonts-liberation
- wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
- sudo dpkg -i google-chrome*.deb
- "npm install -g bower"
- "bower install"
- "npm install -g web-component-tester"
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
script:
- wct
deploy:
provider: script
script: "bash ./gpages.sh cheonhyangzhang paper-typeahead-input"
on:
branch: release
| language: node_js
sudo: required
dist: trusty
node_js: stable
before_install:
- export CHROME_BIN=/usr/bin/google-chrome
- sudo apt-get update
- sudo apt-get install -y libappindicator1 fonts-liberation
- wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
- sudo dpkg -i google-chrome*.deb
- rm google-chrome-stable_current_amd64.deb
- "npm install -g bower"
- "bower install"
- "npm install -g web-component-tester"
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
script:
- wct
deploy:
provider: script
script: "bash ./gpages.sh cheonhyangzhang paper-typeahead-input"
on:
branch: release
| Fix error on deploy script. | Fix error on deploy script.
| YAML | mit | cheonhyangzhang/paper-typeahead-input,cheonhyangzhang/paper-typeahead-input | yaml | ## Code Before:
language: node_js
sudo: required
dist: trusty
node_js: stable
before_install:
- export CHROME_BIN=/usr/bin/google-chrome
- sudo apt-get update
- sudo apt-get install -y libappindicator1 fonts-liberation
- wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
- sudo dpkg -i google-chrome*.deb
- "npm install -g bower"
- "bower install"
- "npm install -g web-component-tester"
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
script:
- wct
deploy:
provider: script
script: "bash ./gpages.sh cheonhyangzhang paper-typeahead-input"
on:
branch: release
## Instruction:
Fix error on deploy script.
## Code After:
language: node_js
sudo: required
dist: trusty
node_js: stable
before_install:
- export CHROME_BIN=/usr/bin/google-chrome
- sudo apt-get update
- sudo apt-get install -y libappindicator1 fonts-liberation
- wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
- sudo dpkg -i google-chrome*.deb
- rm google-chrome-stable_current_amd64.deb
- "npm install -g bower"
- "bower install"
- "npm install -g web-component-tester"
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
script:
- wct
deploy:
provider: script
script: "bash ./gpages.sh cheonhyangzhang paper-typeahead-input"
on:
branch: release
| language: node_js
sudo: required
dist: trusty
node_js: stable
before_install:
- export CHROME_BIN=/usr/bin/google-chrome
- sudo apt-get update
- sudo apt-get install -y libappindicator1 fonts-liberation
- wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
- sudo dpkg -i google-chrome*.deb
+ - rm google-chrome-stable_current_amd64.deb
- "npm install -g bower"
- "bower install"
- "npm install -g web-component-tester"
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
script:
- wct
deploy:
provider: script
script: "bash ./gpages.sh cheonhyangzhang paper-typeahead-input"
on:
branch: release | 1 | 0.045455 | 1 | 0 |
fcd77ed52798f4adcfcfd59daddba9d36f867982 | .travis.yml | .travis.yml | language: ruby
rvm:
- 2.0.0
deploy:
provider: heroku
api_key:
secure: fl9mdZJFd/9jRgmQCSc5lq3LkaeG6x3mdXVnw2TLmshilllCYy1XndD8FzFGZQoOsnsmOLO6/qPODOwlWfQk33u3ne5DWDrOkcKM8vyV4WnP/G5o3LfLLhIS4tzYAyVOi/CM+E/iwn5ygFBLqtrBUMX9rpZpbj3atMba1kcuWx0=
app: contribution-checker
on:
branch: master
rvm: 2.0.0
| language: ruby
rvm:
- 2.0.0
deploy:
provider: heroku
api_key:
secure: OByBG19LgnEGWBniNIobw5yic0znqRgrbEVSMzkGqqmbNUuA9WyFxv+zWTDGwbGqjJct+JiBPOOAWOUwUGeU23iHU9iOyiWVbe9/OxcYgGyIUMczRR4mA6HReCvC3PSO169Z9R3JhIIcAe+zRC0urgdPBEiTkaZNXTNSyLdT8ZM=
app: contribution-checker
on:
branch: master
rvm: 2.0.0
| Update and encrypt Heroku key | Update and encrypt Heroku key
| YAML | mit | jdennes/contribution-checker-app,jdennes/contribution-checker-app,jdennes/contribution-checker-app | yaml | ## Code Before:
language: ruby
rvm:
- 2.0.0
deploy:
provider: heroku
api_key:
secure: fl9mdZJFd/9jRgmQCSc5lq3LkaeG6x3mdXVnw2TLmshilllCYy1XndD8FzFGZQoOsnsmOLO6/qPODOwlWfQk33u3ne5DWDrOkcKM8vyV4WnP/G5o3LfLLhIS4tzYAyVOi/CM+E/iwn5ygFBLqtrBUMX9rpZpbj3atMba1kcuWx0=
app: contribution-checker
on:
branch: master
rvm: 2.0.0
## Instruction:
Update and encrypt Heroku key
## Code After:
language: ruby
rvm:
- 2.0.0
deploy:
provider: heroku
api_key:
secure: OByBG19LgnEGWBniNIobw5yic0znqRgrbEVSMzkGqqmbNUuA9WyFxv+zWTDGwbGqjJct+JiBPOOAWOUwUGeU23iHU9iOyiWVbe9/OxcYgGyIUMczRR4mA6HReCvC3PSO169Z9R3JhIIcAe+zRC0urgdPBEiTkaZNXTNSyLdT8ZM=
app: contribution-checker
on:
branch: master
rvm: 2.0.0
| language: ruby
rvm:
- 2.0.0
deploy:
provider: heroku
api_key:
- secure: fl9mdZJFd/9jRgmQCSc5lq3LkaeG6x3mdXVnw2TLmshilllCYy1XndD8FzFGZQoOsnsmOLO6/qPODOwlWfQk33u3ne5DWDrOkcKM8vyV4WnP/G5o3LfLLhIS4tzYAyVOi/CM+E/iwn5ygFBLqtrBUMX9rpZpbj3atMba1kcuWx0=
+ secure: OByBG19LgnEGWBniNIobw5yic0znqRgrbEVSMzkGqqmbNUuA9WyFxv+zWTDGwbGqjJct+JiBPOOAWOUwUGeU23iHU9iOyiWVbe9/OxcYgGyIUMczRR4mA6HReCvC3PSO169Z9R3JhIIcAe+zRC0urgdPBEiTkaZNXTNSyLdT8ZM=
app: contribution-checker
on:
branch: master
rvm: 2.0.0 | 2 | 0.181818 | 1 | 1 |
b72198c1ed6d9bbcaf8ba0eb9988b7fa7e9dc66c | docs/converting-existing-cloudformation-stacks-to-iidy.md | docs/converting-existing-cloudformation-stacks-to-iidy.md |
Converting current stacks to `iidy` can be done through the `iidy
convert-stack-to-iidy` command, which accepts two parameters: the stack name of
the project that you'd want to convert and a path where the output will be
stored. For example:
```shell
iidy convert-stack-to-iidy my-cloudformation-stack-1 .
# this will generate:
# * _original-template.json
# * stack-args.yaml
# * cfn-template.yaml
```
|
Converting current stacks to `iidy` can be done through the `iidy
convert-stack-to-iidy` command, which accepts two parameters: the stack name of
the project that you'd want to convert and a path where the output will be
stored. For example:
```shell
iidy convert-stack-to-iidy my-cloudformation-stack-1 .
```
this will generate:
- `_original-template.json` or `_original-template.json`
- `stack-args.yaml`
- `cfn-template.yaml`
- `stack-policy.json` (if used)
| Clean up converting stacks docs | Clean up converting stacks docs
| Markdown | mit | unbounce/iidy,unbounce/iidy | markdown | ## Code Before:
Converting current stacks to `iidy` can be done through the `iidy
convert-stack-to-iidy` command, which accepts two parameters: the stack name of
the project that you'd want to convert and a path where the output will be
stored. For example:
```shell
iidy convert-stack-to-iidy my-cloudformation-stack-1 .
# this will generate:
# * _original-template.json
# * stack-args.yaml
# * cfn-template.yaml
```
## Instruction:
Clean up converting stacks docs
## Code After:
Converting current stacks to `iidy` can be done through the `iidy
convert-stack-to-iidy` command, which accepts two parameters: the stack name of
the project that you'd want to convert and a path where the output will be
stored. For example:
```shell
iidy convert-stack-to-iidy my-cloudformation-stack-1 .
```
this will generate:
- `_original-template.json` or `_original-template.json`
- `stack-args.yaml`
- `cfn-template.yaml`
- `stack-policy.json` (if used)
|
Converting current stacks to `iidy` can be done through the `iidy
convert-stack-to-iidy` command, which accepts two parameters: the stack name of
the project that you'd want to convert and a path where the output will be
stored. For example:
```shell
iidy convert-stack-to-iidy my-cloudformation-stack-1 .
+ ```
- # this will generate:
? --
+ this will generate:
- # * _original-template.json
+
+ - `_original-template.json` or `_original-template.json`
- # * stack-args.yaml
? ^ ^^
+ - `stack-args.yaml`
? ^ ^ +
- # * cfn-template.yaml
? ^ ^^
+ - `cfn-template.yaml`
? ^ ^ +
- ```
+ - `stack-policy.json` (if used) | 12 | 0.857143 | 7 | 5 |
fb3508a81f101d1c376deff610d7f93af5d426ba | ghpages/js/stationary-track.js | ghpages/js/stationary-track.js | var playlist = WaveformPlaylist.init({
samplesPerPixel: 3000,
mono: true,
waveHeight: 100,
container: document.getElementById("playlist"),
state: 'cursor',
waveOutlineColor: '#E0EFF1',
colors: {
waveOutlineColor: '#E0EFF1',
timeColor: 'grey',
fadeColor: 'black'
},
controls: {
show: true, //whether or not to include the track controls
width: 200 //width of controls in pixels
}
});
playlist.load([
{
"src": "media/audio/Vocals30.mp3",
"name": "Vocals",
"states": {
"shift": false
}
},
{
"src": "media/audio/BassDrums30.mp3",
"name": "Drums",
"start": 30
}
]).then(function() {
//can do stuff with the playlist.
});
| var playlist = WaveformPlaylist.init({
samplesPerPixel: 3000,
zoomLevels: [500, 1000, 3000, 5000],
mono: true,
waveHeight: 100,
container: document.getElementById("playlist"),
state: 'cursor',
waveOutlineColor: '#E0EFF1',
colors: {
waveOutlineColor: '#E0EFF1',
timeColor: 'grey',
fadeColor: 'black'
},
controls: {
show: true, //whether or not to include the track controls
width: 200 //width of controls in pixels
}
});
playlist.load([
{
"src": "media/audio/Vocals30.mp3",
"name": "Vocals",
"states": {
"shift": false
}
},
{
"src": "media/audio/BassDrums30.mp3",
"name": "Drums",
"start": 30
}
]).then(function() {
//can do stuff with the playlist.
});
| Fix zoom levels for example. | Fix zoom levels for example.
| JavaScript | mit | naomiaro/waveform-playlist,naomiaro/waveform-playlist | javascript | ## Code Before:
var playlist = WaveformPlaylist.init({
samplesPerPixel: 3000,
mono: true,
waveHeight: 100,
container: document.getElementById("playlist"),
state: 'cursor',
waveOutlineColor: '#E0EFF1',
colors: {
waveOutlineColor: '#E0EFF1',
timeColor: 'grey',
fadeColor: 'black'
},
controls: {
show: true, //whether or not to include the track controls
width: 200 //width of controls in pixels
}
});
playlist.load([
{
"src": "media/audio/Vocals30.mp3",
"name": "Vocals",
"states": {
"shift": false
}
},
{
"src": "media/audio/BassDrums30.mp3",
"name": "Drums",
"start": 30
}
]).then(function() {
//can do stuff with the playlist.
});
## Instruction:
Fix zoom levels for example.
## Code After:
var playlist = WaveformPlaylist.init({
samplesPerPixel: 3000,
zoomLevels: [500, 1000, 3000, 5000],
mono: true,
waveHeight: 100,
container: document.getElementById("playlist"),
state: 'cursor',
waveOutlineColor: '#E0EFF1',
colors: {
waveOutlineColor: '#E0EFF1',
timeColor: 'grey',
fadeColor: 'black'
},
controls: {
show: true, //whether or not to include the track controls
width: 200 //width of controls in pixels
}
});
playlist.load([
{
"src": "media/audio/Vocals30.mp3",
"name": "Vocals",
"states": {
"shift": false
}
},
{
"src": "media/audio/BassDrums30.mp3",
"name": "Drums",
"start": 30
}
]).then(function() {
//can do stuff with the playlist.
});
| var playlist = WaveformPlaylist.init({
samplesPerPixel: 3000,
+ zoomLevels: [500, 1000, 3000, 5000],
mono: true,
waveHeight: 100,
container: document.getElementById("playlist"),
state: 'cursor',
waveOutlineColor: '#E0EFF1',
colors: {
waveOutlineColor: '#E0EFF1',
timeColor: 'grey',
fadeColor: 'black'
},
controls: {
show: true, //whether or not to include the track controls
width: 200 //width of controls in pixels
}
});
playlist.load([
{
"src": "media/audio/Vocals30.mp3",
"name": "Vocals",
"states": {
"shift": false
}
},
{
"src": "media/audio/BassDrums30.mp3",
"name": "Drums",
"start": 30
}
]).then(function() {
//can do stuff with the playlist.
}); | 1 | 0.029412 | 1 | 0 |
d12f99258248b06ec3b614e5860c6ad4fdd379a3 | app/controllers/mail_conversations_controller.rb | app/controllers/mail_conversations_controller.rb | class MailConversationsController < ApplicationController
def index
@mailbox_conversations = current_user.mailbox.conversations
end
def new
@recipients = Guide.where.not("id = ?", current_user.id)
end
def create
recipient = Guide.find(params[:guide_id])
receipt = current_user.send_message(recipient, params[:body], params[:subject])
if params[:body] == "" && params[:subject] == ""
@errors = ["Your message is missing a subject!", "Your message is missing a body!" ]
render 'new'
elsif params[:body] == ""
@errors = ["Your message is missing a body!"]
render 'new'
elsif params[:subject] == ""
@errors = ["Your message is missing a subject!"]
render 'new'
else
redirect_to mail_conversation_path(receipt.conversation)
end
end
def show
@mailbox_conversation = current_user.mailbox.conversations.find(params[:id])
end
end
| class MailConversationsController < ApplicationController
def index
@mailbox_conversations = current_user.mailbox.conversations
end
def inbox
end
def outbox
end
def trashcan
end
def new
@recipients = Guide.where.not("id = ?", current_user.id)
end
def create
recipient = Guide.find(params[:guide_id])
receipt = current_user.send_message(recipient, params[:body], params[:subject])
if params[:body] == "" && params[:subject] == ""
@errors = ["Your message is missing a subject!", "Your message is missing a body!" ]
render 'new'
elsif params[:body] == ""
@errors = ["Your message is missing a body!"]
render 'new'
elsif params[:subject] == ""
@errors = ["Your message is missing a subject!"]
render 'new'
else
redirect_to mail_conversation_path(receipt.conversation)
end
end
def show
@mailbox_conversation = current_user.mailbox.conversations.find(params[:id])
end
end
| Create inbox,outbox, and trashcan routes. | Create inbox,outbox, and trashcan routes.
| Ruby | mit | erinc35/GuideMe,erinc35/GuideMe,erinc35/GuideMe | ruby | ## Code Before:
class MailConversationsController < ApplicationController
def index
@mailbox_conversations = current_user.mailbox.conversations
end
def new
@recipients = Guide.where.not("id = ?", current_user.id)
end
def create
recipient = Guide.find(params[:guide_id])
receipt = current_user.send_message(recipient, params[:body], params[:subject])
if params[:body] == "" && params[:subject] == ""
@errors = ["Your message is missing a subject!", "Your message is missing a body!" ]
render 'new'
elsif params[:body] == ""
@errors = ["Your message is missing a body!"]
render 'new'
elsif params[:subject] == ""
@errors = ["Your message is missing a subject!"]
render 'new'
else
redirect_to mail_conversation_path(receipt.conversation)
end
end
def show
@mailbox_conversation = current_user.mailbox.conversations.find(params[:id])
end
end
## Instruction:
Create inbox,outbox, and trashcan routes.
## Code After:
class MailConversationsController < ApplicationController
def index
@mailbox_conversations = current_user.mailbox.conversations
end
def inbox
end
def outbox
end
def trashcan
end
def new
@recipients = Guide.where.not("id = ?", current_user.id)
end
def create
recipient = Guide.find(params[:guide_id])
receipt = current_user.send_message(recipient, params[:body], params[:subject])
if params[:body] == "" && params[:subject] == ""
@errors = ["Your message is missing a subject!", "Your message is missing a body!" ]
render 'new'
elsif params[:body] == ""
@errors = ["Your message is missing a body!"]
render 'new'
elsif params[:subject] == ""
@errors = ["Your message is missing a subject!"]
render 'new'
else
redirect_to mail_conversation_path(receipt.conversation)
end
end
def show
@mailbox_conversation = current_user.mailbox.conversations.find(params[:id])
end
end
| class MailConversationsController < ApplicationController
def index
@mailbox_conversations = current_user.mailbox.conversations
+ end
+
+ def inbox
+ end
+
+ def outbox
+ end
+
+ def trashcan
end
def new
@recipients = Guide.where.not("id = ?", current_user.id)
end
def create
recipient = Guide.find(params[:guide_id])
receipt = current_user.send_message(recipient, params[:body], params[:subject])
if params[:body] == "" && params[:subject] == ""
@errors = ["Your message is missing a subject!", "Your message is missing a body!" ]
render 'new'
elsif params[:body] == ""
@errors = ["Your message is missing a body!"]
render 'new'
elsif params[:subject] == ""
@errors = ["Your message is missing a subject!"]
render 'new'
else
redirect_to mail_conversation_path(receipt.conversation)
end
end
def show
@mailbox_conversation = current_user.mailbox.conversations.find(params[:id])
end
end | 9 | 0.28125 | 9 | 0 |
44c9b29102fb97a631443e38599facb2f305d238 | Readme.md | Readme.md |
Provides a high-level table storage service abstraction similar to Amazon
DynamoDB or Google DataStore, with a Cassandra backend. See [the design
docs](https://github.com/gwicke/restbase-cassandra/tree/master/doc) for
details and background.
This is the default table storage backend for
[RESTBase](https://github.com/gwicke/restbase), and automatically installed as
an npm module dependency (`restbase-cassandra`). See the install instructions
there.
## Status
Prototype, not quite ready for production.
Features:
- basic table storage service with REST interface, backed by Cassandra
- multi-tenant design: domain creation, prepared for per-domain ACLs
- table creation with declarative JSON schemas
- secondary index creation and basic maintenance
- data insertion and retrieval by primary key, including range queries
### Next steps
- More refined secondary index implementation
- range queries on secondary indexes
- Refine HTTP interface & response formats, especially paging
- Authentication (OAuth2 / JWT / JWS) and ACLs
- [Transactions](https://github.com/gwicke/restbase-cassandra/blob/master/doc/Transactions.md): light-weight CAS and 2PC
- Get ready for production: robustness, performance, logging
## Contributors
* Gabriel Wicke <gwicke@wikimedia.org>
* Hardik Juneja <hardikjuneja.hj@gmail.com>
|
Provides a high-level table storage service abstraction similar to Amazon
DynamoDB or Google DataStore, with a Cassandra backend. See [the design
docs](https://github.com/gwicke/restbase-cassandra/tree/master/doc) for
details and background.
This is the default table storage backend for
[RESTBase](https://github.com/gwicke/restbase), and automatically installed as
an npm module dependency (`restbase-cassandra`). See the install instructions
there.
## Status
Prototype, not quite ready for production.
Features:
- basic table storage service with REST interface, backed by Cassandra
- multi-tenant design: domain creation, prepared for per-domain ACLs
- table creation with declarative JSON schemas
- secondary index creation and basic maintenance
- data insertion and retrieval by primary key, including range queries
### Next steps
- More refined [secondary
index](https://github.com/gwicke/restbase-cassandra/blob/master/doc/SecondaryIndexes.md)
implementation
- range queries on secondary indexes
- Refine HTTP interface & response formats, especially paging
- Authentication (OAuth2 / JWT / JWS / auth service callbacks) and ACLs
- [Transactions](https://github.com/gwicke/restbase-cassandra/blob/master/doc/Transactions.md):
light-weight CAS and 2PC
- Get ready for production: robustness, performance, logging
- Basic schema evolution support
## Contributors
* Gabriel Wicke <gwicke@wikimedia.org>
* Hardik Juneja <hardikjuneja.hj@gmail.com>
| Tweak next steps in README some more | Tweak next steps in README some more
| Markdown | apache-2.0 | gwicke/restbase-mod-table-cassandra,eevans/restbase-mod-table-cassandra | markdown | ## Code Before:
Provides a high-level table storage service abstraction similar to Amazon
DynamoDB or Google DataStore, with a Cassandra backend. See [the design
docs](https://github.com/gwicke/restbase-cassandra/tree/master/doc) for
details and background.
This is the default table storage backend for
[RESTBase](https://github.com/gwicke/restbase), and automatically installed as
an npm module dependency (`restbase-cassandra`). See the install instructions
there.
## Status
Prototype, not quite ready for production.
Features:
- basic table storage service with REST interface, backed by Cassandra
- multi-tenant design: domain creation, prepared for per-domain ACLs
- table creation with declarative JSON schemas
- secondary index creation and basic maintenance
- data insertion and retrieval by primary key, including range queries
### Next steps
- More refined secondary index implementation
- range queries on secondary indexes
- Refine HTTP interface & response formats, especially paging
- Authentication (OAuth2 / JWT / JWS) and ACLs
- [Transactions](https://github.com/gwicke/restbase-cassandra/blob/master/doc/Transactions.md): light-weight CAS and 2PC
- Get ready for production: robustness, performance, logging
## Contributors
* Gabriel Wicke <gwicke@wikimedia.org>
* Hardik Juneja <hardikjuneja.hj@gmail.com>
## Instruction:
Tweak next steps in README some more
## Code After:
Provides a high-level table storage service abstraction similar to Amazon
DynamoDB or Google DataStore, with a Cassandra backend. See [the design
docs](https://github.com/gwicke/restbase-cassandra/tree/master/doc) for
details and background.
This is the default table storage backend for
[RESTBase](https://github.com/gwicke/restbase), and automatically installed as
an npm module dependency (`restbase-cassandra`). See the install instructions
there.
## Status
Prototype, not quite ready for production.
Features:
- basic table storage service with REST interface, backed by Cassandra
- multi-tenant design: domain creation, prepared for per-domain ACLs
- table creation with declarative JSON schemas
- secondary index creation and basic maintenance
- data insertion and retrieval by primary key, including range queries
### Next steps
- More refined [secondary
index](https://github.com/gwicke/restbase-cassandra/blob/master/doc/SecondaryIndexes.md)
implementation
- range queries on secondary indexes
- Refine HTTP interface & response formats, especially paging
- Authentication (OAuth2 / JWT / JWS / auth service callbacks) and ACLs
- [Transactions](https://github.com/gwicke/restbase-cassandra/blob/master/doc/Transactions.md):
light-weight CAS and 2PC
- Get ready for production: robustness, performance, logging
- Basic schema evolution support
## Contributors
* Gabriel Wicke <gwicke@wikimedia.org>
* Hardik Juneja <hardikjuneja.hj@gmail.com>
|
Provides a high-level table storage service abstraction similar to Amazon
DynamoDB or Google DataStore, with a Cassandra backend. See [the design
docs](https://github.com/gwicke/restbase-cassandra/tree/master/doc) for
details and background.
This is the default table storage backend for
[RESTBase](https://github.com/gwicke/restbase), and automatically installed as
an npm module dependency (`restbase-cassandra`). See the install instructions
there.
## Status
Prototype, not quite ready for production.
Features:
- basic table storage service with REST interface, backed by Cassandra
- multi-tenant design: domain creation, prepared for per-domain ACLs
- table creation with declarative JSON schemas
- secondary index creation and basic maintenance
- data insertion and retrieval by primary key, including range queries
### Next steps
- - More refined secondary index implementation
+ - More refined [secondary
+ index](https://github.com/gwicke/restbase-cassandra/blob/master/doc/SecondaryIndexes.md)
+ implementation
- range queries on secondary indexes
- Refine HTTP interface & response formats, especially paging
- - Authentication (OAuth2 / JWT / JWS) and ACLs
+ - Authentication (OAuth2 / JWT / JWS / auth service callbacks) and ACLs
? +++++++++++++++++++++++++
- - [Transactions](https://github.com/gwicke/restbase-cassandra/blob/master/doc/Transactions.md): light-weight CAS and 2PC
? -------------------------
+ - [Transactions](https://github.com/gwicke/restbase-cassandra/blob/master/doc/Transactions.md):
+ light-weight CAS and 2PC
- Get ready for production: robustness, performance, logging
+ - Basic schema evolution support
## Contributors
* Gabriel Wicke <gwicke@wikimedia.org>
* Hardik Juneja <hardikjuneja.hj@gmail.com> | 10 | 0.3125 | 7 | 3 |
4c3e64055ee596568ae32c7f36737889d1dc09a3 | README.md | README.md | This project provides utility classes to work with the [Eclipse BPEL Data Model](http://www.eclipse.org/bpel/developers/model.php) of the [Eclipse BPEL Project](http://www.eclipse.org/bpel/).
| This project provides utility classes to work with the [Eclipse BPEL Data Model](http://www.eclipse.org/bpel/developers/model.php) of the [Eclipse BPEL Project](http://www.eclipse.org/bpel/).
Example helper methods:
- `dumpSet` pretty prints a set of ExtensibleElements (activity and process elements)
- `dumpEE` pretty prints an ExtensibleElement
| Add hintso on available methods | Add hintso on available methods | Markdown | apache-2.0 | IAAS/BPEL-model-utilities | markdown | ## Code Before:
This project provides utility classes to work with the [Eclipse BPEL Data Model](http://www.eclipse.org/bpel/developers/model.php) of the [Eclipse BPEL Project](http://www.eclipse.org/bpel/).
## Instruction:
Add hintso on available methods
## Code After:
This project provides utility classes to work with the [Eclipse BPEL Data Model](http://www.eclipse.org/bpel/developers/model.php) of the [Eclipse BPEL Project](http://www.eclipse.org/bpel/).
Example helper methods:
- `dumpSet` pretty prints a set of ExtensibleElements (activity and process elements)
- `dumpEE` pretty prints an ExtensibleElement
| This project provides utility classes to work with the [Eclipse BPEL Data Model](http://www.eclipse.org/bpel/developers/model.php) of the [Eclipse BPEL Project](http://www.eclipse.org/bpel/).
+
+ Example helper methods:
+
+ - `dumpSet` pretty prints a set of ExtensibleElements (activity and process elements)
+ - `dumpEE` pretty prints an ExtensibleElement | 5 | 5 | 5 | 0 |
f9ef79d338af92ece43faa4380d9b6713f00159c | .travis.yml | .travis.yml | sudo: false
language: node_js
install:
- npm install
before_script:
node_js:
- "6"
- "node"
notifications:
email: false
| sudo: false
language: node_js
install:
- npm install
before_script:
node_js:
- "6"
- "7"
- "node"
notifications:
email: false
| Enable node v7 for TravisCI | Enable node v7 for TravisCI
Node v7 is not LTS version, so we would not like to support it
positively and we efforts to move to v8 from v7.
However, our internal repositories still use v7.
We enable v7 in TravisCI for them.
| YAML | mit | voyagegroup/tslint-config-fluct | yaml | ## Code Before:
sudo: false
language: node_js
install:
- npm install
before_script:
node_js:
- "6"
- "node"
notifications:
email: false
## Instruction:
Enable node v7 for TravisCI
Node v7 is not LTS version, so we would not like to support it
positively and we efforts to move to v8 from v7.
However, our internal repositories still use v7.
We enable v7 in TravisCI for them.
## Code After:
sudo: false
language: node_js
install:
- npm install
before_script:
node_js:
- "6"
- "7"
- "node"
notifications:
email: false
| sudo: false
language: node_js
install:
- npm install
before_script:
node_js:
- "6"
+ - "7"
- "node"
notifications:
email: false | 1 | 0.066667 | 1 | 0 |
345b836eacfc73dc026215e37f45fd7457d81650 | spec/pronto/message_spec.rb | spec/pronto/message_spec.rb | require 'spec_helper'
module Pronto
describe Message do
describe '.new' do
subject { Message.new(path, line, level, msg, '8cda581') }
let(:path) { 'README.md' }
let(:line) { Rugged::Diff::Line.new }
let(:msg) { 'message' }
Message::LEVELS.each do |message_level|
context "set log level to #{message_level}" do
let(:level) { message_level }
its(:level) { should == message_level }
end
end
end
end
end
| require 'spec_helper'
module Pronto
describe Message do
let(:message) { Message.new(path, line, level, msg, '8cda581') }
let(:path) { 'README.md' }
let(:line) { Git::Line.new }
let(:msg) { 'message' }
let(:level) { :warning }
describe '.new' do
subject { message }
Message::LEVELS.each do |message_level|
context "set log level to #{message_level}" do
let(:level) { message_level }
its(:level) { should == message_level }
end
end
context 'bad level' do
let(:level) { :random }
specify do
lambda { subject }.should raise_error
end
end
end
describe '#full_path' do
subject { message.full_path }
context 'line is nil' do
let(:line) { nil }
it { should be_nil }
end
end
describe '#repo' do
subject { message.repo }
context 'line is nil' do
let(:line) { nil }
it { should be_nil }
end
end
end
end
| Add more specs for Pronto::Message | Add more specs for Pronto::Message
| Ruby | mit | prontolabs/pronto,mvz/pronto,jhass/pronto,aergonaut/pronto,gussan/pronto,treble37/pronto,Zauberstuhl/pronto,HaiTo/pronto,mmozuras/pronto | ruby | ## Code Before:
require 'spec_helper'
module Pronto
describe Message do
describe '.new' do
subject { Message.new(path, line, level, msg, '8cda581') }
let(:path) { 'README.md' }
let(:line) { Rugged::Diff::Line.new }
let(:msg) { 'message' }
Message::LEVELS.each do |message_level|
context "set log level to #{message_level}" do
let(:level) { message_level }
its(:level) { should == message_level }
end
end
end
end
end
## Instruction:
Add more specs for Pronto::Message
## Code After:
require 'spec_helper'
module Pronto
describe Message do
let(:message) { Message.new(path, line, level, msg, '8cda581') }
let(:path) { 'README.md' }
let(:line) { Git::Line.new }
let(:msg) { 'message' }
let(:level) { :warning }
describe '.new' do
subject { message }
Message::LEVELS.each do |message_level|
context "set log level to #{message_level}" do
let(:level) { message_level }
its(:level) { should == message_level }
end
end
context 'bad level' do
let(:level) { :random }
specify do
lambda { subject }.should raise_error
end
end
end
describe '#full_path' do
subject { message.full_path }
context 'line is nil' do
let(:line) { nil }
it { should be_nil }
end
end
describe '#repo' do
subject { message.repo }
context 'line is nil' do
let(:line) { nil }
it { should be_nil }
end
end
end
end
| require 'spec_helper'
module Pronto
describe Message do
+ let(:message) { Message.new(path, line, level, msg, '8cda581') }
+
+ let(:path) { 'README.md' }
+ let(:line) { Git::Line.new }
+ let(:msg) { 'message' }
+ let(:level) { :warning }
+
describe '.new' do
+ subject { message }
- subject { Message.new(path, line, level, msg, '8cda581') }
- let(:path) { 'README.md' }
- let(:line) { Rugged::Diff::Line.new }
- let(:msg) { 'message' }
Message::LEVELS.each do |message_level|
context "set log level to #{message_level}" do
let(:level) { message_level }
its(:level) { should == message_level }
end
end
+
+ context 'bad level' do
+ let(:level) { :random }
+ specify do
+ lambda { subject }.should raise_error
+ end
+ end
+ end
+
+ describe '#full_path' do
+ subject { message.full_path }
+
+ context 'line is nil' do
+ let(:line) { nil }
+ it { should be_nil }
+ end
+ end
+
+ describe '#repo' do
+ subject { message.repo }
+
+ context 'line is nil' do
+ let(:line) { nil }
+ it { should be_nil }
+ end
end
end
end | 37 | 1.947368 | 33 | 4 |
41c31ca694b54d6cf6302613d2f9a597f6357e33 | src/scripts/ci/setup_appveyor.bat | src/scripts/ci/setup_appveyor.bat |
echo Current build setup MSVS="%MSVS%" PLATFORM="%PLATFORM%" TARGET="%TARGET%"
if %MSVS% == 2013 call "%ProgramFiles(x86)%\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" %PLATFORM%
if %MSVS% == 2015 call "%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %PLATFORM%
if %MSVS% == 2017 call "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" %PLATFORM%
rem check compiler version
cl
appveyor DownloadFile http://download.qt.io/official_releases/jom/jom.zip -FileName jom.zip
7z e jom.zip
|
echo Current build setup MSVS="%MSVS%" PLATFORM="%PLATFORM%" TARGET="%TARGET%"
if %MSVS% == 2013 call "%ProgramFiles(x86)%\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" %PLATFORM%
if %MSVS% == 2015 call "%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %PLATFORM%
if %MSVS% == 2017 call "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" %PLATFORM%
rem check compiler version
cl
git clone --depth 1 https://github.com/randombit/botan-ci-tools
7z e botan-ci-tools/jom_1_1_2.zip
| Use jom via botan-ci-tools repo | Use jom via botan-ci-tools repo
download.qt.io seems to be down ...
| Batchfile | bsd-2-clause | Rohde-Schwarz-Cybersecurity/botan,Rohde-Schwarz-Cybersecurity/botan,Rohde-Schwarz-Cybersecurity/botan,Rohde-Schwarz-Cybersecurity/botan,randombit/botan,webmaster128/botan,randombit/botan,Rohde-Schwarz-Cybersecurity/botan,webmaster128/botan,randombit/botan,webmaster128/botan,webmaster128/botan,webmaster128/botan,randombit/botan,randombit/botan,Rohde-Schwarz-Cybersecurity/botan | batchfile | ## Code Before:
echo Current build setup MSVS="%MSVS%" PLATFORM="%PLATFORM%" TARGET="%TARGET%"
if %MSVS% == 2013 call "%ProgramFiles(x86)%\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" %PLATFORM%
if %MSVS% == 2015 call "%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %PLATFORM%
if %MSVS% == 2017 call "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" %PLATFORM%
rem check compiler version
cl
appveyor DownloadFile http://download.qt.io/official_releases/jom/jom.zip -FileName jom.zip
7z e jom.zip
## Instruction:
Use jom via botan-ci-tools repo
download.qt.io seems to be down ...
## Code After:
echo Current build setup MSVS="%MSVS%" PLATFORM="%PLATFORM%" TARGET="%TARGET%"
if %MSVS% == 2013 call "%ProgramFiles(x86)%\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" %PLATFORM%
if %MSVS% == 2015 call "%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %PLATFORM%
if %MSVS% == 2017 call "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" %PLATFORM%
rem check compiler version
cl
git clone --depth 1 https://github.com/randombit/botan-ci-tools
7z e botan-ci-tools/jom_1_1_2.zip
|
echo Current build setup MSVS="%MSVS%" PLATFORM="%PLATFORM%" TARGET="%TARGET%"
if %MSVS% == 2013 call "%ProgramFiles(x86)%\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" %PLATFORM%
if %MSVS% == 2015 call "%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %PLATFORM%
if %MSVS% == 2017 call "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" %PLATFORM%
rem check compiler version
cl
- appveyor DownloadFile http://download.qt.io/official_releases/jom/jom.zip -FileName jom.zip
- 7z e jom.zip
+ git clone --depth 1 https://github.com/randombit/botan-ci-tools
+ 7z e botan-ci-tools/jom_1_1_2.zip | 4 | 0.333333 | 2 | 2 |
a1deb842c5843bb86d05deece5ef7577f5905cd2 | Zero/Sources/Services/ServiceProvider.swift | Zero/Sources/Services/ServiceProvider.swift | //
// ServiceProvider.swift
// Zero
//
// Created by Jairo Eli de Leon on 5/8/17.
// Copyright © 2017 Jairo Eli de León. All rights reserved.
//
protocol ServiceProviderType: class {}
final class ServiceProvider: ServiceProviderType {}
| //
// ServiceProvider.swift
// Zero
//
// Created by Jairo Eli de Leon on 5/8/17.
// Copyright © 2017 Jairo Eli de León. All rights reserved.
//
protocol ServiceProviderType: class {
var userDefaultsService: UserDefaultsServiceType { get }
var taskService: TaskServiceType { get }
}
final class ServiceProvider: ServiceProviderType {
lazy var userDefaultsService: UserDefaultsServiceType = UserDefaultsService(provider: self)
lazy var taskService: TaskServiceType = TaskService(provider: self)
}
| Add Task and UserDefaults to Service Provider | Add Task and UserDefaults to Service Provider
| Swift | mit | jairoeli/Habit,jairoeli/Habit | swift | ## Code Before:
//
// ServiceProvider.swift
// Zero
//
// Created by Jairo Eli de Leon on 5/8/17.
// Copyright © 2017 Jairo Eli de León. All rights reserved.
//
protocol ServiceProviderType: class {}
final class ServiceProvider: ServiceProviderType {}
## Instruction:
Add Task and UserDefaults to Service Provider
## Code After:
//
// ServiceProvider.swift
// Zero
//
// Created by Jairo Eli de Leon on 5/8/17.
// Copyright © 2017 Jairo Eli de León. All rights reserved.
//
protocol ServiceProviderType: class {
var userDefaultsService: UserDefaultsServiceType { get }
var taskService: TaskServiceType { get }
}
final class ServiceProvider: ServiceProviderType {
lazy var userDefaultsService: UserDefaultsServiceType = UserDefaultsService(provider: self)
lazy var taskService: TaskServiceType = TaskService(provider: self)
}
| //
// ServiceProvider.swift
// Zero
//
// Created by Jairo Eli de Leon on 5/8/17.
// Copyright © 2017 Jairo Eli de León. All rights reserved.
//
- protocol ServiceProviderType: class {}
? -
+ protocol ServiceProviderType: class {
+ var userDefaultsService: UserDefaultsServiceType { get }
+ var taskService: TaskServiceType { get }
+ }
- final class ServiceProvider: ServiceProviderType {}
? -
+ final class ServiceProvider: ServiceProviderType {
+ lazy var userDefaultsService: UserDefaultsServiceType = UserDefaultsService(provider: self)
+ lazy var taskService: TaskServiceType = TaskService(provider: self)
+ } | 10 | 0.909091 | 8 | 2 |
49c491ac9e92afd12d610f3f57409c3dd724b860 | lib/installation_ex.js | lib/installation_ex.js | "use strict"
var NCMBInstallationEx = module.exports = (function() {
var validKeys = [
'applicationName'
, 'appVersion'
, 'badge'
, 'channels'
, 'deviceToken'
, 'deviceType'
, 'sdkVersion'
, 'timeZone'
, 'acl'
];
function NCMBInstallationEx(ncmb) {
this.__proto__.ncmb = ncmb;
this.__proto__.className = '/installations';
}
NCMBInstallationEx.prototype.register = function(attrs, callback) {
var ncmb = this.ncmb;
var dataToPost = {};
Object.keys(attrs).forEach(function(attr) {
if (validKeys.indexOf(attr) != -1) {
dataToPost[attr] = attrs[attr];
}
});
return ncmb.request({
path: "/" + ncmb.version + this.className,
method: "POST",
data: dataToPost
}).then(function(data){
var obj = null;
try {
obj = JSON.parse(data);
} catch(err) {
throw err;
}
if (callback) {
return callback(null, this);
}
return this;
}.bind(this)).catch(function(err){
if(callback) return callback(err, null);
throw err;
});
};
return NCMBInstallationEx;
})();
| "use strict"
var NCMBInstallationEx = module.exports = (function() {
var invalidKeys = [
'objectId'
, 'createDate'
, 'updateDate'
];
function NCMBInstallationEx(ncmb) {
this.__proto__.ncmb = ncmb;
this.__proto__.className = '/installations';
}
NCMBInstallationEx.prototype.register = function(attrs, callback) {
var ncmb = this.ncmb;
var dataToPost = {};
Object.keys(attrs).forEach(function(attr) {
if (invalidKeys.indexOf(attr) == -1) {
dataToPost[attr] = attrs[attr];
}
});
return ncmb.request({
path: "/" + ncmb.version + this.className,
method: "POST",
data: dataToPost
}).then(function(data){
var obj = null;
try {
obj = JSON.parse(data);
} catch(err) {
throw err;
}
if (callback) {
return callback(null, this);
}
return this;
}.bind(this)).catch(function(err){
if(callback) return callback(err, null);
throw err;
});
};
return NCMBInstallationEx;
})();
| Change to invalid keys policy. | Change to invalid keys policy.
| JavaScript | apache-2.0 | NCMBMania/parse2ncmb,koyhoge/parse2ncmb | javascript | ## Code Before:
"use strict"
var NCMBInstallationEx = module.exports = (function() {
var validKeys = [
'applicationName'
, 'appVersion'
, 'badge'
, 'channels'
, 'deviceToken'
, 'deviceType'
, 'sdkVersion'
, 'timeZone'
, 'acl'
];
function NCMBInstallationEx(ncmb) {
this.__proto__.ncmb = ncmb;
this.__proto__.className = '/installations';
}
NCMBInstallationEx.prototype.register = function(attrs, callback) {
var ncmb = this.ncmb;
var dataToPost = {};
Object.keys(attrs).forEach(function(attr) {
if (validKeys.indexOf(attr) != -1) {
dataToPost[attr] = attrs[attr];
}
});
return ncmb.request({
path: "/" + ncmb.version + this.className,
method: "POST",
data: dataToPost
}).then(function(data){
var obj = null;
try {
obj = JSON.parse(data);
} catch(err) {
throw err;
}
if (callback) {
return callback(null, this);
}
return this;
}.bind(this)).catch(function(err){
if(callback) return callback(err, null);
throw err;
});
};
return NCMBInstallationEx;
})();
## Instruction:
Change to invalid keys policy.
## Code After:
"use strict"
var NCMBInstallationEx = module.exports = (function() {
var invalidKeys = [
'objectId'
, 'createDate'
, 'updateDate'
];
function NCMBInstallationEx(ncmb) {
this.__proto__.ncmb = ncmb;
this.__proto__.className = '/installations';
}
NCMBInstallationEx.prototype.register = function(attrs, callback) {
var ncmb = this.ncmb;
var dataToPost = {};
Object.keys(attrs).forEach(function(attr) {
if (invalidKeys.indexOf(attr) == -1) {
dataToPost[attr] = attrs[attr];
}
});
return ncmb.request({
path: "/" + ncmb.version + this.className,
method: "POST",
data: dataToPost
}).then(function(data){
var obj = null;
try {
obj = JSON.parse(data);
} catch(err) {
throw err;
}
if (callback) {
return callback(null, this);
}
return this;
}.bind(this)).catch(function(err){
if(callback) return callback(err, null);
throw err;
});
};
return NCMBInstallationEx;
})();
| "use strict"
var NCMBInstallationEx = module.exports = (function() {
- var validKeys = [
+ var invalidKeys = [
? ++
+ 'objectId'
+ , 'createDate'
+ , 'updateDate'
- 'applicationName'
- , 'appVersion'
- , 'badge'
- , 'channels'
- , 'deviceToken'
- , 'deviceType'
- , 'sdkVersion'
- , 'timeZone'
- , 'acl'
];
function NCMBInstallationEx(ncmb) {
this.__proto__.ncmb = ncmb;
this.__proto__.className = '/installations';
}
NCMBInstallationEx.prototype.register = function(attrs, callback) {
var ncmb = this.ncmb;
var dataToPost = {};
Object.keys(attrs).forEach(function(attr) {
- if (validKeys.indexOf(attr) != -1) {
? ^
+ if (invalidKeys.indexOf(attr) == -1) {
? ++ ^
dataToPost[attr] = attrs[attr];
}
});
return ncmb.request({
path: "/" + ncmb.version + this.className,
method: "POST",
data: dataToPost
}).then(function(data){
var obj = null;
try {
obj = JSON.parse(data);
} catch(err) {
throw err;
}
if (callback) {
return callback(null, this);
}
return this;
}.bind(this)).catch(function(err){
if(callback) return callback(err, null);
throw err;
});
};
return NCMBInstallationEx;
})(); | 16 | 0.296296 | 5 | 11 |
edebe37458da391723e3206c63102cbb69606c5b | ideascube/conf/idb_irq_bardarash.py | ideascube/conf/idb_irq_bardarash.py | """Bardarash in Kurdistan, Iraq"""
from .idb_jor_azraq import * # pragma: no flakes
from django.utils.translation import ugettext_lazy as _
USER_FORM_FIELDS = (
('Ideasbox', ['serial', 'box_awareness']),
(_('Personal informations'), ['short_name', 'full_name', 'latin_name', 'birth_year', 'gender', 'country_of_origin_occupation', 'school_level']), # noqa
(_('Family'), ['marital_status', 'family_status', 'children_under_12', 'children_under_18', 'children_above_18']), # noqa
(_('In the camp'), ['camp_entry_date', 'camp_activities', 'current_occupation', 'camp_address']), # noqa
(_('Language skills'), ['ar_level', 'ku_level', 'sdb_level', 'en_level']),
)
MONITORING_ENTRY_EXPORT_FIELDS = ['serial', 'birth_year', 'gender']
ENTRY_ACTIVITY_CHOICES = []
| """Bardarash in Kurdistan, Iraq"""
from .idb_jor_azraq import * # pragma: no flakes
from django.utils.translation import ugettext_lazy as _
USER_FORM_FIELDS = (
('Ideasbox', ['serial', 'box_awareness']),
(_('Personal informations'), ['short_name', 'full_name', 'latin_name', 'birth_year', 'gender', 'country_of_origin_occupation', 'school_level']), # noqa
(_('Family'), ['marital_status', 'family_status', 'children_under_12', 'children_under_18', 'children_above_18']), # noqa
(_('In the camp'), ['camp_entry_date', 'camp_activities', 'current_occupation', 'camp_address']), # noqa
(_('Language skills'), ['ar_level', 'ku_level', 'sdb_level', 'en_level']),
)
MONITORING_ENTRY_EXPORT_FIELDS = ['serial', 'birth_year', 'gender']
ENTRY_ACTIVITY_CHOICES = []
HOME_CARDS = STAFF_HOME_CARDS + [
{
'id': 'blog',
},
{
'id': 'mediacenter',
},
{
'id': 'library',
}
]
| Remove Kalite until Arabic language is available | Remove Kalite until Arabic language is available
| Python | agpl-3.0 | ideascube/ideascube,ideascube/ideascube,ideascube/ideascube,ideascube/ideascube | python | ## Code Before:
"""Bardarash in Kurdistan, Iraq"""
from .idb_jor_azraq import * # pragma: no flakes
from django.utils.translation import ugettext_lazy as _
USER_FORM_FIELDS = (
('Ideasbox', ['serial', 'box_awareness']),
(_('Personal informations'), ['short_name', 'full_name', 'latin_name', 'birth_year', 'gender', 'country_of_origin_occupation', 'school_level']), # noqa
(_('Family'), ['marital_status', 'family_status', 'children_under_12', 'children_under_18', 'children_above_18']), # noqa
(_('In the camp'), ['camp_entry_date', 'camp_activities', 'current_occupation', 'camp_address']), # noqa
(_('Language skills'), ['ar_level', 'ku_level', 'sdb_level', 'en_level']),
)
MONITORING_ENTRY_EXPORT_FIELDS = ['serial', 'birth_year', 'gender']
ENTRY_ACTIVITY_CHOICES = []
## Instruction:
Remove Kalite until Arabic language is available
## Code After:
"""Bardarash in Kurdistan, Iraq"""
from .idb_jor_azraq import * # pragma: no flakes
from django.utils.translation import ugettext_lazy as _
USER_FORM_FIELDS = (
('Ideasbox', ['serial', 'box_awareness']),
(_('Personal informations'), ['short_name', 'full_name', 'latin_name', 'birth_year', 'gender', 'country_of_origin_occupation', 'school_level']), # noqa
(_('Family'), ['marital_status', 'family_status', 'children_under_12', 'children_under_18', 'children_above_18']), # noqa
(_('In the camp'), ['camp_entry_date', 'camp_activities', 'current_occupation', 'camp_address']), # noqa
(_('Language skills'), ['ar_level', 'ku_level', 'sdb_level', 'en_level']),
)
MONITORING_ENTRY_EXPORT_FIELDS = ['serial', 'birth_year', 'gender']
ENTRY_ACTIVITY_CHOICES = []
HOME_CARDS = STAFF_HOME_CARDS + [
{
'id': 'blog',
},
{
'id': 'mediacenter',
},
{
'id': 'library',
}
]
| """Bardarash in Kurdistan, Iraq"""
from .idb_jor_azraq import * # pragma: no flakes
from django.utils.translation import ugettext_lazy as _
USER_FORM_FIELDS = (
('Ideasbox', ['serial', 'box_awareness']),
(_('Personal informations'), ['short_name', 'full_name', 'latin_name', 'birth_year', 'gender', 'country_of_origin_occupation', 'school_level']), # noqa
(_('Family'), ['marital_status', 'family_status', 'children_under_12', 'children_under_18', 'children_above_18']), # noqa
(_('In the camp'), ['camp_entry_date', 'camp_activities', 'current_occupation', 'camp_address']), # noqa
(_('Language skills'), ['ar_level', 'ku_level', 'sdb_level', 'en_level']),
)
MONITORING_ENTRY_EXPORT_FIELDS = ['serial', 'birth_year', 'gender']
ENTRY_ACTIVITY_CHOICES = []
+
+ HOME_CARDS = STAFF_HOME_CARDS + [
+ {
+ 'id': 'blog',
+ },
+ {
+ 'id': 'mediacenter',
+ },
+ {
+ 'id': 'library',
+ }
+ ]
+ | 13 | 0.8125 | 13 | 0 |
28aa29d953c0217563e9372695e6d4a8b91d83bf | README.md | README.md |
This Project is part of my bachelor thesis.
## Goal
### Building a web based 3D composition tool.
Build a web based 3D scene composition tool for the Project `Roundtrip3D` using current web technologies.
The Tool should provide following views and features
- A 3D View to visualize and edit 3D scenes in the X3DOM format
- A tree view to outline and edit 3D scenes in the X3DOM format
- A text view to edit JavaScript code
- A diagram view for SSIML (`Scene Structure and Integration Modelling Language`) models
- optional feature: launch transformation (transforming SSIML to X3DOM and JavaScript and the other way around) jobs on another machine running an eclipse instance
Requirements: model driven software engineering, web development, JavaScript programming, 3D modeling
## Stack
- [angularjs](http://angularjs.org/)
- [twitter bootstrap](http://getbootstrap.com/)
## License
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
|
This Project is part of my bachelor thesis.
## CI Status
[](https://travis-ci.org/despairblue/scegratoo3)
## Goal
### Building a web based 3D composition tool.
Build a web based 3D scene composition tool for the Project `Roundtrip3D` using current web technologies.
The Tool should provide following views and features
- A 3D View to visualize and edit 3D scenes in the X3DOM format
- A tree view to outline and edit 3D scenes in the X3DOM format
- A text view to edit JavaScript code
- A diagram view for SSIML (`Scene Structure and Integration Modelling Language`) models
- optional feature: launch transformation (transforming SSIML to X3DOM and JavaScript and the other way around) jobs on another machine running an eclipse instance
Requirements: model driven software engineering, web development, JavaScript programming, 3D modeling
## Stack
- [angularjs](http://angularjs.org/)
- [twitter bootstrap](http://getbootstrap.com/)
## License
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
| Add ci status to readme | Add ci status to readme | Markdown | apache-2.0 | despairblue/scegratoo3,despairblue/scegratoo3,despairblue/scegratoo3 | markdown | ## Code Before:
This Project is part of my bachelor thesis.
## Goal
### Building a web based 3D composition tool.
Build a web based 3D scene composition tool for the Project `Roundtrip3D` using current web technologies.
The Tool should provide following views and features
- A 3D View to visualize and edit 3D scenes in the X3DOM format
- A tree view to outline and edit 3D scenes in the X3DOM format
- A text view to edit JavaScript code
- A diagram view for SSIML (`Scene Structure and Integration Modelling Language`) models
- optional feature: launch transformation (transforming SSIML to X3DOM and JavaScript and the other way around) jobs on another machine running an eclipse instance
Requirements: model driven software engineering, web development, JavaScript programming, 3D modeling
## Stack
- [angularjs](http://angularjs.org/)
- [twitter bootstrap](http://getbootstrap.com/)
## License
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
## Instruction:
Add ci status to readme
## Code After:
This Project is part of my bachelor thesis.
## CI Status
[](https://travis-ci.org/despairblue/scegratoo3)
## Goal
### Building a web based 3D composition tool.
Build a web based 3D scene composition tool for the Project `Roundtrip3D` using current web technologies.
The Tool should provide following views and features
- A 3D View to visualize and edit 3D scenes in the X3DOM format
- A tree view to outline and edit 3D scenes in the X3DOM format
- A text view to edit JavaScript code
- A diagram view for SSIML (`Scene Structure and Integration Modelling Language`) models
- optional feature: launch transformation (transforming SSIML to X3DOM and JavaScript and the other way around) jobs on another machine running an eclipse instance
Requirements: model driven software engineering, web development, JavaScript programming, 3D modeling
## Stack
- [angularjs](http://angularjs.org/)
- [twitter bootstrap](http://getbootstrap.com/)
## License
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
|
This Project is part of my bachelor thesis.
+
+ ## CI Status
+ [](https://travis-ci.org/despairblue/scegratoo3)
## Goal
### Building a web based 3D composition tool.
Build a web based 3D scene composition tool for the Project `Roundtrip3D` using current web technologies.
The Tool should provide following views and features
- A 3D View to visualize and edit 3D scenes in the X3DOM format
- A tree view to outline and edit 3D scenes in the X3DOM format
- A text view to edit JavaScript code
- A diagram view for SSIML (`Scene Structure and Integration Modelling Language`) models
- optional feature: launch transformation (transforming SSIML to X3DOM and JavaScript and the other way around) jobs on another machine running an eclipse instance
Requirements: model driven software engineering, web development, JavaScript programming, 3D modeling
## Stack
- [angularjs](http://angularjs.org/)
- [twitter bootstrap](http://getbootstrap.com/)
## License
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/ | 3 | 0.12 | 3 | 0 |
6d21040bcf818e280c8462d9be103a63d0248fad | .travis.yml | .travis.yml | language: go
go:
- 1.4.2
- 1.5.2
install:
- go get github.com/tools/godep
- go get github.com/golang/lint/golint
- go get github.com/GeertJohan/fgt
script: fgt golint ./... && godep go test ./...
| language: go
go:
- 1.5.2
- 1.5.3
- 1.6
install:
- go get github.com/golang/lint/golint
- go get github.com/GeertJohan/fgt
script: make test
| Use `make test` and deprecate Go1.4, add go1.6 | Use `make test` and deprecate Go1.4, add go1.6
| YAML | mit | facesea/banshee,facesea/banshee,eleme/banshee,eleme/banshee,facesea/banshee,facesea/banshee,eleme/banshee,eleme/banshee,eleme/banshee | yaml | ## Code Before:
language: go
go:
- 1.4.2
- 1.5.2
install:
- go get github.com/tools/godep
- go get github.com/golang/lint/golint
- go get github.com/GeertJohan/fgt
script: fgt golint ./... && godep go test ./...
## Instruction:
Use `make test` and deprecate Go1.4, add go1.6
## Code After:
language: go
go:
- 1.5.2
- 1.5.3
- 1.6
install:
- go get github.com/golang/lint/golint
- go get github.com/GeertJohan/fgt
script: make test
| language: go
go:
- - 1.4.2
- 1.5.2
+ - 1.5.3
+ - 1.6
install:
- - go get github.com/tools/godep
- go get github.com/golang/lint/golint
- go get github.com/GeertJohan/fgt
- script: fgt golint ./... && godep go test ./...
+ script: make test | 6 | 0.5 | 3 | 3 |
e12dba66782f21f57efbeca34ad05ca6a1cef56b | src/ggrc/assets/mustache/base_templates/people_list.mustache | src/ggrc/assets/mustache/base_templates/people_list.mustache | {{!
Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file>
Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
Created By: ivan@reciprocitylabs.com
Maintained By: ivan@reciprocitylabs.com
}}
<div class="side-content">
<ul class="label-list">
<li>
<people-group deferred="deferred" editable="editable" instance="instance" mapping="related_requesters" required="true" type="requester"></people-group>
</li>
<li>
<people-group deferred="deferred" editable="editable" instance="instance" mapping="related_assignees" required="true" type="assignee"></people-group>
</li>
<li>
<people-group deferred="deferred" editable="editable" instance="instance" mapping="related_verifiers" type="verifier"></people-group>
</li>
</ul>
| {{!
Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file>
Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
Created By: ivan@reciprocitylabs.com
Maintained By: ivan@reciprocitylabs.com
}}
<div class="side-content">
<ul class="label-list">
<li>
<people-group deferred="deferred" editable="editable" instance="instance" mapping="related_requesters" required="true" type="requester"></people-group>
</li>
<li>
<people-group deferred="deferred" editable="editable" instance="instance" mapping="related_assignees" required="true" type="assignee"></people-group>
</li>
<li class="hidable">
<people-group deferred="deferred" editable="editable" instance="instance" mapping="related_verifiers" type="verifier"></people-group>
</li>
</ul>
| Fix hiding the optional Verifier(s) form field | Fix hiding the optional Verifier(s) form field
| HTML+Django | apache-2.0 | edofic/ggrc-core,josthkko/ggrc-core,j0gurt/ggrc-core,josthkko/ggrc-core,selahssea/ggrc-core,j0gurt/ggrc-core,AleksNeStu/ggrc-core,edofic/ggrc-core,kr41/ggrc-core,plamut/ggrc-core,selahssea/ggrc-core,kr41/ggrc-core,josthkko/ggrc-core,jmakov/ggrc-core,edofic/ggrc-core,plamut/ggrc-core,plamut/ggrc-core,prasannav7/ggrc-core,edofic/ggrc-core,andrei-karalionak/ggrc-core,prasannav7/ggrc-core,jmakov/ggrc-core,NejcZupec/ggrc-core,NejcZupec/ggrc-core,selahssea/ggrc-core,jmakov/ggrc-core,NejcZupec/ggrc-core,kr41/ggrc-core,j0gurt/ggrc-core,prasannav7/ggrc-core,AleksNeStu/ggrc-core,j0gurt/ggrc-core,josthkko/ggrc-core,VinnieJohns/ggrc-core,selahssea/ggrc-core,jmakov/ggrc-core,NejcZupec/ggrc-core,andrei-karalionak/ggrc-core,andrei-karalionak/ggrc-core,VinnieJohns/ggrc-core,AleksNeStu/ggrc-core,kr41/ggrc-core,prasannav7/ggrc-core,andrei-karalionak/ggrc-core,AleksNeStu/ggrc-core,VinnieJohns/ggrc-core,jmakov/ggrc-core,VinnieJohns/ggrc-core,plamut/ggrc-core | html+django | ## Code Before:
{{!
Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file>
Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
Created By: ivan@reciprocitylabs.com
Maintained By: ivan@reciprocitylabs.com
}}
<div class="side-content">
<ul class="label-list">
<li>
<people-group deferred="deferred" editable="editable" instance="instance" mapping="related_requesters" required="true" type="requester"></people-group>
</li>
<li>
<people-group deferred="deferred" editable="editable" instance="instance" mapping="related_assignees" required="true" type="assignee"></people-group>
</li>
<li>
<people-group deferred="deferred" editable="editable" instance="instance" mapping="related_verifiers" type="verifier"></people-group>
</li>
</ul>
## Instruction:
Fix hiding the optional Verifier(s) form field
## Code After:
{{!
Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file>
Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
Created By: ivan@reciprocitylabs.com
Maintained By: ivan@reciprocitylabs.com
}}
<div class="side-content">
<ul class="label-list">
<li>
<people-group deferred="deferred" editable="editable" instance="instance" mapping="related_requesters" required="true" type="requester"></people-group>
</li>
<li>
<people-group deferred="deferred" editable="editable" instance="instance" mapping="related_assignees" required="true" type="assignee"></people-group>
</li>
<li class="hidable">
<people-group deferred="deferred" editable="editable" instance="instance" mapping="related_verifiers" type="verifier"></people-group>
</li>
</ul>
| {{!
Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file>
Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
Created By: ivan@reciprocitylabs.com
Maintained By: ivan@reciprocitylabs.com
}}
<div class="side-content">
<ul class="label-list">
<li>
<people-group deferred="deferred" editable="editable" instance="instance" mapping="related_requesters" required="true" type="requester"></people-group>
</li>
<li>
<people-group deferred="deferred" editable="editable" instance="instance" mapping="related_assignees" required="true" type="assignee"></people-group>
</li>
- <li>
+ <li class="hidable">
<people-group deferred="deferred" editable="editable" instance="instance" mapping="related_verifiers" type="verifier"></people-group>
</li>
</ul> | 2 | 0.105263 | 1 | 1 |
47548e64312b2b749b7bbbe93acdb4c3aabff565 | spec/url_referenceable_spec.rb | spec/url_referenceable_spec.rb | require 'spec_helper'
require 'compo'
# Mock implementation of UrlReferenceable.
class MockUrlReferenceable
include Compo::UrlReferenceable
end
describe MockUrlReferenceable do
before(:each) { allow(subject).to receive(:parent).and_return(parent) }
describe '#url' do
context 'when the UrlReferenceable has no parent' do
let(:parent) { nil }
it 'returns the empty string' do
expect(subject.url).to eq('')
end
end
context 'when the UrlReferenceable has a parent' do
let(:parent) { double(:parent) }
end
end
describe '#parent_url' do
context 'when the UrlReferenceable has no parent' do
let(:parent) { nil }
end
context 'when the UrlReferenceable has a parent' do
let(:parent) { double(:parent) }
end
end
end
| require 'spec_helper'
require 'compo'
# Mock implementation of UrlReferenceable.
class MockUrlReferenceable
include Compo::UrlReferenceable
end
describe MockUrlReferenceable do
before(:each) { allow(subject).to receive(:parent).and_return(parent) }
describe '#url' do
context 'when the UrlReferenceable has no parent' do
let(:parent) { nil }
it 'returns the empty string' do
expect(subject.url).to eq('')
end
end
context 'when the UrlReferenceable has a parent' do
let(:parent) { double(:parent) }
end
end
describe '#parent_url' do
context 'when the UrlReferenceable has no parent' do
let(:parent) { nil }
specify { expect(subject.parent_url).to be_nil }
end
context 'when the UrlReferenceable has a parent' do
let(:parent) { double(:parent) }
end
end
end
| Add parent_url no parent test. | Add parent_url no parent test.
| Ruby | mit | CaptainHayashi/compo | ruby | ## Code Before:
require 'spec_helper'
require 'compo'
# Mock implementation of UrlReferenceable.
class MockUrlReferenceable
include Compo::UrlReferenceable
end
describe MockUrlReferenceable do
before(:each) { allow(subject).to receive(:parent).and_return(parent) }
describe '#url' do
context 'when the UrlReferenceable has no parent' do
let(:parent) { nil }
it 'returns the empty string' do
expect(subject.url).to eq('')
end
end
context 'when the UrlReferenceable has a parent' do
let(:parent) { double(:parent) }
end
end
describe '#parent_url' do
context 'when the UrlReferenceable has no parent' do
let(:parent) { nil }
end
context 'when the UrlReferenceable has a parent' do
let(:parent) { double(:parent) }
end
end
end
## Instruction:
Add parent_url no parent test.
## Code After:
require 'spec_helper'
require 'compo'
# Mock implementation of UrlReferenceable.
class MockUrlReferenceable
include Compo::UrlReferenceable
end
describe MockUrlReferenceable do
before(:each) { allow(subject).to receive(:parent).and_return(parent) }
describe '#url' do
context 'when the UrlReferenceable has no parent' do
let(:parent) { nil }
it 'returns the empty string' do
expect(subject.url).to eq('')
end
end
context 'when the UrlReferenceable has a parent' do
let(:parent) { double(:parent) }
end
end
describe '#parent_url' do
context 'when the UrlReferenceable has no parent' do
let(:parent) { nil }
specify { expect(subject.parent_url).to be_nil }
end
context 'when the UrlReferenceable has a parent' do
let(:parent) { double(:parent) }
end
end
end
| require 'spec_helper'
require 'compo'
# Mock implementation of UrlReferenceable.
class MockUrlReferenceable
include Compo::UrlReferenceable
end
describe MockUrlReferenceable do
before(:each) { allow(subject).to receive(:parent).and_return(parent) }
describe '#url' do
context 'when the UrlReferenceable has no parent' do
let(:parent) { nil }
it 'returns the empty string' do
expect(subject.url).to eq('')
end
end
context 'when the UrlReferenceable has a parent' do
let(:parent) { double(:parent) }
end
end
describe '#parent_url' do
context 'when the UrlReferenceable has no parent' do
let(:parent) { nil }
+
+ specify { expect(subject.parent_url).to be_nil }
end
context 'when the UrlReferenceable has a parent' do
let(:parent) { double(:parent) }
end
end
end | 2 | 0.057143 | 2 | 0 |
4e691594e6ed13949400f5957f6bd48c8f53427a | run.sh | run.sh | : =${RABBITMQ_USER:='guest'}
: =${RABBITMQ_PASSWORD:='guest'}
sed -i 's|%%RABBITMQ_USER%%|'"$RABBITMQ_USER"'|g; s|%%RABBITMQ_PASSWORD%%|'"$RABBITMQ_PASSWORD"'|g' /etc/rabbitmq/rabbitmq.config
# Enable rabbitmq management web interface
rabbitmq-plugins enable rabbitmq_management
# start rabbitmq-server
rabbitmq-server
|
export HOME=$HOME
# Set username and password in config
: =${RABBITMQ_USER:='guest'}
: =${RABBITMQ_PASSWORD:='guest'}
sed -i 's|%%RABBITMQ_USER%%|'"$RABBITMQ_USER"'|g; s|%%RABBITMQ_PASSWORD%%|'"$RABBITMQ_PASSWORD"'|g' /etc/rabbitmq/rabbitmq.config
# Enable rabbitmq management web interface
rabbitmq-plugins enable rabbitmq_management
# start rabbitmq-server
rabbitmq-server
| Make sure the HOME variable is exported and available before rabbitmq starts. | Make sure the HOME variable is exported and available before rabbitmq
starts.
| Shell | mit | pitrho/docker-precise-rabbitmq | shell | ## Code Before:
: =${RABBITMQ_USER:='guest'}
: =${RABBITMQ_PASSWORD:='guest'}
sed -i 's|%%RABBITMQ_USER%%|'"$RABBITMQ_USER"'|g; s|%%RABBITMQ_PASSWORD%%|'"$RABBITMQ_PASSWORD"'|g' /etc/rabbitmq/rabbitmq.config
# Enable rabbitmq management web interface
rabbitmq-plugins enable rabbitmq_management
# start rabbitmq-server
rabbitmq-server
## Instruction:
Make sure the HOME variable is exported and available before rabbitmq
starts.
## Code After:
export HOME=$HOME
# Set username and password in config
: =${RABBITMQ_USER:='guest'}
: =${RABBITMQ_PASSWORD:='guest'}
sed -i 's|%%RABBITMQ_USER%%|'"$RABBITMQ_USER"'|g; s|%%RABBITMQ_PASSWORD%%|'"$RABBITMQ_PASSWORD"'|g' /etc/rabbitmq/rabbitmq.config
# Enable rabbitmq management web interface
rabbitmq-plugins enable rabbitmq_management
# start rabbitmq-server
rabbitmq-server
| +
+ export HOME=$HOME
+
+ # Set username and password in config
: =${RABBITMQ_USER:='guest'}
: =${RABBITMQ_PASSWORD:='guest'}
sed -i 's|%%RABBITMQ_USER%%|'"$RABBITMQ_USER"'|g; s|%%RABBITMQ_PASSWORD%%|'"$RABBITMQ_PASSWORD"'|g' /etc/rabbitmq/rabbitmq.config
# Enable rabbitmq management web interface
rabbitmq-plugins enable rabbitmq_management
# start rabbitmq-server
rabbitmq-server | 4 | 0.4 | 4 | 0 |
aa5b252786f5bbf00962da29b36cfc08b563de53 | layers/+vim/evil-snipe/packages.el | layers/+vim/evil-snipe/packages.el | (setq evil-snipe-packages '(evil-snipe))
(defun evil-snipe/init-evil-snipe ()
(use-package evil-snipe
:diminish evil-snipe-local-mode
:init
(setq evil-snipe-scope 'whole-buffer
evil-snipe-enable-highlight t
evil-snipe-enable-incremental-highlight t
evil-snipe-auto-disable-substitute t
evil-snipe-show-prompt nil
evil-snipe-smart-case t)
:config
(progn
(evil-snipe-mode 1)
(if (configuration-layer/layer-usedp 'git)
(progn
(add-hook 'magit-mode-hook 'turn-off-evil-snipe-override-mode)
(add-hook 'git-rebase-mode-hook 'turn-off-evil-snipe-override-mode)))
(when evil-snipe-enable-alternate-f-and-t-behaviors
(setq evil-snipe-repeat-scope 'whole-buffer)
(evil-snipe-override-mode 1)))))
| (setq evil-snipe-packages '(evil-snipe))
(defun evil-snipe/init-evil-snipe ()
(use-package evil-snipe
:diminish evil-snipe-local-mode
:init
(setq evil-snipe-scope 'whole-buffer
evil-snipe-enable-highlight t
evil-snipe-enable-incremental-highlight t
evil-snipe-auto-disable-substitute t
evil-snipe-show-prompt nil
evil-snipe-smart-case t)
:config
(progn
(if evil-snipe-enable-alternate-f-and-t-behaviors
(progn
(setq evil-snipe-repeat-scope 'whole-buffer)
(evil-snipe-override-mode 1)
(when (configuration-layer/layer-usedp 'git)
(add-hook 'magit-mode-hook 'turn-off-evil-snipe-override-mode)
(add-hook 'git-rebase-mode-hook 'turn-off-evil-snipe-override-mode)))
(evil-snipe-mode 1)
(when (configuration-layer/layer-usedp 'git)
(add-hook 'magit-mode-hook 'turn-off-evil-snipe-mode)
(add-hook 'git-rebase-mode-hook 'turn-off-evil-snipe-mode))))))
| Use separate hooks for override mode | evil-snipe: Use separate hooks for override mode
| Emacs Lisp | mit | tsonntag/dotemacs,tsonntag/dotemacs,tsonntag/dotemacs,tsonntag/dotemacs | emacs-lisp | ## Code Before:
(setq evil-snipe-packages '(evil-snipe))
(defun evil-snipe/init-evil-snipe ()
(use-package evil-snipe
:diminish evil-snipe-local-mode
:init
(setq evil-snipe-scope 'whole-buffer
evil-snipe-enable-highlight t
evil-snipe-enable-incremental-highlight t
evil-snipe-auto-disable-substitute t
evil-snipe-show-prompt nil
evil-snipe-smart-case t)
:config
(progn
(evil-snipe-mode 1)
(if (configuration-layer/layer-usedp 'git)
(progn
(add-hook 'magit-mode-hook 'turn-off-evil-snipe-override-mode)
(add-hook 'git-rebase-mode-hook 'turn-off-evil-snipe-override-mode)))
(when evil-snipe-enable-alternate-f-and-t-behaviors
(setq evil-snipe-repeat-scope 'whole-buffer)
(evil-snipe-override-mode 1)))))
## Instruction:
evil-snipe: Use separate hooks for override mode
## Code After:
(setq evil-snipe-packages '(evil-snipe))
(defun evil-snipe/init-evil-snipe ()
(use-package evil-snipe
:diminish evil-snipe-local-mode
:init
(setq evil-snipe-scope 'whole-buffer
evil-snipe-enable-highlight t
evil-snipe-enable-incremental-highlight t
evil-snipe-auto-disable-substitute t
evil-snipe-show-prompt nil
evil-snipe-smart-case t)
:config
(progn
(if evil-snipe-enable-alternate-f-and-t-behaviors
(progn
(setq evil-snipe-repeat-scope 'whole-buffer)
(evil-snipe-override-mode 1)
(when (configuration-layer/layer-usedp 'git)
(add-hook 'magit-mode-hook 'turn-off-evil-snipe-override-mode)
(add-hook 'git-rebase-mode-hook 'turn-off-evil-snipe-override-mode)))
(evil-snipe-mode 1)
(when (configuration-layer/layer-usedp 'git)
(add-hook 'magit-mode-hook 'turn-off-evil-snipe-mode)
(add-hook 'git-rebase-mode-hook 'turn-off-evil-snipe-mode))))))
| (setq evil-snipe-packages '(evil-snipe))
(defun evil-snipe/init-evil-snipe ()
(use-package evil-snipe
:diminish evil-snipe-local-mode
:init
(setq evil-snipe-scope 'whole-buffer
evil-snipe-enable-highlight t
evil-snipe-enable-incremental-highlight t
evil-snipe-auto-disable-substitute t
evil-snipe-show-prompt nil
evil-snipe-smart-case t)
:config
(progn
+ (if evil-snipe-enable-alternate-f-and-t-behaviors
- (evil-snipe-mode 1)
- (if (configuration-layer/layer-usedp 'git)
(progn
+ (setq evil-snipe-repeat-scope 'whole-buffer)
+ (evil-snipe-override-mode 1)
+ (when (configuration-layer/layer-usedp 'git)
- (add-hook 'magit-mode-hook 'turn-off-evil-snipe-override-mode)
+ (add-hook 'magit-mode-hook 'turn-off-evil-snipe-override-mode)
? ++
- (add-hook 'git-rebase-mode-hook 'turn-off-evil-snipe-override-mode)))
+ (add-hook 'git-rebase-mode-hook 'turn-off-evil-snipe-override-mode)))
? ++
- (when evil-snipe-enable-alternate-f-and-t-behaviors
- (setq evil-snipe-repeat-scope 'whole-buffer)
- (evil-snipe-override-mode 1)))))
? --------- ----
+ (evil-snipe-mode 1)
+ (when (configuration-layer/layer-usedp 'git)
+ (add-hook 'magit-mode-hook 'turn-off-evil-snipe-mode)
+ (add-hook 'git-rebase-mode-hook 'turn-off-evil-snipe-mode)))))) | 17 | 0.772727 | 10 | 7 |
a07794c80dfaf6c26f0776f3d918d07582453823 | articles/quickstart/spa/_includes/_install_auth0js.md | articles/quickstart/spa/_includes/_install_auth0js.md |
You need the auth0.js library to integrate Auth0 into your application.
Install auth0.js using npm or yarn.
```bash
# installation with npm
npm install --save auth0-js
# installation with yarn
yarn add auth0-js
```
Once you install auth0.js, add it to your build system or bring it in to your project with a script tag.
```html
<script type="text/javascript" src="node_modules/auth0-js/build/auth0.js"></script>
```
If you do not want to use a package manager, you can retrieve auth0.js from Auth0's CDN.
```html
<script src="${auth0js_url}"></script>
```
|
You need the auth0.js library to integrate Auth0 into your application.
You can either install the library locally in your application or load it from CDN.
### Loading via dependencies
Install auth0.js using npm or yarn.
```bash
# installation with npm
npm install --save auth0-js
# installation with yarn
yarn add auth0-js
```
Once you install auth0.js, add it to your build system or bring it in to your project with a script tag.
```html
<script type="text/javascript" src="node_modules/auth0-js/build/auth0.js"></script>
```
### Loading it from CDN
If you do not want to use a package manager, you can retrieve auth0.js from Auth0's CDN.
```html
<script src="${auth0js_url}"></script>
```
| Make instructions to bring in auth0.js via dependencies or CDN more explicit | Make instructions to bring in auth0.js via dependencies or CDN more explicit | Markdown | mit | jeffreylees/docs,jeffreylees/docs,yvonnewilson/docs,yvonnewilson/docs,auth0/docs,auth0/docs,yvonnewilson/docs,jeffreylees/docs,auth0/docs | markdown | ## Code Before:
You need the auth0.js library to integrate Auth0 into your application.
Install auth0.js using npm or yarn.
```bash
# installation with npm
npm install --save auth0-js
# installation with yarn
yarn add auth0-js
```
Once you install auth0.js, add it to your build system or bring it in to your project with a script tag.
```html
<script type="text/javascript" src="node_modules/auth0-js/build/auth0.js"></script>
```
If you do not want to use a package manager, you can retrieve auth0.js from Auth0's CDN.
```html
<script src="${auth0js_url}"></script>
```
## Instruction:
Make instructions to bring in auth0.js via dependencies or CDN more explicit
## Code After:
You need the auth0.js library to integrate Auth0 into your application.
You can either install the library locally in your application or load it from CDN.
### Loading via dependencies
Install auth0.js using npm or yarn.
```bash
# installation with npm
npm install --save auth0-js
# installation with yarn
yarn add auth0-js
```
Once you install auth0.js, add it to your build system or bring it in to your project with a script tag.
```html
<script type="text/javascript" src="node_modules/auth0-js/build/auth0.js"></script>
```
### Loading it from CDN
If you do not want to use a package manager, you can retrieve auth0.js from Auth0's CDN.
```html
<script src="${auth0js_url}"></script>
```
|
You need the auth0.js library to integrate Auth0 into your application.
+ You can either install the library locally in your application or load it from CDN.
+
+ ### Loading via dependencies
Install auth0.js using npm or yarn.
```bash
# installation with npm
npm install --save auth0-js
# installation with yarn
yarn add auth0-js
```
Once you install auth0.js, add it to your build system or bring it in to your project with a script tag.
```html
<script type="text/javascript" src="node_modules/auth0-js/build/auth0.js"></script>
```
+ ### Loading it from CDN
+
If you do not want to use a package manager, you can retrieve auth0.js from Auth0's CDN.
```html
<script src="${auth0js_url}"></script>
``` | 5 | 0.208333 | 5 | 0 |
a882990c9d05497540efca385ebb55c200e01e76 | MUON/mapping/AliMpStationType.h | MUON/mapping/AliMpStationType.h | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
// $Id$
// $MpId: AliMpStationType.h,v 1.5 2005/10/28 15:05:04 ivana Exp $
/// \ingroup basic
/// \enum AliMpStationType
/// Enumeration for refering to a MUON station
///
/// Authors: David Guez, Ivana Hrivnacova; IPN Orsay
#ifndef ALI_MP_STATION_TYPE_H
#define ALI_MP_STATION_TYPE_H
enum AliMpStationType
{
kStationInvalid = -1,///< invalid station
kStation1 = 0, ///< station 1 (quadrants)
kStation2, ///< station 2 (quadrants)
kStation345, ///< station 3,4,5 (slats)
kStationTrigger ///< trigger stations (slats)
};
inline
const char* StationTypeName(AliMpStationType stationType)
{
switch ( stationType )
{
case kStation1:
return "st1";
break;
case kStation2:
return "st2";
break;
case kStation345:
return "slat";
break;
case kStationTrigger:
return "trigger";
break;
case kStationInvalid:
default:
return "unknown";
break;
}
}
#endif //ALI_MP_STATION_TYPE_H
| /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
// $Id$
// $MpId: AliMpStationType.h,v 1.5 2005/10/28 15:05:04 ivana Exp $
/// \ingroup basic
/// \enum AliMpStationType
/// Enumeration for refering to a MUON station
///
/// Authors: David Guez, Ivana Hrivnacova; IPN Orsay
#ifndef ALI_MP_STATION_TYPE_H
#define ALI_MP_STATION_TYPE_H
enum AliMpStationType
{
kStationInvalid = -1,///< invalid station
kStation1 = 0, ///< station 1 (quadrants)
kStation2, ///< station 2 (quadrants)
kStation345, ///< station 3,4,5 (slats)
kStationTrigger ///< trigger stations (slats)
};
inline
const char* StationTypeName(AliMpStationType stationType)
{
switch ( stationType )
{
case kStation1:
return "st1";
break;
case kStation2:
return "st2";
break;
case kStation345:
return "slat";
break;
case kStationTrigger:
return "trigger";
break;
case kStationInvalid:
default:
return "invalid";
break;
}
return "unknown";
}
#endif //ALI_MP_STATION_TYPE_H
| Fix warning from gcc4 (Laurent) | Fix warning from gcc4
(Laurent)
| C | bsd-3-clause | ALICEHLT/AliRoot,shahor02/AliRoot,sebaleh/AliRoot,ecalvovi/AliRoot,alisw/AliRoot,ecalvovi/AliRoot,mkrzewic/AliRoot,ALICEHLT/AliRoot,miranov25/AliRoot,miranov25/AliRoot,mkrzewic/AliRoot,ecalvovi/AliRoot,jgrosseo/AliRoot,jgrosseo/AliRoot,sebaleh/AliRoot,ecalvovi/AliRoot,ALICEHLT/AliRoot,ALICEHLT/AliRoot,mkrzewic/AliRoot,miranov25/AliRoot,alisw/AliRoot,mkrzewic/AliRoot,miranov25/AliRoot,ALICEHLT/AliRoot,alisw/AliRoot,jgrosseo/AliRoot,coppedis/AliRoot,coppedis/AliRoot,alisw/AliRoot,sebaleh/AliRoot,sebaleh/AliRoot,ecalvovi/AliRoot,coppedis/AliRoot,mkrzewic/AliRoot,sebaleh/AliRoot,sebaleh/AliRoot,miranov25/AliRoot,shahor02/AliRoot,shahor02/AliRoot,miranov25/AliRoot,shahor02/AliRoot,jgrosseo/AliRoot,shahor02/AliRoot,ALICEHLT/AliRoot,ecalvovi/AliRoot,sebaleh/AliRoot,coppedis/AliRoot,shahor02/AliRoot,mkrzewic/AliRoot,miranov25/AliRoot,alisw/AliRoot,coppedis/AliRoot,coppedis/AliRoot,ALICEHLT/AliRoot,alisw/AliRoot,alisw/AliRoot,coppedis/AliRoot,miranov25/AliRoot,jgrosseo/AliRoot,coppedis/AliRoot,shahor02/AliRoot,mkrzewic/AliRoot,jgrosseo/AliRoot,ecalvovi/AliRoot,alisw/AliRoot,jgrosseo/AliRoot | c | ## Code Before:
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
// $Id$
// $MpId: AliMpStationType.h,v 1.5 2005/10/28 15:05:04 ivana Exp $
/// \ingroup basic
/// \enum AliMpStationType
/// Enumeration for refering to a MUON station
///
/// Authors: David Guez, Ivana Hrivnacova; IPN Orsay
#ifndef ALI_MP_STATION_TYPE_H
#define ALI_MP_STATION_TYPE_H
enum AliMpStationType
{
kStationInvalid = -1,///< invalid station
kStation1 = 0, ///< station 1 (quadrants)
kStation2, ///< station 2 (quadrants)
kStation345, ///< station 3,4,5 (slats)
kStationTrigger ///< trigger stations (slats)
};
inline
const char* StationTypeName(AliMpStationType stationType)
{
switch ( stationType )
{
case kStation1:
return "st1";
break;
case kStation2:
return "st2";
break;
case kStation345:
return "slat";
break;
case kStationTrigger:
return "trigger";
break;
case kStationInvalid:
default:
return "unknown";
break;
}
}
#endif //ALI_MP_STATION_TYPE_H
## Instruction:
Fix warning from gcc4
(Laurent)
## Code After:
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
// $Id$
// $MpId: AliMpStationType.h,v 1.5 2005/10/28 15:05:04 ivana Exp $
/// \ingroup basic
/// \enum AliMpStationType
/// Enumeration for refering to a MUON station
///
/// Authors: David Guez, Ivana Hrivnacova; IPN Orsay
#ifndef ALI_MP_STATION_TYPE_H
#define ALI_MP_STATION_TYPE_H
enum AliMpStationType
{
kStationInvalid = -1,///< invalid station
kStation1 = 0, ///< station 1 (quadrants)
kStation2, ///< station 2 (quadrants)
kStation345, ///< station 3,4,5 (slats)
kStationTrigger ///< trigger stations (slats)
};
inline
const char* StationTypeName(AliMpStationType stationType)
{
switch ( stationType )
{
case kStation1:
return "st1";
break;
case kStation2:
return "st2";
break;
case kStation345:
return "slat";
break;
case kStationTrigger:
return "trigger";
break;
case kStationInvalid:
default:
return "invalid";
break;
}
return "unknown";
}
#endif //ALI_MP_STATION_TYPE_H
| /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
// $Id$
// $MpId: AliMpStationType.h,v 1.5 2005/10/28 15:05:04 ivana Exp $
/// \ingroup basic
/// \enum AliMpStationType
/// Enumeration for refering to a MUON station
///
/// Authors: David Guez, Ivana Hrivnacova; IPN Orsay
#ifndef ALI_MP_STATION_TYPE_H
#define ALI_MP_STATION_TYPE_H
enum AliMpStationType
{
kStationInvalid = -1,///< invalid station
kStation1 = 0, ///< station 1 (quadrants)
kStation2, ///< station 2 (quadrants)
kStation345, ///< station 3,4,5 (slats)
kStationTrigger ///< trigger stations (slats)
};
inline
const char* StationTypeName(AliMpStationType stationType)
{
switch ( stationType )
{
case kStation1:
return "st1";
break;
case kStation2:
return "st2";
break;
case kStation345:
return "slat";
break;
case kStationTrigger:
return "trigger";
break;
case kStationInvalid:
default:
- return "unknown";
+ return "invalid";
break;
}
+ return "unknown";
}
#endif //ALI_MP_STATION_TYPE_H | 3 | 0.06 | 2 | 1 |
6fe85ccfa38c095b61be19f23a662cb6c5e519cf | src/helpers.php | src/helpers.php | <?php
if (!function_exists('cfg')) {
/**
* EasyCfg Helper.
*
* @param mixed $key
* @param mixed $configurable
* @param mixed $configurable_id
* @return mixed
*/
function cfg($key = null, $configurable = null, $configurable_id = null)
{
if ($key === null) {
return Cfg::getFacadeRoot();
} else {
return Cfg::get($key, $configurable, $configurable_id);
}
}
}
| <?php
if (!function_exists('cfg')) {
/**
* EasyCfg Helper.
*
* @param mixed $key
* @param mixed $configurable
* @param mixed $configurable_id
* @return mixed
*/
function cfg($key = null, $configurable = null, $configurable_id = null)
{
if ($key === null) {
return app('CupOfTea\EasyCfg\Contracts\Provider');
} else {
return app('CupOfTea\EasyCfg\Contracts\Provider')->get($key, $configurable, $configurable_id);
}
}
}
| Make helper independent from Facade | Make helper independent from Facade
| PHP | mit | CupOfTea696/EasyCFG | php | ## Code Before:
<?php
if (!function_exists('cfg')) {
/**
* EasyCfg Helper.
*
* @param mixed $key
* @param mixed $configurable
* @param mixed $configurable_id
* @return mixed
*/
function cfg($key = null, $configurable = null, $configurable_id = null)
{
if ($key === null) {
return Cfg::getFacadeRoot();
} else {
return Cfg::get($key, $configurable, $configurable_id);
}
}
}
## Instruction:
Make helper independent from Facade
## Code After:
<?php
if (!function_exists('cfg')) {
/**
* EasyCfg Helper.
*
* @param mixed $key
* @param mixed $configurable
* @param mixed $configurable_id
* @return mixed
*/
function cfg($key = null, $configurable = null, $configurable_id = null)
{
if ($key === null) {
return app('CupOfTea\EasyCfg\Contracts\Provider');
} else {
return app('CupOfTea\EasyCfg\Contracts\Provider')->get($key, $configurable, $configurable_id);
}
}
}
| <?php
if (!function_exists('cfg')) {
/**
* EasyCfg Helper.
*
* @param mixed $key
* @param mixed $configurable
* @param mixed $configurable_id
* @return mixed
*/
function cfg($key = null, $configurable = null, $configurable_id = null)
{
if ($key === null) {
- return Cfg::getFacadeRoot();
+ return app('CupOfTea\EasyCfg\Contracts\Provider');
} else {
- return Cfg::get($key, $configurable, $configurable_id);
? ^^
+ return app('CupOfTea\EasyCfg\Contracts\Provider')->get($key, $configurable, $configurable_id);
? ++++++++++++++++++ ^^^^^^^^^^^^^^^^^^^^^^^
}
}
} | 4 | 0.2 | 2 | 2 |
683d6f576e4bcf4b07a31d617bf5330bd456c108 | tests/all.html | tests/all.html | <!doctype html>
<html>
<head>
<meta charset="utf-8">
<!--Test Infrastructure-->
<link href="dependencies/QUnit/qunit.css" rel="stylesheet" />
<script src="dependencies/QUnit/qunit.js" type="text/javascript"></script>
<link href="dependencies/QUnit/qunit-composite.css" rel="stylesheet" />
<script src="dependencies/Qunit/qunit-composite.js"></script>
<script>
QUnit.testSuites([
{ name: "jQuery 1.9.1", path: "index.html?jquery=1.9.1" },
{ name: "jQuery 1.8.3", path: "index.html?jquery=1.8.3" },
{ name: "jQuery 1.8.3", path: "index.html?jquery=1.7.2" }
]);
</script>
</head>
<body>
<div id="qunit"></div>
</body>
</html>
| <!doctype html>
<html>
<head>
<meta charset="utf-8">
<!--Test Infrastructure-->
<link href="dependencies/QUnit/qunit.css" rel="stylesheet" />
<script src="dependencies/QUnit/qunit.js" type="text/javascript"></script>
<link href="dependencies/QUnit/qunit-composite.css" rel="stylesheet" />
<script src="dependencies/Qunit/qunit-composite.js"></script>
<script>
QUnit.testSuites([
{ name: "jQuery 1.11.2", path: "index.html?jquery=1.11.2" },
{ name: "jQuery 1.10.2", path: "index.html?jquery=1.10.2" },
{ name: "jQuery 1.10.0", path: "index.html?jquery=1.10.0" },
{ name: "jQuery 1.9.1", path: "index.html?jquery=1.9.1" },
{ name: "jQuery 1.8.3", path: "index.html?jquery=1.8.3" },
{ name: "jQuery 1.7.2", path: "index.html?jquery=1.7.2" },
{ name: "jQuery 2.1.3", path: "index.html?jquery=2.1.3" },
{ name: "jQuery 2.1.0", path: "index.html?jquery=2.1.0" },
{ name: "jQuery 2.0.3", path: "index.html?jquery=2.0.3" },
{ name: "jQuery 2.0.0", path: "index.html?jquery=2.0.0" }
]);
</script>
</head>
<body>
<div id="qunit"></div>
</body>
</html>
| Add more versions of jQuery to test | Add more versions of jQuery to test
| HTML | apache-2.0 | vistaprint/ArteJS,vistaprint/ArteJS | html | ## Code Before:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<!--Test Infrastructure-->
<link href="dependencies/QUnit/qunit.css" rel="stylesheet" />
<script src="dependencies/QUnit/qunit.js" type="text/javascript"></script>
<link href="dependencies/QUnit/qunit-composite.css" rel="stylesheet" />
<script src="dependencies/Qunit/qunit-composite.js"></script>
<script>
QUnit.testSuites([
{ name: "jQuery 1.9.1", path: "index.html?jquery=1.9.1" },
{ name: "jQuery 1.8.3", path: "index.html?jquery=1.8.3" },
{ name: "jQuery 1.8.3", path: "index.html?jquery=1.7.2" }
]);
</script>
</head>
<body>
<div id="qunit"></div>
</body>
</html>
## Instruction:
Add more versions of jQuery to test
## Code After:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<!--Test Infrastructure-->
<link href="dependencies/QUnit/qunit.css" rel="stylesheet" />
<script src="dependencies/QUnit/qunit.js" type="text/javascript"></script>
<link href="dependencies/QUnit/qunit-composite.css" rel="stylesheet" />
<script src="dependencies/Qunit/qunit-composite.js"></script>
<script>
QUnit.testSuites([
{ name: "jQuery 1.11.2", path: "index.html?jquery=1.11.2" },
{ name: "jQuery 1.10.2", path: "index.html?jquery=1.10.2" },
{ name: "jQuery 1.10.0", path: "index.html?jquery=1.10.0" },
{ name: "jQuery 1.9.1", path: "index.html?jquery=1.9.1" },
{ name: "jQuery 1.8.3", path: "index.html?jquery=1.8.3" },
{ name: "jQuery 1.7.2", path: "index.html?jquery=1.7.2" },
{ name: "jQuery 2.1.3", path: "index.html?jquery=2.1.3" },
{ name: "jQuery 2.1.0", path: "index.html?jquery=2.1.0" },
{ name: "jQuery 2.0.3", path: "index.html?jquery=2.0.3" },
{ name: "jQuery 2.0.0", path: "index.html?jquery=2.0.0" }
]);
</script>
</head>
<body>
<div id="qunit"></div>
</body>
</html>
| <!doctype html>
<html>
<head>
<meta charset="utf-8">
<!--Test Infrastructure-->
<link href="dependencies/QUnit/qunit.css" rel="stylesheet" />
<script src="dependencies/QUnit/qunit.js" type="text/javascript"></script>
<link href="dependencies/QUnit/qunit-composite.css" rel="stylesheet" />
<script src="dependencies/Qunit/qunit-composite.js"></script>
<script>
QUnit.testSuites([
+ { name: "jQuery 1.11.2", path: "index.html?jquery=1.11.2" },
+ { name: "jQuery 1.10.2", path: "index.html?jquery=1.10.2" },
+ { name: "jQuery 1.10.0", path: "index.html?jquery=1.10.0" },
{ name: "jQuery 1.9.1", path: "index.html?jquery=1.9.1" },
{ name: "jQuery 1.8.3", path: "index.html?jquery=1.8.3" },
- { name: "jQuery 1.8.3", path: "index.html?jquery=1.7.2" }
? ^ ^
+ { name: "jQuery 1.7.2", path: "index.html?jquery=1.7.2" },
? ^ ^ +
+ { name: "jQuery 2.1.3", path: "index.html?jquery=2.1.3" },
+ { name: "jQuery 2.1.0", path: "index.html?jquery=2.1.0" },
+ { name: "jQuery 2.0.3", path: "index.html?jquery=2.0.3" },
+ { name: "jQuery 2.0.0", path: "index.html?jquery=2.0.0" }
]);
</script>
</head>
<body>
<div id="qunit"></div>
</body>
</html> | 9 | 0.375 | 8 | 1 |
ec1f7db3f1bd637807b4b9d69a0b702af36fbef1 | morenines/ignores.py | morenines/ignores.py | import os
from fnmatch import fnmatchcase
import click
class Ignores(object):
@classmethod
def read(cls, path):
ignores = cls()
if path:
with click.open_file(path, 'r') as stream:
ignores.patterns = [line.strip() for line in stream]
return ignores
def __init__(self):
self.patterns = []
def match(self, path):
filename = os.path.basename(path)
if any(fnmatchcase(filename, pattern) for pattern in self.patterns):
return True
else:
return False
| import os
from fnmatch import fnmatchcase
import click
from morenines.util import find_file
class Ignores(object):
@classmethod
def read(cls, path):
if not path:
path = find_file('.mnignore')
ignores = cls()
if path:
with click.open_file(path, 'r') as stream:
ignores.patterns = [line.strip() for line in stream]
return ignores
def __init__(self):
self.patterns = []
def match(self, path):
filename = os.path.basename(path)
if any(fnmatchcase(filename, pattern) for pattern in self.patterns):
return True
else:
return False
| Make Ignores try to find '.mnignore' | Make Ignores try to find '.mnignore'
If it doesn't find it, that's okay, and no action is required.
| Python | mit | mcgid/morenines,mcgid/morenines | python | ## Code Before:
import os
from fnmatch import fnmatchcase
import click
class Ignores(object):
@classmethod
def read(cls, path):
ignores = cls()
if path:
with click.open_file(path, 'r') as stream:
ignores.patterns = [line.strip() for line in stream]
return ignores
def __init__(self):
self.patterns = []
def match(self, path):
filename = os.path.basename(path)
if any(fnmatchcase(filename, pattern) for pattern in self.patterns):
return True
else:
return False
## Instruction:
Make Ignores try to find '.mnignore'
If it doesn't find it, that's okay, and no action is required.
## Code After:
import os
from fnmatch import fnmatchcase
import click
from morenines.util import find_file
class Ignores(object):
@classmethod
def read(cls, path):
if not path:
path = find_file('.mnignore')
ignores = cls()
if path:
with click.open_file(path, 'r') as stream:
ignores.patterns = [line.strip() for line in stream]
return ignores
def __init__(self):
self.patterns = []
def match(self, path):
filename = os.path.basename(path)
if any(fnmatchcase(filename, pattern) for pattern in self.patterns):
return True
else:
return False
| import os
from fnmatch import fnmatchcase
import click
+ from morenines.util import find_file
+
+
class Ignores(object):
@classmethod
def read(cls, path):
+ if not path:
+ path = find_file('.mnignore')
+
ignores = cls()
if path:
with click.open_file(path, 'r') as stream:
ignores.patterns = [line.strip() for line in stream]
return ignores
def __init__(self):
self.patterns = []
def match(self, path):
filename = os.path.basename(path)
if any(fnmatchcase(filename, pattern) for pattern in self.patterns):
return True
else:
return False | 6 | 0.24 | 6 | 0 |
d8570d29e58a376655f1d61f379158bede0fa3dc | app/controllers/people_controller.rb | app/controllers/people_controller.rb | class PeopleController < ApplicationController
before_filter :require_editor, except: [:index, :show]
def index
@people = Person.all.select{|p| p.can_see(current_user)}.paginate(:page => params[:page], :per_page => 15)
end
def new
@person = Person.new
end
def create
@person = Person.create(person_params)
if @person.save
redirect_to person_path(@person)
else
render 'new'
end
end
def show
@person = Person.find(params[:id])
if !@person.can_see(current_user) then
flash[:danger] = "You must be an editor to see the details of living people."
redirect_to people_path
end
end
def edit
@person = Person.find(params[:id])
end
def update
@person = Person.find(params[:id])
if @person.update(person_params)
redirect_to person_path(@person)
else
render 'edit'
end
end
def destroy
end
def person_params
params.require(:person).permit(:name, :gender, :date_of_birth, :date_of_death, :father_id, :mother_id, :current_spouse_id)
end
end
| class PeopleController < ApplicationController
before_filter :require_editor, except: [:index, :show]
def index
@people = Person.all.select{|p| p.can_see(current_user)}.paginate(:page => params[:page], :per_page => 15)
end
def new
@person = Person.new
end
def create
@person = Person.create(person_params)
if @person.save
redirect_to person_path(@person)
else
render 'new'
end
end
def show
@person = Person.find(params[:id])
if !@person.can_see(current_user) then
flash[:danger] = "You must be an editor to see the details of living people."
@person = nil
redirect_to people_path
end
end
def edit
@person = Person.find(params[:id])
end
def update
@person = Person.find(params[:id])
if @person.update(person_params)
redirect_to person_path(@person)
else
render 'edit'
end
end
def destroy
end
def person_params
params.require(:person).permit(:name, :gender, :date_of_birth, :date_of_death, :father_id, :mother_id, :current_spouse_id)
end
end
| Revert "take this out and see if it sticks" | Revert "take this out and see if it sticks"
This reverts commit a8073149416bb511bac5a7f4c444f1e1f4fd6a91.
| Ruby | mit | mrysav/familiar,mrysav/familiar,mrysav/familiar | ruby | ## Code Before:
class PeopleController < ApplicationController
before_filter :require_editor, except: [:index, :show]
def index
@people = Person.all.select{|p| p.can_see(current_user)}.paginate(:page => params[:page], :per_page => 15)
end
def new
@person = Person.new
end
def create
@person = Person.create(person_params)
if @person.save
redirect_to person_path(@person)
else
render 'new'
end
end
def show
@person = Person.find(params[:id])
if !@person.can_see(current_user) then
flash[:danger] = "You must be an editor to see the details of living people."
redirect_to people_path
end
end
def edit
@person = Person.find(params[:id])
end
def update
@person = Person.find(params[:id])
if @person.update(person_params)
redirect_to person_path(@person)
else
render 'edit'
end
end
def destroy
end
def person_params
params.require(:person).permit(:name, :gender, :date_of_birth, :date_of_death, :father_id, :mother_id, :current_spouse_id)
end
end
## Instruction:
Revert "take this out and see if it sticks"
This reverts commit a8073149416bb511bac5a7f4c444f1e1f4fd6a91.
## Code After:
class PeopleController < ApplicationController
before_filter :require_editor, except: [:index, :show]
def index
@people = Person.all.select{|p| p.can_see(current_user)}.paginate(:page => params[:page], :per_page => 15)
end
def new
@person = Person.new
end
def create
@person = Person.create(person_params)
if @person.save
redirect_to person_path(@person)
else
render 'new'
end
end
def show
@person = Person.find(params[:id])
if !@person.can_see(current_user) then
flash[:danger] = "You must be an editor to see the details of living people."
@person = nil
redirect_to people_path
end
end
def edit
@person = Person.find(params[:id])
end
def update
@person = Person.find(params[:id])
if @person.update(person_params)
redirect_to person_path(@person)
else
render 'edit'
end
end
def destroy
end
def person_params
params.require(:person).permit(:name, :gender, :date_of_birth, :date_of_death, :father_id, :mother_id, :current_spouse_id)
end
end
| class PeopleController < ApplicationController
before_filter :require_editor, except: [:index, :show]
def index
@people = Person.all.select{|p| p.can_see(current_user)}.paginate(:page => params[:page], :per_page => 15)
end
def new
@person = Person.new
end
def create
@person = Person.create(person_params)
if @person.save
redirect_to person_path(@person)
else
render 'new'
end
end
def show
@person = Person.find(params[:id])
if !@person.can_see(current_user) then
flash[:danger] = "You must be an editor to see the details of living people."
+ @person = nil
redirect_to people_path
end
end
def edit
@person = Person.find(params[:id])
end
def update
@person = Person.find(params[:id])
if @person.update(person_params)
redirect_to person_path(@person)
else
render 'edit'
end
end
def destroy
end
def person_params
params.require(:person).permit(:name, :gender, :date_of_birth, :date_of_death, :father_id, :mother_id, :current_spouse_id)
end
end | 1 | 0.019608 | 1 | 0 |
bc9446ef51645f24a79c01e2b71c936d5186f8ff | styles/templates/generic/_typography.scss | styles/templates/generic/_typography.scss | // @import "compass/typography" or some other vertical rhythm functions
//usage in settings file: font-family: (_ref: 'typography:::sansFont'),
@include add_settings((
typography: (
sansFont: "IBM Plex Sans",
sansFontLight: "IBM Plex Sans Light",
sansFontMedium: "IBM Plex Sans Medium",
baseFont: "IBM Plex Sans Regular",
serifFont: "Muli Black",
baseLineHeight: 16px,
baseFontSize: 16px,
)
));
| // @import "compass/typography" or some other vertical rhythm functions
//usage in settings file: font-family: (_ref: 'typography:::sansFont'),
/* stylelint-disable-next-line meowtec/no-px */
@include add_settings((
typography: (
sansFont: "IBM Plex Sans",
sansFontLight: "IBM Plex Sans Light",
sansFontMedium: "IBM Plex Sans Medium",
baseFont: "IBM Plex Sans Regular",
serifFont: "Muli Black",
baseLineHeight: 16px,
baseFontSize: 16px,
)
));
| Allow px on root element settings in generic | Allow px on root element settings in generic
| SCSS | lgpl-2.1 | Connexions/cnx-rulesets,Connexions/cnx-recipes,Connexions/cnx-rulesets,Connexions/cte,Connexions/cnx-rulesets,Connexions/cnx-recipes,Connexions/cnx-recipes,Connexions/cte,Connexions/cnx-recipes,Connexions/cnx-rulesets,Connexions/cnx-recipes | scss | ## Code Before:
// @import "compass/typography" or some other vertical rhythm functions
//usage in settings file: font-family: (_ref: 'typography:::sansFont'),
@include add_settings((
typography: (
sansFont: "IBM Plex Sans",
sansFontLight: "IBM Plex Sans Light",
sansFontMedium: "IBM Plex Sans Medium",
baseFont: "IBM Plex Sans Regular",
serifFont: "Muli Black",
baseLineHeight: 16px,
baseFontSize: 16px,
)
));
## Instruction:
Allow px on root element settings in generic
## Code After:
// @import "compass/typography" or some other vertical rhythm functions
//usage in settings file: font-family: (_ref: 'typography:::sansFont'),
/* stylelint-disable-next-line meowtec/no-px */
@include add_settings((
typography: (
sansFont: "IBM Plex Sans",
sansFontLight: "IBM Plex Sans Light",
sansFontMedium: "IBM Plex Sans Medium",
baseFont: "IBM Plex Sans Regular",
serifFont: "Muli Black",
baseLineHeight: 16px,
baseFontSize: 16px,
)
));
| // @import "compass/typography" or some other vertical rhythm functions
//usage in settings file: font-family: (_ref: 'typography:::sansFont'),
+ /* stylelint-disable-next-line meowtec/no-px */
@include add_settings((
typography: (
sansFont: "IBM Plex Sans",
sansFontLight: "IBM Plex Sans Light",
sansFontMedium: "IBM Plex Sans Medium",
baseFont: "IBM Plex Sans Regular",
serifFont: "Muli Black",
baseLineHeight: 16px,
baseFontSize: 16px,
)
));
| 1 | 0.055556 | 1 | 0 |
a5d2751be278356e2a03fe07f5a1d0aef11b401f | ch07/enrich_airlines.py | ch07/enrich_airlines.py | on_time_dataframe = sqlContext.read.parquet('../data/on_time_performance.parquet')
wikidata = sqlContext.read.json('../data/wikidata-20160404-all.json.bz2')
| on_time_dataframe = sqlContext.read.parquet('data/on_time_performance.parquet')
# The first step is easily expressed as SQL: get all unique tail numbers for each airline
on_time_dataframe.registerTempTable("on_time_performance")
carrier_codes = sqlContext.sql(
"SELECT DISTINCT Carrier FROM on_time_performance"
)
carrier_codes.collect()
airlines = sqlContext.read.format('com.databricks.spark.csv')\
.options(header='false', nullValue='\N')\
.load('data/airlines.csv')
airlines.show()
# Is Delta around?
airlines.filter(airlines.C3 == 'DL').show()
# Drop fields except for C1 as name, C3 as carrier code
airlines.registerTempTable("airlines")
airlines = sqlContext.sql("SELECT C1 AS Name, C3 AS CarrierCode from airlines")
# Join our 14 carrier codes to the airliens table to get our set of airlines
our_airlines = carrier_codes.join(airlines, carrier_codes.Carrier == airlines.CarrierCode)
our_airlines = our_airlines.select('Name', 'CarrierCode')
our_airlines.show()
# Store as JSON objects via a dataframe. Repartition to 1 to get 1 json file.
our_airlines.repartition(1).write.json("data/our_airlines.json")
#wikidata = sqlContext.read.json('../data/wikidata-20160404-all.json.bz2')
| Work on chapter 7 enriching airlines with the name of the carrier from the openflights airline data | Work on chapter 7 enriching airlines with the name of the carrier from the openflights airline data
| Python | mit | rjurney/Agile_Data_Code_2,naoyak/Agile_Data_Code_2,rjurney/Agile_Data_Code_2,rjurney/Agile_Data_Code_2,naoyak/Agile_Data_Code_2,rjurney/Agile_Data_Code_2,naoyak/Agile_Data_Code_2,naoyak/Agile_Data_Code_2 | python | ## Code Before:
on_time_dataframe = sqlContext.read.parquet('../data/on_time_performance.parquet')
wikidata = sqlContext.read.json('../data/wikidata-20160404-all.json.bz2')
## Instruction:
Work on chapter 7 enriching airlines with the name of the carrier from the openflights airline data
## Code After:
on_time_dataframe = sqlContext.read.parquet('data/on_time_performance.parquet')
# The first step is easily expressed as SQL: get all unique tail numbers for each airline
on_time_dataframe.registerTempTable("on_time_performance")
carrier_codes = sqlContext.sql(
"SELECT DISTINCT Carrier FROM on_time_performance"
)
carrier_codes.collect()
airlines = sqlContext.read.format('com.databricks.spark.csv')\
.options(header='false', nullValue='\N')\
.load('data/airlines.csv')
airlines.show()
# Is Delta around?
airlines.filter(airlines.C3 == 'DL').show()
# Drop fields except for C1 as name, C3 as carrier code
airlines.registerTempTable("airlines")
airlines = sqlContext.sql("SELECT C1 AS Name, C3 AS CarrierCode from airlines")
# Join our 14 carrier codes to the airliens table to get our set of airlines
our_airlines = carrier_codes.join(airlines, carrier_codes.Carrier == airlines.CarrierCode)
our_airlines = our_airlines.select('Name', 'CarrierCode')
our_airlines.show()
# Store as JSON objects via a dataframe. Repartition to 1 to get 1 json file.
our_airlines.repartition(1).write.json("data/our_airlines.json")
#wikidata = sqlContext.read.json('../data/wikidata-20160404-all.json.bz2')
| - on_time_dataframe = sqlContext.read.parquet('../data/on_time_performance.parquet')
? ---
+ on_time_dataframe = sqlContext.read.parquet('data/on_time_performance.parquet')
+ # The first step is easily expressed as SQL: get all unique tail numbers for each airline
+ on_time_dataframe.registerTempTable("on_time_performance")
+ carrier_codes = sqlContext.sql(
+ "SELECT DISTINCT Carrier FROM on_time_performance"
+ )
+ carrier_codes.collect()
+
+ airlines = sqlContext.read.format('com.databricks.spark.csv')\
+ .options(header='false', nullValue='\N')\
+ .load('data/airlines.csv')
+ airlines.show()
+
+ # Is Delta around?
+ airlines.filter(airlines.C3 == 'DL').show()
+
+ # Drop fields except for C1 as name, C3 as carrier code
+ airlines.registerTempTable("airlines")
+ airlines = sqlContext.sql("SELECT C1 AS Name, C3 AS CarrierCode from airlines")
+
+ # Join our 14 carrier codes to the airliens table to get our set of airlines
+ our_airlines = carrier_codes.join(airlines, carrier_codes.Carrier == airlines.CarrierCode)
+ our_airlines = our_airlines.select('Name', 'CarrierCode')
+ our_airlines.show()
+
+ # Store as JSON objects via a dataframe. Repartition to 1 to get 1 json file.
+ our_airlines.repartition(1).write.json("data/our_airlines.json")
+
- wikidata = sqlContext.read.json('../data/wikidata-20160404-all.json.bz2')
+ #wikidata = sqlContext.read.json('../data/wikidata-20160404-all.json.bz2')
? +
| 31 | 10.333333 | 29 | 2 |
e506b8cb9dbfd5b37e81cc5319c9be40e4e48fb3 | tests/unit/RunnerTest.php | tests/unit/RunnerTest.php | <?php
class RunnerTest extends \Codeception\TestCase\Test
{
/**
* @var \Robo\Runner
*/
private $runner;
public function _before()
{
$this->runner = new \Robo\Runner();
}
public function testHandleError()
{
$tmpLevel = error_reporting();
$this->assertFalse($this->runner->handleError());
error_reporting(0);
$this->assertTrue($this->runner->handleError());
error_reporting($tmpLevel);
}
public function testErrorIsHandled()
{
$tmpLevel = error_reporting();
error_reporting(E_USER_ERROR);
set_error_handler(array($this->runner, 'handleError'));
@trigger_error('test error', E_USER_ERROR);
$this->assertEmpty(error_get_last());
error_reporting(0);
trigger_error('test error', E_USER_ERROR);
$this->assertEmpty(error_get_last());
error_reporting($tmpLevel);
}
} | <?php
class RunnerTest extends \Codeception\TestCase\Test
{
/**
* @var \Robo\Runner
*/
private $runner;
public function _before()
{
$this->runner = new \Robo\Runner();
}
public function testHandleError()
{
$tmpLevel = error_reporting();
$this->assertFalse($this->runner->handleError());
error_reporting(0);
$this->assertTrue($this->runner->handleError());
error_reporting($tmpLevel);
}
public function testErrorIsHandled()
{
$tmpLevel = error_reporting();
// Set error_get_last to a known state. Note that it can never be
// reset; see http://php.net/manual/en/function.error-get-last.php
@trigger_error('control');
$error_description = error_get_last();
$this->assertEquals('control', $error_description['message']);
@trigger_error('');
$error_description = error_get_last();
$this->assertEquals('', $error_description['message']);
// Set error_reporting to a non-zero value. In this instance,
// 'trigger_error' would abort our test script, so we use
// @trigger_error so that execution will continue. With our
// error handler in place, the value of error_get_last() does
// not change.
error_reporting(E_USER_ERROR);
set_error_handler(array($this->runner, 'handleError'));
@trigger_error('test error', E_USER_ERROR);
$error_description = error_get_last();
$this->assertEquals('', $error_description['message']);
// Set error_reporting to zero. Now, even 'trigger_error'
// does not abort execution. The value of error_get_last()
// still does not change.
error_reporting(0);
trigger_error('test error 2', E_USER_ERROR);
$error_description = error_get_last();
$this->assertEquals('', $error_description['message']);
error_reporting($tmpLevel);
}
}
| Make testErrorIsHandled unit test pass. | Make testErrorIsHandled unit test pass.
| PHP | mit | duxet/Robo,iMi-digital/iRobo,iMi-digital/iRobo,Korikulum/Robo,davidrjonas/Robo,Codegyre/Robo,boedah/Robo,duxet/Robo,iMi-digital/iRobo | php | ## Code Before:
<?php
class RunnerTest extends \Codeception\TestCase\Test
{
/**
* @var \Robo\Runner
*/
private $runner;
public function _before()
{
$this->runner = new \Robo\Runner();
}
public function testHandleError()
{
$tmpLevel = error_reporting();
$this->assertFalse($this->runner->handleError());
error_reporting(0);
$this->assertTrue($this->runner->handleError());
error_reporting($tmpLevel);
}
public function testErrorIsHandled()
{
$tmpLevel = error_reporting();
error_reporting(E_USER_ERROR);
set_error_handler(array($this->runner, 'handleError'));
@trigger_error('test error', E_USER_ERROR);
$this->assertEmpty(error_get_last());
error_reporting(0);
trigger_error('test error', E_USER_ERROR);
$this->assertEmpty(error_get_last());
error_reporting($tmpLevel);
}
}
## Instruction:
Make testErrorIsHandled unit test pass.
## Code After:
<?php
class RunnerTest extends \Codeception\TestCase\Test
{
/**
* @var \Robo\Runner
*/
private $runner;
public function _before()
{
$this->runner = new \Robo\Runner();
}
public function testHandleError()
{
$tmpLevel = error_reporting();
$this->assertFalse($this->runner->handleError());
error_reporting(0);
$this->assertTrue($this->runner->handleError());
error_reporting($tmpLevel);
}
public function testErrorIsHandled()
{
$tmpLevel = error_reporting();
// Set error_get_last to a known state. Note that it can never be
// reset; see http://php.net/manual/en/function.error-get-last.php
@trigger_error('control');
$error_description = error_get_last();
$this->assertEquals('control', $error_description['message']);
@trigger_error('');
$error_description = error_get_last();
$this->assertEquals('', $error_description['message']);
// Set error_reporting to a non-zero value. In this instance,
// 'trigger_error' would abort our test script, so we use
// @trigger_error so that execution will continue. With our
// error handler in place, the value of error_get_last() does
// not change.
error_reporting(E_USER_ERROR);
set_error_handler(array($this->runner, 'handleError'));
@trigger_error('test error', E_USER_ERROR);
$error_description = error_get_last();
$this->assertEquals('', $error_description['message']);
// Set error_reporting to zero. Now, even 'trigger_error'
// does not abort execution. The value of error_get_last()
// still does not change.
error_reporting(0);
trigger_error('test error 2', E_USER_ERROR);
$error_description = error_get_last();
$this->assertEquals('', $error_description['message']);
error_reporting($tmpLevel);
}
}
| <?php
class RunnerTest extends \Codeception\TestCase\Test
{
/**
* @var \Robo\Runner
*/
private $runner;
public function _before()
{
$this->runner = new \Robo\Runner();
}
public function testHandleError()
{
$tmpLevel = error_reporting();
$this->assertFalse($this->runner->handleError());
error_reporting(0);
$this->assertTrue($this->runner->handleError());
error_reporting($tmpLevel);
}
public function testErrorIsHandled()
{
$tmpLevel = error_reporting();
+ // Set error_get_last to a known state. Note that it can never be
+ // reset; see http://php.net/manual/en/function.error-get-last.php
+ @trigger_error('control');
+ $error_description = error_get_last();
+ $this->assertEquals('control', $error_description['message']);
+ @trigger_error('');
+ $error_description = error_get_last();
+ $this->assertEquals('', $error_description['message']);
+
+ // Set error_reporting to a non-zero value. In this instance,
+ // 'trigger_error' would abort our test script, so we use
+ // @trigger_error so that execution will continue. With our
+ // error handler in place, the value of error_get_last() does
+ // not change.
error_reporting(E_USER_ERROR);
set_error_handler(array($this->runner, 'handleError'));
@trigger_error('test error', E_USER_ERROR);
- $this->assertEmpty(error_get_last());
+ $error_description = error_get_last();
+ $this->assertEquals('', $error_description['message']);
+ // Set error_reporting to zero. Now, even 'trigger_error'
+ // does not abort execution. The value of error_get_last()
+ // still does not change.
error_reporting(0);
- trigger_error('test error', E_USER_ERROR);
+ trigger_error('test error 2', E_USER_ERROR);
? ++
- $this->assertEmpty(error_get_last());
+ $error_description = error_get_last();
+ $this->assertEquals('', $error_description['message']);
error_reporting($tmpLevel);
}
} | 25 | 0.581395 | 22 | 3 |
451209103db742a7b1f61d7cf50540210034f4a3 | packages/co/control-dsl.yaml | packages/co/control-dsl.yaml | homepage: https://github.com/Atry/Control.Dsl#readme
changelog-type: markdown
hash: 2a7ae5ae1de458cd8f4939164cb341fb67a110f43c5fb75baa7c517ed0b53a54
test-bench-deps:
base: ! '>=4.8 && <5'
doctest: ! '>=0.16.0.1 && <0.17'
control-dsl: -any
containers: ! '>=0.5.11.0 && <0.6'
doctest-discover: ! '>=0.1.0.9 && <0.2'
temporary: ==1.3.*
maintainer: pop.atry@gmail.com
synopsis: An alternative to monads
changelog: ! '# Changelog for `Control.Dsl`
## 0.2.0.0
* Renamed package `do-notation-dsl` to `control-dsl`.
* Renamed type class `Dsl` to `PolyCont`
* Renamed type class `Do` to `Dsl`
* Addd many utility functions.
* Improved documentation and tests.
'
basic-deps:
base: ! '>=4.8 && <5'
all-versions:
- '0.2.0.0'
author: Yang Bo
latest: '0.2.0.0'
description-type: markdown
description: ! '# `Control.Dsl`: An alternative to monads
See [`Control.Dsl` on Hackage](https://hackage.haskell.org/package/control-dsl/docs/Control-Dsl.html)
for more information.
'
license-name: BSD3
| homepage: https://github.com/Atry/Control.Dsl#readme
changelog-type: markdown
hash: bc635841575fe5c57f8ad300d900b3ce935b52130ba59e24e69202b7ae33423f
test-bench-deps:
base: ! '>=4.8 && <5'
doctest: -any
control-dsl: -any
containers: -any
doctest-discover: -any
temporary: -any
maintainer: pop.atry@gmail.com
synopsis: An alternative to monads
changelog: ! '# Changelog for `Control.Dsl`
## 0.2.0.0
* Renamed package `do-notation-dsl` to `control-dsl`.
* Renamed type class `Dsl` to `PolyCont`
* Renamed type class `Do` to `Dsl`
* Addd many utility functions.
* Improved documentation and tests.
'
basic-deps:
base: ! '>=4.8 && <5'
all-versions:
- '0.2.0.0'
- '0.2.0.1'
author: Yang Bo
latest: '0.2.0.1'
description-type: haddock
description: ! 'This \"control-dsl\" package is a toolkit to create extensible Domain
Specific Languages in @do@-notation.
See "Control.Dsl" for more information.'
license-name: BSD3
| Update from Hackage at 2018-10-05T06:37:44Z | Update from Hackage at 2018-10-05T06:37:44Z
| YAML | mit | commercialhaskell/all-cabal-metadata | yaml | ## Code Before:
homepage: https://github.com/Atry/Control.Dsl#readme
changelog-type: markdown
hash: 2a7ae5ae1de458cd8f4939164cb341fb67a110f43c5fb75baa7c517ed0b53a54
test-bench-deps:
base: ! '>=4.8 && <5'
doctest: ! '>=0.16.0.1 && <0.17'
control-dsl: -any
containers: ! '>=0.5.11.0 && <0.6'
doctest-discover: ! '>=0.1.0.9 && <0.2'
temporary: ==1.3.*
maintainer: pop.atry@gmail.com
synopsis: An alternative to monads
changelog: ! '# Changelog for `Control.Dsl`
## 0.2.0.0
* Renamed package `do-notation-dsl` to `control-dsl`.
* Renamed type class `Dsl` to `PolyCont`
* Renamed type class `Do` to `Dsl`
* Addd many utility functions.
* Improved documentation and tests.
'
basic-deps:
base: ! '>=4.8 && <5'
all-versions:
- '0.2.0.0'
author: Yang Bo
latest: '0.2.0.0'
description-type: markdown
description: ! '# `Control.Dsl`: An alternative to monads
See [`Control.Dsl` on Hackage](https://hackage.haskell.org/package/control-dsl/docs/Control-Dsl.html)
for more information.
'
license-name: BSD3
## Instruction:
Update from Hackage at 2018-10-05T06:37:44Z
## Code After:
homepage: https://github.com/Atry/Control.Dsl#readme
changelog-type: markdown
hash: bc635841575fe5c57f8ad300d900b3ce935b52130ba59e24e69202b7ae33423f
test-bench-deps:
base: ! '>=4.8 && <5'
doctest: -any
control-dsl: -any
containers: -any
doctest-discover: -any
temporary: -any
maintainer: pop.atry@gmail.com
synopsis: An alternative to monads
changelog: ! '# Changelog for `Control.Dsl`
## 0.2.0.0
* Renamed package `do-notation-dsl` to `control-dsl`.
* Renamed type class `Dsl` to `PolyCont`
* Renamed type class `Do` to `Dsl`
* Addd many utility functions.
* Improved documentation and tests.
'
basic-deps:
base: ! '>=4.8 && <5'
all-versions:
- '0.2.0.0'
- '0.2.0.1'
author: Yang Bo
latest: '0.2.0.1'
description-type: haddock
description: ! 'This \"control-dsl\" package is a toolkit to create extensible Domain
Specific Languages in @do@-notation.
See "Control.Dsl" for more information.'
license-name: BSD3
| homepage: https://github.com/Atry/Control.Dsl#readme
changelog-type: markdown
- hash: 2a7ae5ae1de458cd8f4939164cb341fb67a110f43c5fb75baa7c517ed0b53a54
+ hash: bc635841575fe5c57f8ad300d900b3ce935b52130ba59e24e69202b7ae33423f
test-bench-deps:
base: ! '>=4.8 && <5'
- doctest: ! '>=0.16.0.1 && <0.17'
+ doctest: -any
control-dsl: -any
- containers: ! '>=0.5.11.0 && <0.6'
- doctest-discover: ! '>=0.1.0.9 && <0.2'
- temporary: ==1.3.*
+ containers: -any
+ doctest-discover: -any
+ temporary: -any
maintainer: pop.atry@gmail.com
synopsis: An alternative to monads
changelog: ! '# Changelog for `Control.Dsl`
## 0.2.0.0
* Renamed package `do-notation-dsl` to `control-dsl`.
* Renamed type class `Dsl` to `PolyCont`
* Renamed type class `Do` to `Dsl`
* Addd many utility functions.
* Improved documentation and tests.
'
basic-deps:
base: ! '>=4.8 && <5'
all-versions:
- '0.2.0.0'
+ - '0.2.0.1'
author: Yang Bo
- latest: '0.2.0.0'
? ^
+ latest: '0.2.0.1'
? ^
- description-type: markdown
? ^ ^^ ^^
+ description-type: haddock
? ^ ^ ^^
- description: ! '# `Control.Dsl`: An alternative to monads
+ description: ! 'This \"control-dsl\" package is a toolkit to create extensible Domain
+ Specific Languages in @do@-notation.
+ See "Control.Dsl" for more information.'
- See [`Control.Dsl` on Hackage](https://hackage.haskell.org/package/control-dsl/docs/Control-Dsl.html)
- for more information.
-
- '
license-name: BSD3 | 23 | 0.522727 | 11 | 12 |
12bb2b553091581f73e4fae7c747ff9cb07a682b | app/controllers/confirmations_controller.rb | app/controllers/confirmations_controller.rb | class ConfirmationsController < Devise::ConfirmationsController
def show
user = User.find_by_confirmation_token params[:confirmation_token]
# assign defaults
unless user.blank?
user.description = Settings.users[:default_description] if user.description.blank?
user.icon = Settings.users[:default_icon] if user.icon.blank?
user.save
# send a thank-you for signing up email
AccountMailer.delay.sign_up_thank_you(user, request.protocol, request.host_with_port)
end
super
end
protected
def after_confirmation_path_for(resource_name, resource)
user_editor_path(resource)
end
end
| class ConfirmationsController < Devise::ConfirmationsController
def new
super
end
def create
if params[:user] and params[:user][:email] and (user = User.where(:email => params[:user][:email]).first).blank?
flash[:alert] = "Email is not in the system"
elsif user.confirmed?
flash[:alert] = "Account is already confirmed - please try signing in"
else
super
end
flash.discard
end
def show
user = User.find_by_confirmation_token params[:confirmation_token]
# assign defaults
unless user.blank?
user.description = Settings.users[:default_description] if user.description.blank?
user.icon = Settings.users[:default_icon] if user.icon.blank?
user.save
# send a thank-you for signing up email
AccountMailer.delay.sign_up_thank_you(user, request.protocol, request.host_with_port)
end
super
end
protected
def after_confirmation_path_for(resource_name, resource)
user_editor_path(resource)
end
def after_resending_confirmation_instructions_path_for(resource_name)
after_devise_path
end
end
| Update Confirmations Controller for Resend | Update Confirmations Controller for Resend
Update the Confirmations Controller to handle custom resend of
confirmation instructions.
| Ruby | mit | jekhokie/IfSimply,jekhokie/IfSimply,jekhokie/IfSimply | ruby | ## Code Before:
class ConfirmationsController < Devise::ConfirmationsController
def show
user = User.find_by_confirmation_token params[:confirmation_token]
# assign defaults
unless user.blank?
user.description = Settings.users[:default_description] if user.description.blank?
user.icon = Settings.users[:default_icon] if user.icon.blank?
user.save
# send a thank-you for signing up email
AccountMailer.delay.sign_up_thank_you(user, request.protocol, request.host_with_port)
end
super
end
protected
def after_confirmation_path_for(resource_name, resource)
user_editor_path(resource)
end
end
## Instruction:
Update Confirmations Controller for Resend
Update the Confirmations Controller to handle custom resend of
confirmation instructions.
## Code After:
class ConfirmationsController < Devise::ConfirmationsController
def new
super
end
def create
if params[:user] and params[:user][:email] and (user = User.where(:email => params[:user][:email]).first).blank?
flash[:alert] = "Email is not in the system"
elsif user.confirmed?
flash[:alert] = "Account is already confirmed - please try signing in"
else
super
end
flash.discard
end
def show
user = User.find_by_confirmation_token params[:confirmation_token]
# assign defaults
unless user.blank?
user.description = Settings.users[:default_description] if user.description.blank?
user.icon = Settings.users[:default_icon] if user.icon.blank?
user.save
# send a thank-you for signing up email
AccountMailer.delay.sign_up_thank_you(user, request.protocol, request.host_with_port)
end
super
end
protected
def after_confirmation_path_for(resource_name, resource)
user_editor_path(resource)
end
def after_resending_confirmation_instructions_path_for(resource_name)
after_devise_path
end
end
| class ConfirmationsController < Devise::ConfirmationsController
+ def new
+ super
+ end
+
+ def create
+ if params[:user] and params[:user][:email] and (user = User.where(:email => params[:user][:email]).first).blank?
+ flash[:alert] = "Email is not in the system"
+ elsif user.confirmed?
+ flash[:alert] = "Account is already confirmed - please try signing in"
+ else
+ super
+ end
+
+ flash.discard
+ end
+
def show
user = User.find_by_confirmation_token params[:confirmation_token]
# assign defaults
unless user.blank?
user.description = Settings.users[:default_description] if user.description.blank?
user.icon = Settings.users[:default_icon] if user.icon.blank?
user.save
# send a thank-you for signing up email
AccountMailer.delay.sign_up_thank_you(user, request.protocol, request.host_with_port)
end
super
end
protected
def after_confirmation_path_for(resource_name, resource)
user_editor_path(resource)
end
+
+ def after_resending_confirmation_instructions_path_for(resource_name)
+ after_devise_path
+ end
end | 20 | 0.833333 | 20 | 0 |
4c055e24c94d576d7b32c015f81c0686d4d34b53 | app/views/shared/_flash.html.erb | app/views/shared/_flash.html.erb | <div class="max-w-7xl mx-auto relative flex flex-col items-end space-y-4">
<div class="fixed z-40 mr-8">
<% flash.each do |type, message| %>
<%= render Alerts::FlashComponent.new(type: type, message: message) %>
<% end %>
</div>
</div>
| <div class="relative flex flex-col items-end space-y-4">
<div class="fixed z-40 mr-8">
<% flash.each do |type, message| %>
<%= render Alerts::FlashComponent.new(type: type, message: message) %>
<% end %>
</div>
</div>
| Move alerts closer to view port right edge | Feature: Move alerts closer to view port right edge
Because:
* It looks more natural as an alert notification when not constrained to the page container.
| HTML+ERB | mit | TheOdinProject/theodinproject,TheOdinProject/theodinproject,TheOdinProject/theodinproject,TheOdinProject/theodinproject | html+erb | ## Code Before:
<div class="max-w-7xl mx-auto relative flex flex-col items-end space-y-4">
<div class="fixed z-40 mr-8">
<% flash.each do |type, message| %>
<%= render Alerts::FlashComponent.new(type: type, message: message) %>
<% end %>
</div>
</div>
## Instruction:
Feature: Move alerts closer to view port right edge
Because:
* It looks more natural as an alert notification when not constrained to the page container.
## Code After:
<div class="relative flex flex-col items-end space-y-4">
<div class="fixed z-40 mr-8">
<% flash.each do |type, message| %>
<%= render Alerts::FlashComponent.new(type: type, message: message) %>
<% end %>
</div>
</div>
| - <div class="max-w-7xl mx-auto relative flex flex-col items-end space-y-4">
? ------------------
+ <div class="relative flex flex-col items-end space-y-4">
<div class="fixed z-40 mr-8">
<% flash.each do |type, message| %>
<%= render Alerts::FlashComponent.new(type: type, message: message) %>
<% end %>
</div>
</div> | 2 | 0.285714 | 1 | 1 |
cba6f359128792b90ca66fe04d86f9b36bfaa5d0 | scripts/check-examples.sh | scripts/check-examples.sh | if ! git diff --word-diff=color --exit-code HEAD -- ./examples/compiled/*.vg.json
then
echo "Output examples vega specs are outdated."
exit 1
elif ! git diff --word-diff=color --exit-code HEAD -- ./examples/specs/normalized/*.vl.json
then
echo "Output normalized examples vega-lite specs are outdated."
exit 1
else
exit 0
fi
| if ! git diff --word-diff=color --exit-code HEAD -- ./examples/compiled/vega_version
then
echo "Output examples were generated using an older version of Vega."
exit 1
elif ! git diff --word-diff=color --exit-code HEAD -- ./examples/compiled/*.vg.json
then
echo "Output examples vega specs are outdated."
exit 1
elif ! git diff --word-diff=color --exit-code HEAD -- ./examples/specs/normalized/*.vl.json
then
echo "Output normalized examples vega-lite specs are outdated."
exit 1
else
exit 0
fi
| Make test fails if examples do not use latest version of Vega | Make test fails if examples do not use latest version of Vega
| Shell | bsd-3-clause | uwdata/vega-lite,uwdata/vega-lite,vega/vega-lite,uwdata/vega-lite,vega/vega-lite,uwdata/vega-lite,vega/vega-lite,uwdata/vega-lite,vega/vega-lite,vega/vega-lite | shell | ## Code Before:
if ! git diff --word-diff=color --exit-code HEAD -- ./examples/compiled/*.vg.json
then
echo "Output examples vega specs are outdated."
exit 1
elif ! git diff --word-diff=color --exit-code HEAD -- ./examples/specs/normalized/*.vl.json
then
echo "Output normalized examples vega-lite specs are outdated."
exit 1
else
exit 0
fi
## Instruction:
Make test fails if examples do not use latest version of Vega
## Code After:
if ! git diff --word-diff=color --exit-code HEAD -- ./examples/compiled/vega_version
then
echo "Output examples were generated using an older version of Vega."
exit 1
elif ! git diff --word-diff=color --exit-code HEAD -- ./examples/compiled/*.vg.json
then
echo "Output examples vega specs are outdated."
exit 1
elif ! git diff --word-diff=color --exit-code HEAD -- ./examples/specs/normalized/*.vl.json
then
echo "Output normalized examples vega-lite specs are outdated."
exit 1
else
exit 0
fi
| + if ! git diff --word-diff=color --exit-code HEAD -- ./examples/compiled/vega_version
+ then
+ echo "Output examples were generated using an older version of Vega."
+ exit 1
- if ! git diff --word-diff=color --exit-code HEAD -- ./examples/compiled/*.vg.json
+ elif ! git diff --word-diff=color --exit-code HEAD -- ./examples/compiled/*.vg.json
? ++
then
echo "Output examples vega specs are outdated."
exit 1
elif ! git diff --word-diff=color --exit-code HEAD -- ./examples/specs/normalized/*.vl.json
then
echo "Output normalized examples vega-lite specs are outdated."
exit 1
else
exit 0
fi | 6 | 0.545455 | 5 | 1 |
29e01ab226f5451e22ba3291e81bbaff13ce1867 | greenmine/settings/__init__.py | greenmine/settings/__init__.py |
from __future__ import absolute_import
import os
try:
print "Trying import local.py settings..."
from .local import *
except ImportError:
print "Trying import development.py settings..."
from .development import *
| from __future__ import (
absolute_import,
print_function
)
import os, sys
try:
print("Trying import local.py settings...", file=sys.stderr)
from .local import *
except ImportError:
print("Trying import development.py settings...", file=sys.stderr)
from .development import *
| Send more print message to sys.stderr | Smallfix: Send more print message to sys.stderr
| Python | agpl-3.0 | Zaneh-/bearded-tribble-back,astagi/taiga-back,astronaut1712/taiga-back,dayatz/taiga-back,bdang2012/taiga-back-casting,jeffdwyatt/taiga-back,crr0004/taiga-back,seanchen/taiga-back,coopsource/taiga-back,EvgeneOskin/taiga-back,frt-arch/taiga-back,Rademade/taiga-back,obimod/taiga-back,dycodedev/taiga-back,Tigerwhit4/taiga-back,19kestier/taiga-back,gauravjns/taiga-back,jeffdwyatt/taiga-back,taigaio/taiga-back,gam-phon/taiga-back,taigaio/taiga-back,obimod/taiga-back,forging2012/taiga-back,WALR/taiga-back,CoolCloud/taiga-back,coopsource/taiga-back,dayatz/taiga-back,EvgeneOskin/taiga-back,astagi/taiga-back,bdang2012/taiga-back-casting,dycodedev/taiga-back,19kestier/taiga-back,gam-phon/taiga-back,obimod/taiga-back,rajiteh/taiga-back,coopsource/taiga-back,crr0004/taiga-back,Tigerwhit4/taiga-back,EvgeneOskin/taiga-back,CoolCloud/taiga-back,joshisa/taiga-back,WALR/taiga-back,dayatz/taiga-back,coopsource/taiga-back,CoolCloud/taiga-back,CMLL/taiga-back,forging2012/taiga-back,seanchen/taiga-back,astronaut1712/taiga-back,Tigerwhit4/taiga-back,seanchen/taiga-back,forging2012/taiga-back,gauravjns/taiga-back,gauravjns/taiga-back,CoolCloud/taiga-back,Zaneh-/bearded-tribble-back,Tigerwhit4/taiga-back,jeffdwyatt/taiga-back,rajiteh/taiga-back,frt-arch/taiga-back,rajiteh/taiga-back,dycodedev/taiga-back,seanchen/taiga-back,forging2012/taiga-back,xdevelsistemas/taiga-back-community,WALR/taiga-back,gam-phon/taiga-back,CMLL/taiga-back,Rademade/taiga-back,CMLL/taiga-back,gauravjns/taiga-back,Rademade/taiga-back,astagi/taiga-back,joshisa/taiga-back,Zaneh-/bearded-tribble-back,xdevelsistemas/taiga-back-community,19kestier/taiga-back,taigaio/taiga-back,jeffdwyatt/taiga-back,crr0004/taiga-back,astronaut1712/taiga-back,joshisa/taiga-back,rajiteh/taiga-back,bdang2012/taiga-back-casting,crr0004/taiga-back,CMLL/taiga-back,astagi/taiga-back,WALR/taiga-back,EvgeneOskin/taiga-back,astronaut1712/taiga-back,Rademade/taiga-back,obimod/taiga-back,xdevelsistemas/taiga-back-community,dycodedev/taiga-back,gam-phon/taiga-back,bdang2012/taiga-back-casting,frt-arch/taiga-back,joshisa/taiga-back,Rademade/taiga-back | python | ## Code Before:
from __future__ import absolute_import
import os
try:
print "Trying import local.py settings..."
from .local import *
except ImportError:
print "Trying import development.py settings..."
from .development import *
## Instruction:
Smallfix: Send more print message to sys.stderr
## Code After:
from __future__ import (
absolute_import,
print_function
)
import os, sys
try:
print("Trying import local.py settings...", file=sys.stderr)
from .local import *
except ImportError:
print("Trying import development.py settings...", file=sys.stderr)
from .development import *
| -
- from __future__ import absolute_import
+ from __future__ import (
+ absolute_import,
+ print_function
+ )
- import os
+ import os, sys
? +++++
try:
- print "Trying import local.py settings..."
? ^
+ print("Trying import local.py settings...", file=sys.stderr)
? ^ ++++++++++++++++++
from .local import *
except ImportError:
- print "Trying import development.py settings..."
? ^
+ print("Trying import development.py settings...", file=sys.stderr)
? ^ ++++++++++++++++++
from .development import * | 12 | 1.2 | 7 | 5 |
ea63ba28e0fa584f590d26c09cf53c0d803745b9 | .eslintrc.yml | .eslintrc.yml | ---
parser: babel-eslint
parserOptions:
ecmaVersion: 2017
sourceType: module
ecmaFeatures:
jsx: true
experimentalObjectRestSpread: true
env:
browser: true
node: true
commonjs: true
plugins:
- react
extends:
- eslint:recommended
- plugin:react/recommended
rules:
no-template-curly-in-string: warn
array-callback-return: error
curly: error
dot-location:
- warn
- property
dot-notation: error
eqeqeq:
- error
- smart
no-return-await: warn
yoda:
- error
- never
- exceptRange: true
semi:
- error
- never
indent:
- error
- 2
keyword-spacing: error
arrow-spacing: error
quotes:
- error
- single
- allowTemplateLiterals: false
avoidEscape: true
prefer-const: error
array-bracket-spacing: error
comma-spacing: error
capitalized-comments:
- error
- always
- {ignorePattern: webpackChunkName}
brace-style: error
no-throw-literal: error
no-return-assign: error
no-multi-str: error
no-multi-spaces: error
space-infix-ops: error
space-unary-ops: error
no-loop-func: error
no-floating-decimal: error
comma-dangle: error
object-curly-spacing: error
no-console: off
jsx-quotes: error
react/prop-types: off
| ---
parser: babel-eslint
parserOptions:
ecmaVersion: 2017
sourceType: module
ecmaFeatures:
jsx: true
experimentalObjectRestSpread: true
env:
browser: true
node: true
commonjs: true
plugins:
- react
extends:
- eslint:recommended
- plugin:react/recommended
rules:
no-template-curly-in-string: warn
array-callback-return: error
curly: error
dot-location:
- warn
- property
dot-notation: error
eqeqeq:
- error
- smart
no-return-await: warn
yoda:
- error
- never
- exceptRange: true
semi:
- error
- never
indent:
- error
- 2
keyword-spacing: error
arrow-spacing: error
quotes:
- error
- single
- allowTemplateLiterals: false
avoidEscape: true
prefer-const: error
array-bracket-spacing: error
comma-spacing: error
capitalized-comments:
- error
- always
- {ignorePattern: webpackChunkName}
brace-style: error
no-throw-literal: error
no-return-assign: error
no-multi-str: error
no-multi-spaces: error
space-infix-ops: error
space-unary-ops: error
no-loop-func: error
no-floating-decimal: error
comma-dangle: error
object-curly-spacing: error
no-console: off
linebreak-style: error
eol-last: error
jsx-quotes: error
react/prop-types: off
| Add linebreak rules to eslint | Add linebreak rules to eslint
| YAML | mit | jsse-2017-ph23/web-frontend,jsse-2017-ph23/web-frontend,jsse-2017-ph23/web-frontend | yaml | ## Code Before:
---
parser: babel-eslint
parserOptions:
ecmaVersion: 2017
sourceType: module
ecmaFeatures:
jsx: true
experimentalObjectRestSpread: true
env:
browser: true
node: true
commonjs: true
plugins:
- react
extends:
- eslint:recommended
- plugin:react/recommended
rules:
no-template-curly-in-string: warn
array-callback-return: error
curly: error
dot-location:
- warn
- property
dot-notation: error
eqeqeq:
- error
- smart
no-return-await: warn
yoda:
- error
- never
- exceptRange: true
semi:
- error
- never
indent:
- error
- 2
keyword-spacing: error
arrow-spacing: error
quotes:
- error
- single
- allowTemplateLiterals: false
avoidEscape: true
prefer-const: error
array-bracket-spacing: error
comma-spacing: error
capitalized-comments:
- error
- always
- {ignorePattern: webpackChunkName}
brace-style: error
no-throw-literal: error
no-return-assign: error
no-multi-str: error
no-multi-spaces: error
space-infix-ops: error
space-unary-ops: error
no-loop-func: error
no-floating-decimal: error
comma-dangle: error
object-curly-spacing: error
no-console: off
jsx-quotes: error
react/prop-types: off
## Instruction:
Add linebreak rules to eslint
## Code After:
---
parser: babel-eslint
parserOptions:
ecmaVersion: 2017
sourceType: module
ecmaFeatures:
jsx: true
experimentalObjectRestSpread: true
env:
browser: true
node: true
commonjs: true
plugins:
- react
extends:
- eslint:recommended
- plugin:react/recommended
rules:
no-template-curly-in-string: warn
array-callback-return: error
curly: error
dot-location:
- warn
- property
dot-notation: error
eqeqeq:
- error
- smart
no-return-await: warn
yoda:
- error
- never
- exceptRange: true
semi:
- error
- never
indent:
- error
- 2
keyword-spacing: error
arrow-spacing: error
quotes:
- error
- single
- allowTemplateLiterals: false
avoidEscape: true
prefer-const: error
array-bracket-spacing: error
comma-spacing: error
capitalized-comments:
- error
- always
- {ignorePattern: webpackChunkName}
brace-style: error
no-throw-literal: error
no-return-assign: error
no-multi-str: error
no-multi-spaces: error
space-infix-ops: error
space-unary-ops: error
no-loop-func: error
no-floating-decimal: error
comma-dangle: error
object-curly-spacing: error
no-console: off
linebreak-style: error
eol-last: error
jsx-quotes: error
react/prop-types: off
| ---
parser: babel-eslint
parserOptions:
ecmaVersion: 2017
sourceType: module
ecmaFeatures:
jsx: true
experimentalObjectRestSpread: true
env:
browser: true
node: true
commonjs: true
plugins:
- react
extends:
- eslint:recommended
- plugin:react/recommended
rules:
no-template-curly-in-string: warn
array-callback-return: error
curly: error
dot-location:
- warn
- property
dot-notation: error
eqeqeq:
- error
- smart
no-return-await: warn
yoda:
- error
- never
- exceptRange: true
semi:
- error
- never
indent:
- error
- 2
keyword-spacing: error
arrow-spacing: error
quotes:
- error
- single
- allowTemplateLiterals: false
avoidEscape: true
prefer-const: error
array-bracket-spacing: error
comma-spacing: error
capitalized-comments:
- error
- always
- {ignorePattern: webpackChunkName}
brace-style: error
no-throw-literal: error
no-return-assign: error
no-multi-str: error
no-multi-spaces: error
space-infix-ops: error
space-unary-ops: error
no-loop-func: error
no-floating-decimal: error
comma-dangle: error
object-curly-spacing: error
no-console: off
+ linebreak-style: error
+ eol-last: error
jsx-quotes: error
react/prop-types: off | 2 | 0.028169 | 2 | 0 |
ddb95e56adcb1e6f83660679523e66a88430d622 | src/uk/org/cinquin/mutinack/misc_util/NamedPoolThreadFactory.java | src/uk/org/cinquin/mutinack/misc_util/NamedPoolThreadFactory.java | package uk.org.cinquin.mutinack.misc_util;
import java.util.concurrent.ThreadFactory;
public class NamedPoolThreadFactory implements ThreadFactory {
private int counter = 0;
final String name;
public NamedPoolThreadFactory(String name) {
this.name = name;
}
@Override
public Thread newThread(Runnable r) {
Thread t = new Thread(r);
t.setName(name + counter++);
return t;
}
}
| package uk.org.cinquin.mutinack.misc_util;
import java.util.concurrent.ThreadFactory;
public class NamedPoolThreadFactory implements ThreadFactory {
private int counter = 0;
final String name;
public NamedPoolThreadFactory(String name) {
this.name = name;
}
@Override
public Thread newThread(Runnable r) {
Thread t = new Thread(r);
t.setName(name + counter++);
t.setDaemon(true);
return t;
}
}
| Mark pool threads as daemon. | Mark pool threads as daemon.
Signed-off-by: Olivier Cinquin <65f36a1df3704fccc062437169cf2fbbed716a11@uci.edu>
| Java | agpl-3.0 | cinquin/mutinack,cinquin/mutinack,cinquin/mutinack,cinquin/mutinack,cinquin/mutinack | java | ## Code Before:
package uk.org.cinquin.mutinack.misc_util;
import java.util.concurrent.ThreadFactory;
public class NamedPoolThreadFactory implements ThreadFactory {
private int counter = 0;
final String name;
public NamedPoolThreadFactory(String name) {
this.name = name;
}
@Override
public Thread newThread(Runnable r) {
Thread t = new Thread(r);
t.setName(name + counter++);
return t;
}
}
## Instruction:
Mark pool threads as daemon.
Signed-off-by: Olivier Cinquin <65f36a1df3704fccc062437169cf2fbbed716a11@uci.edu>
## Code After:
package uk.org.cinquin.mutinack.misc_util;
import java.util.concurrent.ThreadFactory;
public class NamedPoolThreadFactory implements ThreadFactory {
private int counter = 0;
final String name;
public NamedPoolThreadFactory(String name) {
this.name = name;
}
@Override
public Thread newThread(Runnable r) {
Thread t = new Thread(r);
t.setName(name + counter++);
t.setDaemon(true);
return t;
}
}
| package uk.org.cinquin.mutinack.misc_util;
import java.util.concurrent.ThreadFactory;
public class NamedPoolThreadFactory implements ThreadFactory {
private int counter = 0;
final String name;
public NamedPoolThreadFactory(String name) {
this.name = name;
}
@Override
public Thread newThread(Runnable r) {
Thread t = new Thread(r);
t.setName(name + counter++);
+ t.setDaemon(true);
return t;
}
} | 1 | 0.052632 | 1 | 0 |
c642acd29a013c25fab420961109a0a1ebe3c195 | open511/views.py | open511/views.py | from open511.models import RoadEvent
from open511.utils.views import JSONView
class RoadEventListView(JSONView):
def get(self, request):
return [
rdev.to_json_structure() for rdev in RoadEvent.objects.all()
]
list_roadevents = RoadEventListView.as_view()
| from open511.models import RoadEvent
from open511.utils.views import JSONView
class RoadEventListView(JSONView):
allow_jsonp = True
def get(self, request):
return [
rdev.to_json_structure() for rdev in RoadEvent.objects.all()
]
list_roadevents = RoadEventListView.as_view()
| Allow JSONP requests to the roadevents API | Allow JSONP requests to the roadevents API
| Python | mit | Open511/open511-server,Open511/open511-server,Open511/open511-server | python | ## Code Before:
from open511.models import RoadEvent
from open511.utils.views import JSONView
class RoadEventListView(JSONView):
def get(self, request):
return [
rdev.to_json_structure() for rdev in RoadEvent.objects.all()
]
list_roadevents = RoadEventListView.as_view()
## Instruction:
Allow JSONP requests to the roadevents API
## Code After:
from open511.models import RoadEvent
from open511.utils.views import JSONView
class RoadEventListView(JSONView):
allow_jsonp = True
def get(self, request):
return [
rdev.to_json_structure() for rdev in RoadEvent.objects.all()
]
list_roadevents = RoadEventListView.as_view()
| from open511.models import RoadEvent
from open511.utils.views import JSONView
class RoadEventListView(JSONView):
+
+ allow_jsonp = True
def get(self, request):
return [
rdev.to_json_structure() for rdev in RoadEvent.objects.all()
]
list_roadevents = RoadEventListView.as_view()
| 2 | 0.166667 | 2 | 0 |
7bd25e3e9ee1cd45427b943b5b1c4a014d8e9a35 | database/migrations/20180515205626_change_messages_primary_key.php | database/migrations/20180515205626_change_messages_primary_key.php | <?php
use Movim\Migration;
use Illuminate\Database\Schema\Blueprint;
class ChangeMessagesPrimaryKey extends Migration
{
public function up()
{
$this->disableForeignKeyCheck();
$this->schema->table('messages', function(Blueprint $table) {
$table->dropPrimary('messages_pkey');
$table->primary(['user_id', 'jidfrom', 'id']);
});
$this->enableForeignKeyCheck();
}
public function down()
{
$this->disableForeignKeyCheck();
$this->schema->table('messages', function(Blueprint $table) {
$table->dropPrimary('messages_pkey');
$table->primary(['user_id', 'id']);
});
$this->enableForeignKeyCheck();
}
}
| <?php
use Movim\Migration;
use Illuminate\Database\Schema\Blueprint;
class ChangeMessagesPrimaryKey extends Migration
{
public function up()
{
$this->schema->table('messages', function(Blueprint $table) {
$table->dropForeign(['user_id']);
$table->dropPrimary('messages_pkey');
$table->primary(['user_id', 'jidfrom', 'id']);
$table->foreign('user_id')
->references('id')->on('users')
->onDelete('cascade');
});
}
public function down()
{
$this->schema->table('messages', function(Blueprint $table) {
$table->dropForeign(['user_id']);
$table->dropPrimary('messages_pkey');
$table->primary(['user_id', 'id']);
$table->foreign('user_id')
->references('id')->on('users')
->onDelete('cascade');
});
}
}
| Fix last migration for some MySQL servers | Fix last migration for some MySQL servers
| PHP | agpl-3.0 | edhelas/movim,edhelas/movim,movim/movim,edhelas/movim,movim/movim,edhelas/movim,movim/movim | php | ## Code Before:
<?php
use Movim\Migration;
use Illuminate\Database\Schema\Blueprint;
class ChangeMessagesPrimaryKey extends Migration
{
public function up()
{
$this->disableForeignKeyCheck();
$this->schema->table('messages', function(Blueprint $table) {
$table->dropPrimary('messages_pkey');
$table->primary(['user_id', 'jidfrom', 'id']);
});
$this->enableForeignKeyCheck();
}
public function down()
{
$this->disableForeignKeyCheck();
$this->schema->table('messages', function(Blueprint $table) {
$table->dropPrimary('messages_pkey');
$table->primary(['user_id', 'id']);
});
$this->enableForeignKeyCheck();
}
}
## Instruction:
Fix last migration for some MySQL servers
## Code After:
<?php
use Movim\Migration;
use Illuminate\Database\Schema\Blueprint;
class ChangeMessagesPrimaryKey extends Migration
{
public function up()
{
$this->schema->table('messages', function(Blueprint $table) {
$table->dropForeign(['user_id']);
$table->dropPrimary('messages_pkey');
$table->primary(['user_id', 'jidfrom', 'id']);
$table->foreign('user_id')
->references('id')->on('users')
->onDelete('cascade');
});
}
public function down()
{
$this->schema->table('messages', function(Blueprint $table) {
$table->dropForeign(['user_id']);
$table->dropPrimary('messages_pkey');
$table->primary(['user_id', 'id']);
$table->foreign('user_id')
->references('id')->on('users')
->onDelete('cascade');
});
}
}
| <?php
use Movim\Migration;
use Illuminate\Database\Schema\Blueprint;
class ChangeMessagesPrimaryKey extends Migration
{
public function up()
{
- $this->disableForeignKeyCheck();
-
$this->schema->table('messages', function(Blueprint $table) {
+ $table->dropForeign(['user_id']);
$table->dropPrimary('messages_pkey');
$table->primary(['user_id', 'jidfrom', 'id']);
+ $table->foreign('user_id')
+ ->references('id')->on('users')
+ ->onDelete('cascade');
});
-
- $this->enableForeignKeyCheck();
}
public function down()
{
- $this->disableForeignKeyCheck();
-
$this->schema->table('messages', function(Blueprint $table) {
+ $table->dropForeign(['user_id']);
$table->dropPrimary('messages_pkey');
$table->primary(['user_id', 'id']);
+ $table->foreign('user_id')
+ ->references('id')->on('users')
+ ->onDelete('cascade');
});
-
- $this->enableForeignKeyCheck();
}
} | 16 | 0.516129 | 8 | 8 |
01e88cb439c5b53bb4f114ddf58d0d9ff0c55d17 | routes/index.js | routes/index.js | var express = require('express')
var router = express.Router()
router.get('/', function (req, res, next) {
console.log('Cookies: ', req.cookies)
if (Object.keys(req.cookies).indexOf('username') !== -1) {
return res.redirect('/studies')
} else {
res.render('index', { title: 'Choose a new username / Enter your username' })
}
})
router.post('/login', function (req, res, next) {
if (req.param('username').length) {
res.cookie('username', req.param('username'), { httpOnly: false, secure: false, maxAge: 432000000 })
res.redirect('/studies')
} else {
res.redirect('/')
}
})
router.get('/logout', function (req, res, next) {
res.clearCookie('username')
res.redirect('/')
})
module.exports = router
| var express = require('express')
var router = express.Router()
router.get('/', function (req, res, next) {
console.log('Cookies: ', req.cookies)
if (Object.keys(req.cookies).indexOf('username') !== -1) {
return res.redirect('/studies')
} else {
res.render('index', { title: 'Choose a new username / Enter your username' })
}
})
router.post('/login', function (req, res, next) {
if (req.body.username.length) {
res.cookie('username', req.body.username, { httpOnly: false, secure: false, maxAge: 432000000 })
res.redirect('/studies')
} else {
res.redirect('/')
}
})
router.get('/logout', function (req, res, next) {
res.clearCookie('username')
res.redirect('/')
})
module.exports = router
| Handle xpress deprecate warning regarding req.param() | Handle xpress deprecate warning regarding req.param()
| JavaScript | mit | sleutho/HstWebApp,sleutho/HstWebApp | javascript | ## Code Before:
var express = require('express')
var router = express.Router()
router.get('/', function (req, res, next) {
console.log('Cookies: ', req.cookies)
if (Object.keys(req.cookies).indexOf('username') !== -1) {
return res.redirect('/studies')
} else {
res.render('index', { title: 'Choose a new username / Enter your username' })
}
})
router.post('/login', function (req, res, next) {
if (req.param('username').length) {
res.cookie('username', req.param('username'), { httpOnly: false, secure: false, maxAge: 432000000 })
res.redirect('/studies')
} else {
res.redirect('/')
}
})
router.get('/logout', function (req, res, next) {
res.clearCookie('username')
res.redirect('/')
})
module.exports = router
## Instruction:
Handle xpress deprecate warning regarding req.param()
## Code After:
var express = require('express')
var router = express.Router()
router.get('/', function (req, res, next) {
console.log('Cookies: ', req.cookies)
if (Object.keys(req.cookies).indexOf('username') !== -1) {
return res.redirect('/studies')
} else {
res.render('index', { title: 'Choose a new username / Enter your username' })
}
})
router.post('/login', function (req, res, next) {
if (req.body.username.length) {
res.cookie('username', req.body.username, { httpOnly: false, secure: false, maxAge: 432000000 })
res.redirect('/studies')
} else {
res.redirect('/')
}
})
router.get('/logout', function (req, res, next) {
res.clearCookie('username')
res.redirect('/')
})
module.exports = router
| var express = require('express')
var router = express.Router()
router.get('/', function (req, res, next) {
console.log('Cookies: ', req.cookies)
if (Object.keys(req.cookies).indexOf('username') !== -1) {
return res.redirect('/studies')
} else {
res.render('index', { title: 'Choose a new username / Enter your username' })
}
})
router.post('/login', function (req, res, next) {
- if (req.param('username').length) {
? ^^^^^^^ --
+ if (req.body.username.length) {
? ^^^^^
- res.cookie('username', req.param('username'), { httpOnly: false, secure: false, maxAge: 432000000 })
? ^^^^^^^ --
+ res.cookie('username', req.body.username, { httpOnly: false, secure: false, maxAge: 432000000 })
? ^^^^^
res.redirect('/studies')
} else {
res.redirect('/')
}
})
router.get('/logout', function (req, res, next) {
res.clearCookie('username')
res.redirect('/')
})
module.exports = router | 4 | 0.148148 | 2 | 2 |
3223d64053b0d7d4b2ab60bc08e3d0c083509d45 | generators/sage_controller/sage_controller_generator.rb | generators/sage_controller/sage_controller_generator.rb | class SageControllerGenerator < Rails::Generator::Base
attr_accessor :controller_name, :controller_file_name, :password
def initialize(runtime_args, runtime_options = {})
super
@controller_url = (args.shift || 'sage').underscore
@controller_name = @controller_url.camelize + 'Controller'
@controller_file_name = @controller_name.underscore
@password = generate_password
end
def manifest
recorded_session = record do |m|
m.template 'controller.rb', File.join('app', 'controllers', "#{@controller_file_name}.rb")
end
puts ""
puts "Upload URL: /#{@controller_url}/upload"
puts "Download URL: /#{@controller_url}/download"
puts "Import URL: /#{@controller_url}/import"
puts ""
puts "Your controller is protected with http authentication, edit the"
puts "authenticate method in app/controllers/#{@controller_file_name}"
puts "to change this"
puts ""
puts " Username: sageuser"
puts " Password: #{@password}"
puts ""
recorded_session
end
protected
def banner
"Usage: #{$0} sage_controller [CONTROLLERNAME]"
end
def generate_password(length = 8)
'foobar'
end
end
| class SageControllerGenerator < Rails::Generator::Base
attr_accessor :controller_name, :controller_file_name, :password
def initialize(runtime_args, runtime_options = {})
super
@controller_url = (args.shift || 'sage').underscore
@controller_name = @controller_url.camelize + 'Controller'
@controller_file_name = @controller_name.underscore
@password = generate_password
end
def manifest
recorded_session = record do |m|
m.template 'controller.rb', File.join('app', 'controllers', "#{@controller_file_name}.rb")
end
puts ""
puts "Upload URL: /#{@controller_url}/upload"
puts "Download URL: /#{@controller_url}/download"
puts "Import URL: /#{@controller_url}/import"
puts ""
puts "Your controller is protected with http authentication, edit the"
puts "authenticate method in app/controllers/#{@controller_file_name}"
puts "to change this"
puts ""
puts " Username: sageuser"
puts " Password: #{@password}"
puts ""
recorded_session
end
protected
def banner
"Usage: #{$0} sage_controller [CONTROLLERNAME]"
end
def generate_password(pass_length = 8)
char_list = ("a".."z").to_a + ("A".."Z").to_a + ("0".."9").to_a
generate_pass = ""
1.upto(pass_length) { |i| generate_pass << char_list[rand(char_list.size)] }
return generate_pass
end
end
| Create proper passwords in sage_controller generator | Create proper passwords in sage_controller generator
| Ruby | mit | jebw/connect_to_sage | ruby | ## Code Before:
class SageControllerGenerator < Rails::Generator::Base
attr_accessor :controller_name, :controller_file_name, :password
def initialize(runtime_args, runtime_options = {})
super
@controller_url = (args.shift || 'sage').underscore
@controller_name = @controller_url.camelize + 'Controller'
@controller_file_name = @controller_name.underscore
@password = generate_password
end
def manifest
recorded_session = record do |m|
m.template 'controller.rb', File.join('app', 'controllers', "#{@controller_file_name}.rb")
end
puts ""
puts "Upload URL: /#{@controller_url}/upload"
puts "Download URL: /#{@controller_url}/download"
puts "Import URL: /#{@controller_url}/import"
puts ""
puts "Your controller is protected with http authentication, edit the"
puts "authenticate method in app/controllers/#{@controller_file_name}"
puts "to change this"
puts ""
puts " Username: sageuser"
puts " Password: #{@password}"
puts ""
recorded_session
end
protected
def banner
"Usage: #{$0} sage_controller [CONTROLLERNAME]"
end
def generate_password(length = 8)
'foobar'
end
end
## Instruction:
Create proper passwords in sage_controller generator
## Code After:
class SageControllerGenerator < Rails::Generator::Base
attr_accessor :controller_name, :controller_file_name, :password
def initialize(runtime_args, runtime_options = {})
super
@controller_url = (args.shift || 'sage').underscore
@controller_name = @controller_url.camelize + 'Controller'
@controller_file_name = @controller_name.underscore
@password = generate_password
end
def manifest
recorded_session = record do |m|
m.template 'controller.rb', File.join('app', 'controllers', "#{@controller_file_name}.rb")
end
puts ""
puts "Upload URL: /#{@controller_url}/upload"
puts "Download URL: /#{@controller_url}/download"
puts "Import URL: /#{@controller_url}/import"
puts ""
puts "Your controller is protected with http authentication, edit the"
puts "authenticate method in app/controllers/#{@controller_file_name}"
puts "to change this"
puts ""
puts " Username: sageuser"
puts " Password: #{@password}"
puts ""
recorded_session
end
protected
def banner
"Usage: #{$0} sage_controller [CONTROLLERNAME]"
end
def generate_password(pass_length = 8)
char_list = ("a".."z").to_a + ("A".."Z").to_a + ("0".."9").to_a
generate_pass = ""
1.upto(pass_length) { |i| generate_pass << char_list[rand(char_list.size)] }
return generate_pass
end
end
| class SageControllerGenerator < Rails::Generator::Base
attr_accessor :controller_name, :controller_file_name, :password
def initialize(runtime_args, runtime_options = {})
super
@controller_url = (args.shift || 'sage').underscore
@controller_name = @controller_url.camelize + 'Controller'
@controller_file_name = @controller_name.underscore
@password = generate_password
end
def manifest
recorded_session = record do |m|
m.template 'controller.rb', File.join('app', 'controllers', "#{@controller_file_name}.rb")
end
puts ""
puts "Upload URL: /#{@controller_url}/upload"
puts "Download URL: /#{@controller_url}/download"
puts "Import URL: /#{@controller_url}/import"
puts ""
puts "Your controller is protected with http authentication, edit the"
puts "authenticate method in app/controllers/#{@controller_file_name}"
puts "to change this"
puts ""
puts " Username: sageuser"
puts " Password: #{@password}"
puts ""
recorded_session
end
protected
def banner
"Usage: #{$0} sage_controller [CONTROLLERNAME]"
end
- def generate_password(length = 8)
+ def generate_password(pass_length = 8)
? +++++
- 'foobar'
+ char_list = ("a".."z").to_a + ("A".."Z").to_a + ("0".."9").to_a
+ generate_pass = ""
+ 1.upto(pass_length) { |i| generate_pass << char_list[rand(char_list.size)] }
+ return generate_pass
end
end | 7 | 0.155556 | 5 | 2 |
44573a6d52b4eb3ca6a88c870b14c082cf793798 | tools/README.md | tools/README.md | The following procedure will regenerate the binary star data:
1. Install protoc from https://developers.google.com/protocol-buffers/docs/downloads
1. Regenerate the Java protocol buffer with `./compile_proto.sh`. This step and the one above can be skipped if no changes to the app's source.proto file have been made.
1. Build the utilities with `./gradlew assemble` from the stardroid directory.
1. Convert the data files to text protocol buffers with `./generate.sh`.
1. Recompile the App to ensure that string IDs are up to date. You can do this just by running `./gradlew assemble`.
1. Replace the text protocol buffers with versions that include the string resource ids from the `R.java` file with `./rewrite.sh`
1. Finally use the `binary.sh` to convert the ascii proto bufs to binary ones (and put them in the right directory).
| The following procedure will regenerate the binary star data:
1. Install protoc from https://developers.google.com/protocol-buffers/docs/downloads
1. Regenerate the Java protocol buffer with `./compile_proto.sh`. This step and the one above can be skipped if no changes to the app's source.proto file have been made.
1. Build the utilities with `./gradlew assemble` from the stardroid directory.
1. Convert the data files to text protocol buffers with `./generate.sh` from the tools directory.
1. Recompile the App to ensure that string IDs are up to date. You can do this just by running `./gradlew assemble`.
1. Replace the text protocol buffers with versions that include the string resource ids from the `R.java` file with `./rewrite.sh` from the tools directory
1. Finally run `./binary.sh` from the tools directory to convert the ascii proto bufs to binary ones (and put them in the right directory).
| Reword the data regeneration instructions. | Reword the data regeneration instructions.
| Markdown | apache-2.0 | sky-map-team/stardroid,srtanzim/Cosmic-Iris,jaydeetay/stardroid,heychirag/stardroid,sky-map-team/stardroid,heychirag/stardroid,barbeau/stardroid,jaydeetay/stardroid,barbeau/stardroid,sky-map-team/stardroid,srtanzim/Cosmic-Iris,sky-map-team/stardroid,heychirag/stardroid,jaydeetay/stardroid,srtanzim/Cosmic-Iris,barbeau/stardroid,sky-map-team/stardroid | markdown | ## Code Before:
The following procedure will regenerate the binary star data:
1. Install protoc from https://developers.google.com/protocol-buffers/docs/downloads
1. Regenerate the Java protocol buffer with `./compile_proto.sh`. This step and the one above can be skipped if no changes to the app's source.proto file have been made.
1. Build the utilities with `./gradlew assemble` from the stardroid directory.
1. Convert the data files to text protocol buffers with `./generate.sh`.
1. Recompile the App to ensure that string IDs are up to date. You can do this just by running `./gradlew assemble`.
1. Replace the text protocol buffers with versions that include the string resource ids from the `R.java` file with `./rewrite.sh`
1. Finally use the `binary.sh` to convert the ascii proto bufs to binary ones (and put them in the right directory).
## Instruction:
Reword the data regeneration instructions.
## Code After:
The following procedure will regenerate the binary star data:
1. Install protoc from https://developers.google.com/protocol-buffers/docs/downloads
1. Regenerate the Java protocol buffer with `./compile_proto.sh`. This step and the one above can be skipped if no changes to the app's source.proto file have been made.
1. Build the utilities with `./gradlew assemble` from the stardroid directory.
1. Convert the data files to text protocol buffers with `./generate.sh` from the tools directory.
1. Recompile the App to ensure that string IDs are up to date. You can do this just by running `./gradlew assemble`.
1. Replace the text protocol buffers with versions that include the string resource ids from the `R.java` file with `./rewrite.sh` from the tools directory
1. Finally run `./binary.sh` from the tools directory to convert the ascii proto bufs to binary ones (and put them in the right directory).
| The following procedure will regenerate the binary star data:
1. Install protoc from https://developers.google.com/protocol-buffers/docs/downloads
1. Regenerate the Java protocol buffer with `./compile_proto.sh`. This step and the one above can be skipped if no changes to the app's source.proto file have been made.
1. Build the utilities with `./gradlew assemble` from the stardroid directory.
- 1. Convert the data files to text protocol buffers with `./generate.sh`.
+ 1. Convert the data files to text protocol buffers with `./generate.sh` from the tools directory.
? +++++++++++++++++++++++++
1. Recompile the App to ensure that string IDs are up to date. You can do this just by running `./gradlew assemble`.
- 1. Replace the text protocol buffers with versions that include the string resource ids from the `R.java` file with `./rewrite.sh`
+ 1. Replace the text protocol buffers with versions that include the string resource ids from the `R.java` file with `./rewrite.sh` from the tools directory
? +++++++++++++++++++++++++
- 1. Finally use the `binary.sh` to convert the ascii proto bufs to binary ones (and put them in the right directory).
? ^^^^^^
+ 1. Finally run `./binary.sh` from the tools directory to convert the ascii proto bufs to binary ones (and put them in the right directory).
? + ^ ++ +++++++++++++++++++++++++
| 6 | 0.75 | 3 | 3 |
7e9c9c1e593d6628e8f6b00d8b98214475a19a5c | CONTRIBUTING.md | CONTRIBUTING.md |
Before submitting a new issue, do the following:
- Verify you're runing the latest version by running `pem -v` and compare it with the [project page on GitHub](https://github.com/KrauseFx/PEM).
- Verify you have Xcode tools installed by running `xcode-select --install`.
- Make sure to read through the [README](https://github.com/KrauseFx/PEM) of the project.
When submitting a new issue, please provide the following information:
- The full stack trace and output when running `PEM`.
- The command and parameters you used to launch it.
### By providing this information it's much faster and easier to help you
## Pull Requests
Pull requests are always welcome :)
- Your code editor should use the tab spaces of 2
- Make sure to test the changes yourself before submitting |
Before submitting a new issue, do the following:
- Verify you're runing the latest version by running `pem -v` and compare it with the [project page on GitHub](https://github.com/KrauseFx/PEM).
- Verify you have Xcode tools installed by running `xcode-select --install`.
- Make sure to read through the [README](https://github.com/KrauseFx/PEM) of the project.
When submitting a new issue, please provide the following information:
- The full stack trace and output when running `PEM`.
- The command and parameters you used to launch it.
### By providing this information it's much faster and easier to help you
## Pull Requests
Pull requests are always welcome :)
- Your code editor should use the tab spaces of 2
- Make sure to test the changes yourself before submitting
- Run the tests by executing `bundle install` and then `bundle exec rspec`
| Add test instructions to contribution guidelines | Add test instructions to contribution guidelines | Markdown | mit | lyndsey-ferguson/fastlane,tmtrademarked/fastlane,adamcohenrose/fastlane,powtac/fastlane,mbogh/fastlane,dral3x/fastlane,javibm/fastlane,daveanderson/fastlane,bassrock/fastlane,RishabhTayal/fastlane,futuretap/fastlane,vronin/fastlane,fcy/fastlane,luongm/fastlane,sinoru/fastlane,farkasseb/fastlane,bassrock/fastlane,enozero/fastlane,nafu/fastlane,rimarsh/fastlane,jeeftor/fastlane,phatblat/fastlane,tpalmer/fastlane,mgrebenets/fastlane,matthewellis/fastlane,Sajjon/fastlane,hjanuschka/fastlane,tpalmer/fastlane,brbulic/fastlane,manuyavuz/fastlane,nafu/fastlane,joshdholtz/fastlane,sylvek/fastlane,jzallas/fastlane,revile/fastlane,icecrystal23/fastlane,hjanuschka/fastlane,NicholasFFox/fastlane,st3fan/fastlane,kohtenko/fastlane,jorgeazevedo/fastlane,powtac/fastlane,fcy/fastlane,ffittschen/fastlane,bolom/fastlane,soxjke/fastlane,joshrlesch/fastlane,NicholasFFox/fastlane,ExtremeMan/fastlane,enozero/fastlane,oronbz/fastlane,olegoid/fastlane,mandrizzle/fastlane,fcy/fastlane,SandyChapman/fastlane,adamcohenrose/fastlane,ffittschen/fastlane,ashfurrow/fastlane,brbulic/fastlane,jorgeazevedo/fastlane,busce/fastlane,mbogh/fastlane,oronbz/fastlane,fulldecent/fastlane,busce/fastlane,joshrlesch/fastlane,mathiasAichinger/fastlane,manuyavuz/fastlane,oysta/fastlane,smallmiro/fastlane,bassrock/fastlane,jfresen/fastlane,ffittschen/fastlane,fcy/fastlane,nafu/fastlane,cpk1/fastlane,st3fan/fastlane,Econa77/fastlane,fcy/fastlane,tmtrademarked/fastlane,jaleksynas/fastlane,SiarheiFedartsou/fastlane,tommeier/fastlane,futuretap/fastlane,dral3x/fastlane,soxjke/fastlane,iMokhles/fastlane,soxjke/fastlane,mandrizzle/fastlane,mgamer/fastlane,oronbz/fastlane,smallmiro/fastlane,lmirosevic/fastlane,adellibovi/fastlane,revile/fastlane,danielbowden/fastlane,lyndsey-ferguson/fastlane,lyndsey-ferguson/fastlane,luongm/fastlane,jeeftor/fastlane,ashfurrow/fastlane,oysta/fastlane,keatongreve/fastlane,SemenovAlexander/fastlane,lmirosevic/fastlane,kazuhidet/fastlane,fabiomassimo/fastlane,luongm/fastlane,lyndsey-ferguson/fastlane,mgrebenets/fastlane,smallmiro/fastlane,javibm/fastlane,Acorld/fastlane,neonichu/fastlane,oysta/fastlane,fulldecent/fastlane,taquitos/fastlane,st3fan/fastlane,cbowns/fastlane,lmirosevic/fastlane,SiarheiFedartsou/fastlane,tcurdt/fastlane,adellibovi/fastlane,SemenovAlexander/fastlane,tpalmer/fastlane,neonichu/fastlane,busce/fastlane,olegoid/fastlane,jfresen/fastlane,jzallas/fastlane,allewun/fastlane,Econa77/fastlane,joshrlesch/fastlane,cpunion/fastlane,danielbowden/fastlane,carlosefonseca/fastlane,oysta/fastlane,mathiasAichinger/fastlane,lyndsey-ferguson/fastlane,olegoid/fastlane,iCell/fastlane,lyndsey-ferguson/fastlane,RishabhTayal/fastlane,joshdholtz/fastlane,sschlein/fastlane,tommeier/fastlane,sylvek/fastlane,iMokhles/fastlane,fastlane/fastlane,daveanderson/fastlane,Sajjon/fastlane,thasegaw/fastlane,dral3x/fastlane,cbowns/fastlane,powtac/fastlane,matthewellis/fastlane,busce/fastlane,tcurdt/fastlane,joshrlesch/fastlane,orta/fastlane,cbowns/fastlane,luongm/fastlane,Fanagame/fastlane,SandyChapman/fastlane,thasegaw/fastlane,fcy/fastlane,mbogh/fastlane,luongm/fastlane,ssmiech/fastlane,Sajjon/fastlane,NicholasFFox/fastlane,ffittschen/fastlane,bgannin/fastlane,ExtremeMan/fastlane,tcurdt/fastlane,tcurdt/fastlane,jzallas/fastlane,brbulic/fastlane,adamcohenrose/fastlane,SandyChapman/fastlane,mgrebenets/fastlane,mgamer/fastlane,Liquidsoul/fastlane,SemenovAlexander/fastlane,taquitos/fastlane,st3fan/fastlane,phatblat/fastlane,thasegaw/fastlane,vronin/fastlane,joshrlesch/fastlane,jorgeazevedo/fastlane,bolom/fastlane,soxjke/fastlane,Acorld/fastlane,Fanagame/fastlane,cpunion/fastlane,carlosefonseca/fastlane,brbulic/fastlane,marcelofabri/fastlane,farkasseb/fastlane,jeeftor/fastlane,kndl/fastlane,jaleksynas/fastlane,cpk1/fastlane,kazuhidet/fastlane,javibm/fastlane,mgrebenets/fastlane,lmirosevic/fastlane,bgerstle/fastlane,olegoid/fastlane,RishabhTayal/fastlane,jaleksynas/fastlane,futuretap/fastlane,matthewellis/fastlane,st3fan/fastlane,fabiomassimo/fastlane,rimarsh/fastlane,fulldecent/fastlane,lacostej/fastlane,SandyChapman/fastlane,matthewellis/fastlane,Acorld/fastlane,joshrlesch/fastlane,vronin/fastlane,phatblat/fastlane,fastlane/fastlane,SandyChapman/fastlane,KrauseFx/fastlane,jeeftor/fastlane,thasegaw/fastlane,adamcohenrose/fastlane,mgamer/fastlane,milch/fastlane,cbowns/fastlane,kazuhidet/fastlane,tmtrademarked/fastlane,dowjones/fastlane,Acorld/fastlane,oysta/fastlane,iCell/fastlane,daveanderson/fastlane,farkasseb/fastlane,bassrock/fastlane,revile/fastlane,marcelofabri/fastlane,Fanagame/fastlane,sschlein/fastlane,ffittschen/fastlane,cbowns/fastlane,brbulic/fastlane,kazuhidet/fastlane,farkasseb/fastlane,taquitos/fastlane,jaleksynas/fastlane,sinoru/fastlane,sinoru/fastlane,mgamer/fastlane,manuyavuz/fastlane,milch/fastlane,dowjones/fastlane,RishabhTayal/fastlane,matthewellis/fastlane,smallmiro/fastlane,jorgeazevedo/fastlane,oronbz/fastlane,ashfurrow/fastlane,Acorld/fastlane,sinoru/fastlane,ExtremeMan/fastlane,ExtremeMan/fastlane,adellibovi/fastlane,kndl/fastlane,manuyavuz/fastlane,tcurdt/fastlane,phatblat/fastlane,danielbowden/fastlane,iCell/fastlane,manuyavuz/fastlane,dral3x/fastlane,taquitos/fastlane,jorgeazevedo/fastlane,cpunion/fastlane,revile/fastlane,joshdholtz/fastlane,soxjke/fastlane,powtac/fastlane,bgerstle/fastlane,daveanderson/fastlane,SiarheiFedartsou/fastlane,SemenovAlexander/fastlane,mandrizzle/fastlane,adellibovi/fastlane,javibm/fastlane,cpunion/fastlane,mandrizzle/fastlane,marcelofabri/fastlane,mathiasAichinger/fastlane,thelvis4/fastlane,ashfurrow/fastlane,taquitos/fastlane,adamcohenrose/fastlane,ffittschen/fastlane,phatblat/fastlane,fabiomassimo/fastlane,mgrebenets/fastlane,mgamer/fastlane,fastlane/fastlane,keatongreve/fastlane,oysta/fastlane,NicholasFFox/fastlane,marcelofabri/fastlane,Liquidsoul/fastlane,oronbz/fastlane,icecrystal23/fastlane,vronin/fastlane,keatongreve/fastlane,jfresen/fastlane,milch/fastlane,bgannin/fastlane,Liquidsoul/fastlane,jzallas/fastlane,fastlane/fastlane,thasegaw/fastlane,cbowns/fastlane,bgannin/fastlane,lacostej/fastlane,kndl/fastlane,mbogh/fastlane,fabiomassimo/fastlane,bgannin/fastlane,jaleksynas/fastlane,dowjones/fastlane,iMokhles/fastlane,mbogh/fastlane,jzallas/fastlane,hjanuschka/fastlane,orta/fastlane,SemenovAlexander/fastlane,futuretap/fastlane,thelvis4/fastlane,allewun/fastlane,kazuhidet/fastlane,neonichu/fastlane,keatongreve/fastlane,hjanuschka/fastlane,jorgeazevedo/fastlane,lacostej/fastlane,st3fan/fastlane,bolom/fastlane,icecrystal23/fastlane,farkasseb/fastlane,joshdholtz/fastlane,Liquidsoul/fastlane,KrauseFx/fastlane,ssmiech/fastlane,RishabhTayal/fastlane,fabiomassimo/fastlane,tommeier/fastlane,Econa77/fastlane,kndl/fastlane,mathiasAichinger/fastlane,cpunion/fastlane,Sajjon/fastlane,revile/fastlane,manuyavuz/fastlane,jfresen/fastlane,KrauseFx/fastlane,tcurdt/fastlane,olegoid/fastlane,thasegaw/fastlane,Econa77/fastlane,bolom/fastlane,sschlein/fastlane,mgamer/fastlane,Fanagame/fastlane,brbulic/fastlane,mathiasAichinger/fastlane,Liquidsoul/fastlane,KrauseFx/fastlane,fastlane/fastlane,Liquidsoul/fastlane,cpunion/fastlane,lmirosevic/fastlane,jfresen/fastlane,ssmiech/fastlane,tommeier/fastlane,joshrlesch/fastlane,mandrizzle/fastlane,joshdholtz/fastlane,olegoid/fastlane,milch/fastlane,tpalmer/fastlane,carlosefonseca/fastlane,adellibovi/fastlane,iMokhles/fastlane,adellibovi/fastlane,kazuhidet/fastlane,vronin/fastlane,smallmiro/fastlane,sylvek/fastlane,iCell/fastlane,Sajjon/fastlane,matthewellis/fastlane,fulldecent/fastlane,cpk1/fastlane,neonichu/fastlane,olegoid/fastlane,sschlein/fastlane,allewun/fastlane,tmtrademarked/fastlane,carlosefonseca/fastlane,marcelofabri/fastlane,tmtrademarked/fastlane,bgannin/fastlane,nafu/fastlane,mandrizzle/fastlane,dowjones/fastlane,javibm/fastlane,keatongreve/fastlane,Sajjon/fastlane,ExtremeMan/fastlane,thelvis4/fastlane,cpk1/fastlane,fulldecent/fastlane,jeeftor/fastlane,lacostej/fastlane,icecrystal23/fastlane,danielbowden/fastlane,rimarsh/fastlane,ashfurrow/fastlane,joshdholtz/fastlane,busce/fastlane,sschlein/fastlane,carlosefonseca/fastlane,kndl/fastlane,cbowns/fastlane,enozero/fastlane,lmirosevic/fastlane,bolom/fastlane,jeeftor/fastlane,kohtenko/fastlane,mbogh/fastlane,vronin/fastlane,matthewellis/fastlane,sschlein/fastlane,phatblat/fastlane,lmirosevic/fastlane,javibm/fastlane,danielbowden/fastlane,icecrystal23/fastlane,icecrystal23/fastlane,carlosefonseca/fastlane,joshdholtz/fastlane,adamcohenrose/fastlane,hjanuschka/fastlane,farkasseb/fastlane,marcelofabri/fastlane,enozero/fastlane,mandrizzle/fastlane,KrauseFx/fastlane,daveanderson/fastlane,ffittschen/fastlane,mgrebenets/fastlane,Econa77/fastlane,manuyavuz/fastlane,ssmiech/fastlane,iMokhles/fastlane,lacostej/fastlane,danielbowden/fastlane,SiarheiFedartsou/fastlane,jaleksynas/fastlane,marcelofabri/fastlane,bassrock/fastlane,thelvis4/fastlane,lacostej/fastlane,cpk1/fastlane,oronbz/fastlane,hjanuschka/fastlane,fabiomassimo/fastlane,SiarheiFedartsou/fastlane,mgrebenets/fastlane,farkasseb/fastlane,hjanuschka/fastlane,allewun/fastlane,powtac/fastlane,jorgeazevedo/fastlane,rimarsh/fastlane,sinoru/fastlane,bgannin/fastlane,tpalmer/fastlane,NicholasFFox/fastlane,sylvek/fastlane,dowjones/fastlane,jaleksynas/fastlane,iCell/fastlane,NicholasFFox/fastlane,tpalmer/fastlane,fulldecent/fastlane,allewun/fastlane,ashfurrow/fastlane,SemenovAlexander/fastlane,futuretap/fastlane,Econa77/fastlane,sylvek/fastlane,Sajjon/fastlane,fabiomassimo/fastlane,kndl/fastlane,brbulic/fastlane,NicholasFFox/fastlane,Acorld/fastlane,mathiasAichinger/fastlane,RishabhTayal/fastlane,SiarheiFedartsou/fastlane,milch/fastlane,powtac/fastlane,Liquidsoul/fastlane,neonichu/fastlane,fastlane/fastlane,jzallas/fastlane,tommeier/fastlane,dral3x/fastlane,keatongreve/fastlane,soxjke/fastlane,dowjones/fastlane,nafu/fastlane,KrauseFx/fastlane,Fanagame/fastlane,nafu/fastlane,taquitos/fastlane,kazuhidet/fastlane,dral3x/fastlane,RishabhTayal/fastlane,soxjke/fastlane,fulldecent/fastlane,allewun/fastlane,jfresen/fastlane,ssmiech/fastlane,vronin/fastlane,luongm/fastlane,keatongreve/fastlane,rimarsh/fastlane,iCell/fastlane,iCell/fastlane,neonichu/fastlane,oronbz/fastlane,SandyChapman/fastlane,SemenovAlexander/fastlane,thasegaw/fastlane,oysta/fastlane,dowjones/fastlane,ssmiech/fastlane,cpk1/fastlane,cpunion/fastlane,taquitos/fastlane,ExtremeMan/fastlane,tommeier/fastlane,powtac/fastlane,Acorld/fastlane,dral3x/fastlane,luongm/fastlane,revile/fastlane,mathiasAichinger/fastlane,milch/fastlane,thelvis4/fastlane,nafu/fastlane,futuretap/fastlane,phatblat/fastlane,tmtrademarked/fastlane,rimarsh/fastlane,sinoru/fastlane,javibm/fastlane,enozero/fastlane,bassrock/fastlane,busce/fastlane,smallmiro/fastlane,sylvek/fastlane,daveanderson/fastlane,mgamer/fastlane,iMokhles/fastlane,ExtremeMan/fastlane,fcy/fastlane,cpk1/fastlane,st3fan/fastlane,sschlein/fastlane,Fanagame/fastlane,neonichu/fastlane,allewun/fastlane,kndl/fastlane,sylvek/fastlane,KrauseFx/fastlane,jfresen/fastlane,tmtrademarked/fastlane,jzallas/fastlane,enozero/fastlane,ashfurrow/fastlane,futuretap/fastlane,milch/fastlane,rimarsh/fastlane,jeeftor/fastlane,danielbowden/fastlane,bgannin/fastlane,busce/fastlane,carlosefonseca/fastlane,enozero/fastlane,iMokhles/fastlane,thelvis4/fastlane,tpalmer/fastlane,bolom/fastlane,tommeier/fastlane,Econa77/fastlane,mbogh/fastlane,lyndsey-ferguson/fastlane,thelvis4/fastlane,daveanderson/fastlane,adellibovi/fastlane,bolom/fastlane,tcurdt/fastlane,Fanagame/fastlane,SandyChapman/fastlane,adamcohenrose/fastlane,SiarheiFedartsou/fastlane,ssmiech/fastlane,sinoru/fastlane,revile/fastlane,smallmiro/fastlane | markdown | ## Code Before:
Before submitting a new issue, do the following:
- Verify you're runing the latest version by running `pem -v` and compare it with the [project page on GitHub](https://github.com/KrauseFx/PEM).
- Verify you have Xcode tools installed by running `xcode-select --install`.
- Make sure to read through the [README](https://github.com/KrauseFx/PEM) of the project.
When submitting a new issue, please provide the following information:
- The full stack trace and output when running `PEM`.
- The command and parameters you used to launch it.
### By providing this information it's much faster and easier to help you
## Pull Requests
Pull requests are always welcome :)
- Your code editor should use the tab spaces of 2
- Make sure to test the changes yourself before submitting
## Instruction:
Add test instructions to contribution guidelines
## Code After:
Before submitting a new issue, do the following:
- Verify you're runing the latest version by running `pem -v` and compare it with the [project page on GitHub](https://github.com/KrauseFx/PEM).
- Verify you have Xcode tools installed by running `xcode-select --install`.
- Make sure to read through the [README](https://github.com/KrauseFx/PEM) of the project.
When submitting a new issue, please provide the following information:
- The full stack trace and output when running `PEM`.
- The command and parameters you used to launch it.
### By providing this information it's much faster and easier to help you
## Pull Requests
Pull requests are always welcome :)
- Your code editor should use the tab spaces of 2
- Make sure to test the changes yourself before submitting
- Run the tests by executing `bundle install` and then `bundle exec rspec`
|
Before submitting a new issue, do the following:
- Verify you're runing the latest version by running `pem -v` and compare it with the [project page on GitHub](https://github.com/KrauseFx/PEM).
- Verify you have Xcode tools installed by running `xcode-select --install`.
- Make sure to read through the [README](https://github.com/KrauseFx/PEM) of the project.
When submitting a new issue, please provide the following information:
- The full stack trace and output when running `PEM`.
- The command and parameters you used to launch it.
### By providing this information it's much faster and easier to help you
## Pull Requests
Pull requests are always welcome :)
- Your code editor should use the tab spaces of 2
- Make sure to test the changes yourself before submitting
+ - Run the tests by executing `bundle install` and then `bundle exec rspec` | 1 | 0.045455 | 1 | 0 |
be61828baf63a181a8685c253847682695ec9583 | spec/spec_helper.rb | spec/spec_helper.rb | ENV["RAILS_ENV"] = 'test'
require_relative 'spec_helper_common'
require_relative 'spec_helper_pundit'
| ENV["RAILS_ENV"] = 'test'
require_relative 'spec_helper_common'
require_relative 'spec_helper_pundit'
def klass_name
described_class.name.underscore
end
def subject_class
klass_name.to_sym
end
def subject_class_factory
klass_name.split('/').last.to_sym
end
def factory
Factory.build(subject_class_factory)
end
def factory_stubbed
Factory.build_stubbed(subject_class_factory)
end
def factory_create
Factory.create(subject_class_factory)
end
| Add support for new specs | Add support for new specs
| Ruby | mit | concord-consortium/rigse,concord-consortium/rigse,concord-consortium/rigse,concord-consortium/rigse,concord-consortium/rigse,concord-consortium/rigse | ruby | ## Code Before:
ENV["RAILS_ENV"] = 'test'
require_relative 'spec_helper_common'
require_relative 'spec_helper_pundit'
## Instruction:
Add support for new specs
## Code After:
ENV["RAILS_ENV"] = 'test'
require_relative 'spec_helper_common'
require_relative 'spec_helper_pundit'
def klass_name
described_class.name.underscore
end
def subject_class
klass_name.to_sym
end
def subject_class_factory
klass_name.split('/').last.to_sym
end
def factory
Factory.build(subject_class_factory)
end
def factory_stubbed
Factory.build_stubbed(subject_class_factory)
end
def factory_create
Factory.create(subject_class_factory)
end
| ENV["RAILS_ENV"] = 'test'
require_relative 'spec_helper_common'
require_relative 'spec_helper_pundit'
+
+ def klass_name
+ described_class.name.underscore
+ end
+
+ def subject_class
+ klass_name.to_sym
+ end
+
+ def subject_class_factory
+ klass_name.split('/').last.to_sym
+ end
+
+ def factory
+ Factory.build(subject_class_factory)
+ end
+
+ def factory_stubbed
+ Factory.build_stubbed(subject_class_factory)
+ end
+
+ def factory_create
+ Factory.create(subject_class_factory)
+ end | 24 | 6 | 24 | 0 |
bbf06ce9370df4805de6512a40b06bffec82e197 | src/main/config/configuration.properties | src/main/config/configuration.properties | default.cascade = merge
temp-file-name-scheme = org.dita.dost.module.reader.DefaultTempFileScheme
#filter-attributes =
#flag-attributes =
cli.color = true
# Integration
plugindirs = plugins;demo
plugin.ignores =
plugin.order = org.dita.base org.oasis-open.dita.v1_3 org.oasis-open.dita.v1_2
registry = https://plugins.dita-ot.org/
# PDF2 defaults
org.dita.pdf2.i18n.enabled = true
| default.cascade = merge
temp-file-name-scheme = org.dita.dost.module.reader.DefaultTempFileScheme
#filter-attributes =
#flag-attributes =
cli.color = true
default.coderef-charset=UTF-8
# Integration
plugindirs = plugins;demo
plugin.ignores =
plugin.order = org.dita.base org.oasis-open.dita.v1_3 org.oasis-open.dita.v1_2
registry = https://plugins.dita-ot.org/
# PDF2 defaults
org.dita.pdf2.i18n.enabled = true
| Change default encoding for coderefs to UTF-8 | Change default encoding for coderefs to UTF-8
Signed-off-by: Jarno Elovirta <0f1ab0ac7dffd9db21aa539af2fd4bb04abc3ad4@elovirta.com>
| INI | apache-2.0 | dita-ot/dita-ot,dita-ot/dita-ot,infotexture/dita-ot,dita-ot/dita-ot,dita-ot/dita-ot,infotexture/dita-ot,dita-ot/dita-ot,infotexture/dita-ot,infotexture/dita-ot,infotexture/dita-ot | ini | ## Code Before:
default.cascade = merge
temp-file-name-scheme = org.dita.dost.module.reader.DefaultTempFileScheme
#filter-attributes =
#flag-attributes =
cli.color = true
# Integration
plugindirs = plugins;demo
plugin.ignores =
plugin.order = org.dita.base org.oasis-open.dita.v1_3 org.oasis-open.dita.v1_2
registry = https://plugins.dita-ot.org/
# PDF2 defaults
org.dita.pdf2.i18n.enabled = true
## Instruction:
Change default encoding for coderefs to UTF-8
Signed-off-by: Jarno Elovirta <0f1ab0ac7dffd9db21aa539af2fd4bb04abc3ad4@elovirta.com>
## Code After:
default.cascade = merge
temp-file-name-scheme = org.dita.dost.module.reader.DefaultTempFileScheme
#filter-attributes =
#flag-attributes =
cli.color = true
default.coderef-charset=UTF-8
# Integration
plugindirs = plugins;demo
plugin.ignores =
plugin.order = org.dita.base org.oasis-open.dita.v1_3 org.oasis-open.dita.v1_2
registry = https://plugins.dita-ot.org/
# PDF2 defaults
org.dita.pdf2.i18n.enabled = true
| default.cascade = merge
temp-file-name-scheme = org.dita.dost.module.reader.DefaultTempFileScheme
#filter-attributes =
#flag-attributes =
cli.color = true
+ default.coderef-charset=UTF-8
# Integration
plugindirs = plugins;demo
plugin.ignores =
plugin.order = org.dita.base org.oasis-open.dita.v1_3 org.oasis-open.dita.v1_2
registry = https://plugins.dita-ot.org/
# PDF2 defaults
org.dita.pdf2.i18n.enabled = true | 1 | 0.071429 | 1 | 0 |
8c71ddd51c62b34d89c29095cd27d97f64a465cf | my-packages.txt | my-packages.txt | atom-beautify
atom-macros
atom-material-ui
clipboard-plus
code-links
coffee-compile
coffee-links
column-select
emmet
file-icons
flex-tool-bar
git-projects
language-javascript-semantic
linter
linter-coffeelint
linter-pylint
minimap
minimap-git-diff
minimap-linter
preview
project-manager
script
shrink-whitespace
slickedit-select
sort-lines
term2
tool-bar
| atom-beautify
atom-macros
atom-material-ui
clipboard-plus
code-links
coffee-compile
coffee-links
column-select
django-templates
file-icons
flex-tool-bar
git-projects
language-javascript-semantic
linter
linter-coffeelint
linter-pylint
minimap
minimap-git-diff
minimap-linter
preview
project-manager
script
shrink-whitespace
slickedit-select
sort-lines
term2
tool-bar
| Remove emmet (lousy keybindings), add django-templates | Remove emmet (lousy keybindings), add django-templates
| Text | agpl-3.0 | alflanagan/atom_configuration,alflanagan/atom_configuration,alflanagan/atom_configuration | text | ## Code Before:
atom-beautify
atom-macros
atom-material-ui
clipboard-plus
code-links
coffee-compile
coffee-links
column-select
emmet
file-icons
flex-tool-bar
git-projects
language-javascript-semantic
linter
linter-coffeelint
linter-pylint
minimap
minimap-git-diff
minimap-linter
preview
project-manager
script
shrink-whitespace
slickedit-select
sort-lines
term2
tool-bar
## Instruction:
Remove emmet (lousy keybindings), add django-templates
## Code After:
atom-beautify
atom-macros
atom-material-ui
clipboard-plus
code-links
coffee-compile
coffee-links
column-select
django-templates
file-icons
flex-tool-bar
git-projects
language-javascript-semantic
linter
linter-coffeelint
linter-pylint
minimap
minimap-git-diff
minimap-linter
preview
project-manager
script
shrink-whitespace
slickedit-select
sort-lines
term2
tool-bar
| atom-beautify
atom-macros
atom-material-ui
clipboard-plus
code-links
coffee-compile
coffee-links
column-select
- emmet
+ django-templates
file-icons
flex-tool-bar
git-projects
language-javascript-semantic
linter
linter-coffeelint
linter-pylint
minimap
minimap-git-diff
minimap-linter
preview
project-manager
script
shrink-whitespace
slickedit-select
sort-lines
term2
tool-bar | 2 | 0.074074 | 1 | 1 |
d1bfc0f395fe15ae4f36438bb88b51c074aef62a | server/index.js | server/index.js | 'use strict';
const throng = require('throng');
const app = require('./app');
const WORKERS = process.env.WEB_CONCURRENCY || 1;
throng(app, {
workers: WORKERS,
lifetime: Infinity
});
| 'use strict';
const throng = require('throng');
const app = require('./app');
const WORKERS = process.env.WEB_CONCURRENCY || 1;
throng({
workers: WORKERS,
lifetime: Infinity,
start: app
});
| Update server to support throng 4.x | Update server to support throng 4.x
| JavaScript | mit | jmeas/finance-app,jmeas/finance-app,jmeas/moolah,jmeas/moolah | javascript | ## Code Before:
'use strict';
const throng = require('throng');
const app = require('./app');
const WORKERS = process.env.WEB_CONCURRENCY || 1;
throng(app, {
workers: WORKERS,
lifetime: Infinity
});
## Instruction:
Update server to support throng 4.x
## Code After:
'use strict';
const throng = require('throng');
const app = require('./app');
const WORKERS = process.env.WEB_CONCURRENCY || 1;
throng({
workers: WORKERS,
lifetime: Infinity,
start: app
});
| 'use strict';
const throng = require('throng');
const app = require('./app');
const WORKERS = process.env.WEB_CONCURRENCY || 1;
- throng(app, {
? -----
+ throng({
workers: WORKERS,
- lifetime: Infinity
+ lifetime: Infinity,
? +
+ start: app
}); | 5 | 0.416667 | 3 | 2 |
deb89e2191301c40a58fb67ab02331d9859300fe | dp/fibonacci/go/fibonacci_test.go | dp/fibonacci/go/fibonacci_test.go | package main
import "testing"
func TestFibonacci(t *testing.T) {
tcs := map[string]struct {
n int
expected int
}{
"n = 1": {1, 1},
"n = 2": {2, 1},
"n = 50": {50, 12586269025},
"n = 200": {200, 280571172992510140037611932413038677189525},
}
for name, tc := range tcs {
t.Run(name, func(t *testing.T) {
res := fib(tc.n)
if res != tc.expected {
t.Fatalf("want %v, got %v\n", tc.expected, res)
}
})
}
}
| package main
import (
"math/big"
"testing"
)
func TestFibonacci(t *testing.T) {
tcs := map[string]struct {
n int
expected string //Use string to allow for values that overflow an int64
}{
"n = 0": {0, "0"},
"n = 1": {1, "1"},
"n = 2": {2, "1"},
"n = 50": {50, "12586269025"},
"n = 100": {100, "354224848179261915075"},
"n = 200": {200, "280571172992510140037611932413038677189525"},
}
for name, tc := range tcs {
t.Run(name, func(t *testing.T) {
expected, ok := big.NewInt(0).SetString(tc.expected, 10)
if !ok {
t.Fatalf("Bad expected value in test case: %s", tc.expected)
}
res := fib(tc.n)
if res != expected {
t.Fatalf("want %v, got %v\n", tc.expected, res)
}
})
}
}
| Change expected value in test cases to string to allow for values that don't fit in an int64 | Change expected value in test cases to string to allow for values that don't fit in an int64
| Go | cc0-1.0 | ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms | go | ## Code Before:
package main
import "testing"
func TestFibonacci(t *testing.T) {
tcs := map[string]struct {
n int
expected int
}{
"n = 1": {1, 1},
"n = 2": {2, 1},
"n = 50": {50, 12586269025},
"n = 200": {200, 280571172992510140037611932413038677189525},
}
for name, tc := range tcs {
t.Run(name, func(t *testing.T) {
res := fib(tc.n)
if res != tc.expected {
t.Fatalf("want %v, got %v\n", tc.expected, res)
}
})
}
}
## Instruction:
Change expected value in test cases to string to allow for values that don't fit in an int64
## Code After:
package main
import (
"math/big"
"testing"
)
func TestFibonacci(t *testing.T) {
tcs := map[string]struct {
n int
expected string //Use string to allow for values that overflow an int64
}{
"n = 0": {0, "0"},
"n = 1": {1, "1"},
"n = 2": {2, "1"},
"n = 50": {50, "12586269025"},
"n = 100": {100, "354224848179261915075"},
"n = 200": {200, "280571172992510140037611932413038677189525"},
}
for name, tc := range tcs {
t.Run(name, func(t *testing.T) {
expected, ok := big.NewInt(0).SetString(tc.expected, 10)
if !ok {
t.Fatalf("Bad expected value in test case: %s", tc.expected)
}
res := fib(tc.n)
if res != expected {
t.Fatalf("want %v, got %v\n", tc.expected, res)
}
})
}
}
| package main
- import "testing"
+ import (
+ "math/big"
+ "testing"
+ )
func TestFibonacci(t *testing.T) {
tcs := map[string]struct {
n int
- expected int
+ expected string //Use string to allow for values that overflow an int64
}{
+ "n = 0": {0, "0"},
- "n = 1": {1, 1},
+ "n = 1": {1, "1"},
? + +
- "n = 2": {2, 1},
+ "n = 2": {2, "1"},
? + +
- "n = 50": {50, 12586269025},
+ "n = 50": {50, "12586269025"},
? + +
+ "n = 100": {100, "354224848179261915075"},
- "n = 200": {200, 280571172992510140037611932413038677189525},
+ "n = 200": {200, "280571172992510140037611932413038677189525"},
? + +
}
for name, tc := range tcs {
t.Run(name, func(t *testing.T) {
+ expected, ok := big.NewInt(0).SetString(tc.expected, 10)
+ if !ok {
+ t.Fatalf("Bad expected value in test case: %s", tc.expected)
+ }
res := fib(tc.n)
- if res != tc.expected {
? ---
+ if res != expected {
t.Fatalf("want %v, got %v\n", tc.expected, res)
}
})
}
} | 23 | 0.958333 | 16 | 7 |
ad231f2d49a04add1f7b857eee0267fdc7a8001a | README.md | README.md | [](https://travis-ci.org/lromerio/cothority-mobile)
# CothorityMobile
A mobile application to perform distributed tasks using the [cothority-framework][cothority].
[cothority]: https://github.com/dedis/cothority
| [](https://travis-ci.org/lromerio/cothority-mobile) [](https://coveralls.io/github/lromerio/cothority-mobile?branch=master)
# CothorityMobile
A mobile application to perform distributed tasks using the [cothority-framework][cothority].
[cothority]: https://github.com/dedis/cothority
| Update readme to show coverage status | Update readme to show coverage status | Markdown | agpl-3.0 | lromerio/cothority-mobile,lromerio/cothority-mobile | markdown | ## Code Before:
[](https://travis-ci.org/lromerio/cothority-mobile)
# CothorityMobile
A mobile application to perform distributed tasks using the [cothority-framework][cothority].
[cothority]: https://github.com/dedis/cothority
## Instruction:
Update readme to show coverage status
## Code After:
[](https://travis-ci.org/lromerio/cothority-mobile) [](https://coveralls.io/github/lromerio/cothority-mobile?branch=master)
# CothorityMobile
A mobile application to perform distributed tasks using the [cothority-framework][cothority].
[cothority]: https://github.com/dedis/cothority
| - [](https://travis-ci.org/lromerio/cothority-mobile)
+ [](https://travis-ci.org/lromerio/cothority-mobile) [](https://coveralls.io/github/lromerio/cothority-mobile?branch=master)
# CothorityMobile
A mobile application to perform distributed tasks using the [cothority-framework][cothority].
[cothority]: https://github.com/dedis/cothority | 2 | 0.285714 | 1 | 1 |
43a4dd3d0971331dcbda5c74f2636fd3e2486d0a | CMakeLists.txt | CMakeLists.txt |
cmake_minimum_required(VERSION 2.6)
project(mwm)
find_package(PkgConfig REQUIRED)
pkg_check_modules(XCB REQUIRED xcb)
pkg_check_modules(XCB-ATOM REQUIRED xcb-atom)
pkg_check_modules(XCB-ICCCM REQUIRED xcb-icccm)
add_executable(mwm
mwm.c
window.c
layout.c
hook.c
tag.c
bar.c
)
target_link_libraries(mwm ${XCB-ATOM_LIBRARIES} ${XCB-ICCCM_LIBRARIES} ${XCB_LIBRARIES})
install(TARGETS mwm DESTINATION bin)
|
cmake_minimum_required(VERSION 2.6)
project(mwm)
find_package(PkgConfig REQUIRED)
pkg_check_modules(XCB REQUIRED xcb xcb-atom xcb-icccm xcb-keysyms)
add_executable(mwm
mwm.c
window.c
layout.c
hook.c
tag.c
bar.c
)
target_link_libraries(mwm ${XCB_LIBRARIES})
install(TARGETS mwm DESTINATION bin)
| Use simpler xcb module checking | Use simpler xcb module checking
| Text | mit | michaelforney/velox | text | ## Code Before:
cmake_minimum_required(VERSION 2.6)
project(mwm)
find_package(PkgConfig REQUIRED)
pkg_check_modules(XCB REQUIRED xcb)
pkg_check_modules(XCB-ATOM REQUIRED xcb-atom)
pkg_check_modules(XCB-ICCCM REQUIRED xcb-icccm)
add_executable(mwm
mwm.c
window.c
layout.c
hook.c
tag.c
bar.c
)
target_link_libraries(mwm ${XCB-ATOM_LIBRARIES} ${XCB-ICCCM_LIBRARIES} ${XCB_LIBRARIES})
install(TARGETS mwm DESTINATION bin)
## Instruction:
Use simpler xcb module checking
## Code After:
cmake_minimum_required(VERSION 2.6)
project(mwm)
find_package(PkgConfig REQUIRED)
pkg_check_modules(XCB REQUIRED xcb xcb-atom xcb-icccm xcb-keysyms)
add_executable(mwm
mwm.c
window.c
layout.c
hook.c
tag.c
bar.c
)
target_link_libraries(mwm ${XCB_LIBRARIES})
install(TARGETS mwm DESTINATION bin)
|
cmake_minimum_required(VERSION 2.6)
project(mwm)
find_package(PkgConfig REQUIRED)
+ pkg_check_modules(XCB REQUIRED xcb xcb-atom xcb-icccm xcb-keysyms)
- pkg_check_modules(XCB REQUIRED xcb)
- pkg_check_modules(XCB-ATOM REQUIRED xcb-atom)
- pkg_check_modules(XCB-ICCCM REQUIRED xcb-icccm)
add_executable(mwm
mwm.c
window.c
layout.c
hook.c
tag.c
bar.c
)
- target_link_libraries(mwm ${XCB-ATOM_LIBRARIES} ${XCB-ICCCM_LIBRARIES} ${XCB_LIBRARIES})
+ target_link_libraries(mwm ${XCB_LIBRARIES})
install(TARGETS mwm DESTINATION bin)
| 6 | 0.25 | 2 | 4 |
10fe388e54f097346ae88a1a8ac6925cc6054cf5 | .travis.yml | .travis.yml | os:
- osx
- linux
sudo: required
language: go
go: 1.4
install:
- ./tasks/general/ci/install.sh github.com/limetext/lime-backend/lib
- ./tasks/local/ci/install.sh
script:
- ./tasks/general/ci/run_tests.sh lib
- ./tasks/local/ci/check_gen.sh
- ./tasks/general/ci/check_fmt.sh
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/3e692a5224c8490f19bd
on_success: change
on_failure: always
on_start: false
| os:
- osx
- linux
sudo: required
language: go
go: 1.4
install:
- ./tasks/general/ci/install.sh github.com/limetext/lime-backend/lib
script:
- ./tasks/general/ci/run_tests.sh lib
- ./tasks/local/ci/check_gen.sh
- ./tasks/general/ci/check_fmt.sh
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/3e692a5224c8490f19bd
on_success: change
on_failure: always
on_start: false
| Remove the local install script again. | Remove the local install script again.
| YAML | bsd-2-clause | codex8/lime-backend,ch1bo/lime-backend,bj7/lime-backend,ch1bo/lime-backend,bj7/lime-backend,codex8/lime-backend,codex8/lime-backend,bj7/lime-backend,bj7/lime-backend,limetext/lime-backend,codex8/lime-backend,ch1bo/lime-backend,limetext/lime-backend,limetext/lime-backend,limetext/lime-backend,limetext/backend,ch1bo/lime-backend | yaml | ## Code Before:
os:
- osx
- linux
sudo: required
language: go
go: 1.4
install:
- ./tasks/general/ci/install.sh github.com/limetext/lime-backend/lib
- ./tasks/local/ci/install.sh
script:
- ./tasks/general/ci/run_tests.sh lib
- ./tasks/local/ci/check_gen.sh
- ./tasks/general/ci/check_fmt.sh
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/3e692a5224c8490f19bd
on_success: change
on_failure: always
on_start: false
## Instruction:
Remove the local install script again.
## Code After:
os:
- osx
- linux
sudo: required
language: go
go: 1.4
install:
- ./tasks/general/ci/install.sh github.com/limetext/lime-backend/lib
script:
- ./tasks/general/ci/run_tests.sh lib
- ./tasks/local/ci/check_gen.sh
- ./tasks/general/ci/check_fmt.sh
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/3e692a5224c8490f19bd
on_success: change
on_failure: always
on_start: false
| os:
- osx
- linux
sudo: required
language: go
go: 1.4
install:
- ./tasks/general/ci/install.sh github.com/limetext/lime-backend/lib
- - ./tasks/local/ci/install.sh
script:
- ./tasks/general/ci/run_tests.sh lib
- ./tasks/local/ci/check_gen.sh
- ./tasks/general/ci/check_fmt.sh
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/3e692a5224c8490f19bd
on_success: change
on_failure: always
on_start: false | 1 | 0.038462 | 0 | 1 |
148206803b9be055c5a697f69f4b3146363ef3e1 | pyepr/meta.yaml | pyepr/meta.yaml | package:
name: pyepr
version: 0.8.1
source:
fn: pyepr-0.8.1.tar.gz
url: https://pypi.python.org/packages/source/p/pyepr/pyepr-0.8.1.tar.gz
md5: c83ed5bbb8f8a58f22990a0758902f71
requirements:
build:
- python
- numpy
- cython
run:
- python
- numpy
test:
imports:
- epr
about:
home: http://avalentino.github.com/pyepr
license: GPL3
| package:
name: pyepr
version: 0.8.1
source:
fn: pyepr-0.8.1.tar.gz
url: https://pypi.python.org/packages/source/p/pyepr/pyepr-0.8.1.tar.gz
md5: c83ed5bbb8f8a58f22990a0758902f71
requirements:
build:
- python
- numpy
- cython
run:
- python
- numpy
build:
number: 1
test:
imports:
- epr
about:
home: http://avalentino.github.com/pyepr
license: GPL3
summary: Python ENVISAT Product Reader API
| Add summary description to pyepr | Add summary description to pyepr
| YAML | mit | avalentino/conda-recipes | yaml | ## Code Before:
package:
name: pyepr
version: 0.8.1
source:
fn: pyepr-0.8.1.tar.gz
url: https://pypi.python.org/packages/source/p/pyepr/pyepr-0.8.1.tar.gz
md5: c83ed5bbb8f8a58f22990a0758902f71
requirements:
build:
- python
- numpy
- cython
run:
- python
- numpy
test:
imports:
- epr
about:
home: http://avalentino.github.com/pyepr
license: GPL3
## Instruction:
Add summary description to pyepr
## Code After:
package:
name: pyepr
version: 0.8.1
source:
fn: pyepr-0.8.1.tar.gz
url: https://pypi.python.org/packages/source/p/pyepr/pyepr-0.8.1.tar.gz
md5: c83ed5bbb8f8a58f22990a0758902f71
requirements:
build:
- python
- numpy
- cython
run:
- python
- numpy
build:
number: 1
test:
imports:
- epr
about:
home: http://avalentino.github.com/pyepr
license: GPL3
summary: Python ENVISAT Product Reader API
| package:
name: pyepr
version: 0.8.1
source:
fn: pyepr-0.8.1.tar.gz
url: https://pypi.python.org/packages/source/p/pyepr/pyepr-0.8.1.tar.gz
md5: c83ed5bbb8f8a58f22990a0758902f71
requirements:
build:
- python
- numpy
- cython
run:
- python
- numpy
+ build:
+ number: 1
+
test:
imports:
- epr
about:
home: http://avalentino.github.com/pyepr
license: GPL3
+ summary: Python ENVISAT Product Reader API | 4 | 0.16 | 4 | 0 |
f3ac7c52395e358b4f637727cc823f2f295e5418 | README.md | README.md | [](https://travis-ci.org/fluxw42/this-to-that)
# This-to-That
This-to-That is a tool that converts files in batch from a watched or given input folder.
| [](https://travis-ci.org/fluxw42/this-to-that) [](https://coveralls.io/github/fluxw42/this-to-that?branch=master)
# This-to-That
This-to-That is a tool that converts files in batch from a watched or given input folder.
| Add coverage badge to readme | Add coverage badge to readme
| Markdown | mit | fluxw42/this-to-that | markdown | ## Code Before:
[](https://travis-ci.org/fluxw42/this-to-that)
# This-to-That
This-to-That is a tool that converts files in batch from a watched or given input folder.
## Instruction:
Add coverage badge to readme
## Code After:
[](https://travis-ci.org/fluxw42/this-to-that) [](https://coveralls.io/github/fluxw42/this-to-that?branch=master)
# This-to-That
This-to-That is a tool that converts files in batch from a watched or given input folder.
| - [](https://travis-ci.org/fluxw42/this-to-that)
+ [](https://travis-ci.org/fluxw42/this-to-that) [](https://coveralls.io/github/fluxw42/this-to-that?branch=master)
# This-to-That
This-to-That is a tool that converts files in batch from a watched or given input folder.
| 2 | 0.333333 | 1 | 1 |
114382ff9b6dad3c9ba621014dd7cd63ad49bef6 | django/santropolFeast/meal/models.py | django/santropolFeast/meal/models.py | from django.db import models
from django.utils.translation import ugettext_lazy as _
class Meal(models.Model):
class Meta:
verbose_name_plural = _('meals')
# Meal information
nom = models.CharField(max_length=50, verbose_name=_('name'))
description = models.TextField(verbose_name=_('description'))
ingredients = models.ManyToManyField(
'meal.Ingredient',
related_name='related_meals'
)
class Ingredient(models.Model):
class Meta:
verbose_name_plural = _('ingredients')
# Ingredient information
nom = models.CharField(max_length=50, verbose_name=_('name'))
class Allergy(models.Model):
class Meta:
verbose_name_plural = _('allergies')
# Allergy information
nom = models.CharField(max_length=50, verbose_name=_('name'))
description = models.TextField(verbose_name=_('description'))
ingredients = models.ManyToManyField(
'meal.Ingredient',
related_name='related_allergies'
)
| from django.db import models
from django.utils.translation import ugettext_lazy as _
class Meal(models.Model):
class Meta:
verbose_name_plural = _('meals')
# Meal information
nom = models.CharField(max_length=50, verbose_name=_('name'))
description = models.TextField(verbose_name=_('description'))
ingredients = models.ManyToManyField(
'meal.Ingredient',
related_name='related_meals'
)
def __str__( self ):
return self.nom
class Ingredient(models.Model):
class Meta:
verbose_name_plural = _('ingredients')
# Ingredient information
nom = models.CharField(max_length=50, verbose_name=_('name'))
def __str__( self ):
return self.nom
class Allergy(models.Model):
class Meta:
verbose_name_plural = _('allergies')
# Allergy information
nom = models.CharField(max_length=50, verbose_name=_('name'))
description = models.TextField(verbose_name=_('description'))
ingredients = models.ManyToManyField(
'meal.Ingredient',
related_name='related_allergies'
)
def __str__( self ):
return self.nom
| Use string representation for objects | Use string representation for objects
| Python | agpl-3.0 | savoirfairelinux/santropol-feast,savoirfairelinux/sous-chef,savoirfairelinux/santropol-feast,savoirfairelinux/sous-chef,madmath/sous-chef,savoirfairelinux/sous-chef,madmath/sous-chef,savoirfairelinux/santropol-feast,madmath/sous-chef | python | ## Code Before:
from django.db import models
from django.utils.translation import ugettext_lazy as _
class Meal(models.Model):
class Meta:
verbose_name_plural = _('meals')
# Meal information
nom = models.CharField(max_length=50, verbose_name=_('name'))
description = models.TextField(verbose_name=_('description'))
ingredients = models.ManyToManyField(
'meal.Ingredient',
related_name='related_meals'
)
class Ingredient(models.Model):
class Meta:
verbose_name_plural = _('ingredients')
# Ingredient information
nom = models.CharField(max_length=50, verbose_name=_('name'))
class Allergy(models.Model):
class Meta:
verbose_name_plural = _('allergies')
# Allergy information
nom = models.CharField(max_length=50, verbose_name=_('name'))
description = models.TextField(verbose_name=_('description'))
ingredients = models.ManyToManyField(
'meal.Ingredient',
related_name='related_allergies'
)
## Instruction:
Use string representation for objects
## Code After:
from django.db import models
from django.utils.translation import ugettext_lazy as _
class Meal(models.Model):
class Meta:
verbose_name_plural = _('meals')
# Meal information
nom = models.CharField(max_length=50, verbose_name=_('name'))
description = models.TextField(verbose_name=_('description'))
ingredients = models.ManyToManyField(
'meal.Ingredient',
related_name='related_meals'
)
def __str__( self ):
return self.nom
class Ingredient(models.Model):
class Meta:
verbose_name_plural = _('ingredients')
# Ingredient information
nom = models.CharField(max_length=50, verbose_name=_('name'))
def __str__( self ):
return self.nom
class Allergy(models.Model):
class Meta:
verbose_name_plural = _('allergies')
# Allergy information
nom = models.CharField(max_length=50, verbose_name=_('name'))
description = models.TextField(verbose_name=_('description'))
ingredients = models.ManyToManyField(
'meal.Ingredient',
related_name='related_allergies'
)
def __str__( self ):
return self.nom
| from django.db import models
from django.utils.translation import ugettext_lazy as _
class Meal(models.Model):
class Meta:
verbose_name_plural = _('meals')
# Meal information
nom = models.CharField(max_length=50, verbose_name=_('name'))
description = models.TextField(verbose_name=_('description'))
ingredients = models.ManyToManyField(
'meal.Ingredient',
related_name='related_meals'
)
+ def __str__( self ):
+ return self.nom
+
class Ingredient(models.Model):
class Meta:
verbose_name_plural = _('ingredients')
# Ingredient information
nom = models.CharField(max_length=50, verbose_name=_('name'))
+ def __str__( self ):
+ return self.nom
class Allergy(models.Model):
class Meta:
verbose_name_plural = _('allergies')
# Allergy information
nom = models.CharField(max_length=50, verbose_name=_('name'))
description = models.TextField(verbose_name=_('description'))
ingredients = models.ManyToManyField(
'meal.Ingredient',
related_name='related_allergies'
)
+
+ def __str__( self ):
+ return self.nom | 8 | 0.205128 | 8 | 0 |
21fe3174410756b25281bed5a446516f2c053016 | node_modules/hotCoreErrorProtocol/lib/hotCoreErrorProtocol.js | node_modules/hotCoreErrorProtocol/lib/hotCoreErrorProtocol.js | "use strict";
var dummy
, hotplate = require('hotplate')
, path = require('path')
;
// exports.sendResponse = function(method, res, obj){
exports.sendResponse = function(res, obj, status){
var status;
var isOK;
status = status || 200;
isOK = (status >= 200 && status < 300) || // allow any 2XX error code
status === 304; // or, get it out of the cache
if( isOK ){
res.json( status, obj );
} else {
obj = typeof(obj) == 'object' ? obj : { };
var error = {};
// Assign "legal" keys
if( obj.message ) error.message = obj.message;
if( obj.errors ) error.errors = obj.errors;
if( obj.data ) error.data = obj.data;
if( obj.emit ) error.emit = obj.emit;
res.json(status, error);
}
}
hotplate.hotEvents.on( 'pageElements', 'hotCoreErrorProtocol', function( done ){
done( null, {
jses: [ 'hotFixErrorResponse.js']
});
});
hotplate.hotEvents.on( 'clientPath', 'hotCoreErrorProtocol', function( done ){
done( null, path.join(__dirname, '../client') );
})
| "use strict";
var dummy
, hotplate = require('hotplate')
, path = require('path')
;
// exports.sendResponse = function(method, res, obj){
exports.sendResponse = function(res, obj, status){
var status;
var isOK;
status = status || 200;
isOK = (status >= 200 && status < 300) || // allow any 2XX error code
status === 304; // or, get it out of the cache
if( isOK ){
res.status( status ).json( obj );
} else {
obj = typeof(obj) == 'object' ? obj : { };
var error = {};
// Assign "legal" keys
if( obj.message ) error.message = obj.message;
if( obj.errors ) error.errors = obj.errors;
if( obj.data ) error.data = obj.data;
if( obj.emit ) error.emit = obj.emit;
res.status( status ).json( error );
}
}
hotplate.hotEvents.on( 'pageElements', 'hotCoreErrorProtocol', function( done ){
done( null, {
jses: [ 'hotFixErrorResponse.js']
});
});
hotplate.hotEvents.on( 'clientPath', 'hotCoreErrorProtocol', function( done ){
done( null, path.join(__dirname, '../client') );
})
| Update to latest Express API | Update to latest Express API
| JavaScript | mit | shelsonjava/hotplate,mercmobily/hotplate,mercmobily/hotplate,shelsonjava/hotplate | javascript | ## Code Before:
"use strict";
var dummy
, hotplate = require('hotplate')
, path = require('path')
;
// exports.sendResponse = function(method, res, obj){
exports.sendResponse = function(res, obj, status){
var status;
var isOK;
status = status || 200;
isOK = (status >= 200 && status < 300) || // allow any 2XX error code
status === 304; // or, get it out of the cache
if( isOK ){
res.json( status, obj );
} else {
obj = typeof(obj) == 'object' ? obj : { };
var error = {};
// Assign "legal" keys
if( obj.message ) error.message = obj.message;
if( obj.errors ) error.errors = obj.errors;
if( obj.data ) error.data = obj.data;
if( obj.emit ) error.emit = obj.emit;
res.json(status, error);
}
}
hotplate.hotEvents.on( 'pageElements', 'hotCoreErrorProtocol', function( done ){
done( null, {
jses: [ 'hotFixErrorResponse.js']
});
});
hotplate.hotEvents.on( 'clientPath', 'hotCoreErrorProtocol', function( done ){
done( null, path.join(__dirname, '../client') );
})
## Instruction:
Update to latest Express API
## Code After:
"use strict";
var dummy
, hotplate = require('hotplate')
, path = require('path')
;
// exports.sendResponse = function(method, res, obj){
exports.sendResponse = function(res, obj, status){
var status;
var isOK;
status = status || 200;
isOK = (status >= 200 && status < 300) || // allow any 2XX error code
status === 304; // or, get it out of the cache
if( isOK ){
res.status( status ).json( obj );
} else {
obj = typeof(obj) == 'object' ? obj : { };
var error = {};
// Assign "legal" keys
if( obj.message ) error.message = obj.message;
if( obj.errors ) error.errors = obj.errors;
if( obj.data ) error.data = obj.data;
if( obj.emit ) error.emit = obj.emit;
res.status( status ).json( error );
}
}
hotplate.hotEvents.on( 'pageElements', 'hotCoreErrorProtocol', function( done ){
done( null, {
jses: [ 'hotFixErrorResponse.js']
});
});
hotplate.hotEvents.on( 'clientPath', 'hotCoreErrorProtocol', function( done ){
done( null, path.join(__dirname, '../client') );
})
| "use strict";
var dummy
, hotplate = require('hotplate')
, path = require('path')
;
// exports.sendResponse = function(method, res, obj){
exports.sendResponse = function(res, obj, status){
var status;
var isOK;
status = status || 200;
isOK = (status >= 200 && status < 300) || // allow any 2XX error code
status === 304; // or, get it out of the cache
if( isOK ){
- res.json( status, obj );
+ res.status( status ).json( obj );
} else {
obj = typeof(obj) == 'object' ? obj : { };
var error = {};
// Assign "legal" keys
if( obj.message ) error.message = obj.message;
if( obj.errors ) error.errors = obj.errors;
if( obj.data ) error.data = obj.data;
if( obj.emit ) error.emit = obj.emit;
- res.json(status, error);
+ res.status( status ).json( error );
}
}
hotplate.hotEvents.on( 'pageElements', 'hotCoreErrorProtocol', function( done ){
done( null, {
jses: [ 'hotFixErrorResponse.js']
});
});
hotplate.hotEvents.on( 'clientPath', 'hotCoreErrorProtocol', function( done ){
done( null, path.join(__dirname, '../client') );
})
| 4 | 0.078431 | 2 | 2 |
55d795f8fbb1d51c9b91c9d56a352fd56becf529 | index.js | index.js | module.exports = function stringReplaceAsync(
string,
searchValue,
replaceValue
) {
try {
if (typeof replaceValue === "function") {
// Step 1: Call native `replace` one time to acquire arguments for
// `replaceValue` function
// Step 2: Collect all return values in an array
// Step 3: Run `Promise.all` on collected values to resolve them
// Step 4: Call native `replace` the second time, replacing substrings
// with resolved values in order of occurance!
var promises = [];
String.prototype.replace.call(string, searchValue, function () {
promises.push(replaceValue.apply(undefined, arguments));
return "";
});
return Promise.all(promises).then(function (values) {
return String.prototype.replace.call(string, searchValue, function () {
return values.shift();
});
});
} else {
return Promise.resolve(
String.prototype.replace.call(string, searchValue, replaceValue)
);
}
} catch (error) {
return Promise.reject(error);
}
};
| module.exports = function stringReplaceAsync(
string,
searchValue,
replaceValue
) {
try {
if (typeof replaceValue === "function") {
// 1. Run fake pass of `replace`, collect values from `replaceValue` calls
// 2. Resolve them with `Promise.all`
// 3. Run `replace` with resolved values
var values = [];
String.prototype.replace.call(string, searchValue, function () {
values.push(replaceValue.apply(undefined, arguments));
return "";
});
return Promise.all(values).then(function (resolvedValues) {
return String.prototype.replace.call(string, searchValue, function () {
return resolvedValues.shift();
});
});
} else {
return Promise.resolve(
String.prototype.replace.call(string, searchValue, replaceValue)
);
}
} catch (error) {
return Promise.reject(error);
}
};
| Clarify the code a bit | Clarify the code a bit
| JavaScript | mit | dsblv/string-replace-async | javascript | ## Code Before:
module.exports = function stringReplaceAsync(
string,
searchValue,
replaceValue
) {
try {
if (typeof replaceValue === "function") {
// Step 1: Call native `replace` one time to acquire arguments for
// `replaceValue` function
// Step 2: Collect all return values in an array
// Step 3: Run `Promise.all` on collected values to resolve them
// Step 4: Call native `replace` the second time, replacing substrings
// with resolved values in order of occurance!
var promises = [];
String.prototype.replace.call(string, searchValue, function () {
promises.push(replaceValue.apply(undefined, arguments));
return "";
});
return Promise.all(promises).then(function (values) {
return String.prototype.replace.call(string, searchValue, function () {
return values.shift();
});
});
} else {
return Promise.resolve(
String.prototype.replace.call(string, searchValue, replaceValue)
);
}
} catch (error) {
return Promise.reject(error);
}
};
## Instruction:
Clarify the code a bit
## Code After:
module.exports = function stringReplaceAsync(
string,
searchValue,
replaceValue
) {
try {
if (typeof replaceValue === "function") {
// 1. Run fake pass of `replace`, collect values from `replaceValue` calls
// 2. Resolve them with `Promise.all`
// 3. Run `replace` with resolved values
var values = [];
String.prototype.replace.call(string, searchValue, function () {
values.push(replaceValue.apply(undefined, arguments));
return "";
});
return Promise.all(values).then(function (resolvedValues) {
return String.prototype.replace.call(string, searchValue, function () {
return resolvedValues.shift();
});
});
} else {
return Promise.resolve(
String.prototype.replace.call(string, searchValue, replaceValue)
);
}
} catch (error) {
return Promise.reject(error);
}
};
| module.exports = function stringReplaceAsync(
string,
searchValue,
replaceValue
) {
try {
if (typeof replaceValue === "function") {
+ // 1. Run fake pass of `replace`, collect values from `replaceValue` calls
+ // 2. Resolve them with `Promise.all`
+ // 3. Run `replace` with resolved values
- // Step 1: Call native `replace` one time to acquire arguments for
- // `replaceValue` function
- // Step 2: Collect all return values in an array
- // Step 3: Run `Promise.all` on collected values to resolve them
- // Step 4: Call native `replace` the second time, replacing substrings
- // with resolved values in order of occurance!
- var promises = [];
? ^^^^^^
+ var values = [];
? ^^^^
String.prototype.replace.call(string, searchValue, function () {
- promises.push(replaceValue.apply(undefined, arguments));
? ^^^^^^
+ values.push(replaceValue.apply(undefined, arguments));
? ^^^^
return "";
});
- return Promise.all(promises).then(function (values) {
? ^^^^^^
+ return Promise.all(values).then(function (resolvedValues) {
? ^^^^ +++++ +++
return String.prototype.replace.call(string, searchValue, function () {
- return values.shift();
+ return resolvedValues.shift();
? +++++ +++
});
});
} else {
return Promise.resolve(
String.prototype.replace.call(string, searchValue, replaceValue)
);
}
} catch (error) {
return Promise.reject(error);
}
}; | 17 | 0.53125 | 7 | 10 |
bc569c55b1f71995e8ff7094bfaf41fda38255e6 | Gruntfile.coffee | Gruntfile.coffee | shell = require 'shelljs'
'use strict'
module.exports = (grunt) ->
grunt.initConfig
pkg: grunt.file.readJSON 'package.json'
cucumberjs:
src: './features'
coffeelint:
lib: ['lib/**/*.coffee']
tests: ['specs/**/*.coffee']
#
grunt.registerTask 'default', ['build_parser', 'test']
grunt.registerTask 'test', ['jasmine_node']
grunt.registerTask 'lint', ['coffeelint']
grunt.registerTask 'build_parser', ->
shell.exec 'pegjs --allowed-start-rules type lib/syntax/parser.pegjs lib/syntax/parser.js'
grunt.registerTask 'jasmine_node', ->
shell.exec './node_modules/jasmine-node/bin/jasmine-node --coffee specs/'
grunt.loadNpmTasks 'grunt-cucumber'
grunt.loadNpmTasks 'grunt-coffeelint'
| shell = require 'shelljs'
'use strict'
module.exports = (grunt) ->
grunt.initConfig
pkg: grunt.file.readJSON 'package.json'
cucumberjs:
src: './features'
coffeelint:
lib: ['lib/**/*.coffee']
tests: ['specs/**/*.coffee']
#
grunt.registerTask 'default', ['build_parser', 'test']
grunt.registerTask 'test', ['jasmine_node']
grunt.registerTask 'lint', ['coffeelint']
grunt.registerTask 'build_parser', ->
shell.exec 'pegjs --allowed-start-rules system,type,attribute,heading lib/syntax/parser.pegjs lib/syntax/parser.js'
grunt.registerTask 'jasmine_node', ->
shell.exec './node_modules/jasmine-node/bin/jasmine-node --coffee specs/'
grunt.loadNpmTasks 'grunt-cucumber'
grunt.loadNpmTasks 'grunt-coffeelint'
| Allow system, attribute and heading as grammar start rules. | Allow system, attribute and heading as grammar start rules.
| CoffeeScript | mit | llambeau/finitio.js,llambeau/finitio.js | coffeescript | ## Code Before:
shell = require 'shelljs'
'use strict'
module.exports = (grunt) ->
grunt.initConfig
pkg: grunt.file.readJSON 'package.json'
cucumberjs:
src: './features'
coffeelint:
lib: ['lib/**/*.coffee']
tests: ['specs/**/*.coffee']
#
grunt.registerTask 'default', ['build_parser', 'test']
grunt.registerTask 'test', ['jasmine_node']
grunt.registerTask 'lint', ['coffeelint']
grunt.registerTask 'build_parser', ->
shell.exec 'pegjs --allowed-start-rules type lib/syntax/parser.pegjs lib/syntax/parser.js'
grunt.registerTask 'jasmine_node', ->
shell.exec './node_modules/jasmine-node/bin/jasmine-node --coffee specs/'
grunt.loadNpmTasks 'grunt-cucumber'
grunt.loadNpmTasks 'grunt-coffeelint'
## Instruction:
Allow system, attribute and heading as grammar start rules.
## Code After:
shell = require 'shelljs'
'use strict'
module.exports = (grunt) ->
grunt.initConfig
pkg: grunt.file.readJSON 'package.json'
cucumberjs:
src: './features'
coffeelint:
lib: ['lib/**/*.coffee']
tests: ['specs/**/*.coffee']
#
grunt.registerTask 'default', ['build_parser', 'test']
grunt.registerTask 'test', ['jasmine_node']
grunt.registerTask 'lint', ['coffeelint']
grunt.registerTask 'build_parser', ->
shell.exec 'pegjs --allowed-start-rules system,type,attribute,heading lib/syntax/parser.pegjs lib/syntax/parser.js'
grunt.registerTask 'jasmine_node', ->
shell.exec './node_modules/jasmine-node/bin/jasmine-node --coffee specs/'
grunt.loadNpmTasks 'grunt-cucumber'
grunt.loadNpmTasks 'grunt-coffeelint'
| shell = require 'shelljs'
'use strict'
module.exports = (grunt) ->
grunt.initConfig
pkg: grunt.file.readJSON 'package.json'
cucumberjs:
src: './features'
coffeelint:
lib: ['lib/**/*.coffee']
tests: ['specs/**/*.coffee']
#
grunt.registerTask 'default', ['build_parser', 'test']
grunt.registerTask 'test', ['jasmine_node']
grunt.registerTask 'lint', ['coffeelint']
grunt.registerTask 'build_parser', ->
- shell.exec 'pegjs --allowed-start-rules type lib/syntax/parser.pegjs lib/syntax/parser.js'
+ shell.exec 'pegjs --allowed-start-rules system,type,attribute,heading lib/syntax/parser.pegjs lib/syntax/parser.js'
? +++++++ ++++++++++++++++++
grunt.registerTask 'jasmine_node', ->
shell.exec './node_modules/jasmine-node/bin/jasmine-node --coffee specs/'
grunt.loadNpmTasks 'grunt-cucumber'
grunt.loadNpmTasks 'grunt-coffeelint' | 2 | 0.066667 | 1 | 1 |
819108cb476329dcd79fe3de253cbb44839cd5a4 | lib/utils/post-build.coffee | lib/utils/post-build.coffee | path = require 'path'
glob = require('glob')
fs = require 'fs-extra'
async = require 'async'
parsePath = require 'parse-filepath'
_ = require 'underscore'
globPages = require './glob-pages'
module.exports = (program, cb) ->
{relativeDirectory, directory} = program
globPages directory, (err, pages) ->
# Async callback to copy each file.
copy = (file, callback) ->
# Map file to path generated for that directory.
# e.g. if file is in directory 2015-06-16-my-sweet-blog-post that got
# rewritten to my-sweet-blog-post, we find that path rewrite so
# our asset gets copied to the right directory.
parsed = parsePath file
relativePath = path.relative(directory + "/pages", file)
oldPath = parsePath(relativePath).dirname
# Wouldn't rewrite basePath
if oldPath is "."
oldPath = "/"
newPath = "/#{parsed.basename}"
unless oldPath is "/"
page = _.find pages, (page) ->
parsePath(page.requirePath).dirname is oldPath
newPath = parsePath(page.path).dirname + parsed.basename
newPath = directory + "/public/" + newPath
fs.copy(file, newPath, (err) ->
callback err
)
# Copy static assets to public folder.
glob directory + '/pages/**/?(*.jpg|*.png|*.pdf)', null, (err, files) ->
async.map files, copy, (err, results) ->
cb(err, results)
| path = require 'path'
glob = require('glob')
fs = require 'fs-extra'
async = require 'async'
parsePath = require 'parse-filepath'
_ = require 'underscore'
globPages = require './glob-pages'
module.exports = (program, cb) ->
{relativeDirectory, directory} = program
globPages directory, (err, pages) ->
# Async callback to copy each file.
copy = (file, callback) ->
# Map file to path generated for that directory.
# e.g. if file is in directory 2015-06-16-my-sweet-blog-post that got
# rewritten to my-sweet-blog-post, we find that path rewrite so
# our asset gets copied to the right directory.
parsed = parsePath file
relativePath = path.relative(directory + "/pages", file)
oldPath = parsePath(relativePath).dirname
# Wouldn't rewrite basePath
if oldPath is "."
oldPath = "/"
newPath = "/#{parsed.basename}"
unless oldPath is "/"
page = _.find pages, (page) ->
parsePath(page.requirePath).dirname is oldPath
newPath = parsePath(page.path).dirname + parsed.basename
newPath = directory + "/public/" + newPath
fs.copy(file, newPath, (err) ->
callback err
)
# Copy static assets to public folder.
glob directory + '/pages/**/?(*.jpg|*.png|*.pdf|*.gif|*.ico)', null, (err, files) ->
async.map files, copy, (err, results) ->
cb(err, results)
| Add more static file types to be copied to public folder | Add more static file types to be copied to public folder
| CoffeeScript | mit | bzero/gatsby,gesposito/gatsby,mickeyreiss/gatsby,ChristopherBiscardi/gatsby,gesposito/gatsby,rothfels/gatsby,ChristopherBiscardi/gatsby,aliswodeck/gatsby,lanastasov/gatsby,MoOx/gatsby,ChristopherBiscardi/gatsby,gatsbyjs/gatsby,alihalabyah/gatsby,chiedo/gatsby,Khaledgarbaya/gatsby,okcoker/gatsby,fabrictech/gatsby,MariusCC/gatsby,gatsbyjs/gatsby,rothfels/gatsby,0x80/gatsby,okcoker/gatsby,mickeyreiss/gatsby,mingaldrichgan/gatsby,danielfarrell/gatsby,okcoker/gatsby,gatsbyjs/gatsby,mingaldrichgan/gatsby,fk/gatsby,danielfarrell/gatsby,chiedo/gatsby,Syncano/gatsby,brianjking/gatsby,danielfarrell/gatsby,Khaledgarbaya/gatsby,HaQadosch/gatsby,gatsbyjs/gatsby,chiedo/gatsby,mingaldrichgan/gatsby,fabrictech/gatsby,fabrictech/gatsby,kidaa/gatsby,gatsbyjs/gatsby,fson/gatsby,gatsbyjs/gatsby,mickeyreiss/gatsby,shaunstanislaus/gatsby,fk/gatsby,0x80/gatsby,domenicosolazzo/gatsby,Khaledgarbaya/gatsby,fk/gatsby,eriknyk/gatsby,0x80/gatsby,ChristopherBiscardi/gatsby | coffeescript | ## Code Before:
path = require 'path'
glob = require('glob')
fs = require 'fs-extra'
async = require 'async'
parsePath = require 'parse-filepath'
_ = require 'underscore'
globPages = require './glob-pages'
module.exports = (program, cb) ->
{relativeDirectory, directory} = program
globPages directory, (err, pages) ->
# Async callback to copy each file.
copy = (file, callback) ->
# Map file to path generated for that directory.
# e.g. if file is in directory 2015-06-16-my-sweet-blog-post that got
# rewritten to my-sweet-blog-post, we find that path rewrite so
# our asset gets copied to the right directory.
parsed = parsePath file
relativePath = path.relative(directory + "/pages", file)
oldPath = parsePath(relativePath).dirname
# Wouldn't rewrite basePath
if oldPath is "."
oldPath = "/"
newPath = "/#{parsed.basename}"
unless oldPath is "/"
page = _.find pages, (page) ->
parsePath(page.requirePath).dirname is oldPath
newPath = parsePath(page.path).dirname + parsed.basename
newPath = directory + "/public/" + newPath
fs.copy(file, newPath, (err) ->
callback err
)
# Copy static assets to public folder.
glob directory + '/pages/**/?(*.jpg|*.png|*.pdf)', null, (err, files) ->
async.map files, copy, (err, results) ->
cb(err, results)
## Instruction:
Add more static file types to be copied to public folder
## Code After:
path = require 'path'
glob = require('glob')
fs = require 'fs-extra'
async = require 'async'
parsePath = require 'parse-filepath'
_ = require 'underscore'
globPages = require './glob-pages'
module.exports = (program, cb) ->
{relativeDirectory, directory} = program
globPages directory, (err, pages) ->
# Async callback to copy each file.
copy = (file, callback) ->
# Map file to path generated for that directory.
# e.g. if file is in directory 2015-06-16-my-sweet-blog-post that got
# rewritten to my-sweet-blog-post, we find that path rewrite so
# our asset gets copied to the right directory.
parsed = parsePath file
relativePath = path.relative(directory + "/pages", file)
oldPath = parsePath(relativePath).dirname
# Wouldn't rewrite basePath
if oldPath is "."
oldPath = "/"
newPath = "/#{parsed.basename}"
unless oldPath is "/"
page = _.find pages, (page) ->
parsePath(page.requirePath).dirname is oldPath
newPath = parsePath(page.path).dirname + parsed.basename
newPath = directory + "/public/" + newPath
fs.copy(file, newPath, (err) ->
callback err
)
# Copy static assets to public folder.
glob directory + '/pages/**/?(*.jpg|*.png|*.pdf|*.gif|*.ico)', null, (err, files) ->
async.map files, copy, (err, results) ->
cb(err, results)
| path = require 'path'
glob = require('glob')
fs = require 'fs-extra'
async = require 'async'
parsePath = require 'parse-filepath'
_ = require 'underscore'
globPages = require './glob-pages'
module.exports = (program, cb) ->
{relativeDirectory, directory} = program
globPages directory, (err, pages) ->
# Async callback to copy each file.
copy = (file, callback) ->
# Map file to path generated for that directory.
# e.g. if file is in directory 2015-06-16-my-sweet-blog-post that got
# rewritten to my-sweet-blog-post, we find that path rewrite so
# our asset gets copied to the right directory.
parsed = parsePath file
relativePath = path.relative(directory + "/pages", file)
oldPath = parsePath(relativePath).dirname
# Wouldn't rewrite basePath
if oldPath is "."
oldPath = "/"
newPath = "/#{parsed.basename}"
unless oldPath is "/"
page = _.find pages, (page) ->
parsePath(page.requirePath).dirname is oldPath
newPath = parsePath(page.path).dirname + parsed.basename
newPath = directory + "/public/" + newPath
fs.copy(file, newPath, (err) ->
callback err
)
# Copy static assets to public folder.
- glob directory + '/pages/**/?(*.jpg|*.png|*.pdf)', null, (err, files) ->
+ glob directory + '/pages/**/?(*.jpg|*.png|*.pdf|*.gif|*.ico)', null, (err, files) ->
? ++++++++++++
async.map files, copy, (err, results) ->
cb(err, results) | 2 | 0.045455 | 1 | 1 |
f47d3b95f5829b3b0e701ab44f13614d1adff07a | js/widget.js | js/widget.js | (function ($) {
$(window).load(function(){
window.hologram(document.getElementsByClassName('hologram-area')[0], {
uploadUrl: Drupal.settings.Hologram.uploadUrl,
onComplete: function(result){
var response = result['response'];
console.log(result['response'].text);
var json = JSON.stringify(result['files']);
$('input[name="field_image[und][0][value][image_json]"').val(json);
},
config: {
uploader: '/hologram/upload'
},
});
var store = window.hologram.store;
store.subscribe(function(){
var files = store.getState().files;
var val = JSON.stringify(files);
$('input[name="field_image[und][0][value][field][image_json]"').val(json);
});
});
})(jQuery);
| (function ($) {
$(window).load(function(){
window.hologram(document.getElementsByClassName('hologram-area')[0], {
uploadUrl: Drupal.settings.Hologram.uploadUrl,
onComplete: function(result){
var response = result['response'];
var json = JSON.stringify(result['files']);
$('input[name="field_image[und][0][value][image_json]"').val(json);
},
config: {
uploader: '/hologram/upload'
},
});
var store = window.hologram.store;
store.subscribe(function(){
var files = store.getState().files;
var json = JSON.stringify(files);
$('input[name="field_image[und][0][value][field][image_json]"').val(json);
});
});
})(jQuery);
| Fix varriable name of json | Fix varriable name of json
| JavaScript | mit | dollars0427/hologram-widget | javascript | ## Code Before:
(function ($) {
$(window).load(function(){
window.hologram(document.getElementsByClassName('hologram-area')[0], {
uploadUrl: Drupal.settings.Hologram.uploadUrl,
onComplete: function(result){
var response = result['response'];
console.log(result['response'].text);
var json = JSON.stringify(result['files']);
$('input[name="field_image[und][0][value][image_json]"').val(json);
},
config: {
uploader: '/hologram/upload'
},
});
var store = window.hologram.store;
store.subscribe(function(){
var files = store.getState().files;
var val = JSON.stringify(files);
$('input[name="field_image[und][0][value][field][image_json]"').val(json);
});
});
})(jQuery);
## Instruction:
Fix varriable name of json
## Code After:
(function ($) {
$(window).load(function(){
window.hologram(document.getElementsByClassName('hologram-area')[0], {
uploadUrl: Drupal.settings.Hologram.uploadUrl,
onComplete: function(result){
var response = result['response'];
var json = JSON.stringify(result['files']);
$('input[name="field_image[und][0][value][image_json]"').val(json);
},
config: {
uploader: '/hologram/upload'
},
});
var store = window.hologram.store;
store.subscribe(function(){
var files = store.getState().files;
var json = JSON.stringify(files);
$('input[name="field_image[und][0][value][field][image_json]"').val(json);
});
});
})(jQuery);
| (function ($) {
$(window).load(function(){
window.hologram(document.getElementsByClassName('hologram-area')[0], {
uploadUrl: Drupal.settings.Hologram.uploadUrl,
onComplete: function(result){
var response = result['response'];
- console.log(result['response'].text);
var json = JSON.stringify(result['files']);
$('input[name="field_image[und][0][value][image_json]"').val(json);
},
config: {
uploader: '/hologram/upload'
},
});
var store = window.hologram.store;
store.subscribe(function(){
var files = store.getState().files;
- var val = JSON.stringify(files);
? ^^^
+ var json = JSON.stringify(files);
? ^^^^
$('input[name="field_image[und][0][value][field][image_json]"').val(json);
});
});
})(jQuery); | 3 | 0.125 | 1 | 2 |
10509c4d166527bbf53628548d2a317204b432a4 | lib/Bio/EnsEMBL/Hive/RunnableDB/RNAcentral/GetFiles.pm | lib/Bio/EnsEMBL/Hive/RunnableDB/RNAcentral/GetFiles.pm |
=pod
=head1 DESCRIPTION
Recursively get a list of files with a specified extension.
=cut
package Bio::EnsEMBL::Hive::RunnableDB::RNAcentral::GetFiles;
use strict;
use Bio::RNAcentral::InputFiles;
use base ('Bio::EnsEMBL::Hive::Process');
=head2 param_defaults
Description :
=cut
sub param_defaults {
}
=head2 fetch_input
Description :
=cut
sub fetch_input {
my $self = shift @_;
my $location = $self->param_required('location');
my $extension = $self->param_required('extension');
my $opt = {};
$opt->{'output_folder'} = $self->param_required('output_folder');
my $rnac = Bio::RNAcentral::InputFiles->new($opt);
my @files = $rnac->list_folder($location, $extension);
my @files = map { { 'ncr_file' => $_ } } values @files;
# store the files for future use:
$self->param('ncr_files', \@files);
}
=head2 run
Description :
=cut
sub run {
}
=head2 write_output
Description :
=cut
sub write_output {
my $self = shift;
my $files = $self->param('ncr_files');
$self->dataflow_output_id($files, 1);
}
1;
|
=pod
=head1 DESCRIPTION
Recursively get a list of files with a specified extension.
=cut
package Bio::EnsEMBL::Hive::RunnableDB::RNAcentral::GetFiles;
use strict;
use Bio::RNAcentral::InputFiles;
use base ('Bio::EnsEMBL::Hive::Process');
=head2 param_defaults
Description :
=cut
sub param_defaults {
}
=head2 fetch_input
Description :
=cut
sub fetch_input {
my $self = shift @_;
my $location = $self->param_required('location');
my $extension = $self->param_required('extension');
my $opt = {};
$opt->{'output_folder'} = $self->param_required('output_folder');
my $rnac = Bio::RNAcentral::InputFiles->new($opt);
my @files = $rnac->list_folder_recursive($location, $extension);
my @files = map { { 'ncr_file' => $_ } } values @files;
# store the files for future use:
$self->param('ncr_files', \@files);
}
=head2 run
Description :
=cut
sub run {
}
=head2 write_output
Description :
=cut
sub write_output {
my $self = shift;
my $files = $self->param('ncr_files');
$self->dataflow_output_id($files, 1);
}
1;
| Use recursive folder listing for local (non-ftp) import mode | Use recursive folder listing for local (non-ftp) import mode
| Perl | apache-2.0 | RNAcentral/rnacentral-import-pipeline,RNAcentral/rnacentral-import-pipeline,RNAcentral/rnacentral-import-pipeline,RNAcentral/rnacentral-import-pipeline | perl | ## Code Before:
=pod
=head1 DESCRIPTION
Recursively get a list of files with a specified extension.
=cut
package Bio::EnsEMBL::Hive::RunnableDB::RNAcentral::GetFiles;
use strict;
use Bio::RNAcentral::InputFiles;
use base ('Bio::EnsEMBL::Hive::Process');
=head2 param_defaults
Description :
=cut
sub param_defaults {
}
=head2 fetch_input
Description :
=cut
sub fetch_input {
my $self = shift @_;
my $location = $self->param_required('location');
my $extension = $self->param_required('extension');
my $opt = {};
$opt->{'output_folder'} = $self->param_required('output_folder');
my $rnac = Bio::RNAcentral::InputFiles->new($opt);
my @files = $rnac->list_folder($location, $extension);
my @files = map { { 'ncr_file' => $_ } } values @files;
# store the files for future use:
$self->param('ncr_files', \@files);
}
=head2 run
Description :
=cut
sub run {
}
=head2 write_output
Description :
=cut
sub write_output {
my $self = shift;
my $files = $self->param('ncr_files');
$self->dataflow_output_id($files, 1);
}
1;
## Instruction:
Use recursive folder listing for local (non-ftp) import mode
## Code After:
=pod
=head1 DESCRIPTION
Recursively get a list of files with a specified extension.
=cut
package Bio::EnsEMBL::Hive::RunnableDB::RNAcentral::GetFiles;
use strict;
use Bio::RNAcentral::InputFiles;
use base ('Bio::EnsEMBL::Hive::Process');
=head2 param_defaults
Description :
=cut
sub param_defaults {
}
=head2 fetch_input
Description :
=cut
sub fetch_input {
my $self = shift @_;
my $location = $self->param_required('location');
my $extension = $self->param_required('extension');
my $opt = {};
$opt->{'output_folder'} = $self->param_required('output_folder');
my $rnac = Bio::RNAcentral::InputFiles->new($opt);
my @files = $rnac->list_folder_recursive($location, $extension);
my @files = map { { 'ncr_file' => $_ } } values @files;
# store the files for future use:
$self->param('ncr_files', \@files);
}
=head2 run
Description :
=cut
sub run {
}
=head2 write_output
Description :
=cut
sub write_output {
my $self = shift;
my $files = $self->param('ncr_files');
$self->dataflow_output_id($files, 1);
}
1;
|
=pod
=head1 DESCRIPTION
Recursively get a list of files with a specified extension.
=cut
package Bio::EnsEMBL::Hive::RunnableDB::RNAcentral::GetFiles;
use strict;
use Bio::RNAcentral::InputFiles;
use base ('Bio::EnsEMBL::Hive::Process');
=head2 param_defaults
Description :
=cut
sub param_defaults {
}
=head2 fetch_input
Description :
=cut
sub fetch_input {
my $self = shift @_;
my $location = $self->param_required('location');
my $extension = $self->param_required('extension');
my $opt = {};
$opt->{'output_folder'} = $self->param_required('output_folder');
my $rnac = Bio::RNAcentral::InputFiles->new($opt);
- my @files = $rnac->list_folder($location, $extension);
+ my @files = $rnac->list_folder_recursive($location, $extension);
? ++++++++++
my @files = map { { 'ncr_file' => $_ } } values @files;
# store the files for future use:
$self->param('ncr_files', \@files);
}
=head2 run
Description :
=cut
sub run {
}
=head2 write_output
Description :
=cut
sub write_output {
my $self = shift;
my $files = $self->param('ncr_files');
$self->dataflow_output_id($files, 1);
}
1;
| 2 | 0.024691 | 1 | 1 |
8f458471e60d630f67e9cd5941f0764fa299cbd0 | templates/replication.config.erb | templates/replication.config.erb |
[gerrit]
defaultForceUpdate = <%= @replication_force_update %>
<% @replication.each do |replication| -%>
[remote "<%= replication['name'] %>"]
url = <%= replication['url'] %>${name}.git
<% if replication['replicationDelay'] != nil -%>
replicationDelay = <%= replication['replicationDelay'] %>
<% end -%>
<% if replication['threads'] != nil -%>
threads = <%= replication['threads'] %>
<% end -%>
<% if replication['authGroup'] != nil -%>
authGroup = <%= replication['authGroup'] %>
<% end -%>
<% if replication['replicatePermissions'] != nil -%>
replicatePermissions = <%= replication['replicatePermissions'] %>
<% end -%>
<% if replication['mirror'] != nil -%>
mirror = <%= replication['mirror'] %>
<% end -%>
<% end -%>
|
[gerrit]
defaultForceUpdate = <%= @replication_force_update %>
<% @replication.each do |replication| -%>
[remote "<%= replication['name'] %>"]
url = <%= replication['url'] %>${name}.git
<% if replication['replicationDelay'] != nil -%>
replicationDelay = <%= replication['replicationDelay'] %>
<% end -%>
<% if replication['threads'] != nil -%>
threads = <%= replication['threads'] %>
<% end -%>
<% if replication['authGroup'] != nil -%>
authGroup = <%= replication['authGroup'] %>
<% end -%>
<% if replication['replicatePermissions'] != nil -%>
replicatePermissions = <%= replication['replicatePermissions'] %>
<% end -%>
<% if replication['mirror'] != nil -%>
mirror = <%= replication['mirror'] %>
<% end -%>
<% if replication['projects'] != nil -%>
<% replication['projects'].each do |project| -%>
projects = <%= project %>
<% end -%>
<% end -%>
<% end -%>
| Add support for 'projects' keyword | Add support for 'projects' keyword
To replicate only specific projects, the 'projects' keyword can be used
(multiple times if needed) in each remote section of the
replication.config.
Change-Id: I0f66120a7c9c8f849c03c87e621ae1c46a343297
Co-Authored-By: Spencer Krum <9f0bf2adee05513e15363471857cce616f4c4b2c@spencerkrum.com>
| HTML+ERB | apache-2.0 | dhiana/puppet-gerrit,dhiana/puppet-gerrit,dhiana/puppet-gerrit | html+erb | ## Code Before:
[gerrit]
defaultForceUpdate = <%= @replication_force_update %>
<% @replication.each do |replication| -%>
[remote "<%= replication['name'] %>"]
url = <%= replication['url'] %>${name}.git
<% if replication['replicationDelay'] != nil -%>
replicationDelay = <%= replication['replicationDelay'] %>
<% end -%>
<% if replication['threads'] != nil -%>
threads = <%= replication['threads'] %>
<% end -%>
<% if replication['authGroup'] != nil -%>
authGroup = <%= replication['authGroup'] %>
<% end -%>
<% if replication['replicatePermissions'] != nil -%>
replicatePermissions = <%= replication['replicatePermissions'] %>
<% end -%>
<% if replication['mirror'] != nil -%>
mirror = <%= replication['mirror'] %>
<% end -%>
<% end -%>
## Instruction:
Add support for 'projects' keyword
To replicate only specific projects, the 'projects' keyword can be used
(multiple times if needed) in each remote section of the
replication.config.
Change-Id: I0f66120a7c9c8f849c03c87e621ae1c46a343297
Co-Authored-By: Spencer Krum <9f0bf2adee05513e15363471857cce616f4c4b2c@spencerkrum.com>
## Code After:
[gerrit]
defaultForceUpdate = <%= @replication_force_update %>
<% @replication.each do |replication| -%>
[remote "<%= replication['name'] %>"]
url = <%= replication['url'] %>${name}.git
<% if replication['replicationDelay'] != nil -%>
replicationDelay = <%= replication['replicationDelay'] %>
<% end -%>
<% if replication['threads'] != nil -%>
threads = <%= replication['threads'] %>
<% end -%>
<% if replication['authGroup'] != nil -%>
authGroup = <%= replication['authGroup'] %>
<% end -%>
<% if replication['replicatePermissions'] != nil -%>
replicatePermissions = <%= replication['replicatePermissions'] %>
<% end -%>
<% if replication['mirror'] != nil -%>
mirror = <%= replication['mirror'] %>
<% end -%>
<% if replication['projects'] != nil -%>
<% replication['projects'].each do |project| -%>
projects = <%= project %>
<% end -%>
<% end -%>
<% end -%>
|
[gerrit]
defaultForceUpdate = <%= @replication_force_update %>
<% @replication.each do |replication| -%>
[remote "<%= replication['name'] %>"]
url = <%= replication['url'] %>${name}.git
<% if replication['replicationDelay'] != nil -%>
replicationDelay = <%= replication['replicationDelay'] %>
<% end -%>
<% if replication['threads'] != nil -%>
threads = <%= replication['threads'] %>
<% end -%>
<% if replication['authGroup'] != nil -%>
authGroup = <%= replication['authGroup'] %>
<% end -%>
<% if replication['replicatePermissions'] != nil -%>
replicatePermissions = <%= replication['replicatePermissions'] %>
<% end -%>
<% if replication['mirror'] != nil -%>
mirror = <%= replication['mirror'] %>
<% end -%>
+ <% if replication['projects'] != nil -%>
+ <% replication['projects'].each do |project| -%>
+ projects = <%= project %>
<% end -%>
+ <% end -%>
+ <% end -%> | 5 | 0.217391 | 5 | 0 |
644608a942cc6374237808fce0715d08a7c74e27 | app/css/style.scss | app/css/style.scss | html {
body {
/* márgenes para barras superior e inferior */
padding-top: 60px;
padding-bottom: 60px;
.card-body {padding:5px 5px 0 5px;}
.form-group {margin-bottom:5px;}
#components {
.bg-info {background-color: #b7caff !important; cursor: pointer;}
.deliveredstyle * {color: blue;}
.inactivecomponent * {color: gray;}
}
#globalvarscontrol {
#kexp, #area, #buttons {
margin:0;
display: inline-block;
padding: 5px;
label {display: inline;}
input[type=range] {width: 40%; display: inline; vertical-align: middle;}
input[type=text] {width: 20%; display: inline; vertical-align: middle; color:black;}
input[type=number] {width: 60%; display: inline; vertical-align: middle;}
}
}
.help-header {
text-decoration: underline;
}
}
}
| html {
body {
/* márgenes para barras superior e inferior */
padding-top: 60px;
padding-bottom: 60px;
.card-body {padding:5px 5px 0 5px;}
.form-group {margin-bottom:5px;}
#components {
.bg-info {background-color: #b7caff !important; cursor: pointer;}
.deliveredstyle * {color: blue;}
.inactivecomponent * {color: gray;}
td, th { padding: .5rem; }
}
#globalvarscontrol {
#kexp, #area, #buttons {
margin:0;
display: inline-block;
padding: 5px;
label {display: inline;}
input[type=range] {width: 40%; display: inline; vertical-align: middle;}
input[type=text] {width: 20%; display: inline; vertical-align: middle; color:black;}
input[type=number] {width: 60%; display: inline; vertical-align: middle;}
}
}
.help-header {
text-decoration: underline;
}
}
}
| Reduce algo los márgenes de la tabla de componentes | Reduce algo los márgenes de la tabla de componentes
| SCSS | mit | pachi/epbdpanel,pachi/epbdpanel | scss | ## Code Before:
html {
body {
/* márgenes para barras superior e inferior */
padding-top: 60px;
padding-bottom: 60px;
.card-body {padding:5px 5px 0 5px;}
.form-group {margin-bottom:5px;}
#components {
.bg-info {background-color: #b7caff !important; cursor: pointer;}
.deliveredstyle * {color: blue;}
.inactivecomponent * {color: gray;}
}
#globalvarscontrol {
#kexp, #area, #buttons {
margin:0;
display: inline-block;
padding: 5px;
label {display: inline;}
input[type=range] {width: 40%; display: inline; vertical-align: middle;}
input[type=text] {width: 20%; display: inline; vertical-align: middle; color:black;}
input[type=number] {width: 60%; display: inline; vertical-align: middle;}
}
}
.help-header {
text-decoration: underline;
}
}
}
## Instruction:
Reduce algo los márgenes de la tabla de componentes
## Code After:
html {
body {
/* márgenes para barras superior e inferior */
padding-top: 60px;
padding-bottom: 60px;
.card-body {padding:5px 5px 0 5px;}
.form-group {margin-bottom:5px;}
#components {
.bg-info {background-color: #b7caff !important; cursor: pointer;}
.deliveredstyle * {color: blue;}
.inactivecomponent * {color: gray;}
td, th { padding: .5rem; }
}
#globalvarscontrol {
#kexp, #area, #buttons {
margin:0;
display: inline-block;
padding: 5px;
label {display: inline;}
input[type=range] {width: 40%; display: inline; vertical-align: middle;}
input[type=text] {width: 20%; display: inline; vertical-align: middle; color:black;}
input[type=number] {width: 60%; display: inline; vertical-align: middle;}
}
}
.help-header {
text-decoration: underline;
}
}
}
| html {
body {
/* márgenes para barras superior e inferior */
padding-top: 60px;
padding-bottom: 60px;
.card-body {padding:5px 5px 0 5px;}
.form-group {margin-bottom:5px;}
#components {
.bg-info {background-color: #b7caff !important; cursor: pointer;}
.deliveredstyle * {color: blue;}
.inactivecomponent * {color: gray;}
+ td, th { padding: .5rem; }
}
#globalvarscontrol {
#kexp, #area, #buttons {
margin:0;
display: inline-block;
padding: 5px;
label {display: inline;}
input[type=range] {width: 40%; display: inline; vertical-align: middle;}
input[type=text] {width: 20%; display: inline; vertical-align: middle; color:black;}
input[type=number] {width: 60%; display: inline; vertical-align: middle;}
}
}
.help-header {
text-decoration: underline;
}
}
} | 1 | 0.035714 | 1 | 0 |
75ea14061485456441ce80ec5c4bd3604ced4e23 | src/svg/components/Spinner.ts | src/svg/components/Spinner.ts | import Config from '../../Config';
import Component from './Component';
class Spinner extends Component {
constructor() {
super();
}
public render(): void {
let width: number = this.config.get('imageWidth'),
height: number = this.config.get('imageHeight'),
marginLeft: number = this.config.get('marginLeft');
this.svg.append('image')
.attr('class', 'spinner')
.style('opacity', 1)
.attr('xlink:href', '../../../images/Spinner.svg')
.attr('transform', 'translate(' + (width - marginLeft - 200) + ',' + (height - 200) + ')');
}
public update(data: [{}]) {
if (typeof data !== undefined && data.length != 0) {
this.svg.select('.spinner').style('opacity', 0);
}
}
public transition() {}
public clear() {}
}
export default Spinner;
| import Config from '../../Config';
import Component from './Component';
class Spinner extends Component {
constructor() {
super();
}
public render(): void {
let width: number = this.config.get('imageWidth'),
height: number = this.config.get('imageHeight'),
marginLeft: number = this.config.get('marginLeft');
this.svg.append('image')
.attr('class', 'spinner')
.style('opacity', 1)
.attr('xlink:href', '../../../images/Spinner.svg')
.attr('width', 200)
.attr('height', 200)
.attr('transform', 'translate(' + (width - marginLeft - 200) + ',' + (height - 200) + ')');
}
public update(data: [{}]) {
if (typeof data !== undefined && data.length != 0) {
this.svg.select('.spinner').style('opacity', 0);
}
}
public transition() {}
public clear() {}
}
export default Spinner;
| Solve issue that spinner doesn't show on firefox | Solve issue that spinner doesn't show on firefox
| TypeScript | apache-2.0 | proteus-h2020/proteic,proteus-h2020/proteus-charts,proteus-h2020/proteic,proteus-h2020/proteic | typescript | ## Code Before:
import Config from '../../Config';
import Component from './Component';
class Spinner extends Component {
constructor() {
super();
}
public render(): void {
let width: number = this.config.get('imageWidth'),
height: number = this.config.get('imageHeight'),
marginLeft: number = this.config.get('marginLeft');
this.svg.append('image')
.attr('class', 'spinner')
.style('opacity', 1)
.attr('xlink:href', '../../../images/Spinner.svg')
.attr('transform', 'translate(' + (width - marginLeft - 200) + ',' + (height - 200) + ')');
}
public update(data: [{}]) {
if (typeof data !== undefined && data.length != 0) {
this.svg.select('.spinner').style('opacity', 0);
}
}
public transition() {}
public clear() {}
}
export default Spinner;
## Instruction:
Solve issue that spinner doesn't show on firefox
## Code After:
import Config from '../../Config';
import Component from './Component';
class Spinner extends Component {
constructor() {
super();
}
public render(): void {
let width: number = this.config.get('imageWidth'),
height: number = this.config.get('imageHeight'),
marginLeft: number = this.config.get('marginLeft');
this.svg.append('image')
.attr('class', 'spinner')
.style('opacity', 1)
.attr('xlink:href', '../../../images/Spinner.svg')
.attr('width', 200)
.attr('height', 200)
.attr('transform', 'translate(' + (width - marginLeft - 200) + ',' + (height - 200) + ')');
}
public update(data: [{}]) {
if (typeof data !== undefined && data.length != 0) {
this.svg.select('.spinner').style('opacity', 0);
}
}
public transition() {}
public clear() {}
}
export default Spinner;
| import Config from '../../Config';
import Component from './Component';
class Spinner extends Component {
constructor() {
super();
}
public render(): void {
let width: number = this.config.get('imageWidth'),
height: number = this.config.get('imageHeight'),
marginLeft: number = this.config.get('marginLeft');
this.svg.append('image')
.attr('class', 'spinner')
.style('opacity', 1)
.attr('xlink:href', '../../../images/Spinner.svg')
+ .attr('width', 200)
+ .attr('height', 200)
.attr('transform', 'translate(' + (width - marginLeft - 200) + ',' + (height - 200) + ')');
}
public update(data: [{}]) {
if (typeof data !== undefined && data.length != 0) {
this.svg.select('.spinner').style('opacity', 0);
}
}
public transition() {}
public clear() {}
}
export default Spinner; | 2 | 0.0625 | 2 | 0 |
516c2ffd44f172aa1c1d763a52a6bbfb75660687 | app/controllers/sources_controller.rb | app/controllers/sources_controller.rb | class SourcesController < ApplicationController
expose(:sources) { Source.order(:name) }
expose(:source)
expose(:ordered_sources) do
{
email_rank: Source.order(:email_rank),
location_rank: Source.order(:location_rank),
organization_name_rank: Source.order(:organization_name_rank),
phone_number_rank: Source.order(:phone_number_rank),
website_rank: Source.order(:website_rank)
}
end
def create
SourceResolver.resolve(source)
if source.persisted?
redirect_to sources_path
else
render :new
end
end
private
def source_params
params.require(:source).permit(
:name,
:email_rank,
:location_rank,
:organization_name_rank,
:phone_number_rank,
:website_rank
)
end
end
| class SourcesController < ApplicationController
expose(:sources) { Source.order(:name) }
expose(:source)
expose(:ordered_sources) do
{
email_rank: Source.order(:email_rank),
location_rank: Source.order(:location_rank),
organization_name_rank: Source.order(:organization_name_rank),
phone_number_rank: Source.order(:phone_number_rank),
website_rank: Source.order(:website_rank)
}
end
def create
if SourceResolver.resolve(source)
redirect_to sources_path
else
render :new
end
end
private
def source_params
params.require(:source).permit(
:name,
:email_rank,
:location_rank,
:organization_name_rank,
:phone_number_rank,
:website_rank
)
end
end
| Use the return of the SourceResolver | Use the return of the SourceResolver
| Ruby | mit | artsy/bearden,artsy/bearden,artsy/bearden,artsy/bearden | ruby | ## Code Before:
class SourcesController < ApplicationController
expose(:sources) { Source.order(:name) }
expose(:source)
expose(:ordered_sources) do
{
email_rank: Source.order(:email_rank),
location_rank: Source.order(:location_rank),
organization_name_rank: Source.order(:organization_name_rank),
phone_number_rank: Source.order(:phone_number_rank),
website_rank: Source.order(:website_rank)
}
end
def create
SourceResolver.resolve(source)
if source.persisted?
redirect_to sources_path
else
render :new
end
end
private
def source_params
params.require(:source).permit(
:name,
:email_rank,
:location_rank,
:organization_name_rank,
:phone_number_rank,
:website_rank
)
end
end
## Instruction:
Use the return of the SourceResolver
## Code After:
class SourcesController < ApplicationController
expose(:sources) { Source.order(:name) }
expose(:source)
expose(:ordered_sources) do
{
email_rank: Source.order(:email_rank),
location_rank: Source.order(:location_rank),
organization_name_rank: Source.order(:organization_name_rank),
phone_number_rank: Source.order(:phone_number_rank),
website_rank: Source.order(:website_rank)
}
end
def create
if SourceResolver.resolve(source)
redirect_to sources_path
else
render :new
end
end
private
def source_params
params.require(:source).permit(
:name,
:email_rank,
:location_rank,
:organization_name_rank,
:phone_number_rank,
:website_rank
)
end
end
| class SourcesController < ApplicationController
expose(:sources) { Source.order(:name) }
expose(:source)
expose(:ordered_sources) do
{
email_rank: Source.order(:email_rank),
location_rank: Source.order(:location_rank),
organization_name_rank: Source.order(:organization_name_rank),
phone_number_rank: Source.order(:phone_number_rank),
website_rank: Source.order(:website_rank)
}
end
def create
- SourceResolver.resolve(source)
+ if SourceResolver.resolve(source)
? +++
-
- if source.persisted?
redirect_to sources_path
else
render :new
end
end
private
def source_params
params.require(:source).permit(
:name,
:email_rank,
:location_rank,
:organization_name_rank,
:phone_number_rank,
:website_rank
)
end
end | 4 | 0.108108 | 1 | 3 |
8102b9a4d853c4e29219b4b1a0f07a70ab37630d | provisioning/vagrant/bootstrap_freebsd.sh | provisioning/vagrant/bootstrap_freebsd.sh |
UNZIP=`which unzip`
TAR=`which tar`
fail_and_exit() {
echo "Provisioning failed"
exit 1
}
# Install some dependencies
pkg_add -r gmake -F && \
pkg_add -r python -F && \
pkg_add -r bash -F && \
ln -sf /usr/local/bin/python /usr/bin/python && \
pip install PyYAML Jinja2 || fail_and_exit
cd /root
# Extract ansible and install it
$TAR -zxvf v1.3.0.tar.gz || fail_and_exit
cd ansible-1.3.0
# Install Ansible
gmake install && \
/usr/local/bin/bash hacking/env-setup || fail_and_exit
cd ..
# Extract public provisioning scripts
$UNZIP -o beta-v2.zip || fail_and_exit
cd jidoteki-os-templates-beta-v2/provisioning/vagrant
# Run ansible in local mode
chmod 644 hosts && \
ansible-playbook vagrant.yml -i hosts || fail_and_exit
cd ..
cd ..
echo "Provisioning completed successfully"
exit 0
|
UNZIP=`which unzip`
TAR=`which tar`
fail_and_exit() {
echo "Provisioning failed"
exit 1
}
# Install some dependencies
pkg_add -r gmake -F && \
pkg_add -r python27 -F && \
pkg_add -r bash -F && \
pkg_add -r py27-pip -F && \
ln -sf /usr/local/bin/python /usr/bin/python && \
pip install PyYAML Jinja2 || fail_and_exit
cd /root
# Extract ansible and install it
$TAR -zxvf v1.3.0.tar.gz || fail_and_exit
cd ansible-1.3.0
# Install Ansible
gmake install && \
/usr/local/bin/bash hacking/env-setup || fail_and_exit
cd ..
# Extract public provisioning scripts
$UNZIP -o beta-v2.zip || fail_and_exit
cd jidoteki-os-templates-beta-v2/provisioning/vagrant
# Run ansible in local mode
chmod 644 hosts && \
ansible-playbook vagrant.yml -i hosts || fail_and_exit
cd ..
cd ..
echo "Provisioning completed successfully"
exit 0
| Install pip before trying to use it | Install pip before trying to use it
| Shell | mit | unscramble/jidoteki-os-templates | shell | ## Code Before:
UNZIP=`which unzip`
TAR=`which tar`
fail_and_exit() {
echo "Provisioning failed"
exit 1
}
# Install some dependencies
pkg_add -r gmake -F && \
pkg_add -r python -F && \
pkg_add -r bash -F && \
ln -sf /usr/local/bin/python /usr/bin/python && \
pip install PyYAML Jinja2 || fail_and_exit
cd /root
# Extract ansible and install it
$TAR -zxvf v1.3.0.tar.gz || fail_and_exit
cd ansible-1.3.0
# Install Ansible
gmake install && \
/usr/local/bin/bash hacking/env-setup || fail_and_exit
cd ..
# Extract public provisioning scripts
$UNZIP -o beta-v2.zip || fail_and_exit
cd jidoteki-os-templates-beta-v2/provisioning/vagrant
# Run ansible in local mode
chmod 644 hosts && \
ansible-playbook vagrant.yml -i hosts || fail_and_exit
cd ..
cd ..
echo "Provisioning completed successfully"
exit 0
## Instruction:
Install pip before trying to use it
## Code After:
UNZIP=`which unzip`
TAR=`which tar`
fail_and_exit() {
echo "Provisioning failed"
exit 1
}
# Install some dependencies
pkg_add -r gmake -F && \
pkg_add -r python27 -F && \
pkg_add -r bash -F && \
pkg_add -r py27-pip -F && \
ln -sf /usr/local/bin/python /usr/bin/python && \
pip install PyYAML Jinja2 || fail_and_exit
cd /root
# Extract ansible and install it
$TAR -zxvf v1.3.0.tar.gz || fail_and_exit
cd ansible-1.3.0
# Install Ansible
gmake install && \
/usr/local/bin/bash hacking/env-setup || fail_and_exit
cd ..
# Extract public provisioning scripts
$UNZIP -o beta-v2.zip || fail_and_exit
cd jidoteki-os-templates-beta-v2/provisioning/vagrant
# Run ansible in local mode
chmod 644 hosts && \
ansible-playbook vagrant.yml -i hosts || fail_and_exit
cd ..
cd ..
echo "Provisioning completed successfully"
exit 0
|
UNZIP=`which unzip`
TAR=`which tar`
fail_and_exit() {
echo "Provisioning failed"
exit 1
}
# Install some dependencies
pkg_add -r gmake -F && \
- pkg_add -r python -F && \
+ pkg_add -r python27 -F && \
? ++
pkg_add -r bash -F && \
+ pkg_add -r py27-pip -F && \
ln -sf /usr/local/bin/python /usr/bin/python && \
pip install PyYAML Jinja2 || fail_and_exit
cd /root
# Extract ansible and install it
$TAR -zxvf v1.3.0.tar.gz || fail_and_exit
cd ansible-1.3.0
# Install Ansible
gmake install && \
/usr/local/bin/bash hacking/env-setup || fail_and_exit
cd ..
# Extract public provisioning scripts
$UNZIP -o beta-v2.zip || fail_and_exit
cd jidoteki-os-templates-beta-v2/provisioning/vagrant
# Run ansible in local mode
chmod 644 hosts && \
ansible-playbook vagrant.yml -i hosts || fail_and_exit
cd ..
cd ..
echo "Provisioning completed successfully"
exit 0 | 3 | 0.083333 | 2 | 1 |
7a83c884fabbde488314a586b600b58dcfce4ce6 | scss/components/_dropdown-menu.scss | scss/components/_dropdown-menu.scss | .dropdown.menu-bar {
.has-submenu {
position: relative;
}
//Chris's amendments *******
.submenu {
//for left aligned menus only
display: none;
position: absolute;
top: 0;
left: 100%;
width: auto;
white-space: nowrap;
// border: thin solid blue;
background: $body-background;
z-index: 1;
> li {
width: 100%;
}
&.right {
left: auto;
right: 100%;
}
&.first-sub {
top: 100%;
left: 0;
right: auto;
&.right{
left: auto;
right: 0;
}
}
//**************
&:not(.js-dropdown-nohover) > .has-submenu:hover > &,
&.js-dropdown-active {
display: block;
}
}
&.vertical.align-right {
float: right;
}
&.vertical {
width: 100px;
& > li .submenu {
top: 0;
left: 100%;
&.right {
left: auto;
right: 100%;
}
}
}
}
// .submenu {
// display: none;
// position: absolute;
// top: 100%;
// width: auto;
// white-space: nowrap;
// background: $body-background;
// z-index: 1;
//need settings for right-aligned dd as well
| .dropdown.menu-bar {
.has-submenu {
position: relative;
}
//Chris's amendments *******
.submenu {
//for left aligned menus only
display: none;
position: absolute;
top: 0;
left: 100%;
width: auto;
white-space: nowrap;
// border: thin solid blue;
background: $body-background;
z-index: 1;
background: white;
> li {
width: 100%;
}
&.right {
left: auto;
right: 100%;
}
&.first-sub {
top: 100%;
left: 0;
right: auto;
&.right{
left: auto;
right: 0;
}
}
//**************
&:not(.js-dropdown-nohover) > .has-submenu:hover > &,
&.js-dropdown-active {
display: block;
}
}
&.vertical.align-right {
float: right;
}
&.vertical {
width: 100px;
& > li .submenu {
top: 0;
left: 100%;
&.right {
left: auto;
right: 100%;
}
}
}
}
// .submenu {
// display: none;
// position: absolute;
// top: 100%;
// width: auto;
// white-space: nowrap;
// background: $body-background;
// z-index: 1;
//need settings for right-aligned dd as well
| Add background color to dropdown submenus | Add background color to dropdown submenus
| SCSS | mit | yohio/foundation-sites-6,sethkane/foundation-sites,PassKitInc/foundation-sites,abdullahsalem/foundation-sites,colin-marshall/foundation-sites,karland/foundation-sites,sethkane/foundation-sites,designerno1/foundation-sites,atmmarketing/foundation-sites,designerno1/foundation-sites,zurb/foundation,jamesstoneco/foundation-sites,hummingbird-me/foundation-sites-6,aoimedia/foundation,designerno1/foundation-sites,sashaegorov/foundation-sites,BerndtGroup/TBG-foundation-sites,jeromelebleu/foundation-sites,abdullahsalem/foundation-sites,dimamedia/foundation-6-sites-simple-scss-and-js,brettsmason/foundation-sites,yohio/foundation-sites-6,karland/foundation-sites,socketz/foundation-multilevel-offcanvas,dragthor/foundation-sites,samuelmc/foundation-sites,zurb/foundation-sites,Owlbertz/foundation,jaylensoeur/foundation-sites-6,denisahac/foundation-sites,jaylensoeur/foundation-sites-6,natewiebe13/foundation-sites,getoutfitted/reaction-foundation-theme,advisorwebsites/foundation-sites-6,Owlbertz/foundation,denisahac/foundation-sites,Iamronan/foundation,IamManchanda/foundation-sites,getoutfitted/reaction-foundation-theme,zurb/foundation-sites,ucla/foundation-sites,jamesstoneco/foundation-sites,andycochran/foundation-sites,Owlbertz/foundation,DaSchTour/foundation-sites,natewiebe13/foundation-sites,BerndtGroup/TBG-foundation-sites,aoimedia/foundation,Mango-information-systems/foundation,hummingbird-me/foundation-sites-6,pdeffendol/foundation,natewiebe13/foundation-sites,jeromelebleu/foundation-sites,brettsmason/foundation-sites,colin-marshall/foundation-sites,IamManchanda/foundation-sites,Iamronan/foundation,dimamedia/foundation-6-sites-simple-scss-and-js,ucla/foundation-sites,zurb/foundation-sites,atmmarketing/foundation-sites,zurb/foundation-sites-6,samuelmc/foundation-sites,zurb/foundation-sites-6,PassKitInc/foundation-sites,abdullahsalem/foundation-sites,dragthor/foundation-sites,pdeffendol/foundation,samuelmc/foundation-sites,socketz/foundation-multilevel-offcanvas,zurb/foundation,ucla/foundation-sites,jamesstoneco/foundation-sites,jaylensoeur/foundation-sites-6,aoimedia/foundation,jeromelebleu/foundation-sites,Iamronan/foundation,PassKitInc/foundation-sites,socketz/foundation-multilevel-offcanvas,advisorwebsites/foundation-sites-6,atmmarketing/foundation-sites,brettsmason/foundation-sites,getoutfitted/reaction-foundation-theme,pdeffendol/foundation,colin-marshall/foundation-sites,denisahac/foundation-sites,BerndtGroup/TBG-foundation-sites,DaSchTour/foundation-sites,zurb/foundation,sashaegorov/foundation-sites,Mango-information-systems/foundation,karland/foundation-sites,Mango-information-systems/foundation,sethkane/foundation-sites,andycochran/foundation-sites,sashaegorov/foundation-sites,dragthor/foundation-sites,Owlbertz/foundation,pdeffendol/foundation,andycochran/foundation-sites,IamManchanda/foundation-sites | scss | ## Code Before:
.dropdown.menu-bar {
.has-submenu {
position: relative;
}
//Chris's amendments *******
.submenu {
//for left aligned menus only
display: none;
position: absolute;
top: 0;
left: 100%;
width: auto;
white-space: nowrap;
// border: thin solid blue;
background: $body-background;
z-index: 1;
> li {
width: 100%;
}
&.right {
left: auto;
right: 100%;
}
&.first-sub {
top: 100%;
left: 0;
right: auto;
&.right{
left: auto;
right: 0;
}
}
//**************
&:not(.js-dropdown-nohover) > .has-submenu:hover > &,
&.js-dropdown-active {
display: block;
}
}
&.vertical.align-right {
float: right;
}
&.vertical {
width: 100px;
& > li .submenu {
top: 0;
left: 100%;
&.right {
left: auto;
right: 100%;
}
}
}
}
// .submenu {
// display: none;
// position: absolute;
// top: 100%;
// width: auto;
// white-space: nowrap;
// background: $body-background;
// z-index: 1;
//need settings for right-aligned dd as well
## Instruction:
Add background color to dropdown submenus
## Code After:
.dropdown.menu-bar {
.has-submenu {
position: relative;
}
//Chris's amendments *******
.submenu {
//for left aligned menus only
display: none;
position: absolute;
top: 0;
left: 100%;
width: auto;
white-space: nowrap;
// border: thin solid blue;
background: $body-background;
z-index: 1;
background: white;
> li {
width: 100%;
}
&.right {
left: auto;
right: 100%;
}
&.first-sub {
top: 100%;
left: 0;
right: auto;
&.right{
left: auto;
right: 0;
}
}
//**************
&:not(.js-dropdown-nohover) > .has-submenu:hover > &,
&.js-dropdown-active {
display: block;
}
}
&.vertical.align-right {
float: right;
}
&.vertical {
width: 100px;
& > li .submenu {
top: 0;
left: 100%;
&.right {
left: auto;
right: 100%;
}
}
}
}
// .submenu {
// display: none;
// position: absolute;
// top: 100%;
// width: auto;
// white-space: nowrap;
// background: $body-background;
// z-index: 1;
//need settings for right-aligned dd as well
| .dropdown.menu-bar {
.has-submenu {
position: relative;
}
//Chris's amendments *******
.submenu {
//for left aligned menus only
display: none;
position: absolute;
top: 0;
left: 100%;
width: auto;
white-space: nowrap;
// border: thin solid blue;
background: $body-background;
z-index: 1;
+ background: white;
> li {
width: 100%;
}
&.right {
left: auto;
right: 100%;
}
&.first-sub {
top: 100%;
left: 0;
right: auto;
&.right{
left: auto;
right: 0;
}
}
//**************
&:not(.js-dropdown-nohover) > .has-submenu:hover > &,
&.js-dropdown-active {
display: block;
}
}
&.vertical.align-right {
float: right;
}
&.vertical {
width: 100px;
& > li .submenu {
top: 0;
left: 100%;
&.right {
left: auto;
right: 100%;
}
}
}
}
// .submenu {
// display: none;
// position: absolute;
// top: 100%;
// width: auto;
// white-space: nowrap;
// background: $body-background;
// z-index: 1;
//need settings for right-aligned dd as well | 1 | 0.014286 | 1 | 0 |
2a7a53813e1c05057e9953f5005f00a4c4ad7a4d | hnakamur.zsh/defaults/main.yml | hnakamur.zsh/defaults/main.yml | ---
zsh_rc_dir: ~/.zshrc.d
zsh_rc_files:
- git.zsh
- git_completion.zsh
- git-prompt.sh
- prompt.zsh
zsh_rc_templates:
- history.zsh
zsh_path_directories:
- "$HOME/bin"
- "$HOME/go/bin"
- /usr/local/ruby/bin
- /usr/local/node/bin
- /usr/local/bin
zsh_envs:
- name: GOPATH
value: "{{ go_gopath }}"
zsh_my_bin_files:
- modipath
zsh_additional_config_files:
- aliases.zsh
zsh_login_shell: /bin/zsh
zsh_enable_history_sharing: False
zsh_history_file: ~/.zsh_history
zsh_history_memory_size: 1000000
zsh_history_disk_size: 1000000
zsh_bindkey_type: emacs
| ---
zsh_rc_dir: ~/.zshrc.d
zsh_rc_files:
- git.zsh
- git_completion.zsh
- git-prompt.sh
- prompt.zsh
zsh_rc_templates:
- history.zsh
zsh_path_directories:
- "$HOME/bin"
- "$HOME/go/bin"
- /usr/local/ruby/bin
- /usr/local/node/bin
- /usr/local/sbin
- /usr/local/bin
zsh_envs:
- name: GOPATH
value: "{{ go_gopath }}"
zsh_my_bin_files:
- modipath
zsh_additional_config_files:
- aliases.zsh
zsh_login_shell: /bin/zsh
zsh_enable_history_sharing: False
zsh_history_file: ~/.zsh_history
zsh_history_memory_size: 1000000
zsh_history_disk_size: 1000000
zsh_bindkey_type: emacs
| Add Homebrew's sbin /usr/local/sbin to PATH | Add Homebrew's sbin /usr/local/sbin to PATH
| YAML | mit | hnakamur/macbook_setup,hnakamur/macbook_setup,hnakamur/macbook_setup | yaml | ## Code Before:
---
zsh_rc_dir: ~/.zshrc.d
zsh_rc_files:
- git.zsh
- git_completion.zsh
- git-prompt.sh
- prompt.zsh
zsh_rc_templates:
- history.zsh
zsh_path_directories:
- "$HOME/bin"
- "$HOME/go/bin"
- /usr/local/ruby/bin
- /usr/local/node/bin
- /usr/local/bin
zsh_envs:
- name: GOPATH
value: "{{ go_gopath }}"
zsh_my_bin_files:
- modipath
zsh_additional_config_files:
- aliases.zsh
zsh_login_shell: /bin/zsh
zsh_enable_history_sharing: False
zsh_history_file: ~/.zsh_history
zsh_history_memory_size: 1000000
zsh_history_disk_size: 1000000
zsh_bindkey_type: emacs
## Instruction:
Add Homebrew's sbin /usr/local/sbin to PATH
## Code After:
---
zsh_rc_dir: ~/.zshrc.d
zsh_rc_files:
- git.zsh
- git_completion.zsh
- git-prompt.sh
- prompt.zsh
zsh_rc_templates:
- history.zsh
zsh_path_directories:
- "$HOME/bin"
- "$HOME/go/bin"
- /usr/local/ruby/bin
- /usr/local/node/bin
- /usr/local/sbin
- /usr/local/bin
zsh_envs:
- name: GOPATH
value: "{{ go_gopath }}"
zsh_my_bin_files:
- modipath
zsh_additional_config_files:
- aliases.zsh
zsh_login_shell: /bin/zsh
zsh_enable_history_sharing: False
zsh_history_file: ~/.zsh_history
zsh_history_memory_size: 1000000
zsh_history_disk_size: 1000000
zsh_bindkey_type: emacs
| ---
zsh_rc_dir: ~/.zshrc.d
zsh_rc_files:
- git.zsh
- git_completion.zsh
- git-prompt.sh
- prompt.zsh
zsh_rc_templates:
- history.zsh
zsh_path_directories:
- "$HOME/bin"
- "$HOME/go/bin"
- /usr/local/ruby/bin
- /usr/local/node/bin
+ - /usr/local/sbin
- /usr/local/bin
zsh_envs:
- name: GOPATH
value: "{{ go_gopath }}"
zsh_my_bin_files:
- modipath
zsh_additional_config_files:
- aliases.zsh
zsh_login_shell: /bin/zsh
zsh_enable_history_sharing: False
zsh_history_file: ~/.zsh_history
zsh_history_memory_size: 1000000
zsh_history_disk_size: 1000000
zsh_bindkey_type: emacs | 1 | 0.035714 | 1 | 0 |
2c792b5f1828b4a2ba7b393e05f179769ea5a7d2 | packages/widget-chat/test/test-component.js | packages/widget-chat/test/test-component.js | import React, {Component, PropTypes} from 'react';
import {Provider, connect} from 'react-redux';
import injectSpark from '../src/modules/redux-spark/inject-spark';
function TestWidget(props) {
return <div>TestWidget</div>;
}
function mapStateToProps(state, ownProps) {
return Object.assign({}, state.spark, {
spark: ownProps.spark
});
}
export default connect(
mapStateToProps
)(injectSpark(TestWidget));
| import React from 'react';
import {connect} from 'react-redux';
import injectSpark from '../src/modules/redux-spark/inject-spark';
function TestWidget() {
return <div>TestWidget</div>;
}
function mapStateToProps(state, ownProps) {
return Object.assign({}, state.spark, {
spark: ownProps.spark
});
}
export default connect(
mapStateToProps
)(injectSpark(TestWidget));
| Fix CI build failures because of linting | fix(widget-chat): Fix CI build failures because of linting
| JavaScript | mit | CiscoHRIT/spark-js-sdk,mwegman/spark-js-sdk,urbenlegend/spark-js-sdk,tran2/spark-js-sdk,bbender/spark-js-sdk,nickclar/spark-js-sdk,CiscoHRIT/spark-js-sdk,ciscospark/spark-js-sdk,adamweeks/spark-js-sdk,tran2/spark-js-sdk,ianwremmel/spark-js-sdk,aimeex3/spark-js-sdk,nickclar/spark-js-sdk,ciscospark/spark-js-sdk,mwegman/spark-js-sdk,mwegman/spark-js-sdk,adamweeks/spark-js-sdk,bbender/spark-js-sdk,bbender/spark-js-sdk,urbenlegend/spark-js-sdk,aimeex3/spark-js-sdk,aimeex3/spark-js-sdk,adamweeks/spark-js-sdk,ianwremmel/spark-js-sdk | javascript | ## Code Before:
import React, {Component, PropTypes} from 'react';
import {Provider, connect} from 'react-redux';
import injectSpark from '../src/modules/redux-spark/inject-spark';
function TestWidget(props) {
return <div>TestWidget</div>;
}
function mapStateToProps(state, ownProps) {
return Object.assign({}, state.spark, {
spark: ownProps.spark
});
}
export default connect(
mapStateToProps
)(injectSpark(TestWidget));
## Instruction:
fix(widget-chat): Fix CI build failures because of linting
## Code After:
import React from 'react';
import {connect} from 'react-redux';
import injectSpark from '../src/modules/redux-spark/inject-spark';
function TestWidget() {
return <div>TestWidget</div>;
}
function mapStateToProps(state, ownProps) {
return Object.assign({}, state.spark, {
spark: ownProps.spark
});
}
export default connect(
mapStateToProps
)(injectSpark(TestWidget));
| - import React, {Component, PropTypes} from 'react';
+ import React from 'react';
- import {Provider, connect} from 'react-redux';
? ----------
+ import {connect} from 'react-redux';
import injectSpark from '../src/modules/redux-spark/inject-spark';
- function TestWidget(props) {
? -----
+ function TestWidget() {
return <div>TestWidget</div>;
}
function mapStateToProps(state, ownProps) {
return Object.assign({}, state.spark, {
spark: ownProps.spark
});
}
export default connect(
mapStateToProps
)(injectSpark(TestWidget)); | 6 | 0.352941 | 3 | 3 |
0c5ca0a44b9309aafdc24ca9c5c980784af43b83 | README.md | README.md |
A react component that makes <input type='range' /> compatible across all browsers with an optional material design style (cross-browser as well).
Demo: [https://Mapker.github.io/react-range-input](https://Mapker.github.io/react-range-input)
# Why?
It is a [known issue](https://github.com/facebook/react/issues/554) the onChange event does not work in IE. This seeks to be a simple drop in replacement for any <input type='range' /> and still have the onChange event fire in IE.
# Usage
```javascript
import Range from 'react-range-input';
<Range
className='material'
onChange={this.handleOnChange}
onClick={this.handleOnClick}
onKeyDown={this.handleKeyDown}
onMouseMove={this.handleOnMouseMove}
value={20}
min={0}
max={100} />
```
|
A react component that makes <input type='range' /> compatible across all browsers with an optional material design style (cross-browser as well).
Demo: [https://Mapker.github.io/react-range-input](https://Mapker.github.io/react-range-input)
Install via npm:
`npm install range-input`
# Why?
It is a [known issue](https://github.com/facebook/react/issues/554) the onChange event does not work in IE. This seeks to be a simple drop in replacement for any <input type='range' /> and still have the onChange event fire in IE.
# Usage
```javascript
import Range from 'react-range-input';
<Range
className='material'
onChange={this.handleOnChange}
onClick={this.handleOnClick}
onKeyDown={this.handleKeyDown}
onMouseMove={this.handleOnMouseMove}
value={20}
min={0}
max={100} />
```
| Add the npm install command to the readme | Add the npm install command to the readme
| Markdown | mit | Mapker/react-range-input,Mapker/react-range-input | markdown | ## Code Before:
A react component that makes <input type='range' /> compatible across all browsers with an optional material design style (cross-browser as well).
Demo: [https://Mapker.github.io/react-range-input](https://Mapker.github.io/react-range-input)
# Why?
It is a [known issue](https://github.com/facebook/react/issues/554) the onChange event does not work in IE. This seeks to be a simple drop in replacement for any <input type='range' /> and still have the onChange event fire in IE.
# Usage
```javascript
import Range from 'react-range-input';
<Range
className='material'
onChange={this.handleOnChange}
onClick={this.handleOnClick}
onKeyDown={this.handleKeyDown}
onMouseMove={this.handleOnMouseMove}
value={20}
min={0}
max={100} />
```
## Instruction:
Add the npm install command to the readme
## Code After:
A react component that makes <input type='range' /> compatible across all browsers with an optional material design style (cross-browser as well).
Demo: [https://Mapker.github.io/react-range-input](https://Mapker.github.io/react-range-input)
Install via npm:
`npm install range-input`
# Why?
It is a [known issue](https://github.com/facebook/react/issues/554) the onChange event does not work in IE. This seeks to be a simple drop in replacement for any <input type='range' /> and still have the onChange event fire in IE.
# Usage
```javascript
import Range from 'react-range-input';
<Range
className='material'
onChange={this.handleOnChange}
onClick={this.handleOnClick}
onKeyDown={this.handleKeyDown}
onMouseMove={this.handleOnMouseMove}
value={20}
min={0}
max={100} />
```
|
A react component that makes <input type='range' /> compatible across all browsers with an optional material design style (cross-browser as well).
Demo: [https://Mapker.github.io/react-range-input](https://Mapker.github.io/react-range-input)
+
+ Install via npm:
+ `npm install range-input`
# Why?
It is a [known issue](https://github.com/facebook/react/issues/554) the onChange event does not work in IE. This seeks to be a simple drop in replacement for any <input type='range' /> and still have the onChange event fire in IE.
# Usage
```javascript
import Range from 'react-range-input';
<Range
className='material'
onChange={this.handleOnChange}
onClick={this.handleOnClick}
onKeyDown={this.handleKeyDown}
onMouseMove={this.handleOnMouseMove}
value={20}
min={0}
max={100} />
``` | 3 | 0.136364 | 3 | 0 |
43bbafa2ebc49d30ec3fb113df150e22ab631881 | hieradata/nodes/donut.dwnet.yaml | hieradata/nodes/donut.dwnet.yaml | droidwiki::default::isnfsserver: true
redis::bind: '0.0.0.0'
nginx::tls::fullchain: /etc/letsencrypt/live/droidwiki.de-0001/fullchain.pem
nginx::tls::privkey: /etc/letsencrypt/live/droidwiki.de-0001/privkey.pem
| droidwiki::default::isnfsserver: true
redis::bind: '0.0.0.0'
nginx::tls::fullchain: /etc/letsencrypt/live/www.droidwiki.org/fullchain.pem
nginx::tls::privkey: /etc/letsencrypt/live/www.droidwiki.org/privkey.pem
| Change cert location to new one | Change cert location to new one
| YAML | mit | droidwiki/operations-puppet,droidwiki/operations-puppet,droidwiki/operations-puppet,droidwiki/operations-puppet | yaml | ## Code Before:
droidwiki::default::isnfsserver: true
redis::bind: '0.0.0.0'
nginx::tls::fullchain: /etc/letsencrypt/live/droidwiki.de-0001/fullchain.pem
nginx::tls::privkey: /etc/letsencrypt/live/droidwiki.de-0001/privkey.pem
## Instruction:
Change cert location to new one
## Code After:
droidwiki::default::isnfsserver: true
redis::bind: '0.0.0.0'
nginx::tls::fullchain: /etc/letsencrypt/live/www.droidwiki.org/fullchain.pem
nginx::tls::privkey: /etc/letsencrypt/live/www.droidwiki.org/privkey.pem
| droidwiki::default::isnfsserver: true
redis::bind: '0.0.0.0'
- nginx::tls::fullchain: /etc/letsencrypt/live/droidwiki.de-0001/fullchain.pem
? ^^^^^^^
+ nginx::tls::fullchain: /etc/letsencrypt/live/www.droidwiki.org/fullchain.pem
? ++++ ^^^
- nginx::tls::privkey: /etc/letsencrypt/live/droidwiki.de-0001/privkey.pem
? ^^^^^^^
+ nginx::tls::privkey: /etc/letsencrypt/live/www.droidwiki.org/privkey.pem
? ++++ ^^^
| 4 | 0.8 | 2 | 2 |
b71d39861cc32d6f6b156915fa9e1be24389842f | .travis.yml | .travis.yml | sudo: false
language: rust
rust:
- nightly
- beta
- stable
env:
-
- NO_STD=1
matrix:
exclude:
- rust: beta
env: NO_STD=1
- rust: stable
env: NO_STD=1
script:
- ./ci/build.sh
- ./ci/test.sh
| sudo: false
language: rust
rust:
- nightly
- beta
- stable
env:
-
- NO_STD=1
matrix:
allow_failures:
- rust: nightly
exclude:
- rust: beta
env: NO_STD=1
- rust: stable
env: NO_STD=1
script:
- ./ci/build.sh
- ./ci/test.sh
| Allow CI failure on nightly. | Allow CI failure on nightly.
| YAML | apache-2.0 | sebcrozet/alga,sebcrozet/alga | yaml | ## Code Before:
sudo: false
language: rust
rust:
- nightly
- beta
- stable
env:
-
- NO_STD=1
matrix:
exclude:
- rust: beta
env: NO_STD=1
- rust: stable
env: NO_STD=1
script:
- ./ci/build.sh
- ./ci/test.sh
## Instruction:
Allow CI failure on nightly.
## Code After:
sudo: false
language: rust
rust:
- nightly
- beta
- stable
env:
-
- NO_STD=1
matrix:
allow_failures:
- rust: nightly
exclude:
- rust: beta
env: NO_STD=1
- rust: stable
env: NO_STD=1
script:
- ./ci/build.sh
- ./ci/test.sh
| sudo: false
language: rust
rust:
- nightly
- beta
- stable
env:
-
- NO_STD=1
matrix:
+ allow_failures:
+ - rust: nightly
exclude:
- rust: beta
env: NO_STD=1
- rust: stable
env: NO_STD=1
script:
- ./ci/build.sh
- ./ci/test.sh
| 2 | 0.086957 | 2 | 0 |
625a22f9f4bed19a3959317a228c037bfd261fbc | obdalib/obdalib-core/src/main/java/org/obda/query/domain/Function.java | obdalib/obdalib-core/src/main/java/org/obda/query/domain/Function.java | package org.obda.query.domain;
/**
* This class defines a type of {@link Term} in which it expresses a relation
* to one or more other variables in terms of which it may be expressed or on
* which its value depends.
*/
public interface Function extends Term {
}
| package org.obda.query.domain;
import java.util.List;
/**
* This class defines a type of {@link Term} in which it denotes a mapping of
* one or more elements in a set (called the domain of the function) into a
* unique element of another set (the range of the function).
* <p>
* A function expression is a function symbol followed by its arguments.
* The arguments are elements from the domain of the function; the number of
* arguments is equal to the {@code arity} of the function. The arguments are
* enclosed in parentheses and separated by commas, e.g.,
* <p>
* <code>
* f(X,Y) <br />
* father(david) <br />
* price(apple) <br />
* </code>
* <p>
* are all well-formed function expressions.
*/
public interface Function extends Term {
/**
* Get a list of terms (or arguments) that are contained in the function
* symbol.
*
* @return a list of terms.
*/
public List<Term> getTerms();
/**
* Get the number of terms (or arguments) in the function symbol.
* @return
*/
public int getArity();
}
| Add new abstract methods: getTerms() and getArity(). Also, there is a bit modification to the class description. | Add new abstract methods: getTerms() and getArity(). Also, there is a bit
modification to the class description.
| Java | apache-2.0 | clarkparsia/ontop,ConstantB/ontop-spatial,ConstantB/ontop-spatial,eschwert/ontop,ConstantB/ontop-spatial,ontop/ontop,ontop/ontop,eschwert/ontop,clarkparsia/ontop,ontop/ontop,ghxiao/ontop-spatial,ghxiao/ontop-spatial,clarkparsia/ontop,srapisarda/ontop,ghxiao/ontop-spatial,srapisarda/ontop,ontop/ontop,eschwert/ontop,srapisarda/ontop,srapisarda/ontop,ghxiao/ontop-spatial,ontop/ontop,ConstantB/ontop-spatial,eschwert/ontop | java | ## Code Before:
package org.obda.query.domain;
/**
* This class defines a type of {@link Term} in which it expresses a relation
* to one or more other variables in terms of which it may be expressed or on
* which its value depends.
*/
public interface Function extends Term {
}
## Instruction:
Add new abstract methods: getTerms() and getArity(). Also, there is a bit
modification to the class description.
## Code After:
package org.obda.query.domain;
import java.util.List;
/**
* This class defines a type of {@link Term} in which it denotes a mapping of
* one or more elements in a set (called the domain of the function) into a
* unique element of another set (the range of the function).
* <p>
* A function expression is a function symbol followed by its arguments.
* The arguments are elements from the domain of the function; the number of
* arguments is equal to the {@code arity} of the function. The arguments are
* enclosed in parentheses and separated by commas, e.g.,
* <p>
* <code>
* f(X,Y) <br />
* father(david) <br />
* price(apple) <br />
* </code>
* <p>
* are all well-formed function expressions.
*/
public interface Function extends Term {
/**
* Get a list of terms (or arguments) that are contained in the function
* symbol.
*
* @return a list of terms.
*/
public List<Term> getTerms();
/**
* Get the number of terms (or arguments) in the function symbol.
* @return
*/
public int getArity();
}
| package org.obda.query.domain;
+ import java.util.List;
+
/**
- * This class defines a type of {@link Term} in which it expresses a relation
? ^^^^^^ ^^^ ^ ^
+ * This class defines a type of {@link Term} in which it denotes a mapping of
? + ^^^ ^ ^^ +++ ^
- * to one or more other variables in terms of which it may be expressed or on
- * which its value depends.
+ * one or more elements in a set (called the domain of the function) into a
+ * unique element of another set (the range of the function).
+ * <p>
+ * A function expression is a function symbol followed by its arguments.
+ * The arguments are elements from the domain of the function; the number of
+ * arguments is equal to the {@code arity} of the function. The arguments are
+ * enclosed in parentheses and separated by commas, e.g.,
+ * <p>
+ * <code>
+ * f(X,Y) <br />
+ * father(david) <br />
+ * price(apple) <br />
+ * </code>
+ * <p>
+ * are all well-formed function expressions.
*/
public interface Function extends Term {
+ /**
+ * Get a list of terms (or arguments) that are contained in the function
+ * symbol.
+ *
+ * @return a list of terms.
+ */
+ public List<Term> getTerms();
+
+ /**
+ * Get the number of terms (or arguments) in the function symbol.
+ * @return
+ */
+ public int getArity();
} | 34 | 3.4 | 31 | 3 |
e64337f2ca2e5f1eaff4b97bf736511c7da27022 | app/routes/rule-sets/edit.js | app/routes/rule-sets/edit.js | import Ember from 'ember';
export default Ember.Route.extend({
model(params) {
return this.store.findRecord('rule-set', params.rule_set_id);
},
actions: {
createSkill() {
const skill = this.store.createRecord('skill-definition');
skill.set('ruleSet', this.currentModel);
this.currentModel.get('skills').addObject(skill);
this.transitionTo('skills.edit', skill);
}
}
});
| import Ember from 'ember';
export default Ember.Route.extend({
model(params) {
return this.store.findRecord('rule-set', params.rule_set_id);
},
actions: {
createSkill() {
const skill = this.store.createRecord('skill-definition');
skill.set('ruleSet', this.currentModel);
this.currentModel.get('skills').addObject(skill);
this.currentModel.save();
this.transitionTo('skills.edit', skill);
}
}
});
| Save the rule set after adding a skill | Save the rule set after adding a skill
| JavaScript | mit | erbridge/odin,erbridge/odin | javascript | ## Code Before:
import Ember from 'ember';
export default Ember.Route.extend({
model(params) {
return this.store.findRecord('rule-set', params.rule_set_id);
},
actions: {
createSkill() {
const skill = this.store.createRecord('skill-definition');
skill.set('ruleSet', this.currentModel);
this.currentModel.get('skills').addObject(skill);
this.transitionTo('skills.edit', skill);
}
}
});
## Instruction:
Save the rule set after adding a skill
## Code After:
import Ember from 'ember';
export default Ember.Route.extend({
model(params) {
return this.store.findRecord('rule-set', params.rule_set_id);
},
actions: {
createSkill() {
const skill = this.store.createRecord('skill-definition');
skill.set('ruleSet', this.currentModel);
this.currentModel.get('skills').addObject(skill);
this.currentModel.save();
this.transitionTo('skills.edit', skill);
}
}
});
| import Ember from 'ember';
export default Ember.Route.extend({
model(params) {
return this.store.findRecord('rule-set', params.rule_set_id);
},
actions: {
createSkill() {
const skill = this.store.createRecord('skill-definition');
skill.set('ruleSet', this.currentModel);
this.currentModel.get('skills').addObject(skill);
+ this.currentModel.save();
this.transitionTo('skills.edit', skill);
}
}
}); | 1 | 0.052632 | 1 | 0 |
8d80d817dd45cc620a248683ecb2e857936c6b82 | setup.cfg | setup.cfg | [metadata]
name = Markups
version = attr: markups.__version__
description = A wrapper around various text markups
long_description = file: README.rst
author = Dmitry Shachnev
author_email = mitya57@gmail.com
url = https://github.com/retext-project/pymarkups
license = BSD 3-Clause License
classifiers =
Development Status :: 5 - Production/Stable
License :: OSI Approved :: BSD License
Operating System :: OS Independent
Programming Language :: Python
Programming Language :: Python :: 3
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3 :: Only
Topic :: Text Processing :: Markup
Topic :: Text Processing :: General
Topic :: Software Development :: Libraries :: Python Modules
[options]
packages = markups
python_requires = >=3.6
install_requires =
python-markdown-math
importlib-metadata;python_version<'3.8'
[options.extras_require]
markdown = Markdown>=2.6; PyYAML
restructuredtext = docutils
textile = textile
highlighting = Pygments
[options.entry_points]
pymarkups =
markdown = markups.markdown:MarkdownMarkup
restructuredtext = markups.restructuredtext:ReStructuredTextMarkup
textile = markups.textile:TextileMarkup
[bdist_wheel]
universal = 1
| [metadata]
name = Markups
version = attr: markups.__version__
description = A wrapper around various text markups
long_description = file: README.rst
author = Dmitry Shachnev
author_email = mitya57@gmail.com
url = https://github.com/retext-project/pymarkups
license = BSD 3-Clause License
classifiers =
Development Status :: 5 - Production/Stable
License :: OSI Approved :: BSD License
Operating System :: OS Independent
Programming Language :: Python
Programming Language :: Python :: 3
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3 :: Only
Topic :: Text Processing :: Markup
Topic :: Text Processing :: General
Topic :: Software Development :: Libraries :: Python Modules
[options]
packages = markups
python_requires = >=3.6
install_requires =
python-markdown-math
importlib-metadata;python_version<'3.8'
[options.extras_require]
markdown = Markdown>=2.6; PyYAML
restructuredtext = docutils
textile = textile
highlighting = Pygments
[options.entry_points]
pymarkups =
markdown = markups.markdown:MarkdownMarkup
restructuredtext = markups.restructuredtext:ReStructuredTextMarkup
textile = markups.textile:TextileMarkup
| Stop marking the wheel as universal, we no longer support Python 2 | Stop marking the wheel as universal, we no longer support Python 2
| INI | bsd-3-clause | mitya57/pymarkups,retext-project/pymarkups | ini | ## Code Before:
[metadata]
name = Markups
version = attr: markups.__version__
description = A wrapper around various text markups
long_description = file: README.rst
author = Dmitry Shachnev
author_email = mitya57@gmail.com
url = https://github.com/retext-project/pymarkups
license = BSD 3-Clause License
classifiers =
Development Status :: 5 - Production/Stable
License :: OSI Approved :: BSD License
Operating System :: OS Independent
Programming Language :: Python
Programming Language :: Python :: 3
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3 :: Only
Topic :: Text Processing :: Markup
Topic :: Text Processing :: General
Topic :: Software Development :: Libraries :: Python Modules
[options]
packages = markups
python_requires = >=3.6
install_requires =
python-markdown-math
importlib-metadata;python_version<'3.8'
[options.extras_require]
markdown = Markdown>=2.6; PyYAML
restructuredtext = docutils
textile = textile
highlighting = Pygments
[options.entry_points]
pymarkups =
markdown = markups.markdown:MarkdownMarkup
restructuredtext = markups.restructuredtext:ReStructuredTextMarkup
textile = markups.textile:TextileMarkup
[bdist_wheel]
universal = 1
## Instruction:
Stop marking the wheel as universal, we no longer support Python 2
## Code After:
[metadata]
name = Markups
version = attr: markups.__version__
description = A wrapper around various text markups
long_description = file: README.rst
author = Dmitry Shachnev
author_email = mitya57@gmail.com
url = https://github.com/retext-project/pymarkups
license = BSD 3-Clause License
classifiers =
Development Status :: 5 - Production/Stable
License :: OSI Approved :: BSD License
Operating System :: OS Independent
Programming Language :: Python
Programming Language :: Python :: 3
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3 :: Only
Topic :: Text Processing :: Markup
Topic :: Text Processing :: General
Topic :: Software Development :: Libraries :: Python Modules
[options]
packages = markups
python_requires = >=3.6
install_requires =
python-markdown-math
importlib-metadata;python_version<'3.8'
[options.extras_require]
markdown = Markdown>=2.6; PyYAML
restructuredtext = docutils
textile = textile
highlighting = Pygments
[options.entry_points]
pymarkups =
markdown = markups.markdown:MarkdownMarkup
restructuredtext = markups.restructuredtext:ReStructuredTextMarkup
textile = markups.textile:TextileMarkup
| [metadata]
name = Markups
version = attr: markups.__version__
description = A wrapper around various text markups
long_description = file: README.rst
author = Dmitry Shachnev
author_email = mitya57@gmail.com
url = https://github.com/retext-project/pymarkups
license = BSD 3-Clause License
classifiers =
Development Status :: 5 - Production/Stable
License :: OSI Approved :: BSD License
Operating System :: OS Independent
Programming Language :: Python
Programming Language :: Python :: 3
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3 :: Only
Topic :: Text Processing :: Markup
Topic :: Text Processing :: General
Topic :: Software Development :: Libraries :: Python Modules
[options]
packages = markups
python_requires = >=3.6
install_requires =
python-markdown-math
importlib-metadata;python_version<'3.8'
[options.extras_require]
markdown = Markdown>=2.6; PyYAML
restructuredtext = docutils
textile = textile
highlighting = Pygments
[options.entry_points]
pymarkups =
markdown = markups.markdown:MarkdownMarkup
restructuredtext = markups.restructuredtext:ReStructuredTextMarkup
textile = markups.textile:TextileMarkup
-
- [bdist_wheel]
- universal = 1 | 3 | 0.066667 | 0 | 3 |
87730289ea9115f76b1ab70eb4530c5b688edadf | CHANGELOG.md | CHANGELOG.md | v0.2.0
------
- use Kubernetes 1.8 libraries
- update Service Catalog to v0.1.0-rc2
- add `pprof-address` flag to enable pprof on the address
v0.1.3
------
- fix `service-catalog-insecure` flag not working
v0.1.2
------
- workaround glog mess
v0.1.1
------
- `disable-service-catalog` and `service-catalog-insecure` flags to configure interaction with Service Catalog
0.1.0
-----
- Initial release
| v0.2.1
------
- informers respect namespace set on smith command line
v0.2.0
------
- use Kubernetes 1.8 libraries
- update Service Catalog to v0.1.0-rc2
- add `pprof-address` flag to enable pprof on the address
v0.1.3
------
- fix `service-catalog-insecure` flag not working
v0.1.2
------
- workaround glog mess
v0.1.1
------
- `disable-service-catalog` and `service-catalog-insecure` flags to configure interaction with Service Catalog
0.1.0
-----
- Initial release
| Update changelog for v0.2.1 release | Update changelog for v0.2.1 release
| Markdown | apache-2.0 | atlassian/smith,atlassian/smith,atlassian/smith | markdown | ## Code Before:
v0.2.0
------
- use Kubernetes 1.8 libraries
- update Service Catalog to v0.1.0-rc2
- add `pprof-address` flag to enable pprof on the address
v0.1.3
------
- fix `service-catalog-insecure` flag not working
v0.1.2
------
- workaround glog mess
v0.1.1
------
- `disable-service-catalog` and `service-catalog-insecure` flags to configure interaction with Service Catalog
0.1.0
-----
- Initial release
## Instruction:
Update changelog for v0.2.1 release
## Code After:
v0.2.1
------
- informers respect namespace set on smith command line
v0.2.0
------
- use Kubernetes 1.8 libraries
- update Service Catalog to v0.1.0-rc2
- add `pprof-address` flag to enable pprof on the address
v0.1.3
------
- fix `service-catalog-insecure` flag not working
v0.1.2
------
- workaround glog mess
v0.1.1
------
- `disable-service-catalog` and `service-catalog-insecure` flags to configure interaction with Service Catalog
0.1.0
-----
- Initial release
| + v0.2.1
+ ------
+ - informers respect namespace set on smith command line
+
v0.2.0
------
- use Kubernetes 1.8 libraries
- update Service Catalog to v0.1.0-rc2
- add `pprof-address` flag to enable pprof on the address
v0.1.3
------
- fix `service-catalog-insecure` flag not working
v0.1.2
------
- workaround glog mess
v0.1.1
------
- `disable-service-catalog` and `service-catalog-insecure` flags to configure interaction with Service Catalog
0.1.0
-----
- Initial release | 4 | 0.190476 | 4 | 0 |
e85e94d901560cd176883b3522cf0a961759732c | db/Db.py | db/Db.py | import abc
import sqlite3
import Config
class Db(object):
__metaclass__ = abc.ABCMeta
def __init__(self):
self._connection = self.connect()
@abc.abstractmethod
def connect(self, config_file = None):
raise NotImplementedError("Called method is not implemented")
@abc.abstractmethod
def execute(self, query, params = None):
raise NotImplementedError("Called method is not implemented")
@abc.abstractmethod
def commit(self):
raise NotImplementedError("Called method is not implemented")
@abc.abstractmethod
def close(self):
raise NotImplementedError("Called method is not implemented")
class SQLiteDb(Db):
def connect(self, config_file):
conf = Config(config_file)
cfg = conf.sqlite_options()
sqlite3.connect(cfg.db_file)
def execute(self, query, params = None):
self._connection.execute(query, params)
def commit(self):
self._connection.commit()
def close(self):
self._connection.close()
| import abc
import sqlite3
from ebroker.Config import Config
def getDb(config_file = None):
return SQLiteDb(config_file)
class Db(object):
__metaclass__ = abc.ABCMeta
def __init__(self, config_file = None):
self._config_file = config_file
self._connection = None # make sure attribute _connection exists
@abc.abstractmethod
def connect(self):
raise NotImplementedError("Called method is not implemented")
@abc.abstractmethod
def execute(self, query, params = None):
raise NotImplementedError("Called method is not implemented")
@abc.abstractmethod
def commit(self):
raise NotImplementedError("Called method is not implemented")
@abc.abstractmethod
def close(self):
raise NotImplementedError("Called method is not implemented")
class SQLiteDb(Db):
def __init__(self, config_file = None):
super(SQLiteDb, self).__init__(config_file)
conf = Config(config_file)
cfg = conf.sqlite_options()
self._db_file = cfg.db_file
def connect(self):
self._connection = sqlite3.connect(self._db_file)
def execute(self, query, params = None):
if self._connection is None:
self.connect()
if params is None:
self._connection.execute(query)
else:
self._connection.execute(query, params)
def commit(self):
self._connection.commit()
def close(self):
self._connection.close()
def prepare(db = None):
_db = db
if _db is None:
_db = getDb()
_db.execute('''
CREATE TABLE requests(ticker int, price double, amount int, symbol varchar(10), amount_satisfied int)
''')
| Fix various small issues in DB support | Fix various small issues in DB support
| Python | mit | vjuranek/e-broker-client | python | ## Code Before:
import abc
import sqlite3
import Config
class Db(object):
__metaclass__ = abc.ABCMeta
def __init__(self):
self._connection = self.connect()
@abc.abstractmethod
def connect(self, config_file = None):
raise NotImplementedError("Called method is not implemented")
@abc.abstractmethod
def execute(self, query, params = None):
raise NotImplementedError("Called method is not implemented")
@abc.abstractmethod
def commit(self):
raise NotImplementedError("Called method is not implemented")
@abc.abstractmethod
def close(self):
raise NotImplementedError("Called method is not implemented")
class SQLiteDb(Db):
def connect(self, config_file):
conf = Config(config_file)
cfg = conf.sqlite_options()
sqlite3.connect(cfg.db_file)
def execute(self, query, params = None):
self._connection.execute(query, params)
def commit(self):
self._connection.commit()
def close(self):
self._connection.close()
## Instruction:
Fix various small issues in DB support
## Code After:
import abc
import sqlite3
from ebroker.Config import Config
def getDb(config_file = None):
return SQLiteDb(config_file)
class Db(object):
__metaclass__ = abc.ABCMeta
def __init__(self, config_file = None):
self._config_file = config_file
self._connection = None # make sure attribute _connection exists
@abc.abstractmethod
def connect(self):
raise NotImplementedError("Called method is not implemented")
@abc.abstractmethod
def execute(self, query, params = None):
raise NotImplementedError("Called method is not implemented")
@abc.abstractmethod
def commit(self):
raise NotImplementedError("Called method is not implemented")
@abc.abstractmethod
def close(self):
raise NotImplementedError("Called method is not implemented")
class SQLiteDb(Db):
def __init__(self, config_file = None):
super(SQLiteDb, self).__init__(config_file)
conf = Config(config_file)
cfg = conf.sqlite_options()
self._db_file = cfg.db_file
def connect(self):
self._connection = sqlite3.connect(self._db_file)
def execute(self, query, params = None):
if self._connection is None:
self.connect()
if params is None:
self._connection.execute(query)
else:
self._connection.execute(query, params)
def commit(self):
self._connection.commit()
def close(self):
self._connection.close()
def prepare(db = None):
_db = db
if _db is None:
_db = getDb()
_db.execute('''
CREATE TABLE requests(ticker int, price double, amount int, symbol varchar(10), amount_satisfied int)
''')
| import abc
import sqlite3
- import Config
+ from ebroker.Config import Config
+
+
+ def getDb(config_file = None):
+ return SQLiteDb(config_file)
+
class Db(object):
__metaclass__ = abc.ABCMeta
- def __init__(self):
- self._connection = self.connect()
+ def __init__(self, config_file = None):
+ self._config_file = config_file
+ self._connection = None # make sure attribute _connection exists
@abc.abstractmethod
- def connect(self, config_file = None):
+ def connect(self):
raise NotImplementedError("Called method is not implemented")
@abc.abstractmethod
def execute(self, query, params = None):
raise NotImplementedError("Called method is not implemented")
@abc.abstractmethod
def commit(self):
raise NotImplementedError("Called method is not implemented")
@abc.abstractmethod
def close(self):
raise NotImplementedError("Called method is not implemented")
class SQLiteDb(Db):
+
- def connect(self, config_file):
? ^^ ^^^
+ def __init__(self, config_file = None):
? ^^^ ^ ++ +++++++
+ super(SQLiteDb, self).__init__(config_file)
conf = Config(config_file)
cfg = conf.sqlite_options()
- sqlite3.connect(cfg.db_file)
+ self._db_file = cfg.db_file
+
+ def connect(self):
+ self._connection = sqlite3.connect(self._db_file)
def execute(self, query, params = None):
+ if self._connection is None:
+ self.connect()
+ if params is None:
+ self._connection.execute(query)
+ else:
- self._connection.execute(query, params)
+ self._connection.execute(query, params)
? ++++
def commit(self):
self._connection.commit()
def close(self):
self._connection.close()
+
+
+ def prepare(db = None):
+ _db = db
+ if _db is None:
+ _db = getDb()
+ _db.execute('''
+ CREATE TABLE requests(ticker int, price double, amount int, symbol varchar(10), amount_satisfied int)
+ ''')
+
+ | 41 | 0.911111 | 34 | 7 |
07ca8ccb4786c9c616c12992a4a13f4cd11b5e35 | crowdin.yml | crowdin.yml | files:
- source: /languages/YourLanguage.ts
translation: /languages/%language%.ts
- source: /crash-reporter/languages/YourLanguage.ts
translation: /crash-reporter/languages/%language%.ts
| files:
- source: /src/languages/YourLanguage.ts
translation: /src/languages/%language%.ts
- source: /src/crash-reporter/languages/YourLanguage.ts
translation: /src/crash-reporter/languages/%language%.ts
| Update Crowdin settings following reorg | Update Crowdin settings following reorg
| YAML | apache-2.0 | Bionus/imgbrd-grabber,Bionus/imgbrd-grabber,Bionus/imgbrd-grabber,Bionus/imgbrd-grabber,Bionus/imgbrd-grabber,Bionus/imgbrd-grabber | yaml | ## Code Before:
files:
- source: /languages/YourLanguage.ts
translation: /languages/%language%.ts
- source: /crash-reporter/languages/YourLanguage.ts
translation: /crash-reporter/languages/%language%.ts
## Instruction:
Update Crowdin settings following reorg
## Code After:
files:
- source: /src/languages/YourLanguage.ts
translation: /src/languages/%language%.ts
- source: /src/crash-reporter/languages/YourLanguage.ts
translation: /src/crash-reporter/languages/%language%.ts
| files:
- - source: /languages/YourLanguage.ts
+ - source: /src/languages/YourLanguage.ts
? ++++
- translation: /languages/%language%.ts
+ translation: /src/languages/%language%.ts
? ++++
- - source: /crash-reporter/languages/YourLanguage.ts
+ - source: /src/crash-reporter/languages/YourLanguage.ts
? ++++
- translation: /crash-reporter/languages/%language%.ts
+ translation: /src/crash-reporter/languages/%language%.ts
? ++++
| 8 | 1.6 | 4 | 4 |
f6611db1d59bbf5fb7d5cfbcccc629b6916d06a3 | src/test/run-pass/const-int-sign.rs | src/test/run-pass/const-int-sign.rs | const NEGATIVE_A: bool = (-10i32).is_negative();
const NEGATIVE_B: bool = 10i32.is_negative();
const POSITIVE_A: bool= (-10i32).is_positive();
const POSITIVE_B: bool= 10i32.is_positive();
fn main() {
assert!(NEGATIVE_A);
assert!(!NEGATIVE_B);
assert!(!POSITIVE_A);
assert!(POSITIVE_B);
}
|
const NEGATIVE_A: bool = (-10i32).is_negative();
const NEGATIVE_B: bool = 10i32.is_negative();
const POSITIVE_A: bool = (-10i32).is_positive();
const POSITIVE_B: bool = 10i32.is_positive();
const SIGNUM_POS: i32 = 10i32.signum();
const SIGNUM_NIL: i32 = 0i32.signum();
const SIGNUM_NEG: i32 = (-42i32).signum();
fn main() {
assert!(NEGATIVE_A);
assert!(!NEGATIVE_B);
assert!(!POSITIVE_A);
assert!(POSITIVE_B);
assert_eq!(SIGNUM_POS, 1);
assert_eq!(SIGNUM_NIL, 0);
assert_eq!(SIGNUM_NEG, -1);
}
| Add `const`-ness tests for `i32::signum` | Add `const`-ness tests for `i32::signum`
| Rust | apache-2.0 | graydon/rust,graydon/rust,aidancully/rust,graydon/rust,aidancully/rust,aidancully/rust,graydon/rust,aidancully/rust,aidancully/rust,graydon/rust,aidancully/rust,graydon/rust | rust | ## Code Before:
const NEGATIVE_A: bool = (-10i32).is_negative();
const NEGATIVE_B: bool = 10i32.is_negative();
const POSITIVE_A: bool= (-10i32).is_positive();
const POSITIVE_B: bool= 10i32.is_positive();
fn main() {
assert!(NEGATIVE_A);
assert!(!NEGATIVE_B);
assert!(!POSITIVE_A);
assert!(POSITIVE_B);
}
## Instruction:
Add `const`-ness tests for `i32::signum`
## Code After:
const NEGATIVE_A: bool = (-10i32).is_negative();
const NEGATIVE_B: bool = 10i32.is_negative();
const POSITIVE_A: bool = (-10i32).is_positive();
const POSITIVE_B: bool = 10i32.is_positive();
const SIGNUM_POS: i32 = 10i32.signum();
const SIGNUM_NIL: i32 = 0i32.signum();
const SIGNUM_NEG: i32 = (-42i32).signum();
fn main() {
assert!(NEGATIVE_A);
assert!(!NEGATIVE_B);
assert!(!POSITIVE_A);
assert!(POSITIVE_B);
assert_eq!(SIGNUM_POS, 1);
assert_eq!(SIGNUM_NIL, 0);
assert_eq!(SIGNUM_NEG, -1);
}
| +
const NEGATIVE_A: bool = (-10i32).is_negative();
const NEGATIVE_B: bool = 10i32.is_negative();
- const POSITIVE_A: bool= (-10i32).is_positive();
+ const POSITIVE_A: bool = (-10i32).is_positive();
? +
- const POSITIVE_B: bool= 10i32.is_positive();
+ const POSITIVE_B: bool = 10i32.is_positive();
? +
+
+ const SIGNUM_POS: i32 = 10i32.signum();
+ const SIGNUM_NIL: i32 = 0i32.signum();
+ const SIGNUM_NEG: i32 = (-42i32).signum();
fn main() {
assert!(NEGATIVE_A);
assert!(!NEGATIVE_B);
assert!(!POSITIVE_A);
assert!(POSITIVE_B);
+
+ assert_eq!(SIGNUM_POS, 1);
+ assert_eq!(SIGNUM_NIL, 0);
+ assert_eq!(SIGNUM_NEG, -1);
} | 13 | 1.181818 | 11 | 2 |
9d4f0ee09fb9c73d12263f928d2ea5d06148fcda | example/testagent/test/runtests.sh | example/testagent/test/runtests.sh |
set -e
CURRENT_SOURCE_DIR=`dirname "$0"`
TESTAGENT=$1
LIBOFP_DEFAULT_PORT=${LIBOFP_DEFAULT_PORT:-6653}
echo "Working Directory:" `pwd`
for input in $CURRENT_SOURCE_DIR/*.in ; do
name=`basename $input .in`
output=$name.out
echo "Run testagent to convert $input into $output"
# Remove lines with timestamps from output.
$TESTAGENT "127.0.0.1:$LIBOFP_DEFAULT_PORT" < $input | grep -Ev "^time: +[1-9][0-9]*\.[0-9]+$" > $output
echo "Compare $output and $CURRENT_SOURCE_DIR/$output"
diff $output $CURRENT_SOURCE_DIR/$output
done
exit 0
|
set -e
CURRENT_SOURCE_DIR=`dirname "$0"`
TESTAGENT=$1
LIBOFP_DEFAULT_PORT=${LIBOFP_DEFAULT_PORT:-6653}
echo "Working Directory:" `pwd`
for input in $CURRENT_SOURCE_DIR/*.in ; do
name=`basename $input .in`
output=$name.out
output_tmp="$name-${LIBOFP_DEFAULT_PORT}.out"
echo "Run testagent to convert $input into $output"
# Remove lines with timestamps from output.
$TESTAGENT "127.0.0.1:$LIBOFP_DEFAULT_PORT" < $input | grep -Ev "^time: +[1-9][0-9]*\.[0-9]+$" > $output_tmp
echo "Compare $output and $CURRENT_SOURCE_DIR/$output"
diff $output_tmp $CURRENT_SOURCE_DIR/$output
done
exit 0
| Make sure multiple tests can run in parallel. | Make sure multiple tests can run in parallel.
| Shell | mit | byllyfish/oftr,byllyfish/oftr,byllyfish/libofp,byllyfish/libofp,byllyfish/libofp,byllyfish/oftr,byllyfish/oftr,byllyfish/oftr | shell | ## Code Before:
set -e
CURRENT_SOURCE_DIR=`dirname "$0"`
TESTAGENT=$1
LIBOFP_DEFAULT_PORT=${LIBOFP_DEFAULT_PORT:-6653}
echo "Working Directory:" `pwd`
for input in $CURRENT_SOURCE_DIR/*.in ; do
name=`basename $input .in`
output=$name.out
echo "Run testagent to convert $input into $output"
# Remove lines with timestamps from output.
$TESTAGENT "127.0.0.1:$LIBOFP_DEFAULT_PORT" < $input | grep -Ev "^time: +[1-9][0-9]*\.[0-9]+$" > $output
echo "Compare $output and $CURRENT_SOURCE_DIR/$output"
diff $output $CURRENT_SOURCE_DIR/$output
done
exit 0
## Instruction:
Make sure multiple tests can run in parallel.
## Code After:
set -e
CURRENT_SOURCE_DIR=`dirname "$0"`
TESTAGENT=$1
LIBOFP_DEFAULT_PORT=${LIBOFP_DEFAULT_PORT:-6653}
echo "Working Directory:" `pwd`
for input in $CURRENT_SOURCE_DIR/*.in ; do
name=`basename $input .in`
output=$name.out
output_tmp="$name-${LIBOFP_DEFAULT_PORT}.out"
echo "Run testagent to convert $input into $output"
# Remove lines with timestamps from output.
$TESTAGENT "127.0.0.1:$LIBOFP_DEFAULT_PORT" < $input | grep -Ev "^time: +[1-9][0-9]*\.[0-9]+$" > $output_tmp
echo "Compare $output and $CURRENT_SOURCE_DIR/$output"
diff $output_tmp $CURRENT_SOURCE_DIR/$output
done
exit 0
|
set -e
CURRENT_SOURCE_DIR=`dirname "$0"`
TESTAGENT=$1
LIBOFP_DEFAULT_PORT=${LIBOFP_DEFAULT_PORT:-6653}
echo "Working Directory:" `pwd`
for input in $CURRENT_SOURCE_DIR/*.in ; do
name=`basename $input .in`
output=$name.out
+ output_tmp="$name-${LIBOFP_DEFAULT_PORT}.out"
echo "Run testagent to convert $input into $output"
# Remove lines with timestamps from output.
- $TESTAGENT "127.0.0.1:$LIBOFP_DEFAULT_PORT" < $input | grep -Ev "^time: +[1-9][0-9]*\.[0-9]+$" > $output
+ $TESTAGENT "127.0.0.1:$LIBOFP_DEFAULT_PORT" < $input | grep -Ev "^time: +[1-9][0-9]*\.[0-9]+$" > $output_tmp
? ++++
echo "Compare $output and $CURRENT_SOURCE_DIR/$output"
- diff $output $CURRENT_SOURCE_DIR/$output
+ diff $output_tmp $CURRENT_SOURCE_DIR/$output
? ++++
done
exit 0 | 5 | 0.238095 | 3 | 2 |
aee358642015f5453dcca6831bc3f3a6c6df22e7 | atom/browser/api/atom_api_menu_views.h | atom/browser/api/atom_api_menu_views.h | // Copyright (c) 2014 GitHub, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#ifndef ATOM_BROWSER_API_ATOM_API_MENU_VIEWS_H_
#define ATOM_BROWSER_API_ATOM_API_MENU_VIEWS_H_
#include <map>
#include <memory>
#include "atom/browser/api/atom_api_menu.h"
#include "base/memory/weak_ptr.h"
#include "ui/display/screen.h"
#include "ui/views/controls/menu/menu_runner.h"
namespace atom {
namespace api {
class MenuViews : public Menu {
public:
MenuViews(v8::Isolate* isolate, v8::Local<v8::Object> wrapper);
protected:
void PopupAt(
Window* window, int x, int y, int positioning_item) override;
void ClosePopupAt(int32_t window_id) override;
private:
// window ID -> open context menu
std::map<int32_t, std::unique_ptr<views::MenuRunner>> menu_runners_;
base::WeakPtrFactory<MenuViews> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(MenuViews);
};
} // namespace api
} // namespace atom
#endif // ATOM_BROWSER_API_ATOM_API_MENU_VIEWS_H_
| // Copyright (c) 2014 GitHub, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#ifndef ATOM_BROWSER_API_ATOM_API_MENU_VIEWS_H_
#define ATOM_BROWSER_API_ATOM_API_MENU_VIEWS_H_
#include <map>
#include <memory>
#include "atom/browser/api/atom_api_menu.h"
#include "base/memory/weak_ptr.h"
#include "ui/display/screen.h"
#include "ui/views/controls/menu/menu_runner.h"
namespace atom {
namespace api {
class MenuViews : public Menu {
public:
MenuViews(v8::Isolate* isolate, v8::Local<v8::Object> wrapper);
protected:
void PopupAt(
Window* window, int x, int y, int positioning_item,
CloseCallback callback) override;
void ClosePopupAt(int32_t window_id) override;
private:
// window ID -> open context menu
std::map<int32_t, std::unique_ptr<views::MenuRunner>> menu_runners_;
base::WeakPtrFactory<MenuViews> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(MenuViews);
};
} // namespace api
} // namespace atom
#endif // ATOM_BROWSER_API_ATOM_API_MENU_VIEWS_H_
| Fix missing PopupAt overrides on windows/linux | Fix missing PopupAt overrides on windows/linux
Auditors: 47e4a4954d6a66edd1210b9b46e0a144c1078e87@bsclifton
| C | mit | brave/electron,brave/muon,brave/electron,brave/electron,brave/electron,brave/muon,brave/muon,brave/muon,brave/electron,brave/muon,brave/muon,brave/electron | c | ## Code Before:
// Copyright (c) 2014 GitHub, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#ifndef ATOM_BROWSER_API_ATOM_API_MENU_VIEWS_H_
#define ATOM_BROWSER_API_ATOM_API_MENU_VIEWS_H_
#include <map>
#include <memory>
#include "atom/browser/api/atom_api_menu.h"
#include "base/memory/weak_ptr.h"
#include "ui/display/screen.h"
#include "ui/views/controls/menu/menu_runner.h"
namespace atom {
namespace api {
class MenuViews : public Menu {
public:
MenuViews(v8::Isolate* isolate, v8::Local<v8::Object> wrapper);
protected:
void PopupAt(
Window* window, int x, int y, int positioning_item) override;
void ClosePopupAt(int32_t window_id) override;
private:
// window ID -> open context menu
std::map<int32_t, std::unique_ptr<views::MenuRunner>> menu_runners_;
base::WeakPtrFactory<MenuViews> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(MenuViews);
};
} // namespace api
} // namespace atom
#endif // ATOM_BROWSER_API_ATOM_API_MENU_VIEWS_H_
## Instruction:
Fix missing PopupAt overrides on windows/linux
Auditors: 47e4a4954d6a66edd1210b9b46e0a144c1078e87@bsclifton
## Code After:
// Copyright (c) 2014 GitHub, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#ifndef ATOM_BROWSER_API_ATOM_API_MENU_VIEWS_H_
#define ATOM_BROWSER_API_ATOM_API_MENU_VIEWS_H_
#include <map>
#include <memory>
#include "atom/browser/api/atom_api_menu.h"
#include "base/memory/weak_ptr.h"
#include "ui/display/screen.h"
#include "ui/views/controls/menu/menu_runner.h"
namespace atom {
namespace api {
class MenuViews : public Menu {
public:
MenuViews(v8::Isolate* isolate, v8::Local<v8::Object> wrapper);
protected:
void PopupAt(
Window* window, int x, int y, int positioning_item,
CloseCallback callback) override;
void ClosePopupAt(int32_t window_id) override;
private:
// window ID -> open context menu
std::map<int32_t, std::unique_ptr<views::MenuRunner>> menu_runners_;
base::WeakPtrFactory<MenuViews> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(MenuViews);
};
} // namespace api
} // namespace atom
#endif // ATOM_BROWSER_API_ATOM_API_MENU_VIEWS_H_
| // Copyright (c) 2014 GitHub, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#ifndef ATOM_BROWSER_API_ATOM_API_MENU_VIEWS_H_
#define ATOM_BROWSER_API_ATOM_API_MENU_VIEWS_H_
#include <map>
#include <memory>
#include "atom/browser/api/atom_api_menu.h"
#include "base/memory/weak_ptr.h"
#include "ui/display/screen.h"
#include "ui/views/controls/menu/menu_runner.h"
namespace atom {
namespace api {
class MenuViews : public Menu {
public:
MenuViews(v8::Isolate* isolate, v8::Local<v8::Object> wrapper);
protected:
void PopupAt(
- Window* window, int x, int y, int positioning_item) override;
? ^^^^^^^^^^^
+ Window* window, int x, int y, int positioning_item,
? ^
+ CloseCallback callback) override;
void ClosePopupAt(int32_t window_id) override;
private:
// window ID -> open context menu
std::map<int32_t, std::unique_ptr<views::MenuRunner>> menu_runners_;
base::WeakPtrFactory<MenuViews> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(MenuViews);
};
} // namespace api
} // namespace atom
#endif // ATOM_BROWSER_API_ATOM_API_MENU_VIEWS_H_ | 3 | 0.071429 | 2 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.