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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4b0d54bc22cac6838d3aa4ec4d88f126c233dbe3 | manifest.json | manifest.json | {
"manifest_version": 2,
"short_name": "Builds Tab",
"name": "Builds Tab for Github",
"description": "Adds a builds tab to Github repos.",
"version": "0.2.0",
"author": "duxet",
"developer": {
"name": "duxet",
"url": "https://github.com/duxet/builds-tab"
},
"homepage_url": "https://github.com/duxet/builds-tab",
"icons": {
"48": "assets/icon48.png",
"96": "assets/icon96.png"
},
"content_scripts": [
{
"matches": [
"*://github.com/*"
],
"js": [
"dist/index.js"
]
}
],
"permissions": [
"https://api.travis-ci.org/*"
],
"web_accessible_resources": [
"assets/*"
]
}
| {
"manifest_version": 2,
"short_name": "Builds Tab",
"name": "Builds Tab for Github",
"description": "Adds a builds tab to Github repos.",
"version": "0.2.1",
"author": "duxet",
"developer": {
"name": "duxet",
"url": "https://github.com/duxet/builds-tab"
},
"homepage_url": "https://github.com/duxet/builds-tab",
"icons": {
"48": "assets/icon48.png",
"96": "assets/icon96.png"
},
"content_scripts": [
{
"matches": [
"*://github.com/*"
],
"js": [
"dist/index.js"
]
}
],
"permissions": [
"https://api.travis-ci.org/*",
"https://circleci.com/api/v1.1/*"
],
"web_accessible_resources": [
"assets/*"
]
}
| Fix issue with network permissions | Fix issue with network permissions
| JSON | mit | duxet/builds-tab,duxet/builds-tab | json | ## Code Before:
{
"manifest_version": 2,
"short_name": "Builds Tab",
"name": "Builds Tab for Github",
"description": "Adds a builds tab to Github repos.",
"version": "0.2.0",
"author": "duxet",
"developer": {
"name": "duxet",
"url": "https://github.com/duxet/builds-tab"
},
"homepage_url": "https://github.com/duxet/builds-tab",
"icons": {
"48": "assets/icon48.png",
"96": "assets/icon96.png"
},
"content_scripts": [
{
"matches": [
"*://github.com/*"
],
"js": [
"dist/index.js"
]
}
],
"permissions": [
"https://api.travis-ci.org/*"
],
"web_accessible_resources": [
"assets/*"
]
}
## Instruction:
Fix issue with network permissions
## Code After:
{
"manifest_version": 2,
"short_name": "Builds Tab",
"name": "Builds Tab for Github",
"description": "Adds a builds tab to Github repos.",
"version": "0.2.1",
"author": "duxet",
"developer": {
"name": "duxet",
"url": "https://github.com/duxet/builds-tab"
},
"homepage_url": "https://github.com/duxet/builds-tab",
"icons": {
"48": "assets/icon48.png",
"96": "assets/icon96.png"
},
"content_scripts": [
{
"matches": [
"*://github.com/*"
],
"js": [
"dist/index.js"
]
}
],
"permissions": [
"https://api.travis-ci.org/*",
"https://circleci.com/api/v1.1/*"
],
"web_accessible_resources": [
"assets/*"
]
}
| {
"manifest_version": 2,
"short_name": "Builds Tab",
"name": "Builds Tab for Github",
"description": "Adds a builds tab to Github repos.",
- "version": "0.2.0",
? ^
+ "version": "0.2.1",
? ^
"author": "duxet",
"developer": {
"name": "duxet",
"url": "https://github.com/duxet/builds-tab"
},
"homepage_url": "https://github.com/duxet/builds-tab",
"icons": {
"48": "assets/icon48.png",
"96": "assets/icon96.png"
},
"content_scripts": [
{
"matches": [
"*://github.com/*"
],
"js": [
"dist/index.js"
]
}
],
"permissions": [
- "https://api.travis-ci.org/*"
+ "https://api.travis-ci.org/*",
? +
+ "https://circleci.com/api/v1.1/*"
],
"web_accessible_resources": [
"assets/*"
]
} | 5 | 0.151515 | 3 | 2 |
650113ce75fb74ceb6d420e24ff79bd4e4e8d602 | test/src/runner.js | test/src/runner.js | /**
* Created by Aaron on 7/6/2015.
*/
import assert from 'assert';
export function runTests( build, tests ) {
assert( build === 'compat' || build === 'modern', 'Only modern and compat builds are supported' );
let Scriptor;
describe( `requiring ${build} build`, () => {
Scriptor = require( `../../build/${build}/index.js` );
} );
if( typeof tests === 'function' ) {
tests( Scriptor, build );
} else if( Array.isArray( tests ) ) {
for( let test of tests ) {
assert( typeof test === 'function', 'tests must be a function or array of functions' );
test( Scriptor, build );
}
} else {
throw new TypeError( 'tests must be a function or array of functions' );
}
}
| /**
* Created by Aaron on 7/6/2015.
*/
import assert from 'assert';
import Promise from 'bluebird';
Promise.longStackTraces();
export function runTests( build, tests ) {
assert( build === 'compat' || build === 'modern', 'Only modern and compat builds are supported' );
let Scriptor;
describe( `requiring ${build} build`, () => {
Scriptor = require( `../../build/${build}/index.js` );
} );
if( typeof tests === 'function' ) {
tests( Scriptor, build );
} else if( Array.isArray( tests ) ) {
for( let test of tests ) {
assert( typeof test === 'function', 'tests must be a function or array of functions' );
test( Scriptor, build );
}
} else {
throw new TypeError( 'tests must be a function or array of functions' );
}
}
| Enable long stack traces for testing | test: Enable long stack traces for testing
| JavaScript | mit | novacrazy/scriptor | javascript | ## Code Before:
/**
* Created by Aaron on 7/6/2015.
*/
import assert from 'assert';
export function runTests( build, tests ) {
assert( build === 'compat' || build === 'modern', 'Only modern and compat builds are supported' );
let Scriptor;
describe( `requiring ${build} build`, () => {
Scriptor = require( `../../build/${build}/index.js` );
} );
if( typeof tests === 'function' ) {
tests( Scriptor, build );
} else if( Array.isArray( tests ) ) {
for( let test of tests ) {
assert( typeof test === 'function', 'tests must be a function or array of functions' );
test( Scriptor, build );
}
} else {
throw new TypeError( 'tests must be a function or array of functions' );
}
}
## Instruction:
test: Enable long stack traces for testing
## Code After:
/**
* Created by Aaron on 7/6/2015.
*/
import assert from 'assert';
import Promise from 'bluebird';
Promise.longStackTraces();
export function runTests( build, tests ) {
assert( build === 'compat' || build === 'modern', 'Only modern and compat builds are supported' );
let Scriptor;
describe( `requiring ${build} build`, () => {
Scriptor = require( `../../build/${build}/index.js` );
} );
if( typeof tests === 'function' ) {
tests( Scriptor, build );
} else if( Array.isArray( tests ) ) {
for( let test of tests ) {
assert( typeof test === 'function', 'tests must be a function or array of functions' );
test( Scriptor, build );
}
} else {
throw new TypeError( 'tests must be a function or array of functions' );
}
}
| /**
* Created by Aaron on 7/6/2015.
*/
import assert from 'assert';
+
+ import Promise from 'bluebird';
+
+ Promise.longStackTraces();
export function runTests( build, tests ) {
assert( build === 'compat' || build === 'modern', 'Only modern and compat builds are supported' );
let Scriptor;
describe( `requiring ${build} build`, () => {
Scriptor = require( `../../build/${build}/index.js` );
} );
if( typeof tests === 'function' ) {
tests( Scriptor, build );
} else if( Array.isArray( tests ) ) {
for( let test of tests ) {
assert( typeof test === 'function', 'tests must be a function or array of functions' );
test( Scriptor, build );
}
} else {
throw new TypeError( 'tests must be a function or array of functions' );
}
} | 4 | 0.137931 | 4 | 0 |
fa113af85850fab6d3d8525b74ddea2c505b14e2 | t/10-redirect-ssl.t | t/10-redirect-ssl.t | use v6;
use HTTP::UserAgent;
BEGIN {
if ::('IO::Socket::SSL') ~~ Failure {
print("1..0 # Skip: IO::Socket::SSL not available\n");
exit 0;
}
}
use Test;
plan 1;
my $url = 'http://github.com';
my $ua = HTTP::UserAgent.new(GET => $url);
my $get = ~$ua.get($url);
ok $get ~~ /'</html>'/, 'http -> https redirect get 1/1'; | use v6;
use HTTP::UserAgent;
BEGIN {
if ::('IO::Socket::SSL') ~~ Failure {
print("1..0 # Skip: IO::Socket::SSL not available\n");
exit 0;
}
}
use Test;
plan 2;
my $url = 'http://github.com';
my $ua;
lives_ok { $ua = HTTP::UserAgent.new(GET => $url) }, 'new(GET => $url) lives';
my $get = ~$ua.get($url);
ok $get ~~ /'</html>'/, 'http -> https redirect get 1/1'; | Make sure constructor accepts uri | Make sure constructor accepts uri
| Perl | mit | jonathanstowe/http-useragent,hiroraba/http-useragent,tadzik/http-useragent | perl | ## Code Before:
use v6;
use HTTP::UserAgent;
BEGIN {
if ::('IO::Socket::SSL') ~~ Failure {
print("1..0 # Skip: IO::Socket::SSL not available\n");
exit 0;
}
}
use Test;
plan 1;
my $url = 'http://github.com';
my $ua = HTTP::UserAgent.new(GET => $url);
my $get = ~$ua.get($url);
ok $get ~~ /'</html>'/, 'http -> https redirect get 1/1';
## Instruction:
Make sure constructor accepts uri
## Code After:
use v6;
use HTTP::UserAgent;
BEGIN {
if ::('IO::Socket::SSL') ~~ Failure {
print("1..0 # Skip: IO::Socket::SSL not available\n");
exit 0;
}
}
use Test;
plan 2;
my $url = 'http://github.com';
my $ua;
lives_ok { $ua = HTTP::UserAgent.new(GET => $url) }, 'new(GET => $url) lives';
my $get = ~$ua.get($url);
ok $get ~~ /'</html>'/, 'http -> https redirect get 1/1'; | use v6;
use HTTP::UserAgent;
BEGIN {
if ::('IO::Socket::SSL') ~~ Failure {
print("1..0 # Skip: IO::Socket::SSL not available\n");
exit 0;
}
}
use Test;
- plan 1;
? ^
+ plan 2;
? ^
my $url = 'http://github.com';
- my $ua = HTTP::UserAgent.new(GET => $url);
+
+ my $ua;
+ lives_ok { $ua = HTTP::UserAgent.new(GET => $url) }, 'new(GET => $url) lives';
+
my $get = ~$ua.get($url);
ok $get ~~ /'</html>'/, 'http -> https redirect get 1/1'; | 7 | 0.368421 | 5 | 2 |
a87dfa91ebfe7816cfdd2770903a09719b7710d6 | biz/webui/cgi-bin/lookup-tunnel-dns.js | biz/webui/cgi-bin/lookup-tunnel-dns.js | var url = require('url');
var properties = require('../lib/properties');
var rules = require('../lib/proxy').rules;
var util = require('../lib/util');
module.exports = function(req, res) {
var tunnelUrl = properties.get('showHostIpInResHeaders') ? req.query.url : null;
if (typeof tunnelUrl != 'string') {
tunnelUrl = null;
} else if (tunnelUrl) {
tunnelUrl = url.parse(tunnelUrl);
tunnelUrl = tunnelUrl.host ? 'https://' + tunnelUrl.host : null;
}
if (!tunnelUrl) {
return res.json({ec: 2, em: 'server busy'});
}
var _rules = rules.resolveRules(tunnelUrl);
if (_rules.rule) {
var _url = util.setProtocol(util.rule.getMatcher(_rules.rule), true);
if (/^https:/i.test(_url)) {
tunnelUrl = _url;
}
}
rules.resolveHost(tunnelUrl, function(err, host) {
if (err) {
res.json({ec: 2, em: 'server busy'});
} else {
res.json({ec: 0, em: 'success', host: host});
}
});
};
| var url = require('url');
var properties = require('../lib/properties');
var rules = require('../lib/proxy').rules;
var util = require('../lib/util');
module.exports = function(req, res) {
var tunnelUrl = properties.get('showHostIpInResHeaders') ? req.query.url : null;
if (typeof tunnelUrl != 'string') {
tunnelUrl = null;
} else if (tunnelUrl) {
tunnelUrl = url.parse(tunnelUrl);
tunnelUrl = tunnelUrl.host ? 'https://' + tunnelUrl.host : null;
}
if (!tunnelUrl) {
return res.json({ec: 2, em: 'server busy'});
}
var rule = rules.resolveRule(tunnelUrl);
if (rule) {
var _url = util.setProtocol(util.rule.getMatcher(rule), true);
if (/^https:/i.test(_url)) {
tunnelUrl = _url;
}
}
rules.resolveHost(tunnelUrl, function(err, host) {
if (err) {
res.json({ec: 2, em: 'server busy'});
} else {
res.json({ec: 0, em: 'success', host: host});
}
});
};
| Use resolveRule instead of resolveRules | refactor: Use resolveRule instead of resolveRules
| JavaScript | mit | avwo/whistle,avwo/whistle | javascript | ## Code Before:
var url = require('url');
var properties = require('../lib/properties');
var rules = require('../lib/proxy').rules;
var util = require('../lib/util');
module.exports = function(req, res) {
var tunnelUrl = properties.get('showHostIpInResHeaders') ? req.query.url : null;
if (typeof tunnelUrl != 'string') {
tunnelUrl = null;
} else if (tunnelUrl) {
tunnelUrl = url.parse(tunnelUrl);
tunnelUrl = tunnelUrl.host ? 'https://' + tunnelUrl.host : null;
}
if (!tunnelUrl) {
return res.json({ec: 2, em: 'server busy'});
}
var _rules = rules.resolveRules(tunnelUrl);
if (_rules.rule) {
var _url = util.setProtocol(util.rule.getMatcher(_rules.rule), true);
if (/^https:/i.test(_url)) {
tunnelUrl = _url;
}
}
rules.resolveHost(tunnelUrl, function(err, host) {
if (err) {
res.json({ec: 2, em: 'server busy'});
} else {
res.json({ec: 0, em: 'success', host: host});
}
});
};
## Instruction:
refactor: Use resolveRule instead of resolveRules
## Code After:
var url = require('url');
var properties = require('../lib/properties');
var rules = require('../lib/proxy').rules;
var util = require('../lib/util');
module.exports = function(req, res) {
var tunnelUrl = properties.get('showHostIpInResHeaders') ? req.query.url : null;
if (typeof tunnelUrl != 'string') {
tunnelUrl = null;
} else if (tunnelUrl) {
tunnelUrl = url.parse(tunnelUrl);
tunnelUrl = tunnelUrl.host ? 'https://' + tunnelUrl.host : null;
}
if (!tunnelUrl) {
return res.json({ec: 2, em: 'server busy'});
}
var rule = rules.resolveRule(tunnelUrl);
if (rule) {
var _url = util.setProtocol(util.rule.getMatcher(rule), true);
if (/^https:/i.test(_url)) {
tunnelUrl = _url;
}
}
rules.resolveHost(tunnelUrl, function(err, host) {
if (err) {
res.json({ec: 2, em: 'server busy'});
} else {
res.json({ec: 0, em: 'success', host: host});
}
});
};
| var url = require('url');
var properties = require('../lib/properties');
var rules = require('../lib/proxy').rules;
var util = require('../lib/util');
module.exports = function(req, res) {
var tunnelUrl = properties.get('showHostIpInResHeaders') ? req.query.url : null;
if (typeof tunnelUrl != 'string') {
tunnelUrl = null;
} else if (tunnelUrl) {
tunnelUrl = url.parse(tunnelUrl);
tunnelUrl = tunnelUrl.host ? 'https://' + tunnelUrl.host : null;
}
if (!tunnelUrl) {
return res.json({ec: 2, em: 'server busy'});
}
- var _rules = rules.resolveRules(tunnelUrl);
? - - -
+ var rule = rules.resolveRule(tunnelUrl);
- if (_rules.rule) {
? -------
+ if (rule) {
- var _url = util.setProtocol(util.rule.getMatcher(_rules.rule), true);
? -------
+ var _url = util.setProtocol(util.rule.getMatcher(rule), true);
if (/^https:/i.test(_url)) {
tunnelUrl = _url;
}
}
rules.resolveHost(tunnelUrl, function(err, host) {
if (err) {
res.json({ec: 2, em: 'server busy'});
} else {
res.json({ec: 0, em: 'success', host: host});
}
});
}; | 6 | 0.181818 | 3 | 3 |
a8d6dfb4e3379e55e5e5337f0130c126696c6d17 | remoteappmanager/static/js/home/views/application_list_view.js | remoteappmanager/static/js/home/views/application_list_view.js | define([
'urlutils',
'../../components/vue/dist/vue.min'
], function (urlutils, Vue) {
'use strict';
/* Create application_list ViewModel
(will next be wrapped in a main ViewModel which will contain the
applicationListView and the applicationView) */
var ApplicationListView = Vue.extend({
el: '#applist',
data: function() {
return {
loading: true,
model: { app_list: [], selected_index: null },
selected_app_callback: function() {}, // Temporary
stop_application_callback: function() {} // Temporary
};
},
methods: {
stop_application: function(index) {
this.stop_application_callback(index);
}
},
filters: {
icon_src: function(icon_data) {
return (
icon_data ?
'data:image/png;base64,' + icon_data :
urlutils.path_join(
this.base_url, 'static', 'images', 'generic_appicon_128.png'
)
);
},
app_name: function(image) {
return image.ui_name? image.ui_name: image.name;
}
}
});
return {
ApplicationListView : ApplicationListView
};
});
| define([
'urlutils',
'../../components/vue/dist/vue.min'
], function (urlutils, Vue) {
'use strict';
/* Create application_list ViewModel
(will next be wrapped in a main ViewModel which will contain the
applicationListView and the applicationView) */
var ApplicationListView = Vue.extend({
el: '#applist',
data: function() {
return {
loading: true,
model: { app_list: [], selected_index: null },
selected_app_callback: function() {}, // Temporary
stop_application_callback: function() {} // Temporary
};
},
methods: {
stop_application: function(index) {
this.stop_application_callback(index);
}
},
filters: {
icon_src: function(icon_data) {
return (
icon_data ?
'data:image/png;base64,' + icon_data :
urlutils.path_join(
window.apidata.base_url, 'static', 'images', 'generic_appicon_128.png'
)
);
},
app_name: function(image) {
return image.ui_name? image.ui_name: image.name;
}
}
});
return {
ApplicationListView : ApplicationListView
};
});
| Fix issue with unknown "this" | Fix issue with unknown "this"
| JavaScript | bsd-3-clause | simphony/simphony-remote,simphony/simphony-remote,simphony/simphony-remote,simphony/simphony-remote | javascript | ## Code Before:
define([
'urlutils',
'../../components/vue/dist/vue.min'
], function (urlutils, Vue) {
'use strict';
/* Create application_list ViewModel
(will next be wrapped in a main ViewModel which will contain the
applicationListView and the applicationView) */
var ApplicationListView = Vue.extend({
el: '#applist',
data: function() {
return {
loading: true,
model: { app_list: [], selected_index: null },
selected_app_callback: function() {}, // Temporary
stop_application_callback: function() {} // Temporary
};
},
methods: {
stop_application: function(index) {
this.stop_application_callback(index);
}
},
filters: {
icon_src: function(icon_data) {
return (
icon_data ?
'data:image/png;base64,' + icon_data :
urlutils.path_join(
this.base_url, 'static', 'images', 'generic_appicon_128.png'
)
);
},
app_name: function(image) {
return image.ui_name? image.ui_name: image.name;
}
}
});
return {
ApplicationListView : ApplicationListView
};
});
## Instruction:
Fix issue with unknown "this"
## Code After:
define([
'urlutils',
'../../components/vue/dist/vue.min'
], function (urlutils, Vue) {
'use strict';
/* Create application_list ViewModel
(will next be wrapped in a main ViewModel which will contain the
applicationListView and the applicationView) */
var ApplicationListView = Vue.extend({
el: '#applist',
data: function() {
return {
loading: true,
model: { app_list: [], selected_index: null },
selected_app_callback: function() {}, // Temporary
stop_application_callback: function() {} // Temporary
};
},
methods: {
stop_application: function(index) {
this.stop_application_callback(index);
}
},
filters: {
icon_src: function(icon_data) {
return (
icon_data ?
'data:image/png;base64,' + icon_data :
urlutils.path_join(
window.apidata.base_url, 'static', 'images', 'generic_appicon_128.png'
)
);
},
app_name: function(image) {
return image.ui_name? image.ui_name: image.name;
}
}
});
return {
ApplicationListView : ApplicationListView
};
});
| define([
'urlutils',
'../../components/vue/dist/vue.min'
], function (urlutils, Vue) {
'use strict';
/* Create application_list ViewModel
(will next be wrapped in a main ViewModel which will contain the
applicationListView and the applicationView) */
var ApplicationListView = Vue.extend({
el: '#applist',
data: function() {
return {
loading: true,
model: { app_list: [], selected_index: null },
selected_app_callback: function() {}, // Temporary
stop_application_callback: function() {} // Temporary
};
},
methods: {
stop_application: function(index) {
this.stop_application_callback(index);
}
},
filters: {
icon_src: function(icon_data) {
return (
icon_data ?
'data:image/png;base64,' + icon_data :
urlutils.path_join(
- this.base_url, 'static', 'images', 'generic_appicon_128.png'
? ^^^
+ window.apidata.base_url, 'static', 'images', 'generic_appicon_128.png'
? ++++++++++++ ^
)
);
},
app_name: function(image) {
return image.ui_name? image.ui_name: image.name;
}
}
});
return {
ApplicationListView : ApplicationListView
};
}); | 2 | 0.042553 | 1 | 1 |
2119b535871bb709e0fc68b5a1728e81a61ce60c | examples/compose/app.ts | examples/compose/app.ts | import { Context, Component, stateOf, interfaceOf } from '../../src'
import { styleGroup, StyleGroup } from '../../src/utils/style'
import { ViewInterface } from '../../src/interfaces/view'
import h from 'snabbdom/h'
let name = 'Main'
let components = {
counter: require('./counter').default,
}
let state = ({key}) => ({
key,
count: 0,
})
let actions = {
Set: (count: number) => state => {
state.count = count
return state
},
Inc: () => state => {
state.count ++
return state
},
}
let inputs = (ctx: Context) => ({
set: (n: number) => actions.Set(n),
inc: () => actions.Inc(),
})
let view: ViewInterface = (ctx, s) =>
h('div', {
key: name,
class: { [style.base]: true },
}, [
h('div', {
class: { [style.childCount]: true },
}, [
stateOf(ctx, 'counter').count,
]),
interfaceOf(ctx, 'counter', 'view'),
])
let style: any = styleGroup({
base: {
width: '160px',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
padding: '12px',
backgroundColor: '#DDE2E9',
},
childCount: {
padding: '10px',
},
}, name)
let mDef: Component = {
name,
state,
components,
inputs,
actions,
interfaces: {
view,
},
}
export default mDef
| import { Context, Component, stateOf, interfaceOf } from '../../src'
import { styleGroup, StyleGroup } from '../../src/utils/style'
import { ViewInterface } from '../../src/interfaces/view'
import h from 'snabbdom/h'
let name = 'Main'
let components = {
counter: require('./counter').default,
}
let state = ({key}) => ({
key,
})
let view: ViewInterface = (ctx, s) =>
h('div', {
key: name,
class: { [style.base]: true },
}, [
h('div', {
class: { [style.childCount]: true },
}, [
stateOf(ctx, 'counter').count,
]),
interfaceOf(ctx, 'counter', 'view'),
])
let style: any = styleGroup({
base: {
width: '160px',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
padding: '12px',
backgroundColor: '#DDE2E9',
},
childCount: {
padding: '10px',
},
}, name)
let mDef: Component = {
name,
state,
components,
inputs: ctx => ({}),
actions: {},
interfaces: {
view,
},
}
export default mDef
| Remove unused stuff from compose example | Remove unused stuff from compose example
| TypeScript | mit | FractalBlocks/Fractal,FractalBlocks/Fractal,FractalBlocks/Fractal | typescript | ## Code Before:
import { Context, Component, stateOf, interfaceOf } from '../../src'
import { styleGroup, StyleGroup } from '../../src/utils/style'
import { ViewInterface } from '../../src/interfaces/view'
import h from 'snabbdom/h'
let name = 'Main'
let components = {
counter: require('./counter').default,
}
let state = ({key}) => ({
key,
count: 0,
})
let actions = {
Set: (count: number) => state => {
state.count = count
return state
},
Inc: () => state => {
state.count ++
return state
},
}
let inputs = (ctx: Context) => ({
set: (n: number) => actions.Set(n),
inc: () => actions.Inc(),
})
let view: ViewInterface = (ctx, s) =>
h('div', {
key: name,
class: { [style.base]: true },
}, [
h('div', {
class: { [style.childCount]: true },
}, [
stateOf(ctx, 'counter').count,
]),
interfaceOf(ctx, 'counter', 'view'),
])
let style: any = styleGroup({
base: {
width: '160px',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
padding: '12px',
backgroundColor: '#DDE2E9',
},
childCount: {
padding: '10px',
},
}, name)
let mDef: Component = {
name,
state,
components,
inputs,
actions,
interfaces: {
view,
},
}
export default mDef
## Instruction:
Remove unused stuff from compose example
## Code After:
import { Context, Component, stateOf, interfaceOf } from '../../src'
import { styleGroup, StyleGroup } from '../../src/utils/style'
import { ViewInterface } from '../../src/interfaces/view'
import h from 'snabbdom/h'
let name = 'Main'
let components = {
counter: require('./counter').default,
}
let state = ({key}) => ({
key,
})
let view: ViewInterface = (ctx, s) =>
h('div', {
key: name,
class: { [style.base]: true },
}, [
h('div', {
class: { [style.childCount]: true },
}, [
stateOf(ctx, 'counter').count,
]),
interfaceOf(ctx, 'counter', 'view'),
])
let style: any = styleGroup({
base: {
width: '160px',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
padding: '12px',
backgroundColor: '#DDE2E9',
},
childCount: {
padding: '10px',
},
}, name)
let mDef: Component = {
name,
state,
components,
inputs: ctx => ({}),
actions: {},
interfaces: {
view,
},
}
export default mDef
| import { Context, Component, stateOf, interfaceOf } from '../../src'
import { styleGroup, StyleGroup } from '../../src/utils/style'
import { ViewInterface } from '../../src/interfaces/view'
import h from 'snabbdom/h'
let name = 'Main'
let components = {
counter: require('./counter').default,
}
let state = ({key}) => ({
key,
- count: 0,
- })
-
- let actions = {
- Set: (count: number) => state => {
- state.count = count
- return state
- },
- Inc: () => state => {
- state.count ++
- return state
- },
- }
-
- let inputs = (ctx: Context) => ({
- set: (n: number) => actions.Set(n),
- inc: () => actions.Inc(),
})
let view: ViewInterface = (ctx, s) =>
h('div', {
key: name,
class: { [style.base]: true },
}, [
h('div', {
class: { [style.childCount]: true },
}, [
stateOf(ctx, 'counter').count,
]),
interfaceOf(ctx, 'counter', 'view'),
])
let style: any = styleGroup({
base: {
width: '160px',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
padding: '12px',
backgroundColor: '#DDE2E9',
},
childCount: {
padding: '10px',
},
}, name)
let mDef: Component = {
name,
state,
components,
- inputs,
+ inputs: ctx => ({}),
- actions,
+ actions: {},
? ++++
interfaces: {
view,
},
}
export default mDef
| 21 | 0.283784 | 2 | 19 |
07eb9dbe044994dc68d17339674a2dddb4879605 | README.md | README.md | [](http://dodgercms.com/)
[](https://travis-ci.org/ChrisZieba/dodgercms)
DodgerCMS is a static markdown CMS built on top of Amazon S3. It is a clean and simple alternative to heavy content management systems. There are no databases to manage, deployments to monitor, or massive configuration files. Just focus on writing your content and the results are live immediatly.
# Demo
The documentation for [DodgerCMS](http://dodgercms.com) is itself build with `DodgerCMS`.
# Features
- [Full markdown editor](http://dodgercms.com/features/editor)
- [Uploads images directly to the cloud](http://dodgercms.com/features/)
- [Handles changes in URL structure](http://dodgercms.com/features/)
- [Easily extendible](http://dodgercms.com/features/)
- [Access via your S3 bucket](http://dodgercms.com/features/)
# Use Cases
DodgerCMS is simple by design. It is well suited for small blogs, and documentation.
# Installation
Please take a look at the [installation guide](http://dodgercms.com/help/installation).
# License
```
MIT License (MIT)
Copyright (c) 2015 Chris Zieba
``` | [](http://dodgercms.com/)
[](https://travis-ci.org/ChrisZieba/dodgercms)
DodgerCMS is a static markdown CMS built on top of Amazon S3. It is a clean and simple alternative to heavy content management systems. There are no databases to manage, deployments to monitor, or massive configuration files. Just focus on writing your content and the results are live immediatly.
# Demo
The documentation for [DodgerCMS](http://dodgercms.com) is itself build with `DodgerCMS`.
# Features
- [Full markdown editor](http://dodgercms.com/features/editor)
- [Uploads images directly to the cloud](http://dodgercms.com/features/)
- [Handles changes in URL structure](http://dodgercms.com/features/)
- [Easily extendible](http://dodgercms.com/features/)
- [Access via your S3 bucket](http://dodgercms.com/features/)
- [Custom layouts](http://dodgercms.com/features/)
- [Updates in real time](http://dodgercms.com/features/)
# Use Cases
DodgerCMS is simple by design. There are no requirements except Amazon S3. It is well suited for small blogs, documentation, and any static site that benefits from the simple syntax of markdown.
# Installation
Please take a look at the [installation guide](http://dodgercms.com/help/installation).
# License
```
MIT License (MIT)
Copyright (c) 2015 Chris Zieba
``` | Add to the use cases section | Add to the use cases section
| Markdown | mit | etopian/dodgercms,etopian/dodgercms,ChrisZieba/dodgercms,ChrisZieba/dodgercms | markdown | ## Code Before:
[](http://dodgercms.com/)
[](https://travis-ci.org/ChrisZieba/dodgercms)
DodgerCMS is a static markdown CMS built on top of Amazon S3. It is a clean and simple alternative to heavy content management systems. There are no databases to manage, deployments to monitor, or massive configuration files. Just focus on writing your content and the results are live immediatly.
# Demo
The documentation for [DodgerCMS](http://dodgercms.com) is itself build with `DodgerCMS`.
# Features
- [Full markdown editor](http://dodgercms.com/features/editor)
- [Uploads images directly to the cloud](http://dodgercms.com/features/)
- [Handles changes in URL structure](http://dodgercms.com/features/)
- [Easily extendible](http://dodgercms.com/features/)
- [Access via your S3 bucket](http://dodgercms.com/features/)
# Use Cases
DodgerCMS is simple by design. It is well suited for small blogs, and documentation.
# Installation
Please take a look at the [installation guide](http://dodgercms.com/help/installation).
# License
```
MIT License (MIT)
Copyright (c) 2015 Chris Zieba
```
## Instruction:
Add to the use cases section
## Code After:
[](http://dodgercms.com/)
[](https://travis-ci.org/ChrisZieba/dodgercms)
DodgerCMS is a static markdown CMS built on top of Amazon S3. It is a clean and simple alternative to heavy content management systems. There are no databases to manage, deployments to monitor, or massive configuration files. Just focus on writing your content and the results are live immediatly.
# Demo
The documentation for [DodgerCMS](http://dodgercms.com) is itself build with `DodgerCMS`.
# Features
- [Full markdown editor](http://dodgercms.com/features/editor)
- [Uploads images directly to the cloud](http://dodgercms.com/features/)
- [Handles changes in URL structure](http://dodgercms.com/features/)
- [Easily extendible](http://dodgercms.com/features/)
- [Access via your S3 bucket](http://dodgercms.com/features/)
- [Custom layouts](http://dodgercms.com/features/)
- [Updates in real time](http://dodgercms.com/features/)
# Use Cases
DodgerCMS is simple by design. There are no requirements except Amazon S3. It is well suited for small blogs, documentation, and any static site that benefits from the simple syntax of markdown.
# Installation
Please take a look at the [installation guide](http://dodgercms.com/help/installation).
# License
```
MIT License (MIT)
Copyright (c) 2015 Chris Zieba
``` | [](http://dodgercms.com/)
[](https://travis-ci.org/ChrisZieba/dodgercms)
DodgerCMS is a static markdown CMS built on top of Amazon S3. It is a clean and simple alternative to heavy content management systems. There are no databases to manage, deployments to monitor, or massive configuration files. Just focus on writing your content and the results are live immediatly.
# Demo
The documentation for [DodgerCMS](http://dodgercms.com) is itself build with `DodgerCMS`.
# Features
- [Full markdown editor](http://dodgercms.com/features/editor)
- [Uploads images directly to the cloud](http://dodgercms.com/features/)
- [Handles changes in URL structure](http://dodgercms.com/features/)
- [Easily extendible](http://dodgercms.com/features/)
- [Access via your S3 bucket](http://dodgercms.com/features/)
+ - [Custom layouts](http://dodgercms.com/features/)
+ - [Updates in real time](http://dodgercms.com/features/)
# Use Cases
- DodgerCMS is simple by design. It is well suited for small blogs, and documentation.
+ DodgerCMS is simple by design. There are no requirements except Amazon S3. It is well suited for small blogs, documentation, and any static site that benefits from the simple syntax of markdown.
# Installation
Please take a look at the [installation guide](http://dodgercms.com/help/installation).
# License
```
MIT License (MIT)
Copyright (c) 2015 Chris Zieba
``` | 4 | 0.125 | 3 | 1 |
3356721a11d2b74f1410040e6b614845729f8327 | README.md | README.md | [](https://circleci.com/gh/CenturyLinkLabs/docker-reg-client)
[](http://godoc.org/github.com/CenturyLinkLabs/docker-reg-client/registry)
docker-reg-client is an API wrapper for the [Docker Registry v1 API](https://docs.docker.com/reference/api/registry_api/) written in Go.
For detailed documentation, see the [GoDocs](http://godoc.org/github.com/CenturyLinkLabs/docker-reg-client/registry).
## Example
package main
import (
"fmt"
"github.com/CenturyLinkLabs/docker-reg-client/registry"
)
func main() {
c := registry.NewClient()
auth, err := c.Hub.GetReadToken("ubuntu")
if err != nil {
panic(err)
}
tags, err := c.Repository.ListTags("ubuntu", auth)
if err != nil {
panic(err)
}
fmt.Printf("%#v", tags)
}
| [](https://circleci.com/gh/CenturyLinkLabs/docker-reg-client)
[](http://godoc.org/github.com/CenturyLinkLabs/docker-reg-client/registry)
docker-reg-client is an API wrapper for the [Docker Registry v1 API](https://docs.docker.com/reference/api/registry_api/) written in Go.
For detailed documentation, see the [GoDocs](http://godoc.org/github.com/CenturyLinkLabs/docker-reg-client/registry).
## Example
package main
import (
"fmt"
"github.com/CenturyLinkLabs/docker-reg-client/registry"
)
func main() {
c := registry.NewClient()
auth, err := c.Hub.GetReadToken("ubuntu")
if err != nil {
panic(err)
}
tags, err := c.Repository.ListTags("ubuntu", auth)
if err != nil {
panic(err)
}
fmt.Printf("%#v", tags)
}
## Write token caveat
Please note that the `GetWriteToken()` only works on **non automated build**s.
| Add note about GetWriteToken() for automated builds | Add note about GetWriteToken() for automated builds
| Markdown | apache-2.0 | CenturyLinkLabs/docker-reg-client | markdown | ## Code Before:
[](https://circleci.com/gh/CenturyLinkLabs/docker-reg-client)
[](http://godoc.org/github.com/CenturyLinkLabs/docker-reg-client/registry)
docker-reg-client is an API wrapper for the [Docker Registry v1 API](https://docs.docker.com/reference/api/registry_api/) written in Go.
For detailed documentation, see the [GoDocs](http://godoc.org/github.com/CenturyLinkLabs/docker-reg-client/registry).
## Example
package main
import (
"fmt"
"github.com/CenturyLinkLabs/docker-reg-client/registry"
)
func main() {
c := registry.NewClient()
auth, err := c.Hub.GetReadToken("ubuntu")
if err != nil {
panic(err)
}
tags, err := c.Repository.ListTags("ubuntu", auth)
if err != nil {
panic(err)
}
fmt.Printf("%#v", tags)
}
## Instruction:
Add note about GetWriteToken() for automated builds
## Code After:
[](https://circleci.com/gh/CenturyLinkLabs/docker-reg-client)
[](http://godoc.org/github.com/CenturyLinkLabs/docker-reg-client/registry)
docker-reg-client is an API wrapper for the [Docker Registry v1 API](https://docs.docker.com/reference/api/registry_api/) written in Go.
For detailed documentation, see the [GoDocs](http://godoc.org/github.com/CenturyLinkLabs/docker-reg-client/registry).
## Example
package main
import (
"fmt"
"github.com/CenturyLinkLabs/docker-reg-client/registry"
)
func main() {
c := registry.NewClient()
auth, err := c.Hub.GetReadToken("ubuntu")
if err != nil {
panic(err)
}
tags, err := c.Repository.ListTags("ubuntu", auth)
if err != nil {
panic(err)
}
fmt.Printf("%#v", tags)
}
## Write token caveat
Please note that the `GetWriteToken()` only works on **non automated build**s.
| [](https://circleci.com/gh/CenturyLinkLabs/docker-reg-client)
[](http://godoc.org/github.com/CenturyLinkLabs/docker-reg-client/registry)
docker-reg-client is an API wrapper for the [Docker Registry v1 API](https://docs.docker.com/reference/api/registry_api/) written in Go.
For detailed documentation, see the [GoDocs](http://godoc.org/github.com/CenturyLinkLabs/docker-reg-client/registry).
## Example
package main
import (
"fmt"
"github.com/CenturyLinkLabs/docker-reg-client/registry"
)
func main() {
c := registry.NewClient()
auth, err := c.Hub.GetReadToken("ubuntu")
if err != nil {
panic(err)
}
tags, err := c.Repository.ListTags("ubuntu", auth)
if err != nil {
panic(err)
}
fmt.Printf("%#v", tags)
}
+
+ ## Write token caveat
+
+ Please note that the `GetWriteToken()` only works on **non automated build**s. | 4 | 0.129032 | 4 | 0 |
44aebd99f850a455ec123968e07b355dcee5733a | .c8rc.json | .c8rc.json | {
"all": true,
"exclude": [
"{coverage,media,test,test-d,test-tap}/**",
"*.config.js",
"index.d.ts"
],
"reporter": [
"html",
"lcov"
]
}
| {
"all": true,
"exclude": [
"{coverage,examples,media,test,test-d,test-tap,types}/**",
"*.config.cjs",
"*.d.ts"
],
"reporter": [
"html",
"lcov"
]
}
| Exclude more files from code coverage | Exclude more files from code coverage
| JSON | mit | avajs/ava,sindresorhus/ava,avajs/ava | json | ## Code Before:
{
"all": true,
"exclude": [
"{coverage,media,test,test-d,test-tap}/**",
"*.config.js",
"index.d.ts"
],
"reporter": [
"html",
"lcov"
]
}
## Instruction:
Exclude more files from code coverage
## Code After:
{
"all": true,
"exclude": [
"{coverage,examples,media,test,test-d,test-tap,types}/**",
"*.config.cjs",
"*.d.ts"
],
"reporter": [
"html",
"lcov"
]
}
| {
"all": true,
"exclude": [
- "{coverage,media,test,test-d,test-tap}/**",
+ "{coverage,examples,media,test,test-d,test-tap,types}/**",
? +++++++++ ++++++
- "*.config.js",
+ "*.config.cjs",
? +
- "index.d.ts"
? ^^^^^
+ "*.d.ts"
? ^
],
"reporter": [
"html",
"lcov"
]
} | 6 | 0.5 | 3 | 3 |
4e8b8ec6baad0f3e1b9868751a77c190a354ba02 | src/index.js | src/index.js | 'use strict'
/* @flow */
function promisify(callback: Function, throwError: boolean = true): Function {
return function promisified(){
const parameters = Array.from ? Array.from(arguments) : Array.prototype.slice.call(arguments)
const parametersLength = parameters.length + 1
let promise = new Promise((resolve, reject) => {
parameters.push(function(error, data) {
if (error) {
reject(error)
} else resolve(data)
})
if (parametersLength === 1) {
callback.call(this, parameters[0])
} else if (parametersLength === 2) {
callback.call(this, parameters[0], parameters[1])
} else if (parametersLength === 3) {
callback.call(this, parameters[0], parameters[1], parameters[2])
} else if (parametersLength === 4) {
callback.call(this, parameters[0], parameters[1], parameters[2], parameters[3])
} else {
callback.apply(this, parameters)
}
})
if (!throwError) {
promise = promise.catch(function() {
return null
})
}
return promise
}
}
function promisifyAll(object: Object, throwError: boolean = true): Object {
const duplicate = Object.assign({}, object)
for (const item in duplicate) {
if (duplicate.hasOwnProperty(item)) {
const value = duplicate[item]
if (typeof value === 'function') {
duplicate[item] = promisify(value, throwError)
}
}
}
return duplicate
}
module.exports = promisify
module.exports.promisifyAll = promisifyAll
| /* @flow */
function promisify(callback: Function, throwError: boolean = true): Function {
return function promisified(...parameters) {
let promise = new Promise((resolve, reject) => {
parameters.push(function(error, data) {
if (error) {
reject(error)
} else resolve(data)
})
callback.apply(this, parameters)
})
if (!throwError) {
promise = promise.then(function(result) {
return typeof result === 'undefined' ? true : result
}).catch(function() {
return false
})
}
return promise
}
}
function promisifyAll(object: Object, throwError: boolean = true): Object {
const duplicate = Object.assign({}, object)
for (const item in duplicate) {
if (
!{}.hasOwnProperty.call(duplicate, item) ||
typeof duplicate[item] !== 'function'
) {
continue
}
duplicate[`${item}Async`] = promisify(duplicate[item], throwError)
}
return duplicate
}
export default promisify
export { promisify, promisifyAll }
| Enhance main module - Make promisifyAll work bluebird style - Return null instead of false in case of error when throwError is false - Return true instead of undefined in case of success when throwError is false - Make module exports babel styled | :art: Enhance main module
- Make promisifyAll work bluebird style
- Return null instead of false in case of error when throwError is false
- Return true instead of undefined in case of success when throwError is false
- Make module exports babel styled
| JavaScript | mit | steelbrain/promisify | javascript | ## Code Before:
'use strict'
/* @flow */
function promisify(callback: Function, throwError: boolean = true): Function {
return function promisified(){
const parameters = Array.from ? Array.from(arguments) : Array.prototype.slice.call(arguments)
const parametersLength = parameters.length + 1
let promise = new Promise((resolve, reject) => {
parameters.push(function(error, data) {
if (error) {
reject(error)
} else resolve(data)
})
if (parametersLength === 1) {
callback.call(this, parameters[0])
} else if (parametersLength === 2) {
callback.call(this, parameters[0], parameters[1])
} else if (parametersLength === 3) {
callback.call(this, parameters[0], parameters[1], parameters[2])
} else if (parametersLength === 4) {
callback.call(this, parameters[0], parameters[1], parameters[2], parameters[3])
} else {
callback.apply(this, parameters)
}
})
if (!throwError) {
promise = promise.catch(function() {
return null
})
}
return promise
}
}
function promisifyAll(object: Object, throwError: boolean = true): Object {
const duplicate = Object.assign({}, object)
for (const item in duplicate) {
if (duplicate.hasOwnProperty(item)) {
const value = duplicate[item]
if (typeof value === 'function') {
duplicate[item] = promisify(value, throwError)
}
}
}
return duplicate
}
module.exports = promisify
module.exports.promisifyAll = promisifyAll
## Instruction:
:art: Enhance main module
- Make promisifyAll work bluebird style
- Return null instead of false in case of error when throwError is false
- Return true instead of undefined in case of success when throwError is false
- Make module exports babel styled
## Code After:
/* @flow */
function promisify(callback: Function, throwError: boolean = true): Function {
return function promisified(...parameters) {
let promise = new Promise((resolve, reject) => {
parameters.push(function(error, data) {
if (error) {
reject(error)
} else resolve(data)
})
callback.apply(this, parameters)
})
if (!throwError) {
promise = promise.then(function(result) {
return typeof result === 'undefined' ? true : result
}).catch(function() {
return false
})
}
return promise
}
}
function promisifyAll(object: Object, throwError: boolean = true): Object {
const duplicate = Object.assign({}, object)
for (const item in duplicate) {
if (
!{}.hasOwnProperty.call(duplicate, item) ||
typeof duplicate[item] !== 'function'
) {
continue
}
duplicate[`${item}Async`] = promisify(duplicate[item], throwError)
}
return duplicate
}
export default promisify
export { promisify, promisifyAll }
| - 'use strict'
-
/* @flow */
function promisify(callback: Function, throwError: boolean = true): Function {
- return function promisified(){
+ return function promisified(...parameters) {
? +++++++++++++ +
- const parameters = Array.from ? Array.from(arguments) : Array.prototype.slice.call(arguments)
- const parametersLength = parameters.length + 1
let promise = new Promise((resolve, reject) => {
parameters.push(function(error, data) {
if (error) {
reject(error)
} else resolve(data)
})
- if (parametersLength === 1) {
- callback.call(this, parameters[0])
- } else if (parametersLength === 2) {
- callback.call(this, parameters[0], parameters[1])
- } else if (parametersLength === 3) {
- callback.call(this, parameters[0], parameters[1], parameters[2])
- } else if (parametersLength === 4) {
- callback.call(this, parameters[0], parameters[1], parameters[2], parameters[3])
- } else {
- callback.apply(this, parameters)
? --
+ callback.apply(this, parameters)
- }
})
if (!throwError) {
- promise = promise.catch(function() {
? -- -
+ promise = promise.then(function(result) {
? ++ ++++++
+ return typeof result === 'undefined' ? true : result
+ }).catch(function() {
- return null
? ^^ ^
+ return false
? ^^ ^^
})
}
return promise
}
}
function promisifyAll(object: Object, throwError: boolean = true): Object {
const duplicate = Object.assign({}, object)
for (const item in duplicate) {
- if (duplicate.hasOwnProperty(item)) {
- const value = duplicate[item]
- if (typeof value === 'function') {
- duplicate[item] = promisify(value, throwError)
- }
+ if (
+ !{}.hasOwnProperty.call(duplicate, item) ||
+ typeof duplicate[item] !== 'function'
+ ) {
+ continue
}
+ duplicate[`${item}Async`] = promisify(duplicate[item], throwError)
}
return duplicate
}
- module.exports = promisify
- module.exports.promisifyAll = promisifyAll
+ export default promisify
+ export { promisify, promisifyAll } | 39 | 0.78 | 14 | 25 |
e8a4d5fcb1d5fc6dd0f02d69f0dcfb4603f42316 | lib/octonore/template.rb | lib/octonore/template.rb | module Octonore
# A gitignore template. Templates consist of a name and source.
class Template
attr_accessor :name, :source
include HTTParty
USER_AGENT = "octocore/#{VERSION}"
base_uri 'https://api.github.com/gitignore'
# Create a new template.
#
# Example:
# c_template = Octonore::Template.new('C')
# java_template = Octonore::Template.new('Java')
#
# Arguments:
# name: (String)
def initialize(name)
self.name = name
update
end
# Update the Gitignore source from Github.
def update
data = get_data
if valid_template_hash? data
@source = data["source"]
else
raise GitignoreTemplateNotFoundError,
"Template '#{@name}' does not exist!"
end
end
private
def get_data
self.class.get "/templates/#{self.name}", headers: headers
end
def valid_template_hash?(template_hash)
template_hash["message"] != "Not Found"
end
def headers
{"User-Agent" => USER_AGENT}
end
end
class GitignoreTemplateNotFoundError < StandardError
end
end
| module Octonore
# A gitignore template. Templates have two attributes: a
# name and a source.
class Template
attr_accessor :name, :source
include HTTParty
USER_AGENT = "octocore/#{VERSION}"
base_uri 'https://api.github.com/gitignore'
# Create a new template.
#
# Example:
# c_template = Octonore::Template.new('C')
# java_template = Octonore::Template.new('Java')
#
# @param name [String] name of template to create,
# case sensitive
def initialize(name)
self.name = name
update
end
# Update the Gitignore source from Github.
#
# Example:
# >> outdated_template.source = nil
# => nil
# >> outdated_template.update
# => "# Object files\n*.o\n\n# Libraries\n*.lib..."
# >> outdated_template.source
# => "# Object files\n*.o\n\n# Libraries\n*.lib..."
def update
data = get_template_hash @name
if valid_template_hash? data
@source = data["source"]
else
raise GitignoreTemplateNotFoundError,
"Template '#{@name}' does not exist!"
end
end
private
# Get the specified template's hash from Github.
# @param name [String] name of template to get
# @return [Hash] hash containing template info
def get_template_hash(name)
self.class.get "/templates/#{name}", headers: headers
end
def valid_template_hash?(template_hash)
template_hash["message"] != "Not Found"
end
def headers
{"User-Agent" => USER_AGENT}
end
end
class GitignoreTemplateNotFoundError < StandardError
end
end
| Add some much needed documentation. | Add some much needed documentation.
| Ruby | mit | zachlatta/octonore | ruby | ## Code Before:
module Octonore
# A gitignore template. Templates consist of a name and source.
class Template
attr_accessor :name, :source
include HTTParty
USER_AGENT = "octocore/#{VERSION}"
base_uri 'https://api.github.com/gitignore'
# Create a new template.
#
# Example:
# c_template = Octonore::Template.new('C')
# java_template = Octonore::Template.new('Java')
#
# Arguments:
# name: (String)
def initialize(name)
self.name = name
update
end
# Update the Gitignore source from Github.
def update
data = get_data
if valid_template_hash? data
@source = data["source"]
else
raise GitignoreTemplateNotFoundError,
"Template '#{@name}' does not exist!"
end
end
private
def get_data
self.class.get "/templates/#{self.name}", headers: headers
end
def valid_template_hash?(template_hash)
template_hash["message"] != "Not Found"
end
def headers
{"User-Agent" => USER_AGENT}
end
end
class GitignoreTemplateNotFoundError < StandardError
end
end
## Instruction:
Add some much needed documentation.
## Code After:
module Octonore
# A gitignore template. Templates have two attributes: a
# name and a source.
class Template
attr_accessor :name, :source
include HTTParty
USER_AGENT = "octocore/#{VERSION}"
base_uri 'https://api.github.com/gitignore'
# Create a new template.
#
# Example:
# c_template = Octonore::Template.new('C')
# java_template = Octonore::Template.new('Java')
#
# @param name [String] name of template to create,
# case sensitive
def initialize(name)
self.name = name
update
end
# Update the Gitignore source from Github.
#
# Example:
# >> outdated_template.source = nil
# => nil
# >> outdated_template.update
# => "# Object files\n*.o\n\n# Libraries\n*.lib..."
# >> outdated_template.source
# => "# Object files\n*.o\n\n# Libraries\n*.lib..."
def update
data = get_template_hash @name
if valid_template_hash? data
@source = data["source"]
else
raise GitignoreTemplateNotFoundError,
"Template '#{@name}' does not exist!"
end
end
private
# Get the specified template's hash from Github.
# @param name [String] name of template to get
# @return [Hash] hash containing template info
def get_template_hash(name)
self.class.get "/templates/#{name}", headers: headers
end
def valid_template_hash?(template_hash)
template_hash["message"] != "Not Found"
end
def headers
{"User-Agent" => USER_AGENT}
end
end
class GitignoreTemplateNotFoundError < StandardError
end
end
| module Octonore
- # A gitignore template. Templates consist of a name and source.
+ # A gitignore template. Templates have two attributes: a
+ # name and a source.
class Template
attr_accessor :name, :source
include HTTParty
USER_AGENT = "octocore/#{VERSION}"
base_uri 'https://api.github.com/gitignore'
# Create a new template.
#
# Example:
# c_template = Octonore::Template.new('C')
# java_template = Octonore::Template.new('Java')
#
+ # @param name [String] name of template to create,
+ # case sensitive
- # Arguments:
- # name: (String)
-
def initialize(name)
self.name = name
update
end
# Update the Gitignore source from Github.
-
+ #
+ # Example:
+ # >> outdated_template.source = nil
+ # => nil
+ # >> outdated_template.update
+ # => "# Object files\n*.o\n\n# Libraries\n*.lib..."
+ # >> outdated_template.source
+ # => "# Object files\n*.o\n\n# Libraries\n*.lib..."
def update
- data = get_data
+ data = get_template_hash @name
if valid_template_hash? data
@source = data["source"]
else
raise GitignoreTemplateNotFoundError,
"Template '#{@name}' does not exist!"
end
end
private
- def get_data
+ # Get the specified template's hash from Github.
+ # @param name [String] name of template to get
+ # @return [Hash] hash containing template info
+ def get_template_hash(name)
- self.class.get "/templates/#{self.name}", headers: headers
? -----
+ self.class.get "/templates/#{name}", headers: headers
end
def valid_template_hash?(template_hash)
template_hash["message"] != "Not Found"
end
def headers
{"User-Agent" => USER_AGENT}
end
end
class GitignoreTemplateNotFoundError < StandardError
end
end | 26 | 0.42623 | 18 | 8 |
d3453c2ffd749519ba893e7e35a4c1138d3b4caf | meta-xilinx-bsp/recipes-devtools/qemu/files/0001-Add-enable-disable-udev.patch | meta-xilinx-bsp/recipes-devtools/qemu/files/0001-Add-enable-disable-udev.patch | From a471cf4e4c73350e090eb2cd87ec959d138012e5 Mon Sep 17 00:00:00 2001
From: Jeremy Puhlman <jpuhlman@mvista.com>
Date: Thu, 19 Mar 2020 11:54:26 -0700
Subject: [PATCH] Add enable/disable libudev
Upstream-Status: Pending
Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com>
---
configure | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/configure b/configure
index cac271c..bd116eb 100755
--- a/configure
+++ b/configure
@@ -1539,6 +1539,10 @@ for opt do
;;
--disable-plugins) plugins="no"
;;
+ --enable-libudev) libudev="yes"
+ ;;
+ --disable-libudev) libudev="no"
+ ;;
*)
echo "ERROR: unknown option $opt"
echo "Try '$0 --help' for more information"
--
1.8.3.1
| From 96f204df74f7dde5f4c9ad6e6eefc2d46219ccd9 Mon Sep 17 00:00:00 2001
From: Jeremy Puhlman <jpuhlman@mvista.com>
Date: Thu, 19 Mar 2020 11:54:26 -0700
Subject: [PATCH] Add enable/disable libudev
Upstream-Status: Pending
Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com>
%% original patch: 0001-Add-enable-disable-udev.patch
---
configure | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/configure b/configure
index c9a4e73..75f9773 100755
--- a/configure
+++ b/configure
@@ -1606,6 +1606,10 @@ for opt do
;;
--gdb=*) gdb_bin="$optarg"
;;
+ --enable-libudev) libudev="yes"
+ ;;
+ --disable-libudev) libudev="no"
+ ;;
*)
echo "ERROR: unknown option $opt"
echo "Try '$0 --help' for more information"
--
2.7.4
| Fix patch puzz warning during do_patch | qemu-xilinx: Fix patch puzz warning during do_patch
Rework 0001-Add-enable-disable-udev.patch to fix patch fuzz warnings
Signed-off-by: Sai Hari Chandana Kalluri <dcd6f85a7bffd89d026445db0f5113d6d436d06a@xilinx.com>
| Diff | mit | Xilinx/meta-xilinx,Xilinx/meta-xilinx,Xilinx/meta-xilinx,Xilinx/meta-xilinx,Xilinx/meta-xilinx,Xilinx/meta-xilinx | diff | ## Code Before:
From a471cf4e4c73350e090eb2cd87ec959d138012e5 Mon Sep 17 00:00:00 2001
From: Jeremy Puhlman <jpuhlman@mvista.com>
Date: Thu, 19 Mar 2020 11:54:26 -0700
Subject: [PATCH] Add enable/disable libudev
Upstream-Status: Pending
Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com>
---
configure | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/configure b/configure
index cac271c..bd116eb 100755
--- a/configure
+++ b/configure
@@ -1539,6 +1539,10 @@ for opt do
;;
--disable-plugins) plugins="no"
;;
+ --enable-libudev) libudev="yes"
+ ;;
+ --disable-libudev) libudev="no"
+ ;;
*)
echo "ERROR: unknown option $opt"
echo "Try '$0 --help' for more information"
--
1.8.3.1
## Instruction:
qemu-xilinx: Fix patch puzz warning during do_patch
Rework 0001-Add-enable-disable-udev.patch to fix patch fuzz warnings
Signed-off-by: Sai Hari Chandana Kalluri <dcd6f85a7bffd89d026445db0f5113d6d436d06a@xilinx.com>
## Code After:
From 96f204df74f7dde5f4c9ad6e6eefc2d46219ccd9 Mon Sep 17 00:00:00 2001
From: Jeremy Puhlman <jpuhlman@mvista.com>
Date: Thu, 19 Mar 2020 11:54:26 -0700
Subject: [PATCH] Add enable/disable libudev
Upstream-Status: Pending
Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com>
%% original patch: 0001-Add-enable-disable-udev.patch
---
configure | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/configure b/configure
index c9a4e73..75f9773 100755
--- a/configure
+++ b/configure
@@ -1606,6 +1606,10 @@ for opt do
;;
--gdb=*) gdb_bin="$optarg"
;;
+ --enable-libudev) libudev="yes"
+ ;;
+ --disable-libudev) libudev="no"
+ ;;
*)
echo "ERROR: unknown option $opt"
echo "Try '$0 --help' for more information"
--
2.7.4
| - From a471cf4e4c73350e090eb2cd87ec959d138012e5 Mon Sep 17 00:00:00 2001
+ From 96f204df74f7dde5f4c9ad6e6eefc2d46219ccd9 Mon Sep 17 00:00:00 2001
From: Jeremy Puhlman <jpuhlman@mvista.com>
Date: Thu, 19 Mar 2020 11:54:26 -0700
Subject: [PATCH] Add enable/disable libudev
Upstream-Status: Pending
Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com>
+
+ %% original patch: 0001-Add-enable-disable-udev.patch
---
configure | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/configure b/configure
- index cac271c..bd116eb 100755
+ index c9a4e73..75f9773 100755
--- a/configure
+++ b/configure
- @@ -1539,6 +1539,10 @@ for opt do
? ^^^ ^^^
+ @@ -1606,6 +1606,10 @@ for opt do
? ^^^ ^^^
;;
- --disable-plugins) plugins="no"
+ --gdb=*) gdb_bin="$optarg"
;;
+ --enable-libudev) libudev="yes"
+ ;;
+ --disable-libudev) libudev="no"
+ ;;
*)
echo "ERROR: unknown option $opt"
echo "Try '$0 --help' for more information"
--
- 1.8.3.1
+ 2.7.4
| 12 | 0.413793 | 7 | 5 |
c5f8fac43da0257f05a7d5ffb034a34f74feaf3c | app/Http/Controllers/HelpAndPrivacyController.php | app/Http/Controllers/HelpAndPrivacyController.php | <?php
namespace ChopBox\Http\Controllers;
use Illuminate\Http\Request;
use ChopBox\Http\Requests;
use ChopBox\Http\Controllers\Controller;
class HelpAndPrivacyController extends Controller
{
/**
* Display a listing of the resource.
*
* @return Response
*/
public function help()
{
return view('pages.help');
}
/**
* Display a listing of the resource.
*
* @return Response
*/
public function privacy()
{
return view('pages.privacy');
}
}
| <?php
namespace ChopBox\Http\Controllers;
use ChopBox\Http\Requests;
use Illuminate\Http\Request;
use ChopBox\Http\Controllers\Controller;
class HelpAndPrivacyController extends Controller
{
/**
* Display a listing of the resource.
*
* @return Response
*/
public function help()
{
return view('pages.help');
}
/**
* Display a listing of the resource.
*
* @return Response
*/
public function privacy()
{
return view('pages.privacy');
}
}
| Arrange imports from shortest to longest | [Chopbox] Arrange imports from shortest to longest
| PHP | mit | andela/chopbox,andela/chopbox | php | ## Code Before:
<?php
namespace ChopBox\Http\Controllers;
use Illuminate\Http\Request;
use ChopBox\Http\Requests;
use ChopBox\Http\Controllers\Controller;
class HelpAndPrivacyController extends Controller
{
/**
* Display a listing of the resource.
*
* @return Response
*/
public function help()
{
return view('pages.help');
}
/**
* Display a listing of the resource.
*
* @return Response
*/
public function privacy()
{
return view('pages.privacy');
}
}
## Instruction:
[Chopbox] Arrange imports from shortest to longest
## Code After:
<?php
namespace ChopBox\Http\Controllers;
use ChopBox\Http\Requests;
use Illuminate\Http\Request;
use ChopBox\Http\Controllers\Controller;
class HelpAndPrivacyController extends Controller
{
/**
* Display a listing of the resource.
*
* @return Response
*/
public function help()
{
return view('pages.help');
}
/**
* Display a listing of the resource.
*
* @return Response
*/
public function privacy()
{
return view('pages.privacy');
}
}
| <?php
namespace ChopBox\Http\Controllers;
- use Illuminate\Http\Request;
use ChopBox\Http\Requests;
+ use Illuminate\Http\Request;
use ChopBox\Http\Controllers\Controller;
class HelpAndPrivacyController extends Controller
{
/**
* Display a listing of the resource.
*
* @return Response
*/
public function help()
{
return view('pages.help');
}
/**
* Display a listing of the resource.
*
* @return Response
*/
public function privacy()
{
return view('pages.privacy');
}
} | 2 | 0.064516 | 1 | 1 |
cd78a890ac08076be69d8bf04fbfb1177f57192d | examples/browser/chat.js | examples/browser/chat.js | 'use strict';
/* global XMPP */
var client = new XMPP.Client({
websocketsURL: "ws://localhost:5280/xmpp-websocket/",
jid: 'lloyd@evilprofessor.co.uk',
password: 'password'
})
client.addListener(
'online',
function() {
console.log('online')
['astro@spaceboyz.net'].forEach(
function(to) {
var stanza = new XMPP.Element('message', { to: to, type: 'chat'})
.c('body')
.t('Hello from browser')
client.send(stanza)
}
)
}
)
client.addListener(
'error',
function(e) {
console.error(e)
}
)
| 'use strict';
/* global XMPP */
/* Note these are connection details for a local dev server :) */
var client = new XMPP.Client({
websocketsURL: "ws://localhost:5280/xmpp-websocket/",
jid: 'lloyd@evilprofessor.co.uk',
password: 'password'
})
client.addListener(
'online',
function() {
console.log('online')
['astro@spaceboyz.net'].forEach(
function(to) {
var stanza = new XMPP.Element('message', { to: to, type: 'chat'})
.c('body')
.t('Hello from browser')
client.send(stanza)
}
)
}
)
client.addListener(
'error',
function(e) {
console.error(e)
}
)
| Add note about the account | Add note about the account
| JavaScript | isc | node-xmpp/node-xmpp,xmppjs/xmpp.js,capablemonkey/node-xmpp-client,capablemonkey/node-xmpp-client,ggozad/node-xmpp,xmppjs/xmpp.js,node-xmpp/node-xmpp,ggozad/node-xmpp,mweibel/node-xmpp-client | javascript | ## Code Before:
'use strict';
/* global XMPP */
var client = new XMPP.Client({
websocketsURL: "ws://localhost:5280/xmpp-websocket/",
jid: 'lloyd@evilprofessor.co.uk',
password: 'password'
})
client.addListener(
'online',
function() {
console.log('online')
['astro@spaceboyz.net'].forEach(
function(to) {
var stanza = new XMPP.Element('message', { to: to, type: 'chat'})
.c('body')
.t('Hello from browser')
client.send(stanza)
}
)
}
)
client.addListener(
'error',
function(e) {
console.error(e)
}
)
## Instruction:
Add note about the account
## Code After:
'use strict';
/* global XMPP */
/* Note these are connection details for a local dev server :) */
var client = new XMPP.Client({
websocketsURL: "ws://localhost:5280/xmpp-websocket/",
jid: 'lloyd@evilprofessor.co.uk',
password: 'password'
})
client.addListener(
'online',
function() {
console.log('online')
['astro@spaceboyz.net'].forEach(
function(to) {
var stanza = new XMPP.Element('message', { to: to, type: 'chat'})
.c('body')
.t('Hello from browser')
client.send(stanza)
}
)
}
)
client.addListener(
'error',
function(e) {
console.error(e)
}
)
| 'use strict';
/* global XMPP */
+ /* Note these are connection details for a local dev server :) */
var client = new XMPP.Client({
websocketsURL: "ws://localhost:5280/xmpp-websocket/",
jid: 'lloyd@evilprofessor.co.uk',
password: 'password'
})
client.addListener(
'online',
function() {
console.log('online')
['astro@spaceboyz.net'].forEach(
function(to) {
var stanza = new XMPP.Element('message', { to: to, type: 'chat'})
.c('body')
.t('Hello from browser')
client.send(stanza)
}
)
}
)
client.addListener(
'error',
function(e) {
console.error(e)
}
) | 1 | 0.033333 | 1 | 0 |
2c615a9106a056446f6332ce920e9592487ea50a | app/javascript/app/components/my-climate-watch/viz-creator/components/charts/tooltip/tooltip-component.jsx | app/javascript/app/components/my-climate-watch/viz-creator/components/charts/tooltip/tooltip-component.jsx | import React from 'react';
import PropTypes from 'prop-types';
import cx from 'classnames';
import { themr } from 'react-css-themr';
import theme from 'styles/themes/chart-tooltip/chart-tooltip.scss';
const Tooltip = ({ label, tooltip }) => (
<div className={theme.tooltip}>
<div className={theme.tooltipHeader}>
<span className={cx(theme.labelName, theme.labelNameBold)}>{label}</span>
<span className={theme.unit}>{tooltip[0].unit}</span>
</div>
{tooltip.map(l => (
<div className={theme.label} key={l.label}>
<div className={theme.legend}>
<span
className={theme.labelDot}
style={{ backgroundColor: l.color }}
/>
<p className={theme.labelName}>{l.label}</p>
</div>
<p className={theme.labelValue}>{l.value}</p>
</div>
))}
</div>
);
Tooltip.propTypes = {
label: PropTypes.any,
tooltip: PropTypes.array
};
export default themr('Tooltip', theme)(Tooltip);
| import React from 'react';
import PropTypes from 'prop-types';
import cx from 'classnames';
import { themr } from 'react-css-themr';
import theme from 'styles/themes/chart-tooltip/chart-tooltip.scss';
const Tooltip = ({ label, tooltip, payload }) => (
<div className={theme.tooltip}>
<div className={theme.tooltipHeader}>
<span className={cx(theme.labelName, theme.labelNameBold)}>{label}</span>
<span className={theme.unit}>{tooltip[0].unit}</span>
</div>
{tooltip.map((l, i) => (
<div className={theme.label} key={l.label}>
<div className={theme.legend}>
<span
className={theme.labelDot}
style={{ backgroundColor: l.color }}
/>
<p className={theme.labelName}>{l.label}</p>
</div>
{l.value ? <p className={theme.labelValue}>{l.value}</p> : null}
{!l.value &&
payload.length &&
payload.length > 1 && (
<p className={theme.labelValue}>{payload[i].value}</p>
)}
{!l.value &&
payload.length &&
payload.length === 1 && (
<p className={theme.labelValue}>{payload[0].value}</p>
)}
</div>
))}
</div>
);
Tooltip.propTypes = {
label: PropTypes.any,
tooltip: PropTypes.array,
payload: PropTypes.array
};
export default themr('Tooltip', theme)(Tooltip);
| Add payload to render values | Add payload to render values
| JSX | mit | Vizzuality/climate-watch,Vizzuality/climate-watch,Vizzuality/climate-watch,Vizzuality/climate-watch | jsx | ## Code Before:
import React from 'react';
import PropTypes from 'prop-types';
import cx from 'classnames';
import { themr } from 'react-css-themr';
import theme from 'styles/themes/chart-tooltip/chart-tooltip.scss';
const Tooltip = ({ label, tooltip }) => (
<div className={theme.tooltip}>
<div className={theme.tooltipHeader}>
<span className={cx(theme.labelName, theme.labelNameBold)}>{label}</span>
<span className={theme.unit}>{tooltip[0].unit}</span>
</div>
{tooltip.map(l => (
<div className={theme.label} key={l.label}>
<div className={theme.legend}>
<span
className={theme.labelDot}
style={{ backgroundColor: l.color }}
/>
<p className={theme.labelName}>{l.label}</p>
</div>
<p className={theme.labelValue}>{l.value}</p>
</div>
))}
</div>
);
Tooltip.propTypes = {
label: PropTypes.any,
tooltip: PropTypes.array
};
export default themr('Tooltip', theme)(Tooltip);
## Instruction:
Add payload to render values
## Code After:
import React from 'react';
import PropTypes from 'prop-types';
import cx from 'classnames';
import { themr } from 'react-css-themr';
import theme from 'styles/themes/chart-tooltip/chart-tooltip.scss';
const Tooltip = ({ label, tooltip, payload }) => (
<div className={theme.tooltip}>
<div className={theme.tooltipHeader}>
<span className={cx(theme.labelName, theme.labelNameBold)}>{label}</span>
<span className={theme.unit}>{tooltip[0].unit}</span>
</div>
{tooltip.map((l, i) => (
<div className={theme.label} key={l.label}>
<div className={theme.legend}>
<span
className={theme.labelDot}
style={{ backgroundColor: l.color }}
/>
<p className={theme.labelName}>{l.label}</p>
</div>
{l.value ? <p className={theme.labelValue}>{l.value}</p> : null}
{!l.value &&
payload.length &&
payload.length > 1 && (
<p className={theme.labelValue}>{payload[i].value}</p>
)}
{!l.value &&
payload.length &&
payload.length === 1 && (
<p className={theme.labelValue}>{payload[0].value}</p>
)}
</div>
))}
</div>
);
Tooltip.propTypes = {
label: PropTypes.any,
tooltip: PropTypes.array,
payload: PropTypes.array
};
export default themr('Tooltip', theme)(Tooltip);
| import React from 'react';
import PropTypes from 'prop-types';
import cx from 'classnames';
import { themr } from 'react-css-themr';
import theme from 'styles/themes/chart-tooltip/chart-tooltip.scss';
- const Tooltip = ({ label, tooltip }) => (
+ const Tooltip = ({ label, tooltip, payload }) => (
? +++++++++
<div className={theme.tooltip}>
<div className={theme.tooltipHeader}>
<span className={cx(theme.labelName, theme.labelNameBold)}>{label}</span>
<span className={theme.unit}>{tooltip[0].unit}</span>
</div>
- {tooltip.map(l => (
+ {tooltip.map((l, i) => (
? + ++++
<div className={theme.label} key={l.label}>
<div className={theme.legend}>
<span
className={theme.labelDot}
style={{ backgroundColor: l.color }}
/>
<p className={theme.labelName}>{l.label}</p>
</div>
+ {l.value ? <p className={theme.labelValue}>{l.value}</p> : null}
+ {!l.value &&
+ payload.length &&
+ payload.length > 1 && (
- <p className={theme.labelValue}>{l.value}</p>
+ <p className={theme.labelValue}>{payload[i].value}</p>
? ++++ +++ ++++++
+ )}
+ {!l.value &&
+ payload.length &&
+ payload.length === 1 && (
+ <p className={theme.labelValue}>{payload[0].value}</p>
+ )}
</div>
))}
</div>
);
Tooltip.propTypes = {
label: PropTypes.any,
- tooltip: PropTypes.array
+ tooltip: PropTypes.array,
? +
+ payload: PropTypes.array
};
export default themr('Tooltip', theme)(Tooltip); | 19 | 0.558824 | 15 | 4 |
0cd8fa7d42a2fba66bbf61bf322a3d4ec90e4bec | zshrc/main.zsh | zshrc/main.zsh | ZSHRC="$HOME/.dotfiles/zshrc";
source $ZSHRC/oh-my-zsh.zsh
source $ZSHRC/prompt.zsh
source ~/.dotfiles/vendor/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
# set aliases after imports, to ensure they arent overridden
alias cr='cd $(git root)'
alias less='less -S' # enable horizontal scrolling in less
alias s='ssh'
alias subs='filebot -get-subtitles'
alias ta='tmux a'
alias c='z'
alias d='docker'
alias ls='ls --color'
# OS specific code
[ `uname` '==' "Linux" ] && source "$ZSHRC/linux.zsh";
[ `uname` '==' "Darwin" ] && source "$ZSHRC/mac.zsh";
# repo independent settings
[ -f "$HOME/.environment" ] && source "$HOME/.environment";
# set ls colors
eval `dircolors $HOME/.dotfiles/conf/dircolors`
# ignore underscore-prefixed completions
# see http://unix.stackexchange.com/a/116205/66370
zstyle ':completion:*:*:-command-:*:*' ignored-patterns '_*'
export EDITOR=vim
# set virtualenvwrapper working directory
export WORKON_HOME=$HOME/.virtualenvs
# enable ZMV
autoload zmv
alias zmz='noglob zmv'
alias zcp='noglob zmv -C'
| ZSHRC="$HOME/.dotfiles/zshrc";
source $ZSHRC/oh-my-zsh.zsh
source $ZSHRC/prompt.zsh
source ~/.dotfiles/vendor/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
# set aliases after imports, to ensure they arent overridden
alias cr='cd $(git root)'
alias less='less -S' # enable horizontal scrolling in less
alias s='ssh'
alias subs='filebot -get-subtitles'
alias ta='tmux a'
alias c='z'
alias d='docker'
alias ls='ls --color'
# load custom functions
fpath=( $ZSHRC/functions "${fpath[@]}" )
autoload -Uz ckd
# OS specific code
[ `uname` '==' "Linux" ] && source "$ZSHRC/linux.zsh";
[ `uname` '==' "Darwin" ] && source "$ZSHRC/mac.zsh";
# repo independent settings
[ -f "$HOME/.environment" ] && source "$HOME/.environment";
# set ls colors
eval `dircolors $HOME/.dotfiles/conf/dircolors`
# ignore underscore-prefixed completions
# see http://unix.stackexchange.com/a/116205/66370
zstyle ':completion:*:*:-command-:*:*' ignored-patterns '_*'
export EDITOR=vim
# set virtualenvwrapper working directory
export WORKON_HOME=$HOME/.virtualenvs
# enable ZMV
autoload zmv
alias zmz='noglob zmv'
alias zcp='noglob zmv -C'
| Add directory for custom zsh functions | Add directory for custom zsh functions
| Shell | mit | monsendag/dotfiles,monsendag/dotfiles,monsendag/dotfiles,monsendag/dotfiles,monsendag/dotfiles,monsendag/dotfiles | shell | ## Code Before:
ZSHRC="$HOME/.dotfiles/zshrc";
source $ZSHRC/oh-my-zsh.zsh
source $ZSHRC/prompt.zsh
source ~/.dotfiles/vendor/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
# set aliases after imports, to ensure they arent overridden
alias cr='cd $(git root)'
alias less='less -S' # enable horizontal scrolling in less
alias s='ssh'
alias subs='filebot -get-subtitles'
alias ta='tmux a'
alias c='z'
alias d='docker'
alias ls='ls --color'
# OS specific code
[ `uname` '==' "Linux" ] && source "$ZSHRC/linux.zsh";
[ `uname` '==' "Darwin" ] && source "$ZSHRC/mac.zsh";
# repo independent settings
[ -f "$HOME/.environment" ] && source "$HOME/.environment";
# set ls colors
eval `dircolors $HOME/.dotfiles/conf/dircolors`
# ignore underscore-prefixed completions
# see http://unix.stackexchange.com/a/116205/66370
zstyle ':completion:*:*:-command-:*:*' ignored-patterns '_*'
export EDITOR=vim
# set virtualenvwrapper working directory
export WORKON_HOME=$HOME/.virtualenvs
# enable ZMV
autoload zmv
alias zmz='noglob zmv'
alias zcp='noglob zmv -C'
## Instruction:
Add directory for custom zsh functions
## Code After:
ZSHRC="$HOME/.dotfiles/zshrc";
source $ZSHRC/oh-my-zsh.zsh
source $ZSHRC/prompt.zsh
source ~/.dotfiles/vendor/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
# set aliases after imports, to ensure they arent overridden
alias cr='cd $(git root)'
alias less='less -S' # enable horizontal scrolling in less
alias s='ssh'
alias subs='filebot -get-subtitles'
alias ta='tmux a'
alias c='z'
alias d='docker'
alias ls='ls --color'
# load custom functions
fpath=( $ZSHRC/functions "${fpath[@]}" )
autoload -Uz ckd
# OS specific code
[ `uname` '==' "Linux" ] && source "$ZSHRC/linux.zsh";
[ `uname` '==' "Darwin" ] && source "$ZSHRC/mac.zsh";
# repo independent settings
[ -f "$HOME/.environment" ] && source "$HOME/.environment";
# set ls colors
eval `dircolors $HOME/.dotfiles/conf/dircolors`
# ignore underscore-prefixed completions
# see http://unix.stackexchange.com/a/116205/66370
zstyle ':completion:*:*:-command-:*:*' ignored-patterns '_*'
export EDITOR=vim
# set virtualenvwrapper working directory
export WORKON_HOME=$HOME/.virtualenvs
# enable ZMV
autoload zmv
alias zmz='noglob zmv'
alias zcp='noglob zmv -C'
| ZSHRC="$HOME/.dotfiles/zshrc";
source $ZSHRC/oh-my-zsh.zsh
source $ZSHRC/prompt.zsh
source ~/.dotfiles/vendor/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
# set aliases after imports, to ensure they arent overridden
alias cr='cd $(git root)'
alias less='less -S' # enable horizontal scrolling in less
alias s='ssh'
alias subs='filebot -get-subtitles'
alias ta='tmux a'
alias c='z'
alias d='docker'
alias ls='ls --color'
+ # load custom functions
+ fpath=( $ZSHRC/functions "${fpath[@]}" )
+ autoload -Uz ckd
# OS specific code
[ `uname` '==' "Linux" ] && source "$ZSHRC/linux.zsh";
[ `uname` '==' "Darwin" ] && source "$ZSHRC/mac.zsh";
# repo independent settings
[ -f "$HOME/.environment" ] && source "$HOME/.environment";
# set ls colors
eval `dircolors $HOME/.dotfiles/conf/dircolors`
# ignore underscore-prefixed completions
# see http://unix.stackexchange.com/a/116205/66370
zstyle ':completion:*:*:-command-:*:*' ignored-patterns '_*'
export EDITOR=vim
# set virtualenvwrapper working directory
export WORKON_HOME=$HOME/.virtualenvs
# enable ZMV
autoload zmv
alias zmz='noglob zmv'
alias zcp='noglob zmv -C' | 3 | 0.076923 | 3 | 0 |
6bc57e84865484e5298ac27965ba61d5ff26e5d1 | meals/templates/meals/meal_detail.html | meals/templates/meals/meal_detail.html | {% extends 'foodlust/base.html' %}
{% block body %}
<div class="container">
<div class="meal-rectangle-detail">
<h1 class="meal-title-detail text-xs-center p-a-2">{{ object.title }}</h1>
<div class="view hm-zoom">
<img class="meal-img-detail" src="{{ object.photo.url }}">
</div>
<div class="container">
<p>Member: {{ object.member.username }}</p>
<p>Upload date: {{ object.date_created|date:'d M Y' }}</p>
{% if meal.percent >= 0 %}
<p>Rating: {{ meal.percent }}%</p>
{% else %}
<p>Not yet rated</p>
{% endif %}</p>
</div>
<div class="container">
<a href="{{ object.pk }}/liked/">Like <i class="fa fa-lg fa-thumbs-o-up pull-xs-left"></i></a><a class="pull-xs-right" href="{{ object.pk }}/disliked">Dislike <i class="fa fa-lg fa-thumbs-o-down"></i></a></p>
</div>
<hr>
<p>Comments:</p>
{% for comment in comments %}
<p><strong>{{ comment.user.username }}</strong> says: {{ comment.message }}</p>
{% endfor %}
</div>
</div>
{% endblock %}
| {% extends 'foodlust/base.html' %}
{% block body %}
<div class="container">
<div class="meal-rectangle-detail">
<h1 class="meal-title-detail text-xs-center p-a-2">{{ object.title }}</h1>
<div class="view hm-zoom">
<img class="meal-img-detail" src="{{ object.photo.url }}">
</div>
<div class="container">
<p>Member: {{ object.member.username }}</p>
<p>Upload date: {{ object.date_created|date:'d M Y' }}</p>
{% if meal.percent >= 0 %}
<p>Rating: {{ meal.percent }}%</p>
{% else %}
<p>Not yet rated</p>
{% endif %}</p>
</div>
<div class="container">
<a href="{{ object.pk }}/liked/">Like <i class="fa fa-lg fa-thumbs-o-up pull-xs-left"></i></a><a class="pull-xs-right" href="{{ object.pk }}/disliked">Dislike <i class="fa fa-lg fa-thumbs-o-down"></i></a></p>
</div>
<hr>
<p>Comments:</p>
{% for comment in comments %}
<p><strong>{{ comment.user.username }}</strong> says: {{ comment.message }}</p>
{% endfor %}
<form action ='' method="POST">{% csrf_token %}
{{ form.as_p }}
<input class="btn btn-default" type="submit" value="Add Comment">
</form>
</div>
</div>
{% endblock %}
| Add a class to the button. | Add a class to the button.
| HTML | mit | FoodLust/FL,FoodLust/FL,FoodLust/FL | html | ## Code Before:
{% extends 'foodlust/base.html' %}
{% block body %}
<div class="container">
<div class="meal-rectangle-detail">
<h1 class="meal-title-detail text-xs-center p-a-2">{{ object.title }}</h1>
<div class="view hm-zoom">
<img class="meal-img-detail" src="{{ object.photo.url }}">
</div>
<div class="container">
<p>Member: {{ object.member.username }}</p>
<p>Upload date: {{ object.date_created|date:'d M Y' }}</p>
{% if meal.percent >= 0 %}
<p>Rating: {{ meal.percent }}%</p>
{% else %}
<p>Not yet rated</p>
{% endif %}</p>
</div>
<div class="container">
<a href="{{ object.pk }}/liked/">Like <i class="fa fa-lg fa-thumbs-o-up pull-xs-left"></i></a><a class="pull-xs-right" href="{{ object.pk }}/disliked">Dislike <i class="fa fa-lg fa-thumbs-o-down"></i></a></p>
</div>
<hr>
<p>Comments:</p>
{% for comment in comments %}
<p><strong>{{ comment.user.username }}</strong> says: {{ comment.message }}</p>
{% endfor %}
</div>
</div>
{% endblock %}
## Instruction:
Add a class to the button.
## Code After:
{% extends 'foodlust/base.html' %}
{% block body %}
<div class="container">
<div class="meal-rectangle-detail">
<h1 class="meal-title-detail text-xs-center p-a-2">{{ object.title }}</h1>
<div class="view hm-zoom">
<img class="meal-img-detail" src="{{ object.photo.url }}">
</div>
<div class="container">
<p>Member: {{ object.member.username }}</p>
<p>Upload date: {{ object.date_created|date:'d M Y' }}</p>
{% if meal.percent >= 0 %}
<p>Rating: {{ meal.percent }}%</p>
{% else %}
<p>Not yet rated</p>
{% endif %}</p>
</div>
<div class="container">
<a href="{{ object.pk }}/liked/">Like <i class="fa fa-lg fa-thumbs-o-up pull-xs-left"></i></a><a class="pull-xs-right" href="{{ object.pk }}/disliked">Dislike <i class="fa fa-lg fa-thumbs-o-down"></i></a></p>
</div>
<hr>
<p>Comments:</p>
{% for comment in comments %}
<p><strong>{{ comment.user.username }}</strong> says: {{ comment.message }}</p>
{% endfor %}
<form action ='' method="POST">{% csrf_token %}
{{ form.as_p }}
<input class="btn btn-default" type="submit" value="Add Comment">
</form>
</div>
</div>
{% endblock %}
| {% extends 'foodlust/base.html' %}
{% block body %}
<div class="container">
<div class="meal-rectangle-detail">
<h1 class="meal-title-detail text-xs-center p-a-2">{{ object.title }}</h1>
<div class="view hm-zoom">
<img class="meal-img-detail" src="{{ object.photo.url }}">
</div>
<div class="container">
<p>Member: {{ object.member.username }}</p>
<p>Upload date: {{ object.date_created|date:'d M Y' }}</p>
{% if meal.percent >= 0 %}
<p>Rating: {{ meal.percent }}%</p>
{% else %}
<p>Not yet rated</p>
{% endif %}</p>
</div>
<div class="container">
<a href="{{ object.pk }}/liked/">Like <i class="fa fa-lg fa-thumbs-o-up pull-xs-left"></i></a><a class="pull-xs-right" href="{{ object.pk }}/disliked">Dislike <i class="fa fa-lg fa-thumbs-o-down"></i></a></p>
</div>
<hr>
<p>Comments:</p>
{% for comment in comments %}
<p><strong>{{ comment.user.username }}</strong> says: {{ comment.message }}</p>
{% endfor %}
+ <form action ='' method="POST">{% csrf_token %}
+ {{ form.as_p }}
+ <input class="btn btn-default" type="submit" value="Add Comment">
+ </form>
</div>
</div>
{% endblock %} | 4 | 0.133333 | 4 | 0 |
985cee003e775b930d84988a6345103eb3ebe980 | src/integTest/largeAppAndLib/app/src/androidTest/scala/jp/leafytree/android/libproject/app/Lib1ScalaActivityTest.scala | src/integTest/largeAppAndLib/app/src/androidTest/scala/jp/leafytree/android/libproject/app/Lib1ScalaActivityTest.scala | package jp.leafytree.android.libproject.app
import android.test.ActivityInstrumentationTestCase2
import android.widget.TextView
import jp.leafytree.android.libproject.R
import junit.framework.Assert
import jp.leafytree.android.libproject.lib1.{Lib1Java, Lib1ScalaActivity}
import scala.collection.concurrent.TrieMap
class Lib1ScalaActivityTest extends ActivityInstrumentationTestCase2[Lib1ScalaActivity](classOf[Lib1ScalaActivity]) {
def test1() {
Assert.assertTrue(true)
}
def test2() {
Assert.assertEquals("Lib1Java", getActivity.findViewById(R.id.scala_text_view).asInstanceOf[TextView].getText)
}
def test3() {
val map = TrieMap[String, String]()
map.put("1", "Lib1Java")
map.put("2", new Lib1Java().getName)
Assert.assertEquals(map("1"), map("2"))
}
}
| package jp.leafytree.android.libproject.app
import android.test.ActivityInstrumentationTestCase2
import android.widget.TextView
import jp.leafytree.android.libproject.R
import junit.framework.Assert
import jp.leafytree.android.libproject.lib1.{Lib1Java, Lib1ScalaActivity}
import scala.collection.concurrent.TrieMap
import scalaz._
import Scalaz._
class Lib1ScalaActivityTest extends ActivityInstrumentationTestCase2[Lib1ScalaActivity](classOf[Lib1ScalaActivity]) {
def test1() {
Assert.assertTrue(true)
}
def test2() {
Assert.assertEquals("Lib1Java", getActivity.findViewById(R.id.scala_text_view).asInstanceOf[TextView].getText)
}
def test3() {
val map = TrieMap[String, String]()
map.put("1", "Lib1Java")
map.put("2", new Lib1Java().getName)
Assert.assertEquals(map("1"), map("2"))
}
def test4() {
Assert.assertEquals(Success(123), "123".parseInt)
}
}
| Add scalaz availability check for large app | Add scalaz availability check for large app
| Scala | apache-2.0 | saturday06/gradle-android-scala-plugin | scala | ## Code Before:
package jp.leafytree.android.libproject.app
import android.test.ActivityInstrumentationTestCase2
import android.widget.TextView
import jp.leafytree.android.libproject.R
import junit.framework.Assert
import jp.leafytree.android.libproject.lib1.{Lib1Java, Lib1ScalaActivity}
import scala.collection.concurrent.TrieMap
class Lib1ScalaActivityTest extends ActivityInstrumentationTestCase2[Lib1ScalaActivity](classOf[Lib1ScalaActivity]) {
def test1() {
Assert.assertTrue(true)
}
def test2() {
Assert.assertEquals("Lib1Java", getActivity.findViewById(R.id.scala_text_view).asInstanceOf[TextView].getText)
}
def test3() {
val map = TrieMap[String, String]()
map.put("1", "Lib1Java")
map.put("2", new Lib1Java().getName)
Assert.assertEquals(map("1"), map("2"))
}
}
## Instruction:
Add scalaz availability check for large app
## Code After:
package jp.leafytree.android.libproject.app
import android.test.ActivityInstrumentationTestCase2
import android.widget.TextView
import jp.leafytree.android.libproject.R
import junit.framework.Assert
import jp.leafytree.android.libproject.lib1.{Lib1Java, Lib1ScalaActivity}
import scala.collection.concurrent.TrieMap
import scalaz._
import Scalaz._
class Lib1ScalaActivityTest extends ActivityInstrumentationTestCase2[Lib1ScalaActivity](classOf[Lib1ScalaActivity]) {
def test1() {
Assert.assertTrue(true)
}
def test2() {
Assert.assertEquals("Lib1Java", getActivity.findViewById(R.id.scala_text_view).asInstanceOf[TextView].getText)
}
def test3() {
val map = TrieMap[String, String]()
map.put("1", "Lib1Java")
map.put("2", new Lib1Java().getName)
Assert.assertEquals(map("1"), map("2"))
}
def test4() {
Assert.assertEquals(Success(123), "123".parseInt)
}
}
| package jp.leafytree.android.libproject.app
import android.test.ActivityInstrumentationTestCase2
import android.widget.TextView
import jp.leafytree.android.libproject.R
import junit.framework.Assert
import jp.leafytree.android.libproject.lib1.{Lib1Java, Lib1ScalaActivity}
import scala.collection.concurrent.TrieMap
+ import scalaz._
+ import Scalaz._
class Lib1ScalaActivityTest extends ActivityInstrumentationTestCase2[Lib1ScalaActivity](classOf[Lib1ScalaActivity]) {
def test1() {
Assert.assertTrue(true)
}
def test2() {
Assert.assertEquals("Lib1Java", getActivity.findViewById(R.id.scala_text_view).asInstanceOf[TextView].getText)
}
def test3() {
val map = TrieMap[String, String]()
map.put("1", "Lib1Java")
map.put("2", new Lib1Java().getName)
Assert.assertEquals(map("1"), map("2"))
}
+
+ def test4() {
+ Assert.assertEquals(Success(123), "123".parseInt)
+ }
} | 6 | 0.24 | 6 | 0 |
038454978f2ff95fa8528027b12eec1529bb08db | pkgs/development/compilers/jdk/dlj-bundle-builder.sh | pkgs/development/compilers/jdk/dlj-bundle-builder.sh | source $stdenv/setup
sh ${src} --accept-license
if test -z "$installjdk"; then
sh ${construct} . tmp-linux-jdk tmp-linux-jre
ensureDir $out
cp -R tmp-linux-jre/* $out
else
sh ${construct} . $out tmp-linux-jre
fi
echo "Removing files at top level"
for file in $out/*
do
if test -f $file ; then
rm $file
fi
done
rm -rf $out/docs
# Set the dynamic linker.
rpath=
for i in $libraries; do
rpath=$rpath${rpath:+:}$i/lib
done
if test -z "$installjdk"; then
rpath=$rpath${rpath:+:}$out/lib/i386/jli
else
rpath=$rpath${rpath:+:}$out/jre/lib/i386/jli
fi
find $out -type f -perm +100 \
-exec patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
--set-rpath "$rpath" {} \;
| source $stdenv/setup
echo "Unpacking distribution"
unzip ${src} || true
echo "Constructing JDK and JRE"
if test -z "$installjdk"; then
sh ${construct} . tmp-linux-jdk tmp-linux-jre
ensureDir $out
cp -R tmp-linux-jre/* $out
else
sh ${construct} . $out tmp-linux-jre
fi
echo "Removing files at top level"
for file in $out/*
do
if test -f $file ; then
rm $file
fi
done
rm -rf $out/docs
# Set the dynamic linker.
rpath=
for i in $libraries; do
rpath=$rpath${rpath:+:}$i/lib
done
if test -z "$installjdk"; then
rpath=$rpath${rpath:+:}$out/lib/i386/jli
else
rpath=$rpath${rpath:+:}$out/jre/lib/i386/jli
fi
find $out -type f -perm +100 \
-exec patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
--set-rpath "$rpath" {} \;
| Use unzip to avoid unpurities | Use unzip to avoid unpurities
svn path=/nixpkgs/trunk/; revision=8196
| Shell | mit | triton/triton,NixOS/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,triton/triton,triton/triton,triton/triton,SymbiFlow/nixpkgs,NixOS/nixpkgs,triton/triton,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,triton/triton,triton/triton,SymbiFlow/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,triton/triton,NixOS/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs | shell | ## Code Before:
source $stdenv/setup
sh ${src} --accept-license
if test -z "$installjdk"; then
sh ${construct} . tmp-linux-jdk tmp-linux-jre
ensureDir $out
cp -R tmp-linux-jre/* $out
else
sh ${construct} . $out tmp-linux-jre
fi
echo "Removing files at top level"
for file in $out/*
do
if test -f $file ; then
rm $file
fi
done
rm -rf $out/docs
# Set the dynamic linker.
rpath=
for i in $libraries; do
rpath=$rpath${rpath:+:}$i/lib
done
if test -z "$installjdk"; then
rpath=$rpath${rpath:+:}$out/lib/i386/jli
else
rpath=$rpath${rpath:+:}$out/jre/lib/i386/jli
fi
find $out -type f -perm +100 \
-exec patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
--set-rpath "$rpath" {} \;
## Instruction:
Use unzip to avoid unpurities
svn path=/nixpkgs/trunk/; revision=8196
## Code After:
source $stdenv/setup
echo "Unpacking distribution"
unzip ${src} || true
echo "Constructing JDK and JRE"
if test -z "$installjdk"; then
sh ${construct} . tmp-linux-jdk tmp-linux-jre
ensureDir $out
cp -R tmp-linux-jre/* $out
else
sh ${construct} . $out tmp-linux-jre
fi
echo "Removing files at top level"
for file in $out/*
do
if test -f $file ; then
rm $file
fi
done
rm -rf $out/docs
# Set the dynamic linker.
rpath=
for i in $libraries; do
rpath=$rpath${rpath:+:}$i/lib
done
if test -z "$installjdk"; then
rpath=$rpath${rpath:+:}$out/lib/i386/jli
else
rpath=$rpath${rpath:+:}$out/jre/lib/i386/jli
fi
find $out -type f -perm +100 \
-exec patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
--set-rpath "$rpath" {} \;
| source $stdenv/setup
- sh ${src} --accept-license
+ echo "Unpacking distribution"
+ unzip ${src} || true
+
+ echo "Constructing JDK and JRE"
if test -z "$installjdk"; then
sh ${construct} . tmp-linux-jdk tmp-linux-jre
ensureDir $out
cp -R tmp-linux-jre/* $out
else
sh ${construct} . $out tmp-linux-jre
fi
echo "Removing files at top level"
for file in $out/*
do
if test -f $file ; then
rm $file
fi
done
rm -rf $out/docs
# Set the dynamic linker.
rpath=
for i in $libraries; do
rpath=$rpath${rpath:+:}$i/lib
done
if test -z "$installjdk"; then
rpath=$rpath${rpath:+:}$out/lib/i386/jli
else
rpath=$rpath${rpath:+:}$out/jre/lib/i386/jli
fi
find $out -type f -perm +100 \
-exec patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
--set-rpath "$rpath" {} \; | 5 | 0.142857 | 4 | 1 |
fbfe5861e80714e0ff846da7d4e5ac72a278d971 | spec/xclarity_client_discover_spec.rb | spec/xclarity_client_discover_spec.rb | require 'spec_helper'
describe XClarityClient::Discover do
context '#responds?' do
context 'without the correct appliance IPAddress' do
it 'should return false' do
response = XClarityClient::Discover.responds?(Faker::Internet.ip_v4_address, Faker::Number.number(4))
expect(response).not_to be_truthy
end
end
context 'with the correct appliance IPAddress' do
before do
@port = Faker::Number.number(4)
@address = URI('https://' + Faker::Internet.ip_v4_address + ':' + @port)
WebMock.allow_net_connect!
stub_request(:get, File.join(@address.to_s, '/aicc')).to_return(:status => [200, 'OK'])
end
it 'should return true' do
response = XClarityClient::Discover.responds?(@address.host, @port)
expect(response).to be_truthy
end
end
end
end
| require 'spec_helper'
describe XClarityClient::Discover do
context '#responds?' do
context 'without the correct appliance IPAddress' do
it 'should return false' do
response = XClarityClient::Discover.responds?(Faker::Internet.ip_v4_address, Faker::Number.number(4))
expect(response).not_to be_truthy
end
end
context 'with the correct appliance IPAddress' do
context 'with response 200' do
before do
@port = Faker::Number.number(4)
@address = URI('https://' + Faker::Internet.ip_v4_address + ':' + @port)
WebMock.allow_net_connect!
stub_request(:get, File.join(@address.to_s, '/aicc')).to_return(:status => [200, 'OK'])
end
it 'should return true' do
response = XClarityClient::Discover.responds?(@address.host, @port)
expect(response).to be_truthy
end
end
context 'with response 302' do
before do
@port = Faker::Number.number(4)
@address = URI('https://' + Faker::Internet.ip_v4_address + ':' + @port)
WebMock.allow_net_connect!
stub_request(:get, File.join(@address.to_s, '/aicc')).to_return(:status => [302, 'FOUND'])
end
it 'should return true' do
response = XClarityClient::Discover.responds?(@address.host, @port)
expect(response).to be_truthy
end
end
end
end
end
| Update test cases for new responses | Update test cases for new responses
| Ruby | apache-2.0 | lenovo/xclarity_client,lenovo/xclarity_client,juliancheal/xclarity_client,juliancheal/xclarity_client | ruby | ## Code Before:
require 'spec_helper'
describe XClarityClient::Discover do
context '#responds?' do
context 'without the correct appliance IPAddress' do
it 'should return false' do
response = XClarityClient::Discover.responds?(Faker::Internet.ip_v4_address, Faker::Number.number(4))
expect(response).not_to be_truthy
end
end
context 'with the correct appliance IPAddress' do
before do
@port = Faker::Number.number(4)
@address = URI('https://' + Faker::Internet.ip_v4_address + ':' + @port)
WebMock.allow_net_connect!
stub_request(:get, File.join(@address.to_s, '/aicc')).to_return(:status => [200, 'OK'])
end
it 'should return true' do
response = XClarityClient::Discover.responds?(@address.host, @port)
expect(response).to be_truthy
end
end
end
end
## Instruction:
Update test cases for new responses
## Code After:
require 'spec_helper'
describe XClarityClient::Discover do
context '#responds?' do
context 'without the correct appliance IPAddress' do
it 'should return false' do
response = XClarityClient::Discover.responds?(Faker::Internet.ip_v4_address, Faker::Number.number(4))
expect(response).not_to be_truthy
end
end
context 'with the correct appliance IPAddress' do
context 'with response 200' do
before do
@port = Faker::Number.number(4)
@address = URI('https://' + Faker::Internet.ip_v4_address + ':' + @port)
WebMock.allow_net_connect!
stub_request(:get, File.join(@address.to_s, '/aicc')).to_return(:status => [200, 'OK'])
end
it 'should return true' do
response = XClarityClient::Discover.responds?(@address.host, @port)
expect(response).to be_truthy
end
end
context 'with response 302' do
before do
@port = Faker::Number.number(4)
@address = URI('https://' + Faker::Internet.ip_v4_address + ':' + @port)
WebMock.allow_net_connect!
stub_request(:get, File.join(@address.to_s, '/aicc')).to_return(:status => [302, 'FOUND'])
end
it 'should return true' do
response = XClarityClient::Discover.responds?(@address.host, @port)
expect(response).to be_truthy
end
end
end
end
end
| require 'spec_helper'
describe XClarityClient::Discover do
context '#responds?' do
context 'without the correct appliance IPAddress' do
it 'should return false' do
response = XClarityClient::Discover.responds?(Faker::Internet.ip_v4_address, Faker::Number.number(4))
expect(response).not_to be_truthy
end
end
context 'with the correct appliance IPAddress' do
+ context 'with response 200' do
- before do
+ before do
? ++
- @port = Faker::Number.number(4)
+ @port = Faker::Number.number(4)
? ++
- @address = URI('https://' + Faker::Internet.ip_v4_address + ':' + @port)
+ @address = URI('https://' + Faker::Internet.ip_v4_address + ':' + @port)
? ++
- WebMock.allow_net_connect!
+ WebMock.allow_net_connect!
? ++
- stub_request(:get, File.join(@address.to_s, '/aicc')).to_return(:status => [200, 'OK'])
+ stub_request(:get, File.join(@address.to_s, '/aicc')).to_return(:status => [200, 'OK'])
? ++
+ end
+
+ it 'should return true' do
+ response = XClarityClient::Discover.responds?(@address.host, @port)
+ expect(response).to be_truthy
+ end
end
+ context 'with response 302' do
+ before do
+ @port = Faker::Number.number(4)
+ @address = URI('https://' + Faker::Internet.ip_v4_address + ':' + @port)
+ WebMock.allow_net_connect!
+ stub_request(:get, File.join(@address.to_s, '/aicc')).to_return(:status => [302, 'FOUND'])
+ end
+
- it 'should return true' do
+ it 'should return true' do
? ++
- response = XClarityClient::Discover.responds?(@address.host, @port)
+ response = XClarityClient::Discover.responds?(@address.host, @port)
? ++
- expect(response).to be_truthy
+ expect(response).to be_truthy
? ++
+ end
end
end
end
end | 32 | 1.230769 | 24 | 8 |
cf6417e4e6b08ebff85f5557f60821e9ac319657 | watir/lib/watir/html_element.rb | watir/lib/watir/html_element.rb | module Watir
class HTMLElement < Element
def initialize(container, how, what)
set_container container
@how = how
@what = what
if how == :index
raise MissingWayOfFindingObjectException,
"Option does not support attribute #{@how}"
end
super nil
end
def locate
@o = @container.locate_tagged_element('*', @how, @what)
end
end
end | module Watir
class HTMLElement < Element
def initialize(container, how, what)
set_container container
@how = how
@what = what
if how == :index
raise MissingWayOfFindingObjectException,
"#{self.class} does not support attribute #{@how}"
end
super nil
end
def locate
@o = @container.locate_tagged_element('*', @how, @what)
end
end
end | Fix typo - thanks jarmo! | Fix typo - thanks jarmo!
| Ruby | bsd-3-clause | jarib/watir,jarib/watir,jarib/watir,watir/watir-classic,watir/watir-classic,watir/watir-classic,watir/watir-classic | ruby | ## Code Before:
module Watir
class HTMLElement < Element
def initialize(container, how, what)
set_container container
@how = how
@what = what
if how == :index
raise MissingWayOfFindingObjectException,
"Option does not support attribute #{@how}"
end
super nil
end
def locate
@o = @container.locate_tagged_element('*', @how, @what)
end
end
end
## Instruction:
Fix typo - thanks jarmo!
## Code After:
module Watir
class HTMLElement < Element
def initialize(container, how, what)
set_container container
@how = how
@what = what
if how == :index
raise MissingWayOfFindingObjectException,
"#{self.class} does not support attribute #{@how}"
end
super nil
end
def locate
@o = @container.locate_tagged_element('*', @how, @what)
end
end
end | module Watir
class HTMLElement < Element
def initialize(container, how, what)
set_container container
@how = how
@what = what
if how == :index
raise MissingWayOfFindingObjectException,
- "Option does not support attribute #{@how}"
? ^^^^^^
+ "#{self.class} does not support attribute #{@how}"
? ^^^^^^^^^^^^^
end
super nil
end
def locate
@o = @container.locate_tagged_element('*', @how, @what)
end
end
end | 2 | 0.111111 | 1 | 1 |
8e4b7d3a238acd69b0b0a9d35c3ebfee404ad40d | package.json | package.json | {
"name": "lookup-server",
"version": "0.0.1",
"private": true,
"babel": {
"presets": [
"es2015",
"stage-0"
]
},
"dependencies": {
"babel-cli": "6.14.0",
"babel-core": "6.14.0",
"babel-preset-es2015": "6.14.0",
"babel-preset-stage-0": "6.5.0",
"express": "4.13.3",
"foreman": "1.4.1",
"fs": "0.0.2",
"sql.js": "^0.3.2"
},
"scripts": {
"start": "nf start -p $PORT",
"dev": "nf start -p 3000 --procfile Procfile.dev",
"server": "./node_modules/.bin/babel-node server.js"
}
}
| {
"name": "lookup-server",
"version": "0.0.1",
"private": true,
"babel": {
"presets": [
"es2015",
"stage-0"
]
},
"dependencies": {
"babel-cli": "6.14.0",
"babel-core": "6.14.0",
"babel-preset-es2015": "6.14.0",
"babel-preset-stage-0": "6.5.0",
"express": "4.13.3",
"foreman": "1.4.1",
"fs": "0.0.2",
"sql.js": "^0.3.2"
},
"scripts": {
"start": "nf start -p $PORT",
"dev": "nf start -p 3000 --procfile Procfile.dev",
"server": "babel-node server.js"
}
}
| Remove ./node_modues/.bin/ from the npm run server | Remove ./node_modues/.bin/ from the npm run server
| JSON | mit | arshdkhn1/stock-market-app,arshdkhn1/stock-market-app | json | ## Code Before:
{
"name": "lookup-server",
"version": "0.0.1",
"private": true,
"babel": {
"presets": [
"es2015",
"stage-0"
]
},
"dependencies": {
"babel-cli": "6.14.0",
"babel-core": "6.14.0",
"babel-preset-es2015": "6.14.0",
"babel-preset-stage-0": "6.5.0",
"express": "4.13.3",
"foreman": "1.4.1",
"fs": "0.0.2",
"sql.js": "^0.3.2"
},
"scripts": {
"start": "nf start -p $PORT",
"dev": "nf start -p 3000 --procfile Procfile.dev",
"server": "./node_modules/.bin/babel-node server.js"
}
}
## Instruction:
Remove ./node_modues/.bin/ from the npm run server
## Code After:
{
"name": "lookup-server",
"version": "0.0.1",
"private": true,
"babel": {
"presets": [
"es2015",
"stage-0"
]
},
"dependencies": {
"babel-cli": "6.14.0",
"babel-core": "6.14.0",
"babel-preset-es2015": "6.14.0",
"babel-preset-stage-0": "6.5.0",
"express": "4.13.3",
"foreman": "1.4.1",
"fs": "0.0.2",
"sql.js": "^0.3.2"
},
"scripts": {
"start": "nf start -p $PORT",
"dev": "nf start -p 3000 --procfile Procfile.dev",
"server": "babel-node server.js"
}
}
| {
"name": "lookup-server",
"version": "0.0.1",
"private": true,
"babel": {
"presets": [
"es2015",
"stage-0"
]
},
"dependencies": {
"babel-cli": "6.14.0",
"babel-core": "6.14.0",
"babel-preset-es2015": "6.14.0",
"babel-preset-stage-0": "6.5.0",
"express": "4.13.3",
"foreman": "1.4.1",
"fs": "0.0.2",
"sql.js": "^0.3.2"
},
"scripts": {
"start": "nf start -p $PORT",
"dev": "nf start -p 3000 --procfile Procfile.dev",
- "server": "./node_modules/.bin/babel-node server.js"
? --------------------
+ "server": "babel-node server.js"
}
} | 2 | 0.076923 | 1 | 1 |
5e4d17b56c761588df622feec0141fe1d0f149d9 | README.md | README.md |
[](https://travis-ci.org/sebcc/WWO-Net-SDK)
Wonderware Online .NET SDK
==========================
This SDK helps you create and upload tags to Wonderware Online upload API.
Requirements
-----------
- .Net Framework 4.5 and +
Supported
-----------
- .Net Standard 1.1
How it works
-----------
- Create a CSV/JSON datasources from [Wonderware Online Datasource](https://online.wonderware.com/DataSourceManagement)
- Take the token key and provide it to the WonderwareOnlineClient
Unsupported
-----------
The primary implications of being UNSUPPORTED are:
1. They include NO WARRANTY OF ANY KIND. My employers assumes NO responsibility for this code or any unintended consequences of using them.
2. By using this, you assume FULL responsibility for the consequences.
3. This repository assumes no responsibility to my employers |
[](https://travis-ci.org/sebcc/WWO-Net-SDK)
Wonderware Online .NET SDK
==========================
This SDK helps you create and upload tags to Wonderware Online upload API.
Requirements
-----------
- .Net Framework 4.5 and +
Supported
-----------
- .Net Standard 1.1
Features
-----------
- Caching of data
- Json format upload
- Manually purge the cache
How it works
-----------
- Create a CSV/JSON datasources from [Wonderware Online Datasource](https://online.wonderware.com/DataSourceManagement)
- Take the token key and provide it to the WonderwareOnlineClient
Unsupported
-----------
The primary implications of being UNSUPPORTED are:
1. They include NO WARRANTY OF ANY KIND. My employers assumes NO responsibility for this code or any unintended consequences of using them.
2. By using this, you assume FULL responsibility for the consequences.
3. This repository assumes no responsibility to my employers | Update readme file to include features | Update readme file to include features
| Markdown | mit | sebcc/WWO-Net-SDK | markdown | ## Code Before:
[](https://travis-ci.org/sebcc/WWO-Net-SDK)
Wonderware Online .NET SDK
==========================
This SDK helps you create and upload tags to Wonderware Online upload API.
Requirements
-----------
- .Net Framework 4.5 and +
Supported
-----------
- .Net Standard 1.1
How it works
-----------
- Create a CSV/JSON datasources from [Wonderware Online Datasource](https://online.wonderware.com/DataSourceManagement)
- Take the token key and provide it to the WonderwareOnlineClient
Unsupported
-----------
The primary implications of being UNSUPPORTED are:
1. They include NO WARRANTY OF ANY KIND. My employers assumes NO responsibility for this code or any unintended consequences of using them.
2. By using this, you assume FULL responsibility for the consequences.
3. This repository assumes no responsibility to my employers
## Instruction:
Update readme file to include features
## Code After:
[](https://travis-ci.org/sebcc/WWO-Net-SDK)
Wonderware Online .NET SDK
==========================
This SDK helps you create and upload tags to Wonderware Online upload API.
Requirements
-----------
- .Net Framework 4.5 and +
Supported
-----------
- .Net Standard 1.1
Features
-----------
- Caching of data
- Json format upload
- Manually purge the cache
How it works
-----------
- Create a CSV/JSON datasources from [Wonderware Online Datasource](https://online.wonderware.com/DataSourceManagement)
- Take the token key and provide it to the WonderwareOnlineClient
Unsupported
-----------
The primary implications of being UNSUPPORTED are:
1. They include NO WARRANTY OF ANY KIND. My employers assumes NO responsibility for this code or any unintended consequences of using them.
2. By using this, you assume FULL responsibility for the consequences.
3. This repository assumes no responsibility to my employers |
[](https://travis-ci.org/sebcc/WWO-Net-SDK)
Wonderware Online .NET SDK
==========================
This SDK helps you create and upload tags to Wonderware Online upload API.
Requirements
-----------
- .Net Framework 4.5 and +
Supported
-----------
- .Net Standard 1.1
+ Features
+ -----------
+ - Caching of data
+ - Json format upload
+ - Manually purge the cache
+
How it works
-----------
- Create a CSV/JSON datasources from [Wonderware Online Datasource](https://online.wonderware.com/DataSourceManagement)
- Take the token key and provide it to the WonderwareOnlineClient
Unsupported
-----------
The primary implications of being UNSUPPORTED are:
1. They include NO WARRANTY OF ANY KIND. My employers assumes NO responsibility for this code or any unintended consequences of using them.
2. By using this, you assume FULL responsibility for the consequences.
3. This repository assumes no responsibility to my employers | 6 | 0.214286 | 6 | 0 |
09727da53367a38c8ed2e247d4aa382cedb73ae7 | jester/hello.nim | jester/hello.nim | import jester, strtabs, json, asyncio, sockets
get "/json":
var obj = %{"message": %"Hello, World!"}
resp($obj)
var disp = newDispatcher()
disp.register(port = TPort(9000), http=false)
while disp.poll(): nil | import jester, strtabs, json, asyncio, sockets
get "/json":
var obj = %{"message": %"Hello, World!"}
resp($obj, "application/json")
var disp = newDispatcher()
disp.register(port = TPort(9000), http=false)
while disp.poll(): nil | Set Content-Type as application/json for the Jester benchmark. | Set Content-Type as application/json for the Jester benchmark.
| Nimrod | bsd-3-clause | kostya-sh/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,torhve/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,julienschmidt/FrameworkBenchmarks,methane/FrameworkBenchmarks,Verber/FrameworkBenchmarks,jamming/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,sxend/FrameworkBenchmarks,sgml/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,joshk/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,sxend/FrameworkBenchmarks,grob/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,zloster/FrameworkBenchmarks,jamming/FrameworkBenchmarks,valyala/FrameworkBenchmarks,actframework/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,testn/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,leafo/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,grob/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,testn/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,khellang/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,sgml/FrameworkBenchmarks,dmacd/FB-try1,Jesterovskiy/FrameworkBenchmarks,leafo/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,testn/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,actframework/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,khellang/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,denkab/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,dmacd/FB-try1,donovanmuller/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,joshk/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,grob/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,julienschmidt/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,denkab/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,zapov/FrameworkBenchmarks,joshk/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,julienschmidt/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,sgml/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,grob/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,denkab/FrameworkBenchmarks,doom369/FrameworkBenchmarks,zapov/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,methane/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,zloster/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,sgml/FrameworkBenchmarks,julienschmidt/FrameworkBenchmarks,sxend/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,sxend/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,dmacd/FB-try1,Jesterovskiy/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,sgml/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,dmacd/FB-try1,greg-hellings/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,torhve/FrameworkBenchmarks,doom369/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,doom369/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,zapov/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,torhve/FrameworkBenchmarks,sgml/FrameworkBenchmarks,herloct/FrameworkBenchmarks,valyala/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,sxend/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,testn/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,grob/FrameworkBenchmarks,sxend/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,herloct/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,jamming/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,leafo/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,valyala/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,grob/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,sxend/FrameworkBenchmarks,joshk/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,doom369/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,valyala/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,sxend/FrameworkBenchmarks,valyala/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,grob/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,methane/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,leafo/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,khellang/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,jamming/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,doom369/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,denkab/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,khellang/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,valyala/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,jamming/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,zloster/FrameworkBenchmarks,sxend/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,leafo/FrameworkBenchmarks,ratpack/FrameworkBenchmarks,joshk/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,actframework/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,methane/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,grob/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,dmacd/FB-try1,methane/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,zapov/FrameworkBenchmarks,zapov/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,sxend/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,doom369/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,zloster/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,actframework/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,torhve/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,herloct/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,dmacd/FB-try1,doom369/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,sxend/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,zloster/FrameworkBenchmarks,herloct/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,khellang/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,zapov/FrameworkBenchmarks,sxend/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,zloster/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,actframework/FrameworkBenchmarks,ratpack/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,testn/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,herloct/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,methane/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,valyala/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,dmacd/FB-try1,herloct/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,julienschmidt/FrameworkBenchmarks,joshk/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,doom369/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,testn/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,torhve/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,denkab/FrameworkBenchmarks,herloct/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,methane/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,zloster/FrameworkBenchmarks,zloster/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,sgml/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,ratpack/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,actframework/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,julienschmidt/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,jamming/FrameworkBenchmarks,doom369/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,zloster/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,Verber/FrameworkBenchmarks,zapov/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,doom369/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,jamming/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,khellang/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,sgml/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,zloster/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,grob/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,Verber/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,grob/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,methane/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,zapov/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,sxend/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,testn/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,herloct/FrameworkBenchmarks,zloster/FrameworkBenchmarks,zapov/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,ratpack/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,herloct/FrameworkBenchmarks,denkab/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,herloct/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,sxend/FrameworkBenchmarks,actframework/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,doom369/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,denkab/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,actframework/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,Verber/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,sxend/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,doom369/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,zapov/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,dmacd/FB-try1,testn/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,joshk/FrameworkBenchmarks,dmacd/FB-try1,torhve/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,joshk/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,actframework/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,ratpack/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,valyala/FrameworkBenchmarks,khellang/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,testn/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,methane/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,khellang/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,zloster/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,Verber/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,khellang/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,joshk/FrameworkBenchmarks,torhve/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,sxend/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,leafo/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,Verber/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,jamming/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,herloct/FrameworkBenchmarks,jamming/FrameworkBenchmarks,grob/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,ratpack/FrameworkBenchmarks,methane/FrameworkBenchmarks,zloster/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,jamming/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,sgml/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,herloct/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,julienschmidt/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,valyala/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,testn/FrameworkBenchmarks,Verber/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,Verber/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,khellang/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,testn/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,valyala/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,jamming/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,sgml/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,zapov/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,joshk/FrameworkBenchmarks,Verber/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,grob/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,julienschmidt/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,doom369/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,dmacd/FB-try1,steveklabnik/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,actframework/FrameworkBenchmarks,zloster/FrameworkBenchmarks,torhve/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,herloct/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,valyala/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,valyala/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,doom369/FrameworkBenchmarks,grob/FrameworkBenchmarks,khellang/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,jamming/FrameworkBenchmarks,joshk/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,ratpack/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,testn/FrameworkBenchmarks,zloster/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,khellang/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,ratpack/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,testn/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,leafo/FrameworkBenchmarks,julienschmidt/FrameworkBenchmarks,herloct/FrameworkBenchmarks,Verber/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,ratpack/FrameworkBenchmarks,zloster/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,actframework/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,torhve/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,denkab/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,doom369/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,grob/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,ratpack/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,actframework/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,sxend/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,testn/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,denkab/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,Verber/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,julienschmidt/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,valyala/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,leafo/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,Verber/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,joshk/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,herloct/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,torhve/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,dmacd/FB-try1,ratpack/FrameworkBenchmarks,zapov/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,julienschmidt/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,torhve/FrameworkBenchmarks,khellang/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,zapov/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,doom369/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,sgml/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,jamming/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,jamming/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,sxend/FrameworkBenchmarks,joshk/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,methane/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,sgml/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,sgml/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,methane/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,joshk/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,methane/FrameworkBenchmarks,actframework/FrameworkBenchmarks,Verber/FrameworkBenchmarks,leafo/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,zloster/FrameworkBenchmarks,actframework/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,denkab/FrameworkBenchmarks,julienschmidt/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,zapov/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,zloster/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,denkab/FrameworkBenchmarks,actframework/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,denkab/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,sgml/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,methane/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,doom369/FrameworkBenchmarks,denkab/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,leafo/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,dmacd/FB-try1,leafo/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,torhve/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,denkab/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,zapov/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,khellang/FrameworkBenchmarks,valyala/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,actframework/FrameworkBenchmarks,Verber/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,ratpack/FrameworkBenchmarks,zapov/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,leafo/FrameworkBenchmarks | nimrod | ## Code Before:
import jester, strtabs, json, asyncio, sockets
get "/json":
var obj = %{"message": %"Hello, World!"}
resp($obj)
var disp = newDispatcher()
disp.register(port = TPort(9000), http=false)
while disp.poll(): nil
## Instruction:
Set Content-Type as application/json for the Jester benchmark.
## Code After:
import jester, strtabs, json, asyncio, sockets
get "/json":
var obj = %{"message": %"Hello, World!"}
resp($obj, "application/json")
var disp = newDispatcher()
disp.register(port = TPort(9000), http=false)
while disp.poll(): nil | import jester, strtabs, json, asyncio, sockets
get "/json":
var obj = %{"message": %"Hello, World!"}
- resp($obj)
+ resp($obj, "application/json")
var disp = newDispatcher()
disp.register(port = TPort(9000), http=false)
while disp.poll(): nil | 2 | 0.222222 | 1 | 1 |
e2a73e7bc9a0955bdc9b0dcf6a11582f0c623ef0 | Install-GitTools.ps1 | Install-GitTools.ps1 |
choco install TortoiseGit
choco install github-desktop
mkdir "$($env:USERPROFILE)\.ssh" # Create .ssh folder for keys
Get-Service -Name ssh-agent | Set-Service -StartupType Manual
Write-Output "Installing PoshGit"
Install-Module posh-git -Scope CurrentUser -Force -AllowClobber
RefreshEnv
Write-Output "Installing PoshGit to Profile"
Add-PoshGitToProfile |
choco install TortoiseGit
choco install github-desktop
mkdir "$($env:USERPROFILE)\.ssh" # Create .ssh folder for keys
Get-Service -Name ssh-agent | Set-Service -StartupType Manual
Write-Output "Installing PoshGit"
choco install poshgit
RefreshEnv
Write-Output "Installing PoshGit to Profile"
Add-PoshGitToProfile | Switch back to choco poshgit version | Switch back to choco poshgit version
| PowerShell | mit | mattgwagner/New-Machine,mattgwagner/New-Machine,mattgwagner/New-Machine,mattgwagner/New-Machine | powershell | ## Code Before:
choco install TortoiseGit
choco install github-desktop
mkdir "$($env:USERPROFILE)\.ssh" # Create .ssh folder for keys
Get-Service -Name ssh-agent | Set-Service -StartupType Manual
Write-Output "Installing PoshGit"
Install-Module posh-git -Scope CurrentUser -Force -AllowClobber
RefreshEnv
Write-Output "Installing PoshGit to Profile"
Add-PoshGitToProfile
## Instruction:
Switch back to choco poshgit version
## Code After:
choco install TortoiseGit
choco install github-desktop
mkdir "$($env:USERPROFILE)\.ssh" # Create .ssh folder for keys
Get-Service -Name ssh-agent | Set-Service -StartupType Manual
Write-Output "Installing PoshGit"
choco install poshgit
RefreshEnv
Write-Output "Installing PoshGit to Profile"
Add-PoshGitToProfile |
choco install TortoiseGit
choco install github-desktop
mkdir "$($env:USERPROFILE)\.ssh" # Create .ssh folder for keys
Get-Service -Name ssh-agent | Set-Service -StartupType Manual
Write-Output "Installing PoshGit"
- Install-Module posh-git -Scope CurrentUser -Force -AllowClobber
+ choco install poshgit
RefreshEnv
Write-Output "Installing PoshGit to Profile"
Add-PoshGitToProfile | 2 | 0.117647 | 1 | 1 |
c202c0405d263b61366e603efcdf749639e99251 | Cargo.toml | Cargo.toml | [package]
name = "termion"
version = "1.0.0"
authors = ["Ticki <Ticki@users.noreply.github.com>"]
description = "A bindless library for manipulating terminals."
repository = "ticki/termion"
license = "MIT"
keywords = ["tty", "color", "terminal", "console", "tui", "size", "cursor", "clear", "ansi", "escape", "codes", "termios", "truecolor", "mouse", "isatty", "raw", "text", "password", "redox", "async"]
[target.'cfg(not(target_os = "redox"))'.dependencies]
libc = "0.2.8"
| [package]
name = "termion"
version = "1.0.0"
authors = ["Ticki <Ticki@users.noreply.github.com>"]
description = "A bindless library for manipulating terminals."
repository = "ticki/termion"
license = "MIT"
keywords = ["tty", "color", "terminal", "console", "tui", "size", "cursor", "clear", "ansi", "escape", "codes", "termios", "truecolor", "mouse", "isatty", "raw", "text", "password", "redox", "async"]
exclude = ["target", "CHANGELOG.md", "image.png", "Cargo.lock"]
[target.'cfg(not(target_os = "redox"))'.dependencies]
libc = "0.2.8"
| Exclude certain files from package | Exclude certain files from package
| TOML | mit | Ticki/libterm,ticki/termion,ftilde/termion | toml | ## Code Before:
[package]
name = "termion"
version = "1.0.0"
authors = ["Ticki <Ticki@users.noreply.github.com>"]
description = "A bindless library for manipulating terminals."
repository = "ticki/termion"
license = "MIT"
keywords = ["tty", "color", "terminal", "console", "tui", "size", "cursor", "clear", "ansi", "escape", "codes", "termios", "truecolor", "mouse", "isatty", "raw", "text", "password", "redox", "async"]
[target.'cfg(not(target_os = "redox"))'.dependencies]
libc = "0.2.8"
## Instruction:
Exclude certain files from package
## Code After:
[package]
name = "termion"
version = "1.0.0"
authors = ["Ticki <Ticki@users.noreply.github.com>"]
description = "A bindless library for manipulating terminals."
repository = "ticki/termion"
license = "MIT"
keywords = ["tty", "color", "terminal", "console", "tui", "size", "cursor", "clear", "ansi", "escape", "codes", "termios", "truecolor", "mouse", "isatty", "raw", "text", "password", "redox", "async"]
exclude = ["target", "CHANGELOG.md", "image.png", "Cargo.lock"]
[target.'cfg(not(target_os = "redox"))'.dependencies]
libc = "0.2.8"
| [package]
name = "termion"
version = "1.0.0"
authors = ["Ticki <Ticki@users.noreply.github.com>"]
description = "A bindless library for manipulating terminals."
repository = "ticki/termion"
license = "MIT"
keywords = ["tty", "color", "terminal", "console", "tui", "size", "cursor", "clear", "ansi", "escape", "codes", "termios", "truecolor", "mouse", "isatty", "raw", "text", "password", "redox", "async"]
+ exclude = ["target", "CHANGELOG.md", "image.png", "Cargo.lock"]
[target.'cfg(not(target_os = "redox"))'.dependencies]
libc = "0.2.8" | 1 | 0.090909 | 1 | 0 |
74b7a4645ee242217061bb3233b90e6d126cff15 | password_darwin.go | password_darwin.go | package main
import (
"github.com/hashicorp/terraform/helper/schema"
"github.com/keybase/go-keychain"
"log"
"runtime"
)
func passwordRetrievalFunc(env_var string, dv interface{}) schema.SchemaDefaultFunc {
return func() (interface{}, error) {
if runtime.GOOS == "darwin" {
log.Println("[INFO] On macOS so trying the keychain")
query := keychain.NewItem()
query.SetSecClass(keychain.SecClassGenericPassword)
query.SetService("alkscli")
query.SetAccount("alksuid")
query.SetMatchLimit(keychain.MatchLimitOne)
query.SetReturnData(true)
results, err := keychain.QueryItem(query)
if err != nil {
log.Println("[WARN] Error accessing the macOS keychain. Falling back to environment variables")
log.Println(err)
} else {
return string(results[0].Data), nil
}
}
return schema.EnvDefaultFunc(env_var, dv)()
}
}
| package main
import (
"log"
"runtime"
"github.com/hashicorp/terraform/helper/schema"
"github.com/keybase/go-keychain"
)
func passwordRetrievalFunc(envVar string, dv interface{}) schema.SchemaDefaultFunc {
return func() (interface{}, error) {
if runtime.GOOS == "darwin" {
log.Println("[INFO] On macOS so trying the keychain")
query := keychain.NewItem()
query.SetSecClass(keychain.SecClassGenericPassword)
query.SetService("alkscli")
query.SetAccount("alksuid")
query.SetMatchLimit(keychain.MatchLimitOne)
query.SetReturnData(true)
results, err := keychain.QueryItem(query)
if err != nil {
log.Println("[WARN] Error accessing the macOS keychain. Falling back to environment variables")
log.Println(err)
} else {
return string(results[0].Data), nil
}
}
return schema.EnvDefaultFunc(envVar, dv)()
}
}
| Fix some things for code smell | Fix some things for code smell
| Go | mit | Cox-Automotive/terraform-provider-alks | go | ## Code Before:
package main
import (
"github.com/hashicorp/terraform/helper/schema"
"github.com/keybase/go-keychain"
"log"
"runtime"
)
func passwordRetrievalFunc(env_var string, dv interface{}) schema.SchemaDefaultFunc {
return func() (interface{}, error) {
if runtime.GOOS == "darwin" {
log.Println("[INFO] On macOS so trying the keychain")
query := keychain.NewItem()
query.SetSecClass(keychain.SecClassGenericPassword)
query.SetService("alkscli")
query.SetAccount("alksuid")
query.SetMatchLimit(keychain.MatchLimitOne)
query.SetReturnData(true)
results, err := keychain.QueryItem(query)
if err != nil {
log.Println("[WARN] Error accessing the macOS keychain. Falling back to environment variables")
log.Println(err)
} else {
return string(results[0].Data), nil
}
}
return schema.EnvDefaultFunc(env_var, dv)()
}
}
## Instruction:
Fix some things for code smell
## Code After:
package main
import (
"log"
"runtime"
"github.com/hashicorp/terraform/helper/schema"
"github.com/keybase/go-keychain"
)
func passwordRetrievalFunc(envVar string, dv interface{}) schema.SchemaDefaultFunc {
return func() (interface{}, error) {
if runtime.GOOS == "darwin" {
log.Println("[INFO] On macOS so trying the keychain")
query := keychain.NewItem()
query.SetSecClass(keychain.SecClassGenericPassword)
query.SetService("alkscli")
query.SetAccount("alksuid")
query.SetMatchLimit(keychain.MatchLimitOne)
query.SetReturnData(true)
results, err := keychain.QueryItem(query)
if err != nil {
log.Println("[WARN] Error accessing the macOS keychain. Falling back to environment variables")
log.Println(err)
} else {
return string(results[0].Data), nil
}
}
return schema.EnvDefaultFunc(envVar, dv)()
}
}
| package main
import (
+ "log"
+ "runtime"
+
"github.com/hashicorp/terraform/helper/schema"
"github.com/keybase/go-keychain"
- "log"
- "runtime"
)
- func passwordRetrievalFunc(env_var string, dv interface{}) schema.SchemaDefaultFunc {
? ^^
+ func passwordRetrievalFunc(envVar string, dv interface{}) schema.SchemaDefaultFunc {
? ^
return func() (interface{}, error) {
if runtime.GOOS == "darwin" {
log.Println("[INFO] On macOS so trying the keychain")
query := keychain.NewItem()
query.SetSecClass(keychain.SecClassGenericPassword)
query.SetService("alkscli")
query.SetAccount("alksuid")
query.SetMatchLimit(keychain.MatchLimitOne)
query.SetReturnData(true)
results, err := keychain.QueryItem(query)
if err != nil {
log.Println("[WARN] Error accessing the macOS keychain. Falling back to environment variables")
log.Println(err)
} else {
return string(results[0].Data), nil
}
}
- return schema.EnvDefaultFunc(env_var, dv)()
? ^^
+ return schema.EnvDefaultFunc(envVar, dv)()
? ^
}
} | 9 | 0.290323 | 5 | 4 |
4012ea3f86734d33150866df10c1291b4bac581d | ops/roles/web/tasks/main.yml | ops/roles/web/tasks/main.yml | ---
- name: Install sqlite3 for backups
apt:
pkg:
sqlite3
- name: Ensure data directory
file:
path="{{ zoomhub_data_path }}"
owner="{{ admin_user }}"
group="{{ admin_user }}"
state=directory
| ---
- name: Install sqlite3 for backups
apt:
pkg:
sqlite3
- name: Ensure data directory
file:
path="{{ zoomhub_data_path }}"
owner="{{ admin_user }}"
group="{{ admin_user }}"
state=directory
- name: Install PostgreSQL library support
apt:
pkg: libpq-dev
| Add PostgreSQL library support to web server | Add PostgreSQL library support to web server
| YAML | mit | zoomhub/zoomhub,zoomhub/zoomhub,zoomhub/zoomhub,zoomhub/zoomhub | yaml | ## Code Before:
---
- name: Install sqlite3 for backups
apt:
pkg:
sqlite3
- name: Ensure data directory
file:
path="{{ zoomhub_data_path }}"
owner="{{ admin_user }}"
group="{{ admin_user }}"
state=directory
## Instruction:
Add PostgreSQL library support to web server
## Code After:
---
- name: Install sqlite3 for backups
apt:
pkg:
sqlite3
- name: Ensure data directory
file:
path="{{ zoomhub_data_path }}"
owner="{{ admin_user }}"
group="{{ admin_user }}"
state=directory
- name: Install PostgreSQL library support
apt:
pkg: libpq-dev
| ---
- name: Install sqlite3 for backups
apt:
pkg:
sqlite3
- name: Ensure data directory
file:
path="{{ zoomhub_data_path }}"
owner="{{ admin_user }}"
group="{{ admin_user }}"
state=directory
+
+ - name: Install PostgreSQL library support
+ apt:
+ pkg: libpq-dev | 4 | 0.333333 | 4 | 0 |
8430df896c1255eed991c6137c0364475289e8a2 | README.md | README.md | A library to parse event webhooks from Sendgrid
| [](https://travis-ci.org/mirajavora/sendgrid-webhooks)
# sendgrid-webhooks
A library to parse event webhooks from Sendgrid
| Add status of the travis build | Add status of the travis build | Markdown | apache-2.0 | mirajavora/sendgrid-webhooks,Petteroe/sendgrid-webhooks | markdown | ## Code Before:
A library to parse event webhooks from Sendgrid
## Instruction:
Add status of the travis build
## Code After:
[](https://travis-ci.org/mirajavora/sendgrid-webhooks)
# sendgrid-webhooks
A library to parse event webhooks from Sendgrid
| + [](https://travis-ci.org/mirajavora/sendgrid-webhooks)
+
+ # sendgrid-webhooks
A library to parse event webhooks from Sendgrid | 3 | 3 | 3 | 0 |
9c01534c47b0bd382e266cf0e37c7299a1ce3cda | setup/setup_new_mac_machine.sh | setup/setup_new_mac_machine.sh | set -e
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
# Install GNU core utilities (those that come with OS X are outdated)
# Don’t forget to add `$(brew --prefix coreutils)/libexec/gnubin` to `$PATH`.
brew install coreutils
# Install GNU `find`, `locate`, `updatedb`, and `xargs`, g-prefixed
brew install findutils
# Install latest version of Bash.
brew install bash
brew install wget
brew install imagemagick
# .gitignore boilerplate code (example: "gibo python textmate").
brew install gibo
brew install ctags
brew install hexedit
# Allows generation from notification from command line.
brew install terminal-notifier
# brew-cask converts brew into a package manager for mac packages.
brew install brew-cask
brew cask install google-chrome
brew cask install xquartz # For running X server based apps on Mac.
brew cask install wireshark
| set -e
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
# Install GNU core utilities (those that come with OS X are outdated)
# Don’t forget to add `$(brew --prefix coreutils)/libexec/gnubin` to `$PATH`.
brew install coreutils
# Install GNU `find`, `locate`, `updatedb`, and `xargs`, g-prefixed
brew install findutils
# Install latest version of Bash.
brew install bash
brew install wget
brew install imagemagick
# .gitignore boilerplate code (example: "gibo python textmate").
brew install gibo
brew install ctags
brew install hexedit
# Allows generation from notification from command line.
brew install terminal-notifier
# brew-cask converts brew into a package manager for mac packages.
brew install brew-cask
brew cask install google-chrome
brew cask install xquartz # For running X server based apps on Mac.
brew cask install wireshark
brew cask install sophos-antivirus # Free AV protection for Mac.
| Add sophos AV to install list. | Add sophos AV to install list.
| Shell | apache-2.0 | ashishb/dotfiles,ashishb/dotfiles,ashishb/dotfiles | shell | ## Code Before:
set -e
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
# Install GNU core utilities (those that come with OS X are outdated)
# Don’t forget to add `$(brew --prefix coreutils)/libexec/gnubin` to `$PATH`.
brew install coreutils
# Install GNU `find`, `locate`, `updatedb`, and `xargs`, g-prefixed
brew install findutils
# Install latest version of Bash.
brew install bash
brew install wget
brew install imagemagick
# .gitignore boilerplate code (example: "gibo python textmate").
brew install gibo
brew install ctags
brew install hexedit
# Allows generation from notification from command line.
brew install terminal-notifier
# brew-cask converts brew into a package manager for mac packages.
brew install brew-cask
brew cask install google-chrome
brew cask install xquartz # For running X server based apps on Mac.
brew cask install wireshark
## Instruction:
Add sophos AV to install list.
## Code After:
set -e
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
# Install GNU core utilities (those that come with OS X are outdated)
# Don’t forget to add `$(brew --prefix coreutils)/libexec/gnubin` to `$PATH`.
brew install coreutils
# Install GNU `find`, `locate`, `updatedb`, and `xargs`, g-prefixed
brew install findutils
# Install latest version of Bash.
brew install bash
brew install wget
brew install imagemagick
# .gitignore boilerplate code (example: "gibo python textmate").
brew install gibo
brew install ctags
brew install hexedit
# Allows generation from notification from command line.
brew install terminal-notifier
# brew-cask converts brew into a package manager for mac packages.
brew install brew-cask
brew cask install google-chrome
brew cask install xquartz # For running X server based apps on Mac.
brew cask install wireshark
brew cask install sophos-antivirus # Free AV protection for Mac.
| set -e
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
# Install GNU core utilities (those that come with OS X are outdated)
# Don’t forget to add `$(brew --prefix coreutils)/libexec/gnubin` to `$PATH`.
brew install coreutils
# Install GNU `find`, `locate`, `updatedb`, and `xargs`, g-prefixed
brew install findutils
# Install latest version of Bash.
brew install bash
brew install wget
brew install imagemagick
# .gitignore boilerplate code (example: "gibo python textmate").
brew install gibo
brew install ctags
brew install hexedit
# Allows generation from notification from command line.
brew install terminal-notifier
# brew-cask converts brew into a package manager for mac packages.
brew install brew-cask
brew cask install google-chrome
brew cask install xquartz # For running X server based apps on Mac.
brew cask install wireshark
+ brew cask install sophos-antivirus # Free AV protection for Mac. | 1 | 0.043478 | 1 | 0 |
9ca58d213514dbe3ffa3a69c8e318528ec7720b7 | app/models/competitions/oregon_womens_prestige_series_modules/common.rb | app/models/competitions/oregon_womens_prestige_series_modules/common.rb | module Competitions
module OregonWomensPrestigeSeriesModules
module Common
def point_schedule
[ 25, 21, 18, 16, 14, 12, 10, 8, 7, 6, 5, 4, 3, 2, 1 ]
end
def set_multiplier(results)
results.each do |result|
if result["type"] == "MultiDayEvent"
result["multiplier"] = 1.5
else
result["multiplier"] = 1
end
end
end
def cat_123_only_event_ids
[]
end
end
end
end
| module Competitions
module OregonWomensPrestigeSeriesModules
module Common
def members_only?
false
end
def point_schedule
[ 25, 21, 18, 16, 14, 12, 10, 8, 7, 6, 5, 4, 3, 2, 1 ]
end
def set_multiplier(results)
results.each do |result|
if result["type"] == "MultiDayEvent"
result["multiplier"] = 1.5
else
result["multiplier"] = 1
end
end
end
def cat_123_only_event_ids
[]
end
end
end
end
| Remove membership requirement for OWPS | Remove membership requirement for OWPS
| Ruby | mit | scottwillson/racing_on_rails,scottwillson/racing_on_rails,scottwillson/racing_on_rails,scottwillson/racing_on_rails | ruby | ## Code Before:
module Competitions
module OregonWomensPrestigeSeriesModules
module Common
def point_schedule
[ 25, 21, 18, 16, 14, 12, 10, 8, 7, 6, 5, 4, 3, 2, 1 ]
end
def set_multiplier(results)
results.each do |result|
if result["type"] == "MultiDayEvent"
result["multiplier"] = 1.5
else
result["multiplier"] = 1
end
end
end
def cat_123_only_event_ids
[]
end
end
end
end
## Instruction:
Remove membership requirement for OWPS
## Code After:
module Competitions
module OregonWomensPrestigeSeriesModules
module Common
def members_only?
false
end
def point_schedule
[ 25, 21, 18, 16, 14, 12, 10, 8, 7, 6, 5, 4, 3, 2, 1 ]
end
def set_multiplier(results)
results.each do |result|
if result["type"] == "MultiDayEvent"
result["multiplier"] = 1.5
else
result["multiplier"] = 1
end
end
end
def cat_123_only_event_ids
[]
end
end
end
end
| module Competitions
module OregonWomensPrestigeSeriesModules
module Common
+ def members_only?
+ false
+ end
+
def point_schedule
[ 25, 21, 18, 16, 14, 12, 10, 8, 7, 6, 5, 4, 3, 2, 1 ]
end
def set_multiplier(results)
results.each do |result|
if result["type"] == "MultiDayEvent"
result["multiplier"] = 1.5
else
result["multiplier"] = 1
end
end
end
def cat_123_only_event_ids
[]
end
end
end
end | 4 | 0.173913 | 4 | 0 |
2a2de35af9ddcd9bdb250d2ca2f8b3b2ce72f463 | README.md | README.md | Python script to export MongoDB collections to Elasticsearch.
## Usage
All configuration options can be set as command line arguments or environmental variables.
At a minimum, `collection` and `database` must be set.
A full list of options can be retrieved with `mongodb_elasticsearch_connector.py --help`.
| Python script to export MongoDB collections to Elasticsearch.
## Usage
All configuration options can be set as command line arguments or environmental variables.
At a minimum, `collection` and `database` must be set.
A full list of options can be retrieved with `mongodb_elasticsearch_connector.py --help`.
## Docker
The script can be run as a Docker container from `quay.io/wildcard/mongodb-elasticsearch-connector`.
| Add docker reference to readme. | Add docker reference to readme.
| Markdown | apache-2.0 | trywildcard/mongodb-elasticsearch-connector | markdown | ## Code Before:
Python script to export MongoDB collections to Elasticsearch.
## Usage
All configuration options can be set as command line arguments or environmental variables.
At a minimum, `collection` and `database` must be set.
A full list of options can be retrieved with `mongodb_elasticsearch_connector.py --help`.
## Instruction:
Add docker reference to readme.
## Code After:
Python script to export MongoDB collections to Elasticsearch.
## Usage
All configuration options can be set as command line arguments or environmental variables.
At a minimum, `collection` and `database` must be set.
A full list of options can be retrieved with `mongodb_elasticsearch_connector.py --help`.
## Docker
The script can be run as a Docker container from `quay.io/wildcard/mongodb-elasticsearch-connector`.
| Python script to export MongoDB collections to Elasticsearch.
## Usage
All configuration options can be set as command line arguments or environmental variables.
At a minimum, `collection` and `database` must be set.
A full list of options can be retrieved with `mongodb_elasticsearch_connector.py --help`.
+
+ ## Docker
+ The script can be run as a Docker container from `quay.io/wildcard/mongodb-elasticsearch-connector`. | 3 | 0.5 | 3 | 0 |
e85b3274d17091c56c6d6dc91ac6d1db30274e27 | examples/ftp.sh | examples/ftp.sh | set -e
set -u
FREEBSD_HOST=${FREEBSD_HOST-http://ftp.freebsd.org/pub/FreeBSD/releases/}
ARCH=${ARCH-amd64}
RELEASE=${RELEASE-10.3-RELEASE}
zocker create -n ftpbuild scratch
jail_path=`zocker inspect ftpbuild path`
for dist in base.txz lib32.txz
do
echo "# $dist"
fetch "$FREEBSD_HOST/$ARCH/$RELEASE/$dist"
tar -xpf "$dist" -C "${jail_path}/z/"
rm "$dist"
done
zocker commit ftpbuild "$RELEASE"
zocker rm ftpbuild
zocker run -n build "$RELEASE" "freebsd-update --not-running-from-cron fetch install; rm -rf /var/db/freebsd-update/files"
zocker commit build "$RELEASE"
zocker rm build
| set -e
set -u
FREEBSD_HOST=${FREEBSD_HOST-http://ftp.freebsd.org/pub/FreeBSD/releases/}
ARCH=${ARCH-amd64}
RELEASE=${RELEASE-10.3-RELEASE}
zocker create -n ftpbuild scratch
jail_path=`zocker inspect ftpbuild path`
for dist in base.txz lib32.txz
do
echo "# $dist"
fetch "$FREEBSD_HOST/$ARCH/$RELEASE/$dist"
tar -xpf "$dist" -C "${jail_path}/z/"
rm "$dist"
done
zocker commit ftpbuild "$RELEASE"
zocker rm ftpbuild
zocker run -n build "$RELEASE" "freebsd-update --not-running-from-cron fetch install; rm -rf /var/db/freebsd-update/files"
zocker commit build "$RELEASE"
zocker rm build
zocker create -n build "$RELEASE" "tcsh"
zocker commit build "$RELEASE"
zocker rm build
| Set default command to tcsh in the base build | Set default command to tcsh in the base build
| Shell | mit | toddnni/zocker | shell | ## Code Before:
set -e
set -u
FREEBSD_HOST=${FREEBSD_HOST-http://ftp.freebsd.org/pub/FreeBSD/releases/}
ARCH=${ARCH-amd64}
RELEASE=${RELEASE-10.3-RELEASE}
zocker create -n ftpbuild scratch
jail_path=`zocker inspect ftpbuild path`
for dist in base.txz lib32.txz
do
echo "# $dist"
fetch "$FREEBSD_HOST/$ARCH/$RELEASE/$dist"
tar -xpf "$dist" -C "${jail_path}/z/"
rm "$dist"
done
zocker commit ftpbuild "$RELEASE"
zocker rm ftpbuild
zocker run -n build "$RELEASE" "freebsd-update --not-running-from-cron fetch install; rm -rf /var/db/freebsd-update/files"
zocker commit build "$RELEASE"
zocker rm build
## Instruction:
Set default command to tcsh in the base build
## Code After:
set -e
set -u
FREEBSD_HOST=${FREEBSD_HOST-http://ftp.freebsd.org/pub/FreeBSD/releases/}
ARCH=${ARCH-amd64}
RELEASE=${RELEASE-10.3-RELEASE}
zocker create -n ftpbuild scratch
jail_path=`zocker inspect ftpbuild path`
for dist in base.txz lib32.txz
do
echo "# $dist"
fetch "$FREEBSD_HOST/$ARCH/$RELEASE/$dist"
tar -xpf "$dist" -C "${jail_path}/z/"
rm "$dist"
done
zocker commit ftpbuild "$RELEASE"
zocker rm ftpbuild
zocker run -n build "$RELEASE" "freebsd-update --not-running-from-cron fetch install; rm -rf /var/db/freebsd-update/files"
zocker commit build "$RELEASE"
zocker rm build
zocker create -n build "$RELEASE" "tcsh"
zocker commit build "$RELEASE"
zocker rm build
| set -e
set -u
FREEBSD_HOST=${FREEBSD_HOST-http://ftp.freebsd.org/pub/FreeBSD/releases/}
ARCH=${ARCH-amd64}
RELEASE=${RELEASE-10.3-RELEASE}
zocker create -n ftpbuild scratch
jail_path=`zocker inspect ftpbuild path`
for dist in base.txz lib32.txz
do
echo "# $dist"
fetch "$FREEBSD_HOST/$ARCH/$RELEASE/$dist"
tar -xpf "$dist" -C "${jail_path}/z/"
rm "$dist"
done
zocker commit ftpbuild "$RELEASE"
zocker rm ftpbuild
zocker run -n build "$RELEASE" "freebsd-update --not-running-from-cron fetch install; rm -rf /var/db/freebsd-update/files"
zocker commit build "$RELEASE"
zocker rm build
+ zocker create -n build "$RELEASE" "tcsh"
+ zocker commit build "$RELEASE"
+ zocker rm build | 3 | 0.136364 | 3 | 0 |
74ebe939939178d3e94a453df8596c8a7d636848 | tests/runtests.sh | tests/runtests.sh | for t in $@; do
node $t
rv=$?
test $rv -eq 0 && echo "$t .. OK" || echo "$t .. FAIL"
done
| for t in $@; do
node $t
rv=$?
case $rv in
0)
echo "$t .. OK"
;;
64)
echo "$t .. SKIP"
;;
*)
echo "$t .. FAIL"
;;
esac
done
| Use exit code 64 as a special value | Use exit code 64 as a special value
We need a way to signal out that we're skipping a test ;)
Change-Id: Ie8560e762b15487fcedb0d751c260b5484557cb1
Reviewed-on: http://review.couchbase.org/20615
Reviewed-by: Mordechai Nunberg <e7d42768707bf23038325b0b68d4b577e5f6064a@haskalah.org>
Tested-by: Trond Norbye <60edd2ef23891a753f231b0c6f161dc634079a93@gmail.com>
| Shell | apache-2.0 | kshmir/couchnode,ConnectedHomes/couchnode,GannettDigital/couchnode,actano/couchnode,couchbase/couchnode,corbinu/couchnode,brett19/couchnode,ronkorving/couchnode,GannettDigital/couchnode,kshmir/couchnode,KenanSulayman/couchnode,kshmir/couchnode,KenanSulayman/couchnode,jess-sheneberger/couchnode,brett19/couchnode,ConnectedHomes/couchnode,ronkorving/couchnode,corbinu/couchnode,ConnectedHomes/couchnode,couchbase/couchnode,GannettDigital/couchnode,Bloutiouf/couchnode,ronkorving/couchnode,jess-sheneberger/couchnode,corbinu/couchnode,Bloutiouf/couchnode,ConnectedHomes/couchnode,couchbase/couchnode,ronkorving/couchnode,actano/couchnode,actano/couchnode,Bloutiouf/couchnode,brett19/couchnode,Bloutiouf/couchnode,jess-sheneberger/couchnode,KenanSulayman/couchnode,KenanSulayman/couchnode,couchbase/couchnode,jess-sheneberger/couchnode | shell | ## Code Before:
for t in $@; do
node $t
rv=$?
test $rv -eq 0 && echo "$t .. OK" || echo "$t .. FAIL"
done
## Instruction:
Use exit code 64 as a special value
We need a way to signal out that we're skipping a test ;)
Change-Id: Ie8560e762b15487fcedb0d751c260b5484557cb1
Reviewed-on: http://review.couchbase.org/20615
Reviewed-by: Mordechai Nunberg <e7d42768707bf23038325b0b68d4b577e5f6064a@haskalah.org>
Tested-by: Trond Norbye <60edd2ef23891a753f231b0c6f161dc634079a93@gmail.com>
## Code After:
for t in $@; do
node $t
rv=$?
case $rv in
0)
echo "$t .. OK"
;;
64)
echo "$t .. SKIP"
;;
*)
echo "$t .. FAIL"
;;
esac
done
| for t in $@; do
node $t
rv=$?
- test $rv -eq 0 && echo "$t .. OK" || echo "$t .. FAIL"
+ case $rv in
+ 0)
+ echo "$t .. OK"
+ ;;
+ 64)
+ echo "$t .. SKIP"
+ ;;
+ *)
+ echo "$t .. FAIL"
+ ;;
+ esac
done | 12 | 2.4 | 11 | 1 |
d597da7682648b02a02e1f33cd65defdc932253a | src/main/kotlin/com/ids1024/whitakerswords/SearchAdapter.kt | src/main/kotlin/com/ids1024/whitakerswords/SearchAdapter.kt | package com.ids1024.whitakerswords
import java.util.ArrayList
import android.widget.TextView
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.support.v7.widget.RecyclerView
import android.text.SpannableStringBuilder
class SearchAdapter(results: ArrayList<SpannableStringBuilder>) : RecyclerView.Adapter<SearchAdapter.ViewHolder>() {
var results = results
override fun getItemCount(): Int {
return results.size
}
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
holder.text_view.text = results.get(position)
}
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
val view = LayoutInflater.from(parent.getContext()).inflate(R.layout.result, null)
return ViewHolder(view)
}
class ViewHolder(view: View) : RecyclerView.ViewHolder(view) {
val text_view: TextView = view.findViewById(R.id.result_text)
}
}
| package com.ids1024.whitakerswords
import java.util.ArrayList
import android.widget.TextView
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.support.v7.widget.RecyclerView
import android.text.SpannableStringBuilder
class SearchAdapter(results: ArrayList<SpannableStringBuilder>) : RecyclerView.Adapter<SearchAdapter.ViewHolder>() {
var results = results
override fun getItemCount(): Int {
return results.size
}
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
holder.text_view.text = results.get(position)
}
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
val view = LayoutInflater.from(parent.context)
.inflate(R.layout.result, parent, false)
return ViewHolder(view)
}
class ViewHolder(view: View) : RecyclerView.ViewHolder(view) {
val text_view: TextView = view.findViewById(R.id.result_text)
}
}
| Make LayoutInflator.inflate() call match docs | Make LayoutInflator.inflate() call match docs
Don't know if this changes anything...
| Kotlin | mit | ids1024/whitakers-words-android,ids1024/whitakers-words-android | kotlin | ## Code Before:
package com.ids1024.whitakerswords
import java.util.ArrayList
import android.widget.TextView
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.support.v7.widget.RecyclerView
import android.text.SpannableStringBuilder
class SearchAdapter(results: ArrayList<SpannableStringBuilder>) : RecyclerView.Adapter<SearchAdapter.ViewHolder>() {
var results = results
override fun getItemCount(): Int {
return results.size
}
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
holder.text_view.text = results.get(position)
}
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
val view = LayoutInflater.from(parent.getContext()).inflate(R.layout.result, null)
return ViewHolder(view)
}
class ViewHolder(view: View) : RecyclerView.ViewHolder(view) {
val text_view: TextView = view.findViewById(R.id.result_text)
}
}
## Instruction:
Make LayoutInflator.inflate() call match docs
Don't know if this changes anything...
## Code After:
package com.ids1024.whitakerswords
import java.util.ArrayList
import android.widget.TextView
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.support.v7.widget.RecyclerView
import android.text.SpannableStringBuilder
class SearchAdapter(results: ArrayList<SpannableStringBuilder>) : RecyclerView.Adapter<SearchAdapter.ViewHolder>() {
var results = results
override fun getItemCount(): Int {
return results.size
}
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
holder.text_view.text = results.get(position)
}
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
val view = LayoutInflater.from(parent.context)
.inflate(R.layout.result, parent, false)
return ViewHolder(view)
}
class ViewHolder(view: View) : RecyclerView.ViewHolder(view) {
val text_view: TextView = view.findViewById(R.id.result_text)
}
}
| package com.ids1024.whitakerswords
import java.util.ArrayList
import android.widget.TextView
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.support.v7.widget.RecyclerView
import android.text.SpannableStringBuilder
class SearchAdapter(results: ArrayList<SpannableStringBuilder>) : RecyclerView.Adapter<SearchAdapter.ViewHolder>() {
var results = results
override fun getItemCount(): Int {
return results.size
}
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
holder.text_view.text = results.get(position)
}
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
- val view = LayoutInflater.from(parent.getContext()).inflate(R.layout.result, null)
+ val view = LayoutInflater.from(parent.context)
+ .inflate(R.layout.result, parent, false)
return ViewHolder(view)
}
class ViewHolder(view: View) : RecyclerView.ViewHolder(view) {
val text_view: TextView = view.findViewById(R.id.result_text)
}
} | 3 | 0.1 | 2 | 1 |
360f22ab136710fc3be4faa1600e8290095d89a8 | .travis.yml | .travis.yml | sudo: required
language: generic
dist: trusty
env:
- COVERAGE_FILE=/tmp/.coverage
after_success:
- codecov
script:
- sudo apt install software-properties-common python3-setuptools python3-mysql.connector python3-pyxattr
- sudo mkdir -p /etc/systemd/system # Until Travis is stuck with 14.04
- sudo easy_install3 pip
- sudo -H pip3 install -r requirements.txt
- sudo -H pip3 install codecov pytest-cov requests-kerberos
- sudo -H pip3 install -e .
- echo ca | sudo tee /etc/hostname
- echo 127.0.0.1 localhost | sudo tee /etc/hosts
- echo 127.0.1.1 ca.example.lan ca | sudo tee -a /etc/hosts
- sudo hostname -F /etc/hostname
- sudo find /home/ -type d -exec chmod 755 {} \; # Allow certidude serve to read templates
- sudo coverage run --parallel-mode --source certidude -m py.test tests
- sudo coverage combine
- sudo coverage report
- sudo coverage xml -i
cache: pip
| sudo: required
language: generic
dist: trusty
env:
- COVERAGE_FILE=/tmp/.coverage
after_success:
- codecov
script:
- sudo npm config set registry=http://registry.npmjs.org/
- sudo apt install software-properties-common python3-setuptools python3-mysql.connector python3-pyxattr
- sudo mkdir -p /etc/systemd/system # Until Travis is stuck with 14.04
- sudo easy_install3 pip
- sudo -H pip3 install -r requirements.txt
- sudo -H pip3 install codecov pytest-cov requests-kerberos
- sudo -H pip3 install -e .
- echo ca | sudo tee /etc/hostname
- echo 127.0.0.1 localhost | sudo tee /etc/hosts
- echo 127.0.1.1 ca.example.lan ca | sudo tee -a /etc/hosts
- sudo hostname -F /etc/hostname
- sudo find /home/ -type d -exec chmod 755 {} \; # Allow certidude serve to read templates
- sudo coverage run --parallel-mode --source certidude -m py.test tests
- sudo coverage combine
- sudo coverage report
- sudo coverage xml -i
cache: pip
| Disable NPM's HTTP for Travis, due to old ca-certificates package | tests: Disable NPM's HTTP for Travis, due to old ca-certificates package
| YAML | mit | plaes/certidude,plaes/certidude,laurivosandi/certidude,laurivosandi/certidude,laurivosandi/certidude,laurivosandi/certidude,plaes/certidude,plaes/certidude | yaml | ## Code Before:
sudo: required
language: generic
dist: trusty
env:
- COVERAGE_FILE=/tmp/.coverage
after_success:
- codecov
script:
- sudo apt install software-properties-common python3-setuptools python3-mysql.connector python3-pyxattr
- sudo mkdir -p /etc/systemd/system # Until Travis is stuck with 14.04
- sudo easy_install3 pip
- sudo -H pip3 install -r requirements.txt
- sudo -H pip3 install codecov pytest-cov requests-kerberos
- sudo -H pip3 install -e .
- echo ca | sudo tee /etc/hostname
- echo 127.0.0.1 localhost | sudo tee /etc/hosts
- echo 127.0.1.1 ca.example.lan ca | sudo tee -a /etc/hosts
- sudo hostname -F /etc/hostname
- sudo find /home/ -type d -exec chmod 755 {} \; # Allow certidude serve to read templates
- sudo coverage run --parallel-mode --source certidude -m py.test tests
- sudo coverage combine
- sudo coverage report
- sudo coverage xml -i
cache: pip
## Instruction:
tests: Disable NPM's HTTP for Travis, due to old ca-certificates package
## Code After:
sudo: required
language: generic
dist: trusty
env:
- COVERAGE_FILE=/tmp/.coverage
after_success:
- codecov
script:
- sudo npm config set registry=http://registry.npmjs.org/
- sudo apt install software-properties-common python3-setuptools python3-mysql.connector python3-pyxattr
- sudo mkdir -p /etc/systemd/system # Until Travis is stuck with 14.04
- sudo easy_install3 pip
- sudo -H pip3 install -r requirements.txt
- sudo -H pip3 install codecov pytest-cov requests-kerberos
- sudo -H pip3 install -e .
- echo ca | sudo tee /etc/hostname
- echo 127.0.0.1 localhost | sudo tee /etc/hosts
- echo 127.0.1.1 ca.example.lan ca | sudo tee -a /etc/hosts
- sudo hostname -F /etc/hostname
- sudo find /home/ -type d -exec chmod 755 {} \; # Allow certidude serve to read templates
- sudo coverage run --parallel-mode --source certidude -m py.test tests
- sudo coverage combine
- sudo coverage report
- sudo coverage xml -i
cache: pip
| sudo: required
language: generic
dist: trusty
env:
- COVERAGE_FILE=/tmp/.coverage
after_success:
- codecov
script:
+ - sudo npm config set registry=http://registry.npmjs.org/
- sudo apt install software-properties-common python3-setuptools python3-mysql.connector python3-pyxattr
- sudo mkdir -p /etc/systemd/system # Until Travis is stuck with 14.04
- sudo easy_install3 pip
- sudo -H pip3 install -r requirements.txt
- sudo -H pip3 install codecov pytest-cov requests-kerberos
- sudo -H pip3 install -e .
- echo ca | sudo tee /etc/hostname
- echo 127.0.0.1 localhost | sudo tee /etc/hosts
- echo 127.0.1.1 ca.example.lan ca | sudo tee -a /etc/hosts
- sudo hostname -F /etc/hostname
- sudo find /home/ -type d -exec chmod 755 {} \; # Allow certidude serve to read templates
- sudo coverage run --parallel-mode --source certidude -m py.test tests
- sudo coverage combine
- sudo coverage report
- sudo coverage xml -i
cache: pip | 1 | 0.041667 | 1 | 0 |
ae94e631ae4b59415fce0b16e5a465268f32db59 | 5.5/fpm/Dockerfile | 5.5/fpm/Dockerfile | FROM php:5.5.19-fpm
MAINTAINER Aaron Jan <https://github.com/AaronJan/php-armed>
# Install modules
RUN apt-get update && apt-get install -y \
apt-utils re2c g++ \
zlib1g zlib1g-dbg zlib1g-dev zlibc \
libpng12-0 libpng12-dev libpng3 \
libjpeg9 libjpeg9-dbg libjpeg9-dev \
libmcrypt-dev libmcrypt4 mcrypt \
libpq-dev \
&& docker-php-ext-install gd \
&& docker-php-ext-install exif \
&& docker-php-ext-install iconv \
&& docker-php-ext-install mcrypt \
&& docker-php-ext-install hash \
&& docker-php-ext-install fileinfo \
&& docker-php-ext-install pdo \
&& docker-php-ext-install pdo_mysql \
&& docker-php-ext-install pdo_pgsql \
&& docker-php-ext-install mysqli \
&& docker-php-ext-install session \
&& docker-php-ext-install mbstring
COPY docker-entrypoint.sh /entrypoint.sh
RUN ["chmod", "a+x", "/entrypoint.sh"]
ENTRYPOINT ["/entrypoint.sh"]
CMD ["php-fpm"]
| FROM php:5.5.19-fpm
MAINTAINER Aaron Jan <https://github.com/AaronJan/php-armed>
# Install modules
RUN apt-get update && apt-get install -y \
apt-utils re2c g++ \
zlib1g zlib1g-dbg zlib1g-dev zlibc libtool \
libpng12-0 libpng12-dev libpng3 \
libfreetype6 libfreetype6-dev \
libjpeg62-turbo libjpeg62-turbo-dbg libjpeg62-turbo-dev \
libmcrypt-dev libmcrypt4 mcrypt \
libpq-dev \
&& docker-php-ext-install exif \
&& docker-php-ext-install iconv \
&& docker-php-ext-install mcrypt \
&& docker-php-ext-install hash \
&& docker-php-ext-install fileinfo \
&& docker-php-ext-install pdo \
&& docker-php-ext-install pdo_mysql \
&& docker-php-ext-install pdo_pgsql \
&& docker-php-ext-install mysqli \
&& docker-php-ext-install session \
&& docker-php-ext-install mbstring \
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-gd-dir=/usr/include/ \
&& docker-php-ext-install gd
COPY docker-entrypoint.sh /entrypoint.sh
RUN ["chmod", "a+x", "/entrypoint.sh"]
ENTRYPOINT ["/entrypoint.sh"]
CMD ["php-fpm"]
| Add support for `Freetype` and `Jpeg` | Add support for `Freetype` and `Jpeg` | unknown | apache-2.0 | AaronJan/php-armed | unknown | ## Code Before:
FROM php:5.5.19-fpm
MAINTAINER Aaron Jan <https://github.com/AaronJan/php-armed>
# Install modules
RUN apt-get update && apt-get install -y \
apt-utils re2c g++ \
zlib1g zlib1g-dbg zlib1g-dev zlibc \
libpng12-0 libpng12-dev libpng3 \
libjpeg9 libjpeg9-dbg libjpeg9-dev \
libmcrypt-dev libmcrypt4 mcrypt \
libpq-dev \
&& docker-php-ext-install gd \
&& docker-php-ext-install exif \
&& docker-php-ext-install iconv \
&& docker-php-ext-install mcrypt \
&& docker-php-ext-install hash \
&& docker-php-ext-install fileinfo \
&& docker-php-ext-install pdo \
&& docker-php-ext-install pdo_mysql \
&& docker-php-ext-install pdo_pgsql \
&& docker-php-ext-install mysqli \
&& docker-php-ext-install session \
&& docker-php-ext-install mbstring
COPY docker-entrypoint.sh /entrypoint.sh
RUN ["chmod", "a+x", "/entrypoint.sh"]
ENTRYPOINT ["/entrypoint.sh"]
CMD ["php-fpm"]
## Instruction:
Add support for `Freetype` and `Jpeg`
## Code After:
FROM php:5.5.19-fpm
MAINTAINER Aaron Jan <https://github.com/AaronJan/php-armed>
# Install modules
RUN apt-get update && apt-get install -y \
apt-utils re2c g++ \
zlib1g zlib1g-dbg zlib1g-dev zlibc libtool \
libpng12-0 libpng12-dev libpng3 \
libfreetype6 libfreetype6-dev \
libjpeg62-turbo libjpeg62-turbo-dbg libjpeg62-turbo-dev \
libmcrypt-dev libmcrypt4 mcrypt \
libpq-dev \
&& docker-php-ext-install exif \
&& docker-php-ext-install iconv \
&& docker-php-ext-install mcrypt \
&& docker-php-ext-install hash \
&& docker-php-ext-install fileinfo \
&& docker-php-ext-install pdo \
&& docker-php-ext-install pdo_mysql \
&& docker-php-ext-install pdo_pgsql \
&& docker-php-ext-install mysqli \
&& docker-php-ext-install session \
&& docker-php-ext-install mbstring \
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-gd-dir=/usr/include/ \
&& docker-php-ext-install gd
COPY docker-entrypoint.sh /entrypoint.sh
RUN ["chmod", "a+x", "/entrypoint.sh"]
ENTRYPOINT ["/entrypoint.sh"]
CMD ["php-fpm"]
| FROM php:5.5.19-fpm
MAINTAINER Aaron Jan <https://github.com/AaronJan/php-armed>
# Install modules
RUN apt-get update && apt-get install -y \
apt-utils re2c g++ \
- zlib1g zlib1g-dbg zlib1g-dev zlibc \
+ zlib1g zlib1g-dbg zlib1g-dev zlibc libtool \
? ++++++++
libpng12-0 libpng12-dev libpng3 \
+ libfreetype6 libfreetype6-dev \
- libjpeg9 libjpeg9-dbg libjpeg9-dev \
? ^ ^ ^
+ libjpeg62-turbo libjpeg62-turbo-dbg libjpeg62-turbo-dev \
? ^^^^^^^^ ^^^^^^^^ ^^^^^^^^
libmcrypt-dev libmcrypt4 mcrypt \
libpq-dev \
- && docker-php-ext-install gd \
&& docker-php-ext-install exif \
&& docker-php-ext-install iconv \
&& docker-php-ext-install mcrypt \
&& docker-php-ext-install hash \
&& docker-php-ext-install fileinfo \
&& docker-php-ext-install pdo \
&& docker-php-ext-install pdo_mysql \
&& docker-php-ext-install pdo_pgsql \
&& docker-php-ext-install mysqli \
&& docker-php-ext-install session \
- && docker-php-ext-install mbstring
+ && docker-php-ext-install mbstring \
? ++
+ && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-gd-dir=/usr/include/ \
+ && docker-php-ext-install gd
COPY docker-entrypoint.sh /entrypoint.sh
RUN ["chmod", "a+x", "/entrypoint.sh"]
ENTRYPOINT ["/entrypoint.sh"]
CMD ["php-fpm"] | 10 | 0.3125 | 6 | 4 |
c0a78cdf2d2225454ebb9144a6c71f4f4aad1b4b | test/src/board_test.js | test/src/board_test.js | import Board from '../../frontend/src/shogi/board';
import Piece from '../../frontend/src/shogi/piece';
import memo from 'memo-is';
import _ from 'lodash';
| import Board from '../../frontend/src/shogi/board';
import Piece from '../../frontend/src/shogi/piece';
import memo from 'memo-is';
import _ from 'lodash';
describe('isTakenKing', () => {
context("if take the piece, king is taken", () => {
});
context("if moves the piece, king is taken", () => {
});
});
| Add `isTakenKing` test, but example is empty. | Add `isTakenKing` test, but example is empty.
* TODO
| JavaScript | mit | mgi166/usi-front,mgi166/usi-front | javascript | ## Code Before:
import Board from '../../frontend/src/shogi/board';
import Piece from '../../frontend/src/shogi/piece';
import memo from 'memo-is';
import _ from 'lodash';
## Instruction:
Add `isTakenKing` test, but example is empty.
* TODO
## Code After:
import Board from '../../frontend/src/shogi/board';
import Piece from '../../frontend/src/shogi/piece';
import memo from 'memo-is';
import _ from 'lodash';
describe('isTakenKing', () => {
context("if take the piece, king is taken", () => {
});
context("if moves the piece, king is taken", () => {
});
});
| import Board from '../../frontend/src/shogi/board';
import Piece from '../../frontend/src/shogi/piece';
import memo from 'memo-is';
import _ from 'lodash';
+
+ describe('isTakenKing', () => {
+ context("if take the piece, king is taken", () => {
+ });
+
+ context("if moves the piece, king is taken", () => {
+ });
+ }); | 8 | 2 | 8 | 0 |
5236a208278867defa10cacce41191641368d309 | source/stylesheets/_footer.sass | source/stylesheets/_footer.sass | footer
+outer-container
border-top: 1px solid $light-gray
padding-top: 4em
padding-bottom: 4em
.recent-posts, .footer-tags
h3
font-size: 1.7em
li
font-size: 1.05em
.recent-posts
+span-columns(6)
+shift(2)
.footer-tags
+span-columns(2)
.recent-posts, .footer-tags
color: darken($medium-gray, 20%)
a
+transition(all .1s ease-in-out)
color: $text-color
&:hover
color: $matcha-green
border-bottom: 2px solid $matcha-green
| footer
+outer-container
border-top: 1px solid $light-gray
padding:
bottom: $medium-margin
h3
font-size: 1.7em
color: $light-gray
margin:
bottom: $small-margin
li
font-size: 1.05em
margin:
bottom: $small-margin / 4
a
color: darken($medium-gray, 30%)
.recent-posts, .footer-tags
+span-columns(8)
+shift(2)
margin:
top: $medium-margin
li
margin:
top: $small-margin
.footer-tags
li
display: inline
margin:
right: $small-margin
| Adjust styles for rearranged footer content | Adjust styles for rearranged footer content
| Sass | mit | vis-kid/betweenscreens,vis-kid/betweenscreens,vis-kid/betweenscreens | sass | ## Code Before:
footer
+outer-container
border-top: 1px solid $light-gray
padding-top: 4em
padding-bottom: 4em
.recent-posts, .footer-tags
h3
font-size: 1.7em
li
font-size: 1.05em
.recent-posts
+span-columns(6)
+shift(2)
.footer-tags
+span-columns(2)
.recent-posts, .footer-tags
color: darken($medium-gray, 20%)
a
+transition(all .1s ease-in-out)
color: $text-color
&:hover
color: $matcha-green
border-bottom: 2px solid $matcha-green
## Instruction:
Adjust styles for rearranged footer content
## Code After:
footer
+outer-container
border-top: 1px solid $light-gray
padding:
bottom: $medium-margin
h3
font-size: 1.7em
color: $light-gray
margin:
bottom: $small-margin
li
font-size: 1.05em
margin:
bottom: $small-margin / 4
a
color: darken($medium-gray, 30%)
.recent-posts, .footer-tags
+span-columns(8)
+shift(2)
margin:
top: $medium-margin
li
margin:
top: $small-margin
.footer-tags
li
display: inline
margin:
right: $small-margin
| footer
+outer-container
border-top: 1px solid $light-gray
- padding-top: 4em
- padding-bottom: 4em
+ padding:
+ bottom: $medium-margin
+ h3
+ font-size: 1.7em
+ color: $light-gray
+ margin:
+ bottom: $small-margin
+ li
+ font-size: 1.05em
+ margin:
+ bottom: $small-margin / 4
+ a
+ color: darken($medium-gray, 30%)
.recent-posts, .footer-tags
- h3
- font-size: 1.7em
+ +span-columns(8)
+ +shift(2)
+ margin:
+ top: $medium-margin
li
+ margin:
+ top: $small-margin
- font-size: 1.05em
-
- .recent-posts
- +span-columns(6)
- +shift(2)
.footer-tags
+ li
+ display: inline
+ margin:
+ right: $small-margin
- +span-columns(2)
-
- .recent-posts, .footer-tags
- color: darken($medium-gray, 20%)
- a
- +transition(all .1s ease-in-out)
- color: $text-color
- &:hover
- color: $matcha-green
- border-bottom: 2px solid $matcha-green | 42 | 1.555556 | 23 | 19 |
3597217110ff42ba0284e44ef0b500cc5891e27d | index.js | index.js | var chalk = require('chalk'),
success = chalk.green,
error = chalk.red,
info = chalk.white,
warning = chalk.yellow,
text = chalk.white;
module.exports = {
success: success('\u2714'),
error: error('\u2718'),
point: info('\u2794'),
warning: warning('\u2757'),
bullet: text('\u2731')
};
| var chalk = require('chalk'),
success = chalk.green,
error = chalk.red,
info = chalk.white,
warning = chalk.yellow,
text = chalk.white,
process = chalk.blue;
module.exports = {
success: success('\u2714'),
error: error('\u2718'),
point: info('\u2794'),
warning: warning('\u2757'),
bullet: text('\u2731'),
inbound: process('\u10142'),
outbound: process('\u11013')
};
| Add arrow symbols, change identation for tabs | Add arrow symbols, change identation for tabs
| JavaScript | mit | marcoslhc/symbols | javascript | ## Code Before:
var chalk = require('chalk'),
success = chalk.green,
error = chalk.red,
info = chalk.white,
warning = chalk.yellow,
text = chalk.white;
module.exports = {
success: success('\u2714'),
error: error('\u2718'),
point: info('\u2794'),
warning: warning('\u2757'),
bullet: text('\u2731')
};
## Instruction:
Add arrow symbols, change identation for tabs
## Code After:
var chalk = require('chalk'),
success = chalk.green,
error = chalk.red,
info = chalk.white,
warning = chalk.yellow,
text = chalk.white,
process = chalk.blue;
module.exports = {
success: success('\u2714'),
error: error('\u2718'),
point: info('\u2794'),
warning: warning('\u2757'),
bullet: text('\u2731'),
inbound: process('\u10142'),
outbound: process('\u11013')
};
| var chalk = require('chalk'),
- success = chalk.green,
? ^^^^
+ success = chalk.green,
? ^
- error = chalk.red,
? ^^^^
+ error = chalk.red,
? ^
- info = chalk.white,
? ^^^^
+ info = chalk.white,
? ^
- warning = chalk.yellow,
? ^^^^
+ warning = chalk.yellow,
? ^
- text = chalk.white;
? ^^^^ ^
+ text = chalk.white,
? ^ ^
+ process = chalk.blue;
module.exports = {
- success: success('\u2714'),
? ^^^^
+ success: success('\u2714'),
? ^
- error: error('\u2718'),
? ^^^^
+ error: error('\u2718'),
? ^
- point: info('\u2794'),
? ^^^^
+ point: info('\u2794'),
? ^
- warning: warning('\u2757'),
? ^^^^
+ warning: warning('\u2757'),
? ^
- bullet: text('\u2731')
? ^^^^
+ bullet: text('\u2731'),
? ^ +
+ inbound: process('\u10142'),
+ outbound: process('\u11013')
}; | 23 | 1.642857 | 13 | 10 |
56c05b4a36b8754612b6c30aa351dc4ce6abbf88 | app/expeditions.rb | app/expeditions.rb | require 'rest-client'
require 'json'
module Expeditions
extend Discordrb::Commands::CommandContainer
command :regnum, description: 'Get a user\'s registration number for a given expedition', usage: "<expedition id> <user>", min_args: 2, max_args: 2 do |event, expedition_id, user_id|
registrations = JSON.parse(RestClient.get("https://api.smallworlds.io/api/expeditions/#{expedition_id}/registrations/", {accept: :json}).body)
if registrations.empty?
event.respond 'No registrations found for that expedition'
break
end
puts registrations
reg_user = registrations.find { |registration| registration['user'] == user_id.to_i }
puts reg_user
if reg_user.nil?
event.respond 'No registration found for that user'
break
end
"That user has registration number: **#{reg_user['registration_number']}**"
end
end
| require 'rest-client'
require 'json'
module Expeditions
extend Discordrb::Commands::CommandContainer
command :regnum, description: 'Get a user\'s registration number, optionally for a given expedition', usage: "<username> [<expedition id>]", min_args: 1, max_args: 2 do |event, username, expedition_id|
expedition_id ||= 1 # The current expedition.
user_object = JSON.parse(RestClient.get("https://api.smallworlds.io/api/users/", {accept: :json}).body)
user = user_object.find { |obj| obj['username'].downcase == username.downcase }
if user.nil?
event.respond "No user found with username #{username}"
break
end
registrations = JSON.parse(RestClient.get("https://api.smallworlds.io/api/expeditions/#{expedition_id}/registrations/", {accept: :json}).body)
if registrations.empty?
event.respond "No registrations found for expedition #{expedition_id}"
break
end
reg_user = registrations.find { |registration| registration['user'] == user['id'] }
if reg_user.nil?
event.respond "No registration found for #{username}"
break
end
"#{username}'s registration numer for expedition #{expedition_id}: **#{reg_user['registration_number'].to_s.rjust(3, "0")}**"
end
end
| Refactor to find by username | Refactor to find by username
| Ruby | mit | small-worlds/discordbot,small-worlds/discordbot | ruby | ## Code Before:
require 'rest-client'
require 'json'
module Expeditions
extend Discordrb::Commands::CommandContainer
command :regnum, description: 'Get a user\'s registration number for a given expedition', usage: "<expedition id> <user>", min_args: 2, max_args: 2 do |event, expedition_id, user_id|
registrations = JSON.parse(RestClient.get("https://api.smallworlds.io/api/expeditions/#{expedition_id}/registrations/", {accept: :json}).body)
if registrations.empty?
event.respond 'No registrations found for that expedition'
break
end
puts registrations
reg_user = registrations.find { |registration| registration['user'] == user_id.to_i }
puts reg_user
if reg_user.nil?
event.respond 'No registration found for that user'
break
end
"That user has registration number: **#{reg_user['registration_number']}**"
end
end
## Instruction:
Refactor to find by username
## Code After:
require 'rest-client'
require 'json'
module Expeditions
extend Discordrb::Commands::CommandContainer
command :regnum, description: 'Get a user\'s registration number, optionally for a given expedition', usage: "<username> [<expedition id>]", min_args: 1, max_args: 2 do |event, username, expedition_id|
expedition_id ||= 1 # The current expedition.
user_object = JSON.parse(RestClient.get("https://api.smallworlds.io/api/users/", {accept: :json}).body)
user = user_object.find { |obj| obj['username'].downcase == username.downcase }
if user.nil?
event.respond "No user found with username #{username}"
break
end
registrations = JSON.parse(RestClient.get("https://api.smallworlds.io/api/expeditions/#{expedition_id}/registrations/", {accept: :json}).body)
if registrations.empty?
event.respond "No registrations found for expedition #{expedition_id}"
break
end
reg_user = registrations.find { |registration| registration['user'] == user['id'] }
if reg_user.nil?
event.respond "No registration found for #{username}"
break
end
"#{username}'s registration numer for expedition #{expedition_id}: **#{reg_user['registration_number'].to_s.rjust(3, "0")}**"
end
end
| require 'rest-client'
require 'json'
module Expeditions
extend Discordrb::Commands::CommandContainer
- command :regnum, description: 'Get a user\'s registration number for a given expedition', usage: "<expedition id> <user>", min_args: 2, max_args: 2 do |event, expedition_id, user_id|
+ command :regnum, description: 'Get a user\'s registration number, optionally for a given expedition', usage: "<username> [<expedition id>]", min_args: 1, max_args: 2 do |event, username, expedition_id|
+ expedition_id ||= 1 # The current expedition.
+ user_object = JSON.parse(RestClient.get("https://api.smallworlds.io/api/users/", {accept: :json}).body)
+
+ user = user_object.find { |obj| obj['username'].downcase == username.downcase }
+
+ if user.nil?
+ event.respond "No user found with username #{username}"
+ break
+ end
+
registrations = JSON.parse(RestClient.get("https://api.smallworlds.io/api/expeditions/#{expedition_id}/registrations/", {accept: :json}).body)
if registrations.empty?
- event.respond 'No registrations found for that expedition'
? ^ ----- ^
+ event.respond "No registrations found for expedition #{expedition_id}"
? ^ ^^^^^^^^^^^^^^^^^^
break
end
- puts registrations
-
- reg_user = registrations.find { |registration| registration['user'] == user_id.to_i }
? ^ ^^^^^
+ reg_user = registrations.find { |registration| registration['user'] == user['id'] }
? ^^ ^^
-
- puts reg_user
if reg_user.nil?
- event.respond 'No registration found for that user'
? ^ ^^^^^ ^
+ event.respond "No registration found for #{username}"
? ^ ^^ ^^^^^^
break
end
- "That user has registration number: **#{reg_user['registration_number']}**"
+ "#{username}'s registration numer for expedition #{expedition_id}: **#{reg_user['registration_number'].to_s.rjust(3, "0")}**"
end
end | 24 | 0.857143 | 15 | 9 |
b817429e913f7b3868ca5e4dfad8ad6e0f4af1e3 | test/models/rss_log_test.rb | test/models/rss_log_test.rb |
require("test_helper")
class RssLogTest < UnitTestCase
def test_url_for_normalized_controllers
normalized_rss_log_types.each do |type|
rss_log = create_rss_log(type)
id = rss_log.target_id
assert_match(type_normalized_show_path(type, id), rss_log.url,
"rss_log.url incorrect for #{model(type)}")
end
end
# ---------- helpers ---------------------------------------------------------
def normalized_rss_log_types
RssLog.all_types.each_with_object([]) do |type, ary|
ary << type if model(type).controller_normalized?(model(type).name)
end
end
def model(type)
type.camelize.constantize
end
# rss_log factory
def create_rss_log(type)
# Target must have id; use an existing object to avoid hitting db
target = model(type).first
rss_log = RssLog.new
rss_log["#{type}_id".to_sym] = target.id
rss_log.updated_at = Time.zone.now
rss_log
end
def type_normalized_show_path(type, id)
%r{/#{model(type).show_controller}/#{id}}
end
end
|
require("test_helper")
class RssLogTest < UnitTestCase
# Alert developer if normalization changes the path of an RssLogg'ed object
# The test should be deleted once controllers for all RssLog'ged objects are
# normalized.
# See https://www.pivotaltracker.com/story/show/174685402
def test_url_for_normalized_controllers
normalized_rss_log_types.each do |type|
rss_log = create_rss_log(type)
id = rss_log.target_id
assert_match(type_normalized_show_path(type, id), rss_log.url,
"rss_log.url incorrect for #{model(type)}")
end
end
# ---------- helpers ---------------------------------------------------------
def normalized_rss_log_types
RssLog.all_types.each_with_object([]) do |type, ary|
ary << type if model(type).controller_normalized?(model(type).name)
end
end
def model(type)
type.camelize.constantize
end
# rss_log factory
def create_rss_log(type)
# Target must have id; use an existing object to avoid hitting db
target = model(type).first
rss_log = RssLog.new
rss_log["#{type}_id".to_sym] = target.id
rss_log.updated_at = Time.zone.now
rss_log
end
def type_normalized_show_path(type, id)
%r{/#{model(type).show_controller}/#{id}}
end
end
| Add comment about purpose of test | Add comment about purpose of test
| Ruby | mit | MushroomObserver/mushroom-observer,MushroomObserver/mushroom-observer,JoeCohen/mushroom-observer,MushroomObserver/mushroom-observer,JoeCohen/mushroom-observer,JoeCohen/mushroom-observer,MushroomObserver/mushroom-observer,JoeCohen/mushroom-observer,JoeCohen/mushroom-observer,JoeCohen/mushroom-observer,MushroomObserver/mushroom-observer,MushroomObserver/mushroom-observer,JoeCohen/mushroom-observer,MushroomObserver/mushroom-observer | ruby | ## Code Before:
require("test_helper")
class RssLogTest < UnitTestCase
def test_url_for_normalized_controllers
normalized_rss_log_types.each do |type|
rss_log = create_rss_log(type)
id = rss_log.target_id
assert_match(type_normalized_show_path(type, id), rss_log.url,
"rss_log.url incorrect for #{model(type)}")
end
end
# ---------- helpers ---------------------------------------------------------
def normalized_rss_log_types
RssLog.all_types.each_with_object([]) do |type, ary|
ary << type if model(type).controller_normalized?(model(type).name)
end
end
def model(type)
type.camelize.constantize
end
# rss_log factory
def create_rss_log(type)
# Target must have id; use an existing object to avoid hitting db
target = model(type).first
rss_log = RssLog.new
rss_log["#{type}_id".to_sym] = target.id
rss_log.updated_at = Time.zone.now
rss_log
end
def type_normalized_show_path(type, id)
%r{/#{model(type).show_controller}/#{id}}
end
end
## Instruction:
Add comment about purpose of test
## Code After:
require("test_helper")
class RssLogTest < UnitTestCase
# Alert developer if normalization changes the path of an RssLogg'ed object
# The test should be deleted once controllers for all RssLog'ged objects are
# normalized.
# See https://www.pivotaltracker.com/story/show/174685402
def test_url_for_normalized_controllers
normalized_rss_log_types.each do |type|
rss_log = create_rss_log(type)
id = rss_log.target_id
assert_match(type_normalized_show_path(type, id), rss_log.url,
"rss_log.url incorrect for #{model(type)}")
end
end
# ---------- helpers ---------------------------------------------------------
def normalized_rss_log_types
RssLog.all_types.each_with_object([]) do |type, ary|
ary << type if model(type).controller_normalized?(model(type).name)
end
end
def model(type)
type.camelize.constantize
end
# rss_log factory
def create_rss_log(type)
# Target must have id; use an existing object to avoid hitting db
target = model(type).first
rss_log = RssLog.new
rss_log["#{type}_id".to_sym] = target.id
rss_log.updated_at = Time.zone.now
rss_log
end
def type_normalized_show_path(type, id)
%r{/#{model(type).show_controller}/#{id}}
end
end
|
require("test_helper")
class RssLogTest < UnitTestCase
+ # Alert developer if normalization changes the path of an RssLogg'ed object
+ # The test should be deleted once controllers for all RssLog'ged objects are
+ # normalized.
+ # See https://www.pivotaltracker.com/story/show/174685402
def test_url_for_normalized_controllers
normalized_rss_log_types.each do |type|
rss_log = create_rss_log(type)
id = rss_log.target_id
assert_match(type_normalized_show_path(type, id), rss_log.url,
"rss_log.url incorrect for #{model(type)}")
end
end
# ---------- helpers ---------------------------------------------------------
def normalized_rss_log_types
RssLog.all_types.each_with_object([]) do |type, ary|
ary << type if model(type).controller_normalized?(model(type).name)
end
end
def model(type)
type.camelize.constantize
end
# rss_log factory
def create_rss_log(type)
# Target must have id; use an existing object to avoid hitting db
target = model(type).first
rss_log = RssLog.new
rss_log["#{type}_id".to_sym] = target.id
rss_log.updated_at = Time.zone.now
rss_log
end
def type_normalized_show_path(type, id)
%r{/#{model(type).show_controller}/#{id}}
end
end | 4 | 0.102564 | 4 | 0 |
5a8fac1838b2ed3ace12da7821cfde766794dcdd | roles/utils/vars/main.yml | roles/utils/vars/main.yml | ---
packages:
- apg #random password generator
- at
- bmon
- build-essential
- byobu #For remove-old-kernels
- cloc #Count lines of code
- git
- git-extras
- gnupg
- gparted
- htop
- incron
- iotop
- lftp
- lnav
- most
- mtr
- multitail
- ncdu
- openssl
- pandoc
- preload
- pv
- pydf
- qalc
- renameutils
- ranger
- rsync
- screenfetch
- task-spooler
- texlive-fonts-recommended #for pandoc to pdf
- tig
- tlp
- tlp-rdw
- tmux
- tree
- undistract-me
- xclip
- clipit
- silversearcher-ag
- vim-gtk
- curl
packages_arch:
- openssh
- cronie
packages_debian:
- anacron
- aptitude
- openssh-client
- openssh-server
| ---
packages:
- apg #random password generator
- at
- bmon
- build-essential
- byobu #For remove-old-kernels
- cloc #Count lines of code
- git
- git-extras
- gnupg
- gparted
- htop
- incron
- iotop
- lftp
- lnav
- most
- mtr
- multitail
- ncdu
- openssl
- pandoc
- preload
- pv
- pydf
- qalc
- renameutils
- ranger
- rsync
- screenfetch
- task-spooler
- texlive-fonts-recommended #for pandoc to pdf
- tig
- tlp
- tlp-rdw
- tmux
- tree
- undistract-me
- xclip
- clipit
- silversearcher-ag
- vim-gtk
- curl
- libimage-exiftool-perl
packages_arch:
- openssh
- cronie
packages_debian:
- anacron
- aptitude
- openssh-client
- openssh-server
| Add exiftool for pdf edit | Add exiftool for pdf edit
| YAML | apache-2.0 | mansonjesus/ansible-playbooks | yaml | ## Code Before:
---
packages:
- apg #random password generator
- at
- bmon
- build-essential
- byobu #For remove-old-kernels
- cloc #Count lines of code
- git
- git-extras
- gnupg
- gparted
- htop
- incron
- iotop
- lftp
- lnav
- most
- mtr
- multitail
- ncdu
- openssl
- pandoc
- preload
- pv
- pydf
- qalc
- renameutils
- ranger
- rsync
- screenfetch
- task-spooler
- texlive-fonts-recommended #for pandoc to pdf
- tig
- tlp
- tlp-rdw
- tmux
- tree
- undistract-me
- xclip
- clipit
- silversearcher-ag
- vim-gtk
- curl
packages_arch:
- openssh
- cronie
packages_debian:
- anacron
- aptitude
- openssh-client
- openssh-server
## Instruction:
Add exiftool for pdf edit
## Code After:
---
packages:
- apg #random password generator
- at
- bmon
- build-essential
- byobu #For remove-old-kernels
- cloc #Count lines of code
- git
- git-extras
- gnupg
- gparted
- htop
- incron
- iotop
- lftp
- lnav
- most
- mtr
- multitail
- ncdu
- openssl
- pandoc
- preload
- pv
- pydf
- qalc
- renameutils
- ranger
- rsync
- screenfetch
- task-spooler
- texlive-fonts-recommended #for pandoc to pdf
- tig
- tlp
- tlp-rdw
- tmux
- tree
- undistract-me
- xclip
- clipit
- silversearcher-ag
- vim-gtk
- curl
- libimage-exiftool-perl
packages_arch:
- openssh
- cronie
packages_debian:
- anacron
- aptitude
- openssh-client
- openssh-server
| ---
packages:
- apg #random password generator
- at
- bmon
- build-essential
- byobu #For remove-old-kernels
- cloc #Count lines of code
- git
- git-extras
- gnupg
- gparted
- htop
- incron
- iotop
- lftp
- lnav
- most
- mtr
- multitail
- ncdu
- openssl
- pandoc
- preload
- pv
- pydf
- qalc
- renameutils
- ranger
- rsync
- screenfetch
- task-spooler
- texlive-fonts-recommended #for pandoc to pdf
- tig
- tlp
- tlp-rdw
- tmux
- tree
- undistract-me
- xclip
- clipit
- silversearcher-ag
- vim-gtk
- curl
+ - libimage-exiftool-perl
packages_arch:
- openssh
- cronie
packages_debian:
- anacron
- aptitude
- openssh-client
- openssh-server | 1 | 0.018182 | 1 | 0 |
1058b7a70a12284b8b3ad3cc52e3832a9347f3d2 | header.php | header.php | <?php
/**
* Template for header
*
* <head> section and everything up until <div id="content">
*
* @Author: Roni Laukkarinen
* @Date: 2020-05-11 13:17:32
* @Last Modified by: Timi Wahalahti
* @Last Modified time: 2020-11-19 11:24:53
*
* @package air-light
*/
namespace Air_Light;
?>
<!doctype html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="profile" href="http://gmpg.org/xfn/11">
<?php wp_head(); ?>
</head>
<body <?php body_class( 'no-js' ); ?>>
<?php wp_body_open(); ?>
<div id="page" class="site">
<a class="skip-link screen-reader-text" href="#content"><?php echo esc_html( get_default_localization( 'Skip to content' ) ); ?></a>
<div class="nav-container">
<header class="site-header">
<?php get_template_part( 'template-parts/header/branding' ); ?>
<?php get_template_part( 'template-parts/header/navigation' ); ?>
</header>
</div><!-- .nav-container -->
<div class="site-content">
| <?php
/**
* Template for header
*
* <head> section and everything up until <div id="content">
*
* @Author: Roni Laukkarinen
* @Date: 2020-05-11 13:17:32
* @Last Modified by: Roni Laukkarinen
* @Last Modified time: 2021-02-25 13:47:40
*
* @package air-light
*/
namespace Air_Light;
?>
<!doctype html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="profile" href="http://gmpg.org/xfn/11">
<?php wp_head(); ?>
</head>
<body <?php body_class( 'no-js' ); ?>>
<a class="skip-link screen-reader-text" href="#content"><?php echo esc_html( get_default_localization( 'Skip to content' ) ); ?></a>
<?php wp_body_open(); ?>
<div id="page" class="site">
<div class="nav-container">
<header class="site-header">
<?php get_template_part( 'template-parts/header/branding' ); ?>
<?php get_template_part( 'template-parts/header/navigation' ); ?>
</header>
</div><!-- .nav-container -->
<div class="site-content">
| Move skip link right after body tag | Move skip link right after body tag
| PHP | mit | digitoimistodude/air,digitoimistodude/air,digitoimistodude/air | php | ## Code Before:
<?php
/**
* Template for header
*
* <head> section and everything up until <div id="content">
*
* @Author: Roni Laukkarinen
* @Date: 2020-05-11 13:17:32
* @Last Modified by: Timi Wahalahti
* @Last Modified time: 2020-11-19 11:24:53
*
* @package air-light
*/
namespace Air_Light;
?>
<!doctype html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="profile" href="http://gmpg.org/xfn/11">
<?php wp_head(); ?>
</head>
<body <?php body_class( 'no-js' ); ?>>
<?php wp_body_open(); ?>
<div id="page" class="site">
<a class="skip-link screen-reader-text" href="#content"><?php echo esc_html( get_default_localization( 'Skip to content' ) ); ?></a>
<div class="nav-container">
<header class="site-header">
<?php get_template_part( 'template-parts/header/branding' ); ?>
<?php get_template_part( 'template-parts/header/navigation' ); ?>
</header>
</div><!-- .nav-container -->
<div class="site-content">
## Instruction:
Move skip link right after body tag
## Code After:
<?php
/**
* Template for header
*
* <head> section and everything up until <div id="content">
*
* @Author: Roni Laukkarinen
* @Date: 2020-05-11 13:17:32
* @Last Modified by: Roni Laukkarinen
* @Last Modified time: 2021-02-25 13:47:40
*
* @package air-light
*/
namespace Air_Light;
?>
<!doctype html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="profile" href="http://gmpg.org/xfn/11">
<?php wp_head(); ?>
</head>
<body <?php body_class( 'no-js' ); ?>>
<a class="skip-link screen-reader-text" href="#content"><?php echo esc_html( get_default_localization( 'Skip to content' ) ); ?></a>
<?php wp_body_open(); ?>
<div id="page" class="site">
<div class="nav-container">
<header class="site-header">
<?php get_template_part( 'template-parts/header/branding' ); ?>
<?php get_template_part( 'template-parts/header/navigation' ); ?>
</header>
</div><!-- .nav-container -->
<div class="site-content">
| <?php
/**
* Template for header
*
* <head> section and everything up until <div id="content">
*
* @Author: Roni Laukkarinen
* @Date: 2020-05-11 13:17:32
- * @Last Modified by: Timi Wahalahti
+ * @Last Modified by: Roni Laukkarinen
- * @Last Modified time: 2020-11-19 11:24:53
? --- ^^ ^ - ^^
+ * @Last Modified time: 2021-02-25 13:47:40
? ^^^^^ ^ + ^^
*
* @package air-light
*/
namespace Air_Light;
?>
<!doctype html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="profile" href="http://gmpg.org/xfn/11">
<?php wp_head(); ?>
</head>
<body <?php body_class( 'no-js' ); ?>>
+ <a class="skip-link screen-reader-text" href="#content"><?php echo esc_html( get_default_localization( 'Skip to content' ) ); ?></a>
+
<?php wp_body_open(); ?>
<div id="page" class="site">
-
- <a class="skip-link screen-reader-text" href="#content"><?php echo esc_html( get_default_localization( 'Skip to content' ) ); ?></a>
<div class="nav-container">
<header class="site-header">
<?php get_template_part( 'template-parts/header/branding' ); ?>
<?php get_template_part( 'template-parts/header/navigation' ); ?>
</header>
</div><!-- .nav-container -->
<div class="site-content"> | 8 | 0.177778 | 4 | 4 |
355ec91fe37d78433715c652eee71f2ac14e91cc | README.md | README.md | [](https://styleci.io/repos/75443611)
[](https://codeclimate.com/github/VATSIM-UK/core)
[](https://travis-ci.org/VATSIM-UK/core)
## Upgrade Notes
The following are the upgrade notes for deploying in production.
### All Versions
1. Stop the queue and TeamSpeak daemon
2. Disable cronjobs
3. Run `composer install --optimize-autoloader --no-dev` (dev: `composer install`)
4. Run `php artisan migrate --step --force --no-interaction`
6. Run `npm install`
7. Run `npm run prod` (dev: `npm run dev`)
8. **Perform version-specific upgrade steps (below)**
9. Enable all cronjobs
10. Restart the queue and TeamSpeak daemon
### 3.3.0
* No version-specific steps required.
### Older Versions
To upgrade from older versions, check the `README.md` file for that release.
| [](https://styleci.io/repos/75443611)
[](https://codeclimate.com/github/VATSIM-UK/core)
[](https://travis-ci.org/VATSIM-UK/core)
## Upgrade Notes
The following are the upgrade notes for deploying in production.
### All Versions
1. Stop the queue and TeamSpeak daemon
2. Disable cronjobs
3. Run `composer install --optimize-autoloader --no-dev` (dev: `composer install`)
4. Run `php artisan migrate --step --force --no-interaction`
6. Run `npm install`
7. Run `npm run prod` (dev: `npm run dev`)
8. **Perform version-specific upgrade steps (below)**
9. Enable all cronjobs
10. Restart the queue and TeamSpeak daemon
### 3.3.0
* Import airport data to `airports` table.
### Older Versions
To upgrade from older versions, check the `README.md` file for that release.
| Add importing airports to deployment notes | Add importing airports to deployment notes
| Markdown | mit | atoff/core,enlim/core,atoff/core,enlim/core,enlim/core | markdown | ## Code Before:
[](https://styleci.io/repos/75443611)
[](https://codeclimate.com/github/VATSIM-UK/core)
[](https://travis-ci.org/VATSIM-UK/core)
## Upgrade Notes
The following are the upgrade notes for deploying in production.
### All Versions
1. Stop the queue and TeamSpeak daemon
2. Disable cronjobs
3. Run `composer install --optimize-autoloader --no-dev` (dev: `composer install`)
4. Run `php artisan migrate --step --force --no-interaction`
6. Run `npm install`
7. Run `npm run prod` (dev: `npm run dev`)
8. **Perform version-specific upgrade steps (below)**
9. Enable all cronjobs
10. Restart the queue and TeamSpeak daemon
### 3.3.0
* No version-specific steps required.
### Older Versions
To upgrade from older versions, check the `README.md` file for that release.
## Instruction:
Add importing airports to deployment notes
## Code After:
[](https://styleci.io/repos/75443611)
[](https://codeclimate.com/github/VATSIM-UK/core)
[](https://travis-ci.org/VATSIM-UK/core)
## Upgrade Notes
The following are the upgrade notes for deploying in production.
### All Versions
1. Stop the queue and TeamSpeak daemon
2. Disable cronjobs
3. Run `composer install --optimize-autoloader --no-dev` (dev: `composer install`)
4. Run `php artisan migrate --step --force --no-interaction`
6. Run `npm install`
7. Run `npm run prod` (dev: `npm run dev`)
8. **Perform version-specific upgrade steps (below)**
9. Enable all cronjobs
10. Restart the queue and TeamSpeak daemon
### 3.3.0
* Import airport data to `airports` table.
### Older Versions
To upgrade from older versions, check the `README.md` file for that release.
| [](https://styleci.io/repos/75443611)
[](https://codeclimate.com/github/VATSIM-UK/core)
[](https://travis-ci.org/VATSIM-UK/core)
## Upgrade Notes
The following are the upgrade notes for deploying in production.
### All Versions
1. Stop the queue and TeamSpeak daemon
2. Disable cronjobs
3. Run `composer install --optimize-autoloader --no-dev` (dev: `composer install`)
4. Run `php artisan migrate --step --force --no-interaction`
6. Run `npm install`
7. Run `npm run prod` (dev: `npm run dev`)
8. **Perform version-specific upgrade steps (below)**
9. Enable all cronjobs
10. Restart the queue and TeamSpeak daemon
### 3.3.0
- * No version-specific steps required.
+ * Import airport data to `airports` table.
### Older Versions
To upgrade from older versions, check the `README.md` file for that release. | 2 | 0.074074 | 1 | 1 |
ea05214716ffcba0ca6d4553e1458552478dfe63 | done/pong/src/pong/Ball.java | done/pong/src/pong/Ball.java | package pong;
import java.awt.Color;
import java.awt.Graphics2D;
import java.util.Random;
public class Ball {
private float x, y;
private float angle;
private float size;
private Color color;
public Ball() {
Random r = new Random();
this.angle = (float) (r.nextFloat() * 2 * Math.PI);
this.size = 13;
this.x = Screen.WIDTH / 2 - this.size / 2;
this.y = Screen.HEIGHT / 2 - this.size / 2;
this.color = Color.WHITE;
}
public void draw(Graphics2D g2d) {
g2d.setColor(color);
g2d.fillRect(
(int) this.x,
(int) this.y,
(int) this.size,
(int) this.size);
}
public void tick() {
}
}
| package pong;
import java.awt.Color;
import java.awt.Graphics2D;
import java.util.Random;
public class Ball {
private float x, y;
private float angle;
private float size;
private float speed;
private Color color;
public Ball() {
Random r = new Random();
this.angle = (float) (r.nextFloat() * 2 * Math.PI);
this.size = 13;
this.speed = 2;
this.x = Screen.WIDTH / 2 - this.size / 2;
this.y = Screen.HEIGHT / 2 - this.size / 2;
this.color = Color.WHITE;
}
public void draw(Graphics2D g2d) {
g2d.setColor(color);
g2d.fillRect(
(int) this.x,
(int) this.y,
(int) this.size,
(int) this.size);
}
public void tick() {
if (this.x + this.size > Screen.WIDTH) {
// game over, one point to left
} else if (this.x < 0) {
// game over, one point to right
}
if (this.y + this.size > Screen.HEIGHT || this.y < 0) {
this.angle = (float) (Math.PI - this.angle);
}
float d = this.speed;
float dx = (float) (d * Math.sin(this.angle));
float dy = (float) (d * Math.cos(this.angle));
this.x += dx;
this.y += dy;
}
}
| Make ball bounce off ceiling and floor | Make ball bounce off ceiling and floor
| Java | mit | SullyJHF/learn-to-code | java | ## Code Before:
package pong;
import java.awt.Color;
import java.awt.Graphics2D;
import java.util.Random;
public class Ball {
private float x, y;
private float angle;
private float size;
private Color color;
public Ball() {
Random r = new Random();
this.angle = (float) (r.nextFloat() * 2 * Math.PI);
this.size = 13;
this.x = Screen.WIDTH / 2 - this.size / 2;
this.y = Screen.HEIGHT / 2 - this.size / 2;
this.color = Color.WHITE;
}
public void draw(Graphics2D g2d) {
g2d.setColor(color);
g2d.fillRect(
(int) this.x,
(int) this.y,
(int) this.size,
(int) this.size);
}
public void tick() {
}
}
## Instruction:
Make ball bounce off ceiling and floor
## Code After:
package pong;
import java.awt.Color;
import java.awt.Graphics2D;
import java.util.Random;
public class Ball {
private float x, y;
private float angle;
private float size;
private float speed;
private Color color;
public Ball() {
Random r = new Random();
this.angle = (float) (r.nextFloat() * 2 * Math.PI);
this.size = 13;
this.speed = 2;
this.x = Screen.WIDTH / 2 - this.size / 2;
this.y = Screen.HEIGHT / 2 - this.size / 2;
this.color = Color.WHITE;
}
public void draw(Graphics2D g2d) {
g2d.setColor(color);
g2d.fillRect(
(int) this.x,
(int) this.y,
(int) this.size,
(int) this.size);
}
public void tick() {
if (this.x + this.size > Screen.WIDTH) {
// game over, one point to left
} else if (this.x < 0) {
// game over, one point to right
}
if (this.y + this.size > Screen.HEIGHT || this.y < 0) {
this.angle = (float) (Math.PI - this.angle);
}
float d = this.speed;
float dx = (float) (d * Math.sin(this.angle));
float dy = (float) (d * Math.cos(this.angle));
this.x += dx;
this.y += dy;
}
}
| package pong;
import java.awt.Color;
import java.awt.Graphics2D;
import java.util.Random;
public class Ball {
private float x, y;
private float angle;
private float size;
+ private float speed;
+
private Color color;
public Ball() {
Random r = new Random();
this.angle = (float) (r.nextFloat() * 2 * Math.PI);
this.size = 13;
+ this.speed = 2;
this.x = Screen.WIDTH / 2 - this.size / 2;
this.y = Screen.HEIGHT / 2 - this.size / 2;
this.color = Color.WHITE;
}
public void draw(Graphics2D g2d) {
g2d.setColor(color);
g2d.fillRect(
(int) this.x,
(int) this.y,
(int) this.size,
(int) this.size);
}
public void tick() {
+ if (this.x + this.size > Screen.WIDTH) {
+ // game over, one point to left
+ } else if (this.x < 0) {
+ // game over, one point to right
+ }
+ if (this.y + this.size > Screen.HEIGHT || this.y < 0) {
+ this.angle = (float) (Math.PI - this.angle);
+ }
+
+ float d = this.speed;
+ float dx = (float) (d * Math.sin(this.angle));
+ float dy = (float) (d * Math.cos(this.angle));
+
+ this.x += dx;
+ this.y += dy;
}
} | 18 | 0.514286 | 18 | 0 |
719c053ffeb46e25c4d0a02e9874805aae425735 | src/index.html | src/index.html | <!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>SARAI Maps</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
</head>
<body>
<div class="main-container">
<div class="navbar navbar-main navbar-default navbar--s-1">
<div class="container-fluid">
<div class="navbar-header">
<h1 id="logo" class="logo navbar-brand">
<a class="logo__link" href="/">
<img src="/assets/img/ui/sarai-logo.png" alt="Project SARAI" class="img"/>
</a>
<span class="hidden">Project SARAI</span>
</h1>
</div>
</div>
</div>
<app-root>Loading...</app-root>
</div>
</body>
</html>
| <!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>SARAI Maps</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
<style>
.hidden { display: none !important; }
</style>
</head>
<body>
<div class="main-container">
<div class="navbar navbar-main navbar-default navbar--s-1">
<div class="container-fluid">
<div class="navbar-header">
<h1 id="logo" class="logo navbar-brand">
<a class="logo__link" href="/">
<img src="/assets/img/ui/sarai-logo.png" alt="Project SARAI" class="img"/>
</a>
<span class="hidden">Project SARAI</span>
</h1>
</div>
</div>
</div>
<app-root>Loading...</app-root>
</div>
</body>
</html>
| Add .hidden as an inline style to prevent fouc | Add .hidden as an inline style to prevent fouc
| HTML | mit | ecsnavarretemit/sarai-interactive-maps,ecsnavarretemit/sarai-interactive-maps,ecsnavarretemit/sarai-ng2,ecsnavarretemit/sarai-ng2,ecsnavarretemit/sarai-ng2,ecsnavarretemit/sarai-interactive-maps | html | ## Code Before:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>SARAI Maps</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
</head>
<body>
<div class="main-container">
<div class="navbar navbar-main navbar-default navbar--s-1">
<div class="container-fluid">
<div class="navbar-header">
<h1 id="logo" class="logo navbar-brand">
<a class="logo__link" href="/">
<img src="/assets/img/ui/sarai-logo.png" alt="Project SARAI" class="img"/>
</a>
<span class="hidden">Project SARAI</span>
</h1>
</div>
</div>
</div>
<app-root>Loading...</app-root>
</div>
</body>
</html>
## Instruction:
Add .hidden as an inline style to prevent fouc
## Code After:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>SARAI Maps</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
<style>
.hidden { display: none !important; }
</style>
</head>
<body>
<div class="main-container">
<div class="navbar navbar-main navbar-default navbar--s-1">
<div class="container-fluid">
<div class="navbar-header">
<h1 id="logo" class="logo navbar-brand">
<a class="logo__link" href="/">
<img src="/assets/img/ui/sarai-logo.png" alt="Project SARAI" class="img"/>
</a>
<span class="hidden">Project SARAI</span>
</h1>
</div>
</div>
</div>
<app-root>Loading...</app-root>
</div>
</body>
</html>
| <!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>SARAI Maps</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
+ <style>
+ .hidden { display: none !important; }
+ </style>
</head>
<body>
<div class="main-container">
<div class="navbar navbar-main navbar-default navbar--s-1">
<div class="container-fluid">
<div class="navbar-header">
<h1 id="logo" class="logo navbar-brand">
<a class="logo__link" href="/">
<img src="/assets/img/ui/sarai-logo.png" alt="Project SARAI" class="img"/>
</a>
<span class="hidden">Project SARAI</span>
</h1>
</div>
</div>
</div>
<app-root>Loading...</app-root>
</div>
</body>
</html>
| 3 | 0.096774 | 3 | 0 |
87042a26ddf5f57317b17e610cbc186f8f4cb106 | TokenRate.php | TokenRate.php | <?
namespace iFixit\TokenBucket;
use \InvalidArgumentException;
/**
* Defines a rate of tokens per second. Specify the tokens you want to
* allow for a given number of seconds.
*/
class TokenRate {
private $rate;
public function __construct($tokens, $seconds) {
if (!is_int($tokens)) {
throw new InvalidArgumentException("Tokens must be an int");
}
if (!is_numeric($seconds)) {
throw new InvalidArgumentException("Seconds must be an int");
}
$this->tokens = $tokens;
$this->seconds = $seconds;
if ($this->tokens == 0 || $this->seconds == 0) {
$this->rate = 0;
} else {
$this->rate = (double)$this->tokens / (double)$this->seconds;
}
}
/**
* @return double rate of token regeneration
*/
public function getRate() {
return $this->rate;
}
public function getTokens() {
return $this->tokens;
}
public function getSeconds() {
return $this->seconds();
}
}
| <?
namespace iFixit\TokenBucket;
use \InvalidArgumentException;
/**
* Defines a rate of tokens per second. Specify the tokens you want to
* allow for a given number of seconds.
*/
class TokenRate {
private $rate;
private $tokens;
private $seconds;
public function __construct($tokens, $seconds) {
if (!is_int($tokens)) {
throw new InvalidArgumentException("Tokens must be an int");
}
if (!is_numeric($seconds)) {
throw new InvalidArgumentException("Seconds must be an int");
}
$this->tokens = $tokens;
$this->seconds = $seconds;
if ($this->tokens == 0 || $this->seconds == 0) {
$this->rate = 0;
} else {
$this->rate = (double)$this->tokens / (double)$this->seconds;
}
}
/**
* @return double rate of token regeneration
*/
public function getRate() {
return $this->rate;
}
public function getTokens() {
return $this->tokens;
}
public function getSeconds() {
return $this->seconds();
}
}
| Add tokens and seconds as private members | Add tokens and seconds as private members
These members shouldn't be accessible other than being specified in the
constructor. If they were updated after the fact then the rate wouldn't
represent the chnage.
| PHP | mit | iFixit/php-token-bucket | php | ## Code Before:
<?
namespace iFixit\TokenBucket;
use \InvalidArgumentException;
/**
* Defines a rate of tokens per second. Specify the tokens you want to
* allow for a given number of seconds.
*/
class TokenRate {
private $rate;
public function __construct($tokens, $seconds) {
if (!is_int($tokens)) {
throw new InvalidArgumentException("Tokens must be an int");
}
if (!is_numeric($seconds)) {
throw new InvalidArgumentException("Seconds must be an int");
}
$this->tokens = $tokens;
$this->seconds = $seconds;
if ($this->tokens == 0 || $this->seconds == 0) {
$this->rate = 0;
} else {
$this->rate = (double)$this->tokens / (double)$this->seconds;
}
}
/**
* @return double rate of token regeneration
*/
public function getRate() {
return $this->rate;
}
public function getTokens() {
return $this->tokens;
}
public function getSeconds() {
return $this->seconds();
}
}
## Instruction:
Add tokens and seconds as private members
These members shouldn't be accessible other than being specified in the
constructor. If they were updated after the fact then the rate wouldn't
represent the chnage.
## Code After:
<?
namespace iFixit\TokenBucket;
use \InvalidArgumentException;
/**
* Defines a rate of tokens per second. Specify the tokens you want to
* allow for a given number of seconds.
*/
class TokenRate {
private $rate;
private $tokens;
private $seconds;
public function __construct($tokens, $seconds) {
if (!is_int($tokens)) {
throw new InvalidArgumentException("Tokens must be an int");
}
if (!is_numeric($seconds)) {
throw new InvalidArgumentException("Seconds must be an int");
}
$this->tokens = $tokens;
$this->seconds = $seconds;
if ($this->tokens == 0 || $this->seconds == 0) {
$this->rate = 0;
} else {
$this->rate = (double)$this->tokens / (double)$this->seconds;
}
}
/**
* @return double rate of token regeneration
*/
public function getRate() {
return $this->rate;
}
public function getTokens() {
return $this->tokens;
}
public function getSeconds() {
return $this->seconds();
}
}
| <?
namespace iFixit\TokenBucket;
use \InvalidArgumentException;
/**
* Defines a rate of tokens per second. Specify the tokens you want to
* allow for a given number of seconds.
*/
class TokenRate {
private $rate;
+ private $tokens;
+ private $seconds;
public function __construct($tokens, $seconds) {
if (!is_int($tokens)) {
throw new InvalidArgumentException("Tokens must be an int");
}
if (!is_numeric($seconds)) {
throw new InvalidArgumentException("Seconds must be an int");
}
$this->tokens = $tokens;
$this->seconds = $seconds;
if ($this->tokens == 0 || $this->seconds == 0) {
$this->rate = 0;
} else {
$this->rate = (double)$this->tokens / (double)$this->seconds;
}
}
/**
* @return double rate of token regeneration
*/
public function getRate() {
return $this->rate;
}
public function getTokens() {
return $this->tokens;
}
public function getSeconds() {
return $this->seconds();
}
} | 2 | 0.043478 | 2 | 0 |
7c66e847d316f317f8659161d842659f62675edf | config/schedule.rb | config/schedule.rb | require 'yaml'
app_config = YAML.load_file("#{path}/config/application.yml")
set :output, error: "#{path}/log/error.log", standard: "#{path}/log/cron.log"
every 1.day, at: '4:00 am' do
rake '-s sitemap:refresh'
rake 'db:backup MAX=10'
end
case @environment
when 'production'
every 1.day, at: '4:00 am' do
command "backup perform -t #{app_config['application_name'].tr('-', '_')}"
end
end
| require 'yaml'
app_config = YAML.load_file("#{path}/config/application.yml")
set :output, error: "#{path}/log/error.log", standard: "#{path}/log/cron.log"
every 1.day, at: '4:00 am' do
rake '-s sitemap:refresh'
rake 'db:backup MAX=10'
end
case @environment
when 'production'
every 1.day, at: '4:00 am' do
command "backup perform -t #{app_config['application_name'].tr('-', '_')}"
end
end
every :reboot do
command "cd #{path} && bin/delayed_job start" # Restart delayed_job
end
| Add cron job to start delayed_job when server is rebooting | Add cron job to start delayed_job when server is rebooting
| Ruby | mit | lr-agenceweb/rails-starter,lr-agenceweb/rails-starter,lr-agenceweb/rails-starter,lr-agenceweb/rails-starter | ruby | ## Code Before:
require 'yaml'
app_config = YAML.load_file("#{path}/config/application.yml")
set :output, error: "#{path}/log/error.log", standard: "#{path}/log/cron.log"
every 1.day, at: '4:00 am' do
rake '-s sitemap:refresh'
rake 'db:backup MAX=10'
end
case @environment
when 'production'
every 1.day, at: '4:00 am' do
command "backup perform -t #{app_config['application_name'].tr('-', '_')}"
end
end
## Instruction:
Add cron job to start delayed_job when server is rebooting
## Code After:
require 'yaml'
app_config = YAML.load_file("#{path}/config/application.yml")
set :output, error: "#{path}/log/error.log", standard: "#{path}/log/cron.log"
every 1.day, at: '4:00 am' do
rake '-s sitemap:refresh'
rake 'db:backup MAX=10'
end
case @environment
when 'production'
every 1.day, at: '4:00 am' do
command "backup perform -t #{app_config['application_name'].tr('-', '_')}"
end
end
every :reboot do
command "cd #{path} && bin/delayed_job start" # Restart delayed_job
end
| require 'yaml'
app_config = YAML.load_file("#{path}/config/application.yml")
set :output, error: "#{path}/log/error.log", standard: "#{path}/log/cron.log"
every 1.day, at: '4:00 am' do
rake '-s sitemap:refresh'
rake 'db:backup MAX=10'
end
case @environment
when 'production'
every 1.day, at: '4:00 am' do
command "backup perform -t #{app_config['application_name'].tr('-', '_')}"
end
end
+
+ every :reboot do
+ command "cd #{path} && bin/delayed_job start" # Restart delayed_job
+ end | 4 | 0.25 | 4 | 0 |
1ba76b35d46ecdd44522db309dcf1ee7ab6d1520 | README.md | README.md |
[Grunt][grunt] plugin for html validation, using [Mike Smith's vnu.jar][vnujar].
## Getting Started
Install this grunt plugin next to your project's [grunt.js gruntfile][getting_started] with: `npm install grunt-html`
Then add this line to your project's `grunt.js` gruntfile:
```javascript
grunt.loadNpmTasks('grunt-html');
```
Then specify what files to validate in your config:
```javascript
grunt.initConfig({
htmllint: {
all: ["demos/**/*.html", "tests/**/*.html"]
}
});
```
For fast validation, keep that in a single group, as the validator initialization takes a few seconds.
[grunt]: https://github.com/cowboy/grunt
[getting_started]: https://github.com/cowboy/grunt/blob/master/docs/getting_started.md
[vnujar]: https://bitbucket.org/sideshowbarker/vnu/
## Release History
* 0.1.1 Rename html task to htmllint, fixes #1
* 0.1.0 First Release
## License
Copyright (c) 2012 Jörn Zaefferer
Licensed under the MIT license.
|
[Grunt][grunt] plugin for html validation, using [Mike Smith's vnu.jar][vnujar].
## Getting Started
Install this grunt plugin next to your project's [Gruntfile.js gruntfile][getting_started] with: `npm install grunt-html --save-dev`
Then add this line to your project's `Gruntfile.js`:
```javascript
grunt.loadNpmTasks('grunt-html');
```
Then specify what files to validate in your config:
```javascript
grunt.initConfig({
htmllint: {
all: ["demos/**/*.html", "tests/**/*.html"]
}
});
```
For fast validation, keep that in a single group, as the validator initialization takes a few seconds.
[grunt]: https://github.com/gruntjs/grunt
[getting_started]: https://github.com/gruntjs/grunt/wiki/Getting-started
[vnujar]: https://bitbucket.org/sideshowbarker/vnu/
## License
Copyright (c) 2012 Jörn Zaefferer
Licensed under the MIT license.
| Update readme for grunt 0.4 | Update readme for grunt 0.4
| Markdown | mit | wesjones/grunt-html,jzaefferer/grunt-html,mgechev/grunt-html,wesjones/grunt-html,wesjones/grunt-html,jzaefferer/grunt-html,jzaefferer/grunt-html | markdown | ## Code Before:
[Grunt][grunt] plugin for html validation, using [Mike Smith's vnu.jar][vnujar].
## Getting Started
Install this grunt plugin next to your project's [grunt.js gruntfile][getting_started] with: `npm install grunt-html`
Then add this line to your project's `grunt.js` gruntfile:
```javascript
grunt.loadNpmTasks('grunt-html');
```
Then specify what files to validate in your config:
```javascript
grunt.initConfig({
htmllint: {
all: ["demos/**/*.html", "tests/**/*.html"]
}
});
```
For fast validation, keep that in a single group, as the validator initialization takes a few seconds.
[grunt]: https://github.com/cowboy/grunt
[getting_started]: https://github.com/cowboy/grunt/blob/master/docs/getting_started.md
[vnujar]: https://bitbucket.org/sideshowbarker/vnu/
## Release History
* 0.1.1 Rename html task to htmllint, fixes #1
* 0.1.0 First Release
## License
Copyright (c) 2012 Jörn Zaefferer
Licensed under the MIT license.
## Instruction:
Update readme for grunt 0.4
## Code After:
[Grunt][grunt] plugin for html validation, using [Mike Smith's vnu.jar][vnujar].
## Getting Started
Install this grunt plugin next to your project's [Gruntfile.js gruntfile][getting_started] with: `npm install grunt-html --save-dev`
Then add this line to your project's `Gruntfile.js`:
```javascript
grunt.loadNpmTasks('grunt-html');
```
Then specify what files to validate in your config:
```javascript
grunt.initConfig({
htmllint: {
all: ["demos/**/*.html", "tests/**/*.html"]
}
});
```
For fast validation, keep that in a single group, as the validator initialization takes a few seconds.
[grunt]: https://github.com/gruntjs/grunt
[getting_started]: https://github.com/gruntjs/grunt/wiki/Getting-started
[vnujar]: https://bitbucket.org/sideshowbarker/vnu/
## License
Copyright (c) 2012 Jörn Zaefferer
Licensed under the MIT license.
|
[Grunt][grunt] plugin for html validation, using [Mike Smith's vnu.jar][vnujar].
## Getting Started
- Install this grunt plugin next to your project's [grunt.js gruntfile][getting_started] with: `npm install grunt-html`
? ^
+ Install this grunt plugin next to your project's [Gruntfile.js gruntfile][getting_started] with: `npm install grunt-html --save-dev`
? ^ ++++ +++++++++++
- Then add this line to your project's `grunt.js` gruntfile:
? ^^^^^^^^^^^
+ Then add this line to your project's `Gruntfile.js`:
? ^ ++++
```javascript
grunt.loadNpmTasks('grunt-html');
```
Then specify what files to validate in your config:
```javascript
grunt.initConfig({
htmllint: {
all: ["demos/**/*.html", "tests/**/*.html"]
}
});
```
For fast validation, keep that in a single group, as the validator initialization takes a few seconds.
- [grunt]: https://github.com/cowboy/grunt
? ^^^^^^
+ [grunt]: https://github.com/gruntjs/grunt
? ^^^^^^^
- [getting_started]: https://github.com/cowboy/grunt/blob/master/docs/getting_started.md
+ [getting_started]: https://github.com/gruntjs/grunt/wiki/Getting-started
[vnujar]: https://bitbucket.org/sideshowbarker/vnu/
-
- ## Release History
- * 0.1.1 Rename html task to htmllint, fixes #1
- * 0.1.0 First Release
## License
Copyright (c) 2012 Jörn Zaefferer
Licensed under the MIT license. | 12 | 0.342857 | 4 | 8 |
d76589114d1723bb0cb666dcb70058b74052e63b | src/backend/port/dynloader/win32.c | src/backend/port/dynloader/win32.c | /* $PostgreSQL: pgsql/src/backend/port/dynloader/win32.c,v 1.4 2004/11/17 08:30:08 neilc Exp $ */
#include <windows.h>
char *dlerror(void);
int dlclose(void *handle);
void *dlsym(void *handle, const char *symbol);
void *dlopen(const char *path, int mode);
char *
dlerror(void)
{
return "error";
}
int
dlclose(void *handle)
{
return FreeLibrary((HMODULE) handle) ? 0 : 1;
}
void *
dlsym(void *handle, const char *symbol)
{
return (void *) GetProcAddress((HMODULE) handle, symbol);
}
void *
dlopen(const char *path, int mode)
{
return (void *) LoadLibrary(path);
}
| /* $PostgreSQL: pgsql/src/backend/port/dynloader/win32.c,v 1.5 2004/12/02 19:38:50 momjian Exp $ */
#include <windows.h>
char *dlerror(void);
int dlclose(void *handle);
void *dlsym(void *handle, const char *symbol);
void *dlopen(const char *path, int mode);
char *
dlerror(void)
{
return "dynamic load error";
}
int
dlclose(void *handle)
{
return FreeLibrary((HMODULE) handle) ? 0 : 1;
}
void *
dlsym(void *handle, const char *symbol)
{
return (void *) GetProcAddress((HMODULE) handle, symbol);
}
void *
dlopen(const char *path, int mode)
{
return (void *) LoadLibrary(path);
}
| Change Win32 dlerror message to: | Change Win32 dlerror message to:
return "dynamic loading error";
| C | mpl-2.0 | yazun/postgres-xl,randomtask1155/gpdb,janebeckman/gpdb,snaga/postgres-xl,tpostgres-projects/tPostgres,jmcatamney/gpdb,rvs/gpdb,techdragon/Postgres-XL,adam8157/gpdb,xuegang/gpdb,ashwinstar/gpdb,foyzur/gpdb,snaga/postgres-xl,zeroae/postgres-xl,lintzc/gpdb,edespino/gpdb,50wu/gpdb,arcivanov/postgres-xl,Chibin/gpdb,yuanzhao/gpdb,postmind-net/postgres-xl,0x0FFF/gpdb,foyzur/gpdb,snaga/postgres-xl,greenplum-db/gpdb,0x0FFF/gpdb,jmcatamney/gpdb,ovr/postgres-xl,janebeckman/gpdb,kaknikhil/gpdb,ahachete/gpdb,ashwinstar/gpdb,rubikloud/gpdb,royc1/gpdb,lintzc/gpdb,pavanvd/postgres-xl,ashwinstar/gpdb,lintzc/gpdb,edespino/gpdb,adam8157/gpdb,lisakowen/gpdb,cjcjameson/gpdb,lpetrov-pivotal/gpdb,zaksoup/gpdb,janebeckman/gpdb,ahachete/gpdb,Quikling/gpdb,CraigHarris/gpdb,Chibin/gpdb,royc1/gpdb,Quikling/gpdb,jmcatamney/gpdb,xinzweb/gpdb,yuanzhao/gpdb,tangp3/gpdb,kaknikhil/gpdb,postmind-net/postgres-xl,Quikling/gpdb,kmjungersen/PostgresXL,janebeckman/gpdb,Chibin/gpdb,zaksoup/gpdb,rvs/gpdb,Quikling/gpdb,CraigHarris/gpdb,Chibin/gpdb,cjcjameson/gpdb,chrishajas/gpdb,foyzur/gpdb,yazun/postgres-xl,edespino/gpdb,yuanzhao/gpdb,lpetrov-pivotal/gpdb,lisakowen/gpdb,yuanzhao/gpdb,xuegang/gpdb,janebeckman/gpdb,chrishajas/gpdb,xinzweb/gpdb,tangp3/gpdb,yazun/postgres-xl,lisakowen/gpdb,kaknikhil/gpdb,rvs/gpdb,xuegang/gpdb,kmjungersen/PostgresXL,xinzweb/gpdb,jmcatamney/gpdb,yuanzhao/gpdb,kmjungersen/PostgresXL,janebeckman/gpdb,zeroae/postgres-xl,atris/gpdb,adam8157/gpdb,50wu/gpdb,Chibin/gpdb,tpostgres-projects/tPostgres,0x0FFF/gpdb,xinzweb/gpdb,greenplum-db/gpdb,foyzur/gpdb,oberstet/postgres-xl,foyzur/gpdb,cjcjameson/gpdb,Postgres-XL/Postgres-XL,ahachete/gpdb,ashwinstar/gpdb,zeroae/postgres-xl,janebeckman/gpdb,lisakowen/gpdb,royc1/gpdb,lintzc/gpdb,Quikling/gpdb,tangp3/gpdb,jmcatamney/gpdb,Quikling/gpdb,kaknikhil/gpdb,xuegang/gpdb,ovr/postgres-xl,janebeckman/gpdb,xuegang/gpdb,pavanvd/postgres-xl,Postgres-XL/Postgres-XL,xinzweb/gpdb,lpetrov-pivotal/gpdb,yazun/postgres-xl,oberstet/postgres-xl,yuanzhao/gpdb,Chibin/gpdb,rvs/gpdb,arcivanov/postgres-xl,xinzweb/gpdb,ovr/postgres-xl,yuanzhao/gpdb,ahachete/gpdb,techdragon/Postgres-XL,royc1/gpdb,tangp3/gpdb,royc1/gpdb,postmind-net/postgres-xl,cjcjameson/gpdb,oberstet/postgres-xl,postmind-net/postgres-xl,Postgres-XL/Postgres-XL,tpostgres-projects/tPostgres,ashwinstar/gpdb,50wu/gpdb,cjcjameson/gpdb,rubikloud/gpdb,rubikloud/gpdb,edespino/gpdb,greenplum-db/gpdb,snaga/postgres-xl,randomtask1155/gpdb,50wu/gpdb,oberstet/postgres-xl,rubikloud/gpdb,ahachete/gpdb,cjcjameson/gpdb,Chibin/gpdb,zeroae/postgres-xl,Chibin/gpdb,lpetrov-pivotal/gpdb,edespino/gpdb,greenplum-db/gpdb,kaknikhil/gpdb,techdragon/Postgres-XL,ashwinstar/gpdb,chrishajas/gpdb,ovr/postgres-xl,cjcjameson/gpdb,atris/gpdb,CraigHarris/gpdb,50wu/gpdb,lpetrov-pivotal/gpdb,randomtask1155/gpdb,tpostgres-projects/tPostgres,adam8157/gpdb,arcivanov/postgres-xl,chrishajas/gpdb,lisakowen/gpdb,chrishajas/gpdb,greenplum-db/gpdb,zaksoup/gpdb,rvs/gpdb,kaknikhil/gpdb,ovr/postgres-xl,jmcatamney/gpdb,rvs/gpdb,jmcatamney/gpdb,greenplum-db/gpdb,CraigHarris/gpdb,atris/gpdb,pavanvd/postgres-xl,50wu/gpdb,CraigHarris/gpdb,xuegang/gpdb,Quikling/gpdb,cjcjameson/gpdb,kaknikhil/gpdb,zeroae/postgres-xl,royc1/gpdb,ahachete/gpdb,chrishajas/gpdb,randomtask1155/gpdb,lisakowen/gpdb,lisakowen/gpdb,rvs/gpdb,rubikloud/gpdb,janebeckman/gpdb,0x0FFF/gpdb,xuegang/gpdb,zaksoup/gpdb,atris/gpdb,zaksoup/gpdb,foyzur/gpdb,techdragon/Postgres-XL,lpetrov-pivotal/gpdb,randomtask1155/gpdb,ahachete/gpdb,edespino/gpdb,CraigHarris/gpdb,tangp3/gpdb,lpetrov-pivotal/gpdb,lisakowen/gpdb,Quikling/gpdb,rubikloud/gpdb,rubikloud/gpdb,xuegang/gpdb,pavanvd/postgres-xl,atris/gpdb,xinzweb/gpdb,greenplum-db/gpdb,royc1/gpdb,kmjungersen/PostgresXL,Chibin/gpdb,chrishajas/gpdb,randomtask1155/gpdb,ahachete/gpdb,tangp3/gpdb,zaksoup/gpdb,tangp3/gpdb,0x0FFF/gpdb,kaknikhil/gpdb,Chibin/gpdb,edespino/gpdb,yazun/postgres-xl,janebeckman/gpdb,oberstet/postgres-xl,jmcatamney/gpdb,rvs/gpdb,Postgres-XL/Postgres-XL,rvs/gpdb,ashwinstar/gpdb,CraigHarris/gpdb,xuegang/gpdb,Quikling/gpdb,ashwinstar/gpdb,edespino/gpdb,0x0FFF/gpdb,lpetrov-pivotal/gpdb,adam8157/gpdb,randomtask1155/gpdb,foyzur/gpdb,arcivanov/postgres-xl,50wu/gpdb,lintzc/gpdb,rvs/gpdb,tangp3/gpdb,CraigHarris/gpdb,snaga/postgres-xl,kaknikhil/gpdb,lintzc/gpdb,edespino/gpdb,foyzur/gpdb,atris/gpdb,tpostgres-projects/tPostgres,cjcjameson/gpdb,lintzc/gpdb,xinzweb/gpdb,Quikling/gpdb,rubikloud/gpdb,edespino/gpdb,lintzc/gpdb,kaknikhil/gpdb,50wu/gpdb,0x0FFF/gpdb,0x0FFF/gpdb,yuanzhao/gpdb,lintzc/gpdb,arcivanov/postgres-xl,yuanzhao/gpdb,zaksoup/gpdb,adam8157/gpdb,atris/gpdb,greenplum-db/gpdb,royc1/gpdb,postmind-net/postgres-xl,kmjungersen/PostgresXL,arcivanov/postgres-xl,adam8157/gpdb,randomtask1155/gpdb,zaksoup/gpdb,yuanzhao/gpdb,adam8157/gpdb,CraigHarris/gpdb,cjcjameson/gpdb,atris/gpdb,Postgres-XL/Postgres-XL,techdragon/Postgres-XL,pavanvd/postgres-xl,chrishajas/gpdb | c | ## Code Before:
/* $PostgreSQL: pgsql/src/backend/port/dynloader/win32.c,v 1.4 2004/11/17 08:30:08 neilc Exp $ */
#include <windows.h>
char *dlerror(void);
int dlclose(void *handle);
void *dlsym(void *handle, const char *symbol);
void *dlopen(const char *path, int mode);
char *
dlerror(void)
{
return "error";
}
int
dlclose(void *handle)
{
return FreeLibrary((HMODULE) handle) ? 0 : 1;
}
void *
dlsym(void *handle, const char *symbol)
{
return (void *) GetProcAddress((HMODULE) handle, symbol);
}
void *
dlopen(const char *path, int mode)
{
return (void *) LoadLibrary(path);
}
## Instruction:
Change Win32 dlerror message to:
return "dynamic loading error";
## Code After:
/* $PostgreSQL: pgsql/src/backend/port/dynloader/win32.c,v 1.5 2004/12/02 19:38:50 momjian Exp $ */
#include <windows.h>
char *dlerror(void);
int dlclose(void *handle);
void *dlsym(void *handle, const char *symbol);
void *dlopen(const char *path, int mode);
char *
dlerror(void)
{
return "dynamic load error";
}
int
dlclose(void *handle)
{
return FreeLibrary((HMODULE) handle) ? 0 : 1;
}
void *
dlsym(void *handle, const char *symbol)
{
return (void *) GetProcAddress((HMODULE) handle, symbol);
}
void *
dlopen(const char *path, int mode)
{
return (void *) LoadLibrary(path);
}
| - /* $PostgreSQL: pgsql/src/backend/port/dynloader/win32.c,v 1.4 2004/11/17 08:30:08 neilc Exp $ */
? ^ ^^^^^ ^ --- ----
+ /* $PostgreSQL: pgsql/src/backend/port/dynloader/win32.c,v 1.5 2004/12/02 19:38:50 momjian Exp $ */
? ^ +++++ ^^^ ^ ++++++
#include <windows.h>
char *dlerror(void);
int dlclose(void *handle);
void *dlsym(void *handle, const char *symbol);
void *dlopen(const char *path, int mode);
char *
dlerror(void)
{
- return "error";
+ return "dynamic load error";
}
int
dlclose(void *handle)
{
return FreeLibrary((HMODULE) handle) ? 0 : 1;
}
void *
dlsym(void *handle, const char *symbol)
{
return (void *) GetProcAddress((HMODULE) handle, symbol);
}
void *
dlopen(const char *path, int mode)
{
return (void *) LoadLibrary(path);
} | 4 | 0.125 | 2 | 2 |
09a58298b194c9fe15e7e636556ba72c0ba95488 | _config.yml | _config.yml | data_dir: .
exclude:
- README.md
- CHANGELOG.md
- ISSUE_TEMPLATE.md
- LICENSE
- node_modules
- bin
- sandbox
- stash
| data_dir: .
include:
- _redirects
exclude:
- README.md
- CHANGELOG.md
- ISSUE_TEMPLATE.md
- LICENSE
- node_modules
- bin
- sandbox
- stash
| Include _redirects in _site directory | Include _redirects in _site directory
| YAML | mit | colebemis/feather,colebemis/feather | yaml | ## Code Before:
data_dir: .
exclude:
- README.md
- CHANGELOG.md
- ISSUE_TEMPLATE.md
- LICENSE
- node_modules
- bin
- sandbox
- stash
## Instruction:
Include _redirects in _site directory
## Code After:
data_dir: .
include:
- _redirects
exclude:
- README.md
- CHANGELOG.md
- ISSUE_TEMPLATE.md
- LICENSE
- node_modules
- bin
- sandbox
- stash
| data_dir: .
+ include:
+ - _redirects
exclude:
- README.md
- CHANGELOG.md
- ISSUE_TEMPLATE.md
- LICENSE
- node_modules
- bin
- sandbox
- stash | 2 | 0.2 | 2 | 0 |
de5b1d713d1d81da5778f00edcc44a017cfb3df2 | README.md | README.md | An example how to use [OpenSheetMusicDisplay](https://github.com/opensheetmusicdisplay/opensheetmusicdisplay) within a Webpack build. Uses TypeScript.
## Usage
```
$ npm install
$ npm start
```
Now you can browse to http://127.0.0.1:8080 and see your running instance of
OpenSheetMusicDisplay.
If you decided to play around and make changes, you can trigger a rebuild anytime using
```
$ npm run webpack
```
You may have to do a hard refresh in the browser (Ctrl+F5), Chrome sometimes caches the old page and compiled index.ts.
## Project structure
* `index.ts` - the application's entry point, contains all sources
* `webpack.config.js` - Webpack configuration
* `tsconfig.json` - TypeScript compiler configuration
* `MuzioClementi_SonatinaOpus36No1_Part1.xml` - the MusicXML file to be displayed
### Build artifacts
* `dist/` - directory containing all build artifacts, will be served on `npm start`
| An example how to use [OpenSheetMusicDisplay](https://github.com/opensheetmusicdisplay/opensheetmusicdisplay) within a Webpack build. Uses TypeScript.
## Usage
```
$ npm install
$ npm start
```
Now you can browse to http://127.0.0.1:8080 and see your running instance of
OpenSheetMusicDisplay.
If you decided to play around and make changes, you can trigger a rebuild anytime using
```
$ npm run webpack
```
You may have to do a hard refresh in the browser (Ctrl+F5), Chrome sometimes caches the old page and compiled index.ts.
## Project structure
* `index.ts` - the application's entry point, contains all sources
* `webpack.config.js` - Webpack configuration
* `tsconfig.json` - TypeScript compiler configuration
* `Resources/` - Resources folder for project data
* `MuzioClementi_SonatinaOpus36No1_Part1.xml` - the MusicXML file to be displayed
* `favicon.ico` - OSMD icon for the tab bar
### Build artifacts
* `dist/` - directory containing all build artifacts, will be served from a local http server on `npm start`
| Update Readme - project structure | Update Readme - project structure | Markdown | mit | opensheetmusicdisplay/webpack-usage-example,opensheetmusicdisplay/webpack-usage-example | markdown | ## Code Before:
An example how to use [OpenSheetMusicDisplay](https://github.com/opensheetmusicdisplay/opensheetmusicdisplay) within a Webpack build. Uses TypeScript.
## Usage
```
$ npm install
$ npm start
```
Now you can browse to http://127.0.0.1:8080 and see your running instance of
OpenSheetMusicDisplay.
If you decided to play around and make changes, you can trigger a rebuild anytime using
```
$ npm run webpack
```
You may have to do a hard refresh in the browser (Ctrl+F5), Chrome sometimes caches the old page and compiled index.ts.
## Project structure
* `index.ts` - the application's entry point, contains all sources
* `webpack.config.js` - Webpack configuration
* `tsconfig.json` - TypeScript compiler configuration
* `MuzioClementi_SonatinaOpus36No1_Part1.xml` - the MusicXML file to be displayed
### Build artifacts
* `dist/` - directory containing all build artifacts, will be served on `npm start`
## Instruction:
Update Readme - project structure
## Code After:
An example how to use [OpenSheetMusicDisplay](https://github.com/opensheetmusicdisplay/opensheetmusicdisplay) within a Webpack build. Uses TypeScript.
## Usage
```
$ npm install
$ npm start
```
Now you can browse to http://127.0.0.1:8080 and see your running instance of
OpenSheetMusicDisplay.
If you decided to play around and make changes, you can trigger a rebuild anytime using
```
$ npm run webpack
```
You may have to do a hard refresh in the browser (Ctrl+F5), Chrome sometimes caches the old page and compiled index.ts.
## Project structure
* `index.ts` - the application's entry point, contains all sources
* `webpack.config.js` - Webpack configuration
* `tsconfig.json` - TypeScript compiler configuration
* `Resources/` - Resources folder for project data
* `MuzioClementi_SonatinaOpus36No1_Part1.xml` - the MusicXML file to be displayed
* `favicon.ico` - OSMD icon for the tab bar
### Build artifacts
* `dist/` - directory containing all build artifacts, will be served from a local http server on `npm start`
| An example how to use [OpenSheetMusicDisplay](https://github.com/opensheetmusicdisplay/opensheetmusicdisplay) within a Webpack build. Uses TypeScript.
## Usage
```
$ npm install
$ npm start
```
Now you can browse to http://127.0.0.1:8080 and see your running instance of
OpenSheetMusicDisplay.
If you decided to play around and make changes, you can trigger a rebuild anytime using
```
$ npm run webpack
```
You may have to do a hard refresh in the browser (Ctrl+F5), Chrome sometimes caches the old page and compiled index.ts.
## Project structure
* `index.ts` - the application's entry point, contains all sources
* `webpack.config.js` - Webpack configuration
* `tsconfig.json` - TypeScript compiler configuration
+ * `Resources/` - Resources folder for project data
- * `MuzioClementi_SonatinaOpus36No1_Part1.xml` - the MusicXML file to be displayed
+ * `MuzioClementi_SonatinaOpus36No1_Part1.xml` - the MusicXML file to be displayed
? ++
+ * `favicon.ico` - OSMD icon for the tab bar
### Build artifacts
- * `dist/` - directory containing all build artifacts, will be served on `npm start`
+ * `dist/` - directory containing all build artifacts, will be served from a local http server on `npm start`
? +++++++++++++++++++++++++
| 6 | 0.230769 | 4 | 2 |
632febaac3f6e83bf1f94a09366279428acc1f07 | lib/tasks/emails.rake | lib/tasks/emails.rake | desc "Send daily emails"
task :send_emails => :environment do
User.all.each {|u| u.send_notification_email rescue nil } if Time.now.utc < Date.parse('2012-12-25')
end
| desc "Send daily emails"
task :send_emails => :environment do
User.all.each {|u| u.send_notification_email rescue nil } if Time.now.utc >= Date.parse("#{CURRENT_YEAR}-12-01") && Time.now.utc < Date.parse("#{CURRENT_YEAR}-12-25")
end
| Send email notifcations during december 2013 | Send email notifcations during december 2013
| Ruby | mit | davefp/24pullrequests,erikaheidi/24pullrequests,erikaheidi/24pullrequests,davefp/24pullrequests | ruby | ## Code Before:
desc "Send daily emails"
task :send_emails => :environment do
User.all.each {|u| u.send_notification_email rescue nil } if Time.now.utc < Date.parse('2012-12-25')
end
## Instruction:
Send email notifcations during december 2013
## Code After:
desc "Send daily emails"
task :send_emails => :environment do
User.all.each {|u| u.send_notification_email rescue nil } if Time.now.utc >= Date.parse("#{CURRENT_YEAR}-12-01") && Time.now.utc < Date.parse("#{CURRENT_YEAR}-12-25")
end
| desc "Send daily emails"
task :send_emails => :environment do
- User.all.each {|u| u.send_notification_email rescue nil } if Time.now.utc < Date.parse('2012-12-25')
+ User.all.each {|u| u.send_notification_email rescue nil } if Time.now.utc >= Date.parse("#{CURRENT_YEAR}-12-01") && Time.now.utc < Date.parse("#{CURRENT_YEAR}-12-25")
end | 2 | 0.5 | 1 | 1 |
07e7f5023958538933802f78c7bdd5d61f04a825 | flocker/restapi/__init__.py | flocker/restapi/__init__.py |
from ._infrastructure import structured
__all__ = ["structured"]
|
from ._infrastructure import (
structured, EndpointResponse, userDocumentation,
)
__all__ = ["structured", "EndpointResponse", "userDocumentation"]
| Address review comment: Make more APIs public. | Address review comment: Make more APIs public.
| Python | apache-2.0 | moypray/flocker,adamtheturtle/flocker,Azulinho/flocker,agonzalezro/flocker,1d4Nf6/flocker,1d4Nf6/flocker,runcom/flocker,1d4Nf6/flocker,moypray/flocker,lukemarsden/flocker,LaynePeng/flocker,jml/flocker,moypray/flocker,adamtheturtle/flocker,lukemarsden/flocker,wallnerryan/flocker-profiles,mbrukman/flocker,jml/flocker,AndyHuu/flocker,achanda/flocker,wallnerryan/flocker-profiles,hackday-profilers/flocker,Azulinho/flocker,lukemarsden/flocker,wallnerryan/flocker-profiles,achanda/flocker,w4ngyi/flocker,achanda/flocker,Azulinho/flocker,AndyHuu/flocker,LaynePeng/flocker,agonzalezro/flocker,mbrukman/flocker,mbrukman/flocker,agonzalezro/flocker,AndyHuu/flocker,runcom/flocker,w4ngyi/flocker,jml/flocker,hackday-profilers/flocker,hackday-profilers/flocker,LaynePeng/flocker,runcom/flocker,adamtheturtle/flocker,w4ngyi/flocker | python | ## Code Before:
from ._infrastructure import structured
__all__ = ["structured"]
## Instruction:
Address review comment: Make more APIs public.
## Code After:
from ._infrastructure import (
structured, EndpointResponse, userDocumentation,
)
__all__ = ["structured", "EndpointResponse", "userDocumentation"]
|
- from ._infrastructure import structured
? ^^^^^^^^^^
+ from ._infrastructure import (
? ^
+ structured, EndpointResponse, userDocumentation,
+ )
- __all__ = ["structured"]
+ __all__ = ["structured", "EndpointResponse", "userDocumentation"] | 6 | 1.2 | 4 | 2 |
bcd1b1fb25a7e509d435a1996489a0fb21465a56 | src/Providers/ServiceProvider.php | src/Providers/ServiceProvider.php | <?php
namespace Orchestra\Support\Providers;
use Illuminate\Support\ServiceProvider as BaseServiceProvider;
abstract class ServiceProvider extends BaseServiceProvider
{
use Traits\PackageProvider;
/**
* Register a database migration path.
*
* @param array|string $paths
*
* @return void
*/
protected function loadMigrationsFrom($paths)
{
if ($this->app->bound('migrator')) {
parent::loadMigrationsFrom($paths);
}
}
}
| <?php
namespace Orchestra\Support\Providers;
use Illuminate\Support\ServiceProvider as BaseServiceProvider;
abstract class ServiceProvider extends BaseServiceProvider
{
use Traits\PackageProvider;
}
| Remove redundant method. Laravel core have solve the underlying issue. | Remove redundant method. Laravel core have solve the underlying issue.
Signed-off-by: crynobone <e1a543840a942eb68427510a8a483282a7bfeddf@gmail.com>
| PHP | mit | orchestral/support | php | ## Code Before:
<?php
namespace Orchestra\Support\Providers;
use Illuminate\Support\ServiceProvider as BaseServiceProvider;
abstract class ServiceProvider extends BaseServiceProvider
{
use Traits\PackageProvider;
/**
* Register a database migration path.
*
* @param array|string $paths
*
* @return void
*/
protected function loadMigrationsFrom($paths)
{
if ($this->app->bound('migrator')) {
parent::loadMigrationsFrom($paths);
}
}
}
## Instruction:
Remove redundant method. Laravel core have solve the underlying issue.
Signed-off-by: crynobone <e1a543840a942eb68427510a8a483282a7bfeddf@gmail.com>
## Code After:
<?php
namespace Orchestra\Support\Providers;
use Illuminate\Support\ServiceProvider as BaseServiceProvider;
abstract class ServiceProvider extends BaseServiceProvider
{
use Traits\PackageProvider;
}
| <?php
namespace Orchestra\Support\Providers;
use Illuminate\Support\ServiceProvider as BaseServiceProvider;
abstract class ServiceProvider extends BaseServiceProvider
{
use Traits\PackageProvider;
-
- /**
- * Register a database migration path.
- *
- * @param array|string $paths
- *
- * @return void
- */
- protected function loadMigrationsFrom($paths)
- {
- if ($this->app->bound('migrator')) {
- parent::loadMigrationsFrom($paths);
- }
- }
} | 14 | 0.583333 | 0 | 14 |
0fcf47c09402bd49866ace6ddbe584de40800534 | yahoo.py | yahoo.py | import time
from yahoo_finance import Share
# Collect 30 mins of Finance data on 5 companies, one value per minute
nyt = Share('NYT')
ibm = Share('IBM')
google = Share('GOOG')
facebook = Share('FB')
linkedin = Share('LNKD')
for minute in range(30):
print "%s minutes" % minute
nyt.refresh()
print "The New York Times' stock price is $%s" % nyt.get_price()
ibm.refresh()
print "IBM's stock price is $%s" % ibm.get_price()
google.refresh()
print "Google's stock price is $%s" % google.get_price()
facebook.refresh()
print "Facebook's stock price is $%s" % facebook.get_price()
linkedin.refresh()
print "Linkedin's stock price is $%s" % linkedin.get_price()
time.sleep(60)
| import time
from yahoo_finance import Share
# Collect 30 mins of Finance data on 5 companies, one value per minute
for minute in range(30):
nyt = Share('NYT')
ibm = Share('IBM')
google = Share('GOOG')
facebook = Share('FB')
linkedin = Share('LNKD')
print "%s minutes" % minute
print "The New York Times' stock price is $%s" % nyt.get_price()
print "IBM's stock price is $%s" % ibm.get_price()
print "Google's stock price is $%s" % google.get_price()
print "Facebook's stock price is $%s" % facebook.get_price()
print "Linkedin's stock price is $%s" % linkedin.get_price()
time.sleep(60)
| Remove need for refresh() by putting everything in loop | Remove need for refresh() by putting everything in loop
| Python | mit | cathyq/yahoo-finance | python | ## Code Before:
import time
from yahoo_finance import Share
# Collect 30 mins of Finance data on 5 companies, one value per minute
nyt = Share('NYT')
ibm = Share('IBM')
google = Share('GOOG')
facebook = Share('FB')
linkedin = Share('LNKD')
for minute in range(30):
print "%s minutes" % minute
nyt.refresh()
print "The New York Times' stock price is $%s" % nyt.get_price()
ibm.refresh()
print "IBM's stock price is $%s" % ibm.get_price()
google.refresh()
print "Google's stock price is $%s" % google.get_price()
facebook.refresh()
print "Facebook's stock price is $%s" % facebook.get_price()
linkedin.refresh()
print "Linkedin's stock price is $%s" % linkedin.get_price()
time.sleep(60)
## Instruction:
Remove need for refresh() by putting everything in loop
## Code After:
import time
from yahoo_finance import Share
# Collect 30 mins of Finance data on 5 companies, one value per minute
for minute in range(30):
nyt = Share('NYT')
ibm = Share('IBM')
google = Share('GOOG')
facebook = Share('FB')
linkedin = Share('LNKD')
print "%s minutes" % minute
print "The New York Times' stock price is $%s" % nyt.get_price()
print "IBM's stock price is $%s" % ibm.get_price()
print "Google's stock price is $%s" % google.get_price()
print "Facebook's stock price is $%s" % facebook.get_price()
print "Linkedin's stock price is $%s" % linkedin.get_price()
time.sleep(60)
| import time
from yahoo_finance import Share
# Collect 30 mins of Finance data on 5 companies, one value per minute
- nyt = Share('NYT')
- ibm = Share('IBM')
- google = Share('GOOG')
- facebook = Share('FB')
- linkedin = Share('LNKD')
for minute in range(30):
+ nyt = Share('NYT')
+ ibm = Share('IBM')
+ google = Share('GOOG')
+ facebook = Share('FB')
+ linkedin = Share('LNKD')
+
print "%s minutes" % minute
- nyt.refresh()
print "The New York Times' stock price is $%s" % nyt.get_price()
- ibm.refresh()
print "IBM's stock price is $%s" % ibm.get_price()
- google.refresh()
print "Google's stock price is $%s" % google.get_price()
- facebook.refresh()
print "Facebook's stock price is $%s" % facebook.get_price()
- linkedin.refresh()
print "Linkedin's stock price is $%s" % linkedin.get_price()
time.sleep(60)
| 16 | 0.666667 | 6 | 10 |
0576c47fab332dcbeee8713b616ebc387548e22c | src/test/gls/syntax/ParsingTest.groovy | src/test/gls/syntax/ParsingTest.groovy | package gls.syntax
public class ParsingTest extends gls.CompilableTestSupport {
void testExpressionParsingWithCastingInFrontOfAClosure() {
int[] numbers = new int[3]
shouldCompile """
(String) {-> print ""}.call()
"""
shouldCompile """
(String[]) {-> print ""}.call()
"""
shouldCompile """
(short) {-> print numbers[0]}.call()
"""
shouldCompile """
(short[]) {-> print numbers}.call()
"""
def testObj = new Groovy2605()
def val1 = (Groovy2605) {-> return testObj}.call()
assert val1 instanceof Groovy2605
def val2 = (String){-> return testObj}.call()
assert val2 instanceof String
assert val2 == "[A Groovy2605 object]"
def val3 = (short) {-> return numbers[0]}.call()
assert val3 instanceof Short
def val4 = (short[]) {-> return numbers}.call()
assert val4.class.componentType == short
}
}
class Groovy2605 {
String toString(){
return "[A Groovy2605 object]"
}
}
| package gls.syntax
public class ParsingTest extends gls.CompilableTestSupport {
void testExpressionParsingWithCastingInFrontOfAClosure() {
int[] numbers = new int[3]
shouldCompile """
(String) {-> print ""}.call()
"""
shouldCompile """
(String[]) {-> print ""}.call()
"""
shouldCompile """
(short) {-> print numbers[0]}.call()
"""
shouldCompile """
(short[]) {-> print numbers}.call()
"""
def testObj = new Groovy2605()
def val1 = (Groovy2605) {-> return testObj}.call()
assert val1 instanceof Groovy2605
def val2 = (String){-> return testObj}.call()
assert val2 instanceof String
assert val2 == "[A Groovy2605 object]"
def val3 = (short) {-> return numbers[0]}.call()
assert val3 instanceof Short
def val4 = (short[]) {-> return numbers}.call()
assert val4.class.componentType == short
}
void testExpressionParsingWithCastInFrontOfAMap() {
shouldCompile """
def m = (Map)[a:{ "foo"; println 'bar' }]
"""
}
}
class Groovy2605 {
String toString(){
return "[A Groovy2605 object]"
}
}
| Test for GROOVY-4058: Unexpected compilation error with MapEntryExpression usage - groovy grammar issue? | Test for GROOVY-4058: Unexpected compilation error with MapEntryExpression usage - groovy grammar issue?
git-svn-id: aa43ce4553b005588bb3cc6c16966320b011facb@19706 a5544e8c-8a19-0410-ba12-f9af4593a198
| Groovy | apache-2.0 | apache/incubator-groovy,yukangguo/incubator-groovy,bsideup/incubator-groovy,nobeans/incubator-groovy,russel/groovy,ebourg/incubator-groovy,dpolivaev/groovy,armsargis/groovy,alien11689/groovy-core,gillius/incubator-groovy,russel/incubator-groovy,kidaa/incubator-groovy,guangying945/incubator-groovy,adjohnson916/groovy-core,guangying945/incubator-groovy,armsargis/groovy,apache/incubator-groovy,i55ac/incubator-groovy,alien11689/groovy-core,aaronzirbes/incubator-groovy,avafanasiev/groovy,groovy/groovy-core,alien11689/incubator-groovy,jwagenleitner/incubator-groovy,fpavageau/groovy,paulk-asert/incubator-groovy,taoguan/incubator-groovy,groovy/groovy-core,samanalysis/incubator-groovy,EPadronU/incubator-groovy,yukangguo/incubator-groovy,mariogarcia/groovy-core,PascalSchumacher/incubator-groovy,mariogarcia/groovy-core,upadhyayap/incubator-groovy,christoph-frick/groovy-core,yukangguo/incubator-groovy,genqiang/incubator-groovy,tkruse/incubator-groovy,pledbrook/incubator-groovy,sagarsane/groovy-core,aim-for-better/incubator-groovy,alien11689/groovy-core,PascalSchumacher/incubator-groovy,nkhuyu/incubator-groovy,adjohnson916/groovy-core,ebourg/groovy-core,ebourg/groovy-core,shils/incubator-groovy,kenzanmedia/incubator-groovy,apache/incubator-groovy,apache/groovy,christoph-frick/groovy-core,upadhyayap/incubator-groovy,eginez/incubator-groovy,apache/groovy,rlovtangen/groovy-core,sagarsane/groovy-core,jwagenleitner/incubator-groovy,paplorinc/incubator-groovy,aim-for-better/incubator-groovy,sagarsane/groovy-core,ChanJLee/incubator-groovy,yukangguo/incubator-groovy,samanalysis/incubator-groovy,kenzanmedia/incubator-groovy,kidaa/incubator-groovy,nobeans/incubator-groovy,paulk-asert/incubator-groovy,dpolivaev/groovy,sagarsane/groovy-core,rabbitcount/incubator-groovy,kenzanmedia/incubator-groovy,paulk-asert/incubator-groovy,antoaravinth/incubator-groovy,jwagenleitner/incubator-groovy,rlovtangen/groovy-core,paulk-asert/groovy,traneHead/groovy-core,i55ac/incubator-groovy,shils/groovy,mariogarcia/groovy-core,aim-for-better/incubator-groovy,ChanJLee/incubator-groovy,eginez/incubator-groovy,genqiang/incubator-groovy,samanalysis/incubator-groovy,adjohnson916/groovy-core,guangying945/incubator-groovy,shils/incubator-groovy,adjohnson916/groovy-core,EPadronU/incubator-groovy,dpolivaev/groovy,genqiang/incubator-groovy,avafanasiev/groovy,nkhuyu/incubator-groovy,antoaravinth/incubator-groovy,christoph-frick/groovy-core,kidaa/incubator-groovy,eginez/incubator-groovy,paulk-asert/groovy,fpavageau/groovy,adjohnson916/incubator-groovy,jwagenleitner/groovy,shils/groovy,antoaravinth/incubator-groovy,pickypg/incubator-groovy,PascalSchumacher/incubator-groovy,EPadronU/incubator-groovy,taoguan/incubator-groovy,ebourg/incubator-groovy,traneHead/groovy-core,ChanJLee/incubator-groovy,taoguan/incubator-groovy,bsideup/groovy-core,russel/groovy,aaronzirbes/incubator-groovy,paulk-asert/incubator-groovy,alien11689/incubator-groovy,sagarsane/groovy-core,aaronzirbes/incubator-groovy,rlovtangen/groovy-core,graemerocher/incubator-groovy,fpavageau/groovy,gillius/incubator-groovy,apache/incubator-groovy,upadhyayap/incubator-groovy,ChanJLee/incubator-groovy,shils/groovy,avafanasiev/groovy,rlovtangen/groovy-core,russel/groovy,paplorinc/incubator-groovy,mariogarcia/groovy-core,paplorinc/incubator-groovy,taoguan/incubator-groovy,groovy/groovy-core,apache/groovy,russel/groovy,bsideup/incubator-groovy,jwagenleitner/groovy,bsideup/incubator-groovy,aaronzirbes/incubator-groovy,russel/incubator-groovy,russel/incubator-groovy,PascalSchumacher/incubator-groovy,samanalysis/incubator-groovy,adjohnson916/incubator-groovy,russel/incubator-groovy,guangying945/incubator-groovy,rlovtangen/groovy-core,ebourg/groovy-core,bsideup/groovy-core,gillius/incubator-groovy,rabbitcount/incubator-groovy,paulk-asert/groovy,antoaravinth/incubator-groovy,armsargis/groovy,ebourg/groovy-core,pickypg/incubator-groovy,fpavageau/groovy,nkhuyu/incubator-groovy,christoph-frick/groovy-core,jwagenleitner/groovy,jwagenleitner/groovy,nkhuyu/incubator-groovy,aim-for-better/incubator-groovy,paplorinc/incubator-groovy,sagarsane/incubator-groovy,nobeans/incubator-groovy,upadhyayap/incubator-groovy,ebourg/groovy-core,pickypg/incubator-groovy,sagarsane/incubator-groovy,kidaa/incubator-groovy,genqiang/incubator-groovy,alien11689/groovy-core,sagarsane/incubator-groovy,dpolivaev/groovy,christoph-frick/groovy-core,avafanasiev/groovy,nobeans/incubator-groovy,pledbrook/incubator-groovy,traneHead/groovy-core,sagarsane/incubator-groovy,traneHead/groovy-core,i55ac/incubator-groovy,ebourg/incubator-groovy,tkruse/incubator-groovy,groovy/groovy-core,EPadronU/incubator-groovy,pickypg/incubator-groovy,bsideup/groovy-core,alien11689/groovy-core,jwagenleitner/incubator-groovy,mariogarcia/groovy-core,rabbitcount/incubator-groovy,paulk-asert/incubator-groovy,shils/incubator-groovy,apache/groovy,kenzanmedia/incubator-groovy,shils/incubator-groovy,graemerocher/incubator-groovy,adjohnson916/incubator-groovy,ebourg/incubator-groovy,tkruse/incubator-groovy,groovy/groovy-core,adjohnson916/groovy-core,alien11689/incubator-groovy,armsargis/groovy,paulk-asert/groovy,rabbitcount/incubator-groovy,graemerocher/incubator-groovy,PascalSchumacher/incubator-groovy,bsideup/incubator-groovy,tkruse/incubator-groovy,pledbrook/incubator-groovy,i55ac/incubator-groovy,adjohnson916/incubator-groovy,bsideup/groovy-core,shils/groovy,graemerocher/incubator-groovy,alien11689/incubator-groovy,gillius/incubator-groovy,eginez/incubator-groovy,pledbrook/incubator-groovy | groovy | ## Code Before:
package gls.syntax
public class ParsingTest extends gls.CompilableTestSupport {
void testExpressionParsingWithCastingInFrontOfAClosure() {
int[] numbers = new int[3]
shouldCompile """
(String) {-> print ""}.call()
"""
shouldCompile """
(String[]) {-> print ""}.call()
"""
shouldCompile """
(short) {-> print numbers[0]}.call()
"""
shouldCompile """
(short[]) {-> print numbers}.call()
"""
def testObj = new Groovy2605()
def val1 = (Groovy2605) {-> return testObj}.call()
assert val1 instanceof Groovy2605
def val2 = (String){-> return testObj}.call()
assert val2 instanceof String
assert val2 == "[A Groovy2605 object]"
def val3 = (short) {-> return numbers[0]}.call()
assert val3 instanceof Short
def val4 = (short[]) {-> return numbers}.call()
assert val4.class.componentType == short
}
}
class Groovy2605 {
String toString(){
return "[A Groovy2605 object]"
}
}
## Instruction:
Test for GROOVY-4058: Unexpected compilation error with MapEntryExpression usage - groovy grammar issue?
git-svn-id: aa43ce4553b005588bb3cc6c16966320b011facb@19706 a5544e8c-8a19-0410-ba12-f9af4593a198
## Code After:
package gls.syntax
public class ParsingTest extends gls.CompilableTestSupport {
void testExpressionParsingWithCastingInFrontOfAClosure() {
int[] numbers = new int[3]
shouldCompile """
(String) {-> print ""}.call()
"""
shouldCompile """
(String[]) {-> print ""}.call()
"""
shouldCompile """
(short) {-> print numbers[0]}.call()
"""
shouldCompile """
(short[]) {-> print numbers}.call()
"""
def testObj = new Groovy2605()
def val1 = (Groovy2605) {-> return testObj}.call()
assert val1 instanceof Groovy2605
def val2 = (String){-> return testObj}.call()
assert val2 instanceof String
assert val2 == "[A Groovy2605 object]"
def val3 = (short) {-> return numbers[0]}.call()
assert val3 instanceof Short
def val4 = (short[]) {-> return numbers}.call()
assert val4.class.componentType == short
}
void testExpressionParsingWithCastInFrontOfAMap() {
shouldCompile """
def m = (Map)[a:{ "foo"; println 'bar' }]
"""
}
}
class Groovy2605 {
String toString(){
return "[A Groovy2605 object]"
}
}
| package gls.syntax
public class ParsingTest extends gls.CompilableTestSupport {
void testExpressionParsingWithCastingInFrontOfAClosure() {
int[] numbers = new int[3]
shouldCompile """
(String) {-> print ""}.call()
"""
shouldCompile """
(String[]) {-> print ""}.call()
"""
shouldCompile """
(short) {-> print numbers[0]}.call()
"""
shouldCompile """
(short[]) {-> print numbers}.call()
"""
def testObj = new Groovy2605()
def val1 = (Groovy2605) {-> return testObj}.call()
assert val1 instanceof Groovy2605
def val2 = (String){-> return testObj}.call()
assert val2 instanceof String
assert val2 == "[A Groovy2605 object]"
def val3 = (short) {-> return numbers[0]}.call()
assert val3 instanceof Short
def val4 = (short[]) {-> return numbers}.call()
assert val4.class.componentType == short
}
+
+ void testExpressionParsingWithCastInFrontOfAMap() {
+ shouldCompile """
+ def m = (Map)[a:{ "foo"; println 'bar' }]
+ """
+ }
}
class Groovy2605 {
String toString(){
return "[A Groovy2605 object]"
}
} | 6 | 0.139535 | 6 | 0 |
b65d49df58dc63e30ad1bff31161892e1be781d7 | app/views/images/_list.html.erb | app/views/images/_list.html.erb | <% imageable.images.each do |image| %>
<div class="thumbnail col-sm-4">
<a href="<%= image.url %>">
<img src="<%= image.url(w: 150) %>">
</a>
<% if user_signed_in? && (current_user.owns?(imageable) || current_user.admin?) %>
<div class="image-controls pull-right">
<% if image == imageable.cover_image %>
cover
<% else %>
<%= link_to "make cover", image_path(image, cover: true), method: :patch %>
<% end %>
|
<%= link_to image_tag("delete"), image_path(image), method: :delete %>
</div>
<% end %>
<div class="clearfix"></div>
</div>
<% end %> | <%
parent = { parent_type: imageable.class, parent_id: imageable.id }
imageable.images.each do |image| %>
<div class="thumbnail col-sm-4">
<a href="<%= image.url %>">
<img src="<%= image.url(w: 150) %>">
</a>
<% if user_signed_in? && (current_user.owns?(imageable) || current_user.admin?) %>
<div class="image-controls pull-right">
<% if image == imageable.cover_image %>
cover
<% else %>
<%= link_to "make cover", image_path(image, parent.merge(cover: true)), method: :patch %>
<% end %>
|
<%= link_to image_tag("delete"), image_path(image, parent), method: :delete %>
</div>
<% end %>
<div class="clearfix"></div>
</div>
<% end %> | Fix image deletion and cover-making. | Fix image deletion and cover-making.
| HTML+ERB | mit | winnitron/winnitron_reborn,winnitron/winnitron_reborn,winnitron/winnitron_reborn | html+erb | ## Code Before:
<% imageable.images.each do |image| %>
<div class="thumbnail col-sm-4">
<a href="<%= image.url %>">
<img src="<%= image.url(w: 150) %>">
</a>
<% if user_signed_in? && (current_user.owns?(imageable) || current_user.admin?) %>
<div class="image-controls pull-right">
<% if image == imageable.cover_image %>
cover
<% else %>
<%= link_to "make cover", image_path(image, cover: true), method: :patch %>
<% end %>
|
<%= link_to image_tag("delete"), image_path(image), method: :delete %>
</div>
<% end %>
<div class="clearfix"></div>
</div>
<% end %>
## Instruction:
Fix image deletion and cover-making.
## Code After:
<%
parent = { parent_type: imageable.class, parent_id: imageable.id }
imageable.images.each do |image| %>
<div class="thumbnail col-sm-4">
<a href="<%= image.url %>">
<img src="<%= image.url(w: 150) %>">
</a>
<% if user_signed_in? && (current_user.owns?(imageable) || current_user.admin?) %>
<div class="image-controls pull-right">
<% if image == imageable.cover_image %>
cover
<% else %>
<%= link_to "make cover", image_path(image, parent.merge(cover: true)), method: :patch %>
<% end %>
|
<%= link_to image_tag("delete"), image_path(image, parent), method: :delete %>
</div>
<% end %>
<div class="clearfix"></div>
</div>
<% end %> | + <%
+ parent = { parent_type: imageable.class, parent_id: imageable.id }
- <% imageable.images.each do |image| %>
? ^^
+ imageable.images.each do |image| %>
? ^
<div class="thumbnail col-sm-4">
<a href="<%= image.url %>">
<img src="<%= image.url(w: 150) %>">
</a>
<% if user_signed_in? && (current_user.owns?(imageable) || current_user.admin?) %>
<div class="image-controls pull-right">
<% if image == imageable.cover_image %>
cover
<% else %>
- <%= link_to "make cover", image_path(image, cover: true), method: :patch %>
+ <%= link_to "make cover", image_path(image, parent.merge(cover: true)), method: :patch %>
? +++++++++++++ +
<% end %>
|
- <%= link_to image_tag("delete"), image_path(image), method: :delete %>
+ <%= link_to image_tag("delete"), image_path(image, parent), method: :delete %>
? ++++++++
</div>
<% end %>
<div class="clearfix"></div>
</div>
<% end %> | 8 | 0.4 | 5 | 3 |
88c6d82212267a676ba9b50168eecf8e5f77bf81 | PREUPLOAD.cfg | PREUPLOAD.cfg | [Hook Scripts]
checkstyle_hook = ../../development/tools/checkstyle/checkstyle.py --sha ${PREUPLOAD_COMMIT}
[Builtin Hooks]
commit_msg_bug_field = true
commit_msg_changeid_field = true
commit_msg_test_field = true
| [Hook Scripts]
checkstyle_hook = ../../development/tools/checkstyle/checkstyle.py --sha ${PREUPLOAD_COMMIT}
[Builtin Hooks]
commit_msg_changeid_field = true
commit_msg_test_field = true
| Remove requirement for bug field in commit message. | Remove requirement for bug field in commit message.
Bug: 31494824
Test: Did not test it, but this CL could have had no bug number.
Change-Id: I1d6f30f6a0641a50514566aeb98a3589c930b3e4
| INI | apache-2.0 | AndroidX/androidx,AndroidX/androidx,AndroidX/androidx,aosp-mirror/platform_frameworks_support,androidx/androidx,AndroidX/androidx,AndroidX/androidx,AndroidX/androidx,androidx/androidx,aosp-mirror/platform_frameworks_support,androidx/androidx,AndroidX/androidx,androidx/androidx,aosp-mirror/platform_frameworks_support,androidx/androidx,androidx/androidx,aosp-mirror/platform_frameworks_support,AndroidX/androidx,androidx/androidx,AndroidX/androidx,androidx/androidx,androidx/androidx,androidx/androidx,AndroidX/androidx,aosp-mirror/platform_frameworks_support | ini | ## Code Before:
[Hook Scripts]
checkstyle_hook = ../../development/tools/checkstyle/checkstyle.py --sha ${PREUPLOAD_COMMIT}
[Builtin Hooks]
commit_msg_bug_field = true
commit_msg_changeid_field = true
commit_msg_test_field = true
## Instruction:
Remove requirement for bug field in commit message.
Bug: 31494824
Test: Did not test it, but this CL could have had no bug number.
Change-Id: I1d6f30f6a0641a50514566aeb98a3589c930b3e4
## Code After:
[Hook Scripts]
checkstyle_hook = ../../development/tools/checkstyle/checkstyle.py --sha ${PREUPLOAD_COMMIT}
[Builtin Hooks]
commit_msg_changeid_field = true
commit_msg_test_field = true
| [Hook Scripts]
checkstyle_hook = ../../development/tools/checkstyle/checkstyle.py --sha ${PREUPLOAD_COMMIT}
[Builtin Hooks]
- commit_msg_bug_field = true
commit_msg_changeid_field = true
commit_msg_test_field = true | 1 | 0.142857 | 0 | 1 |
57d0011d58f94332db747b9b4b8e23bd00bbedcb | collects/meta/web/download/index.rkt | collects/meta/web/download/index.rkt |
(require racket/string "data.rkt")
(define (in-ftp . paths)
(string-join (cons "/var/ftp/pub/racket" paths) "/"))
(define docs (symlink (in-ftp "docs")))
(define installers (symlink (in-ftp "installers")))
(provide index)
(define index
(page #:link-title "Downloads"
@ul{@li{Current @a[href: `(,installers "/recent")]{installers}
(or @a[href: installers]{all versions}).}
@li{Current documentation in
@a[href: `(,docs "/recent/html")]{HTML} and in
@a[href: `(,docs "/recent/pdf")]{PDF}
(or @a[href: docs]{all versions}).}}))
|
(require racket/string "data.rkt" "../www/download.rkt")
(define (in-ftp . paths)
(string-join (cons "/var/ftp/pub/racket" paths) "/"))
(define docs (symlink (in-ftp "docs")))
(define installers (symlink (in-ftp "installers")))
(provide index)
(define index
@page[#:link-title "Downloads"]{
@div[style: "float: right;"]{@download-button}
Use these links to browse the download directories directly:
@ul{@li{Current @a[href: `(,installers "/recent")]{installers}
(or @a[href: installers]{all versions}).}
@li{Current documentation in
@a[href: `(,docs "/recent/html")]{HTML} and in
@a[href: `(,docs "/recent/pdf")]{PDF}
(or @a[href: docs]{all versions}).}}})
| Put a download button on the toplevel download page too. | Put a download button on the toplevel download page too.
The download toplevel is not meant to be part of the web, but people
will still get there -- so be nice.
| Racket | bsd-2-clause | mafagafogigante/racket,mafagafogigante/racket,mafagafogigante/racket,mafagafogigante/racket,mafagafogigante/racket,mafagafogigante/racket,mafagafogigante/racket,mafagafogigante/racket,mafagafogigante/racket | racket | ## Code Before:
(require racket/string "data.rkt")
(define (in-ftp . paths)
(string-join (cons "/var/ftp/pub/racket" paths) "/"))
(define docs (symlink (in-ftp "docs")))
(define installers (symlink (in-ftp "installers")))
(provide index)
(define index
(page #:link-title "Downloads"
@ul{@li{Current @a[href: `(,installers "/recent")]{installers}
(or @a[href: installers]{all versions}).}
@li{Current documentation in
@a[href: `(,docs "/recent/html")]{HTML} and in
@a[href: `(,docs "/recent/pdf")]{PDF}
(or @a[href: docs]{all versions}).}}))
## Instruction:
Put a download button on the toplevel download page too.
The download toplevel is not meant to be part of the web, but people
will still get there -- so be nice.
## Code After:
(require racket/string "data.rkt" "../www/download.rkt")
(define (in-ftp . paths)
(string-join (cons "/var/ftp/pub/racket" paths) "/"))
(define docs (symlink (in-ftp "docs")))
(define installers (symlink (in-ftp "installers")))
(provide index)
(define index
@page[#:link-title "Downloads"]{
@div[style: "float: right;"]{@download-button}
Use these links to browse the download directories directly:
@ul{@li{Current @a[href: `(,installers "/recent")]{installers}
(or @a[href: installers]{all versions}).}
@li{Current documentation in
@a[href: `(,docs "/recent/html")]{HTML} and in
@a[href: `(,docs "/recent/pdf")]{PDF}
(or @a[href: docs]{all versions}).}}})
|
- (require racket/string "data.rkt")
+ (require racket/string "data.rkt" "../www/download.rkt")
? ++++++++++++++++++++++
(define (in-ftp . paths)
(string-join (cons "/var/ftp/pub/racket" paths) "/"))
(define docs (symlink (in-ftp "docs")))
(define installers (symlink (in-ftp "installers")))
(provide index)
(define index
- (page #:link-title "Downloads"
? ^ ^
+ @page[#:link-title "Downloads"]{
? ^ ^ ++
+ @div[style: "float: right;"]{@download-button}
+ Use these links to browse the download directories directly:
@ul{@li{Current @a[href: `(,installers "/recent")]{installers}
(or @a[href: installers]{all versions}).}
@li{Current documentation in
@a[href: `(,docs "/recent/html")]{HTML} and in
@a[href: `(,docs "/recent/pdf")]{PDF}
- (or @a[href: docs]{all versions}).}}))
? -
+ (or @a[href: docs]{all versions}).}}})
? +
| 8 | 0.444444 | 5 | 3 |
3cd9fc540e9989c1842b38d35f9e01bd269a5957 | pib/stack.py | pib/stack.py | """The Pibstack.yaml parsing code."""
import yaml
class StackConfig(object):
"""The configuration for the stack."""
def __init__(self, path_to_repo):
self.services = {} # map service name to config dict
self.databases = {} # map database name to config dict
self.path_to_repo = path_to_repo
stack = path_to_repo / "Pibstack.yaml"
with stack.open() as f:
data = yaml.safe_load(f.read())
self.name = data["main"]["name"]
for service in [data["main"]] + data["requires"]:
name = service["name"]
if service["type"] == "service":
self.services[name] = service
elif service["type"] == "postgres":
self.databases[name] = service
else:
raise ValueError("Unknown type: " + service["type"])
| """The Pibstack.yaml parsing code."""
import yaml
from .schema import validate
class StackConfig(object):
"""The configuration for the stack."""
def __init__(self, path_to_repo):
self.services = {} # map service name to config dict
self.databases = {} # map database name to config dict
self.path_to_repo = path_to_repo
stack = path_to_repo / "Pibstack.yaml"
with stack.open() as f:
data = yaml.safe_load(f.read())
validate(data)
self.name = data["main"]["name"]
for service in [data["main"]] + data["requires"]:
name = service["name"]
if service["type"] == "service":
self.services[name] = service
elif service["type"] == "postgres":
self.databases[name] = service
else:
raise ValueError("Unknown type: " + service["type"])
| Validate the schema when loading it. | Validate the schema when loading it.
| Python | apache-2.0 | datawire/pib | python | ## Code Before:
"""The Pibstack.yaml parsing code."""
import yaml
class StackConfig(object):
"""The configuration for the stack."""
def __init__(self, path_to_repo):
self.services = {} # map service name to config dict
self.databases = {} # map database name to config dict
self.path_to_repo = path_to_repo
stack = path_to_repo / "Pibstack.yaml"
with stack.open() as f:
data = yaml.safe_load(f.read())
self.name = data["main"]["name"]
for service in [data["main"]] + data["requires"]:
name = service["name"]
if service["type"] == "service":
self.services[name] = service
elif service["type"] == "postgres":
self.databases[name] = service
else:
raise ValueError("Unknown type: " + service["type"])
## Instruction:
Validate the schema when loading it.
## Code After:
"""The Pibstack.yaml parsing code."""
import yaml
from .schema import validate
class StackConfig(object):
"""The configuration for the stack."""
def __init__(self, path_to_repo):
self.services = {} # map service name to config dict
self.databases = {} # map database name to config dict
self.path_to_repo = path_to_repo
stack = path_to_repo / "Pibstack.yaml"
with stack.open() as f:
data = yaml.safe_load(f.read())
validate(data)
self.name = data["main"]["name"]
for service in [data["main"]] + data["requires"]:
name = service["name"]
if service["type"] == "service":
self.services[name] = service
elif service["type"] == "postgres":
self.databases[name] = service
else:
raise ValueError("Unknown type: " + service["type"])
| """The Pibstack.yaml parsing code."""
import yaml
+
+ from .schema import validate
class StackConfig(object):
"""The configuration for the stack."""
def __init__(self, path_to_repo):
self.services = {} # map service name to config dict
self.databases = {} # map database name to config dict
self.path_to_repo = path_to_repo
stack = path_to_repo / "Pibstack.yaml"
with stack.open() as f:
data = yaml.safe_load(f.read())
+ validate(data)
self.name = data["main"]["name"]
for service in [data["main"]] + data["requires"]:
name = service["name"]
if service["type"] == "service":
self.services[name] = service
elif service["type"] == "postgres":
self.databases[name] = service
else:
raise ValueError("Unknown type: " + service["type"]) | 3 | 0.12 | 3 | 0 |
0cc68b55afd0cf3db883dae3f2f30f19051f2357 | .github/workflows/pr-stale.yaml | .github/workflows/pr-stale.yaml | name: 'Close stale issues and PR(s)'
on:
schedule:
- cron: '30 1 * * *'
jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.'
stale-pr-message: 'This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.'
close-issue-message: 'This issue was closed because it has been stalled for 5 days with no activity.'
days-before-stale: 30
days-before-close: 5
days-before-pr-close: -1
exempt-all-pr-assignees: true
exempt-all-pr-milestones: true
exempt-issue-labels: 'long-term'
| name: 'Close stale issues and PR(s)'
on:
schedule:
- cron: '30 1 * * *'
jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.'
stale-pr-message: 'This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.'
close-issue-message: 'This issue was closed because it has been stalled for 5 days with no activity.'
days-before-stale: 30
days-before-close: 5
days-before-pr-close: -1
exempt-all-pr-assignees: true
exempt-all-pr-milestones: true
exempt-issue-labels: 'long-term,enhancement'
| Update stale bot to exclude enhancement label | workflows: Update stale bot to exclude enhancement label
This PR is from comment https://github.com/fluent/fluent-bit/issues/2181#issuecomment-843689076
to explude enhancement label from stable bot.
Signed-off-by: Yong Tang <765086fe2e0c1f980161f127fec596800f327f62@outlook.com>
| YAML | apache-2.0 | fluent/fluent-bit,nokute78/fluent-bit,nokute78/fluent-bit,fluent/fluent-bit,nokute78/fluent-bit,nokute78/fluent-bit,fluent/fluent-bit,fluent/fluent-bit,fluent/fluent-bit,fluent/fluent-bit,fluent/fluent-bit,nokute78/fluent-bit,nokute78/fluent-bit,nokute78/fluent-bit,fluent/fluent-bit,nokute78/fluent-bit,fluent/fluent-bit,nokute78/fluent-bit,nokute78/fluent-bit,fluent/fluent-bit,fluent/fluent-bit,nokute78/fluent-bit,nokute78/fluent-bit,fluent/fluent-bit | yaml | ## Code Before:
name: 'Close stale issues and PR(s)'
on:
schedule:
- cron: '30 1 * * *'
jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.'
stale-pr-message: 'This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.'
close-issue-message: 'This issue was closed because it has been stalled for 5 days with no activity.'
days-before-stale: 30
days-before-close: 5
days-before-pr-close: -1
exempt-all-pr-assignees: true
exempt-all-pr-milestones: true
exempt-issue-labels: 'long-term'
## Instruction:
workflows: Update stale bot to exclude enhancement label
This PR is from comment https://github.com/fluent/fluent-bit/issues/2181#issuecomment-843689076
to explude enhancement label from stable bot.
Signed-off-by: Yong Tang <765086fe2e0c1f980161f127fec596800f327f62@outlook.com>
## Code After:
name: 'Close stale issues and PR(s)'
on:
schedule:
- cron: '30 1 * * *'
jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.'
stale-pr-message: 'This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.'
close-issue-message: 'This issue was closed because it has been stalled for 5 days with no activity.'
days-before-stale: 30
days-before-close: 5
days-before-pr-close: -1
exempt-all-pr-assignees: true
exempt-all-pr-milestones: true
exempt-issue-labels: 'long-term,enhancement'
| name: 'Close stale issues and PR(s)'
on:
schedule:
- cron: '30 1 * * *'
jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.'
stale-pr-message: 'This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.'
close-issue-message: 'This issue was closed because it has been stalled for 5 days with no activity.'
days-before-stale: 30
days-before-close: 5
days-before-pr-close: -1
exempt-all-pr-assignees: true
exempt-all-pr-milestones: true
- exempt-issue-labels: 'long-term'
+ exempt-issue-labels: 'long-term,enhancement'
? ++++++++++++
| 2 | 0.095238 | 1 | 1 |
09102cb87c41330d1ae670f0e1cea00037c74b5b | src/librement/profile/models.py | src/librement/profile/models.py | from django.db import models
from django_enumfield import EnumField
from librement.utils.user_data import PerUserData
from .enums import AccountEnum, CountryEnum
class Profile(PerUserData('profile')):
account_type = EnumField(AccountEnum)
organisation = models.CharField(max_length=100, blank=True)
address_1 = models.CharField(max_length=150, blank=True)
address_2 = models.CharField(max_length=150, blank=True)
city = models.CharField(max_length=100, blank=True)
region = models.CharField(max_length=100, blank=True)
zipcode = models.CharField(max_length=100, blank=True)
country = EnumField(CountryEnum)
| from django.db import models
from django_enumfield import EnumField
from librement.utils.user_data import PerUserData
from .enums import AccountEnum, CountryEnum
class Profile(PerUserData('profile')):
account_type = EnumField(AccountEnum)
organisation = models.CharField(max_length=100, blank=True)
address_1 = models.CharField(max_length=150, blank=True)
address_2 = models.CharField(max_length=150, blank=True)
city = models.CharField(max_length=100, blank=True)
region = models.CharField(max_length=100, blank=True)
zipcode = models.CharField(max_length=100, blank=True)
country = EnumField(CountryEnum)
class Email(models.Model):
user = models.ForeignKey('auth.User', related_name='emails')
email = models.EmailField(unique=True)
def __unicode__(self):
return u"%s" % self.email
| Add model for storing multiple email addresses. | Add model for storing multiple email addresses.
Signed-off-by: Chris Lamb <29e6d179a8d73471df7861382db6dd7e64138033@debian.org>
| Python | agpl-3.0 | rhertzog/librement,rhertzog/librement,rhertzog/librement | python | ## Code Before:
from django.db import models
from django_enumfield import EnumField
from librement.utils.user_data import PerUserData
from .enums import AccountEnum, CountryEnum
class Profile(PerUserData('profile')):
account_type = EnumField(AccountEnum)
organisation = models.CharField(max_length=100, blank=True)
address_1 = models.CharField(max_length=150, blank=True)
address_2 = models.CharField(max_length=150, blank=True)
city = models.CharField(max_length=100, blank=True)
region = models.CharField(max_length=100, blank=True)
zipcode = models.CharField(max_length=100, blank=True)
country = EnumField(CountryEnum)
## Instruction:
Add model for storing multiple email addresses.
Signed-off-by: Chris Lamb <29e6d179a8d73471df7861382db6dd7e64138033@debian.org>
## Code After:
from django.db import models
from django_enumfield import EnumField
from librement.utils.user_data import PerUserData
from .enums import AccountEnum, CountryEnum
class Profile(PerUserData('profile')):
account_type = EnumField(AccountEnum)
organisation = models.CharField(max_length=100, blank=True)
address_1 = models.CharField(max_length=150, blank=True)
address_2 = models.CharField(max_length=150, blank=True)
city = models.CharField(max_length=100, blank=True)
region = models.CharField(max_length=100, blank=True)
zipcode = models.CharField(max_length=100, blank=True)
country = EnumField(CountryEnum)
class Email(models.Model):
user = models.ForeignKey('auth.User', related_name='emails')
email = models.EmailField(unique=True)
def __unicode__(self):
return u"%s" % self.email
| from django.db import models
from django_enumfield import EnumField
from librement.utils.user_data import PerUserData
from .enums import AccountEnum, CountryEnum
class Profile(PerUserData('profile')):
account_type = EnumField(AccountEnum)
organisation = models.CharField(max_length=100, blank=True)
address_1 = models.CharField(max_length=150, blank=True)
address_2 = models.CharField(max_length=150, blank=True)
city = models.CharField(max_length=100, blank=True)
region = models.CharField(max_length=100, blank=True)
zipcode = models.CharField(max_length=100, blank=True)
country = EnumField(CountryEnum)
+
+ class Email(models.Model):
+ user = models.ForeignKey('auth.User', related_name='emails')
+
+ email = models.EmailField(unique=True)
+
+ def __unicode__(self):
+ return u"%s" % self.email | 8 | 0.4 | 8 | 0 |
593ceea21f731894e729253da57e2cb9c8f58e6a | webapp-frontend/src/main/resources/templates/index.html | webapp-frontend/src/main/resources/templates/index.html | <!DOCTYPE html>
<html lang="en"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:th="http://www.thymeleaf.org">
<head>
<title th:text="#{titleprefix} + ': ' + #{main.title}">OSM Mosques: Main Page</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
</head>
<body bgcolor="#fff">
<h1 th:text="#{titleprefix} + ': ' + #{main.title}">OSM Mosques: Main Page</h1>
<ul>
<li th:text="#{main.this-page}">This page here..</li>
<li><a href="osm/list">List of OSM</a> muslim prayer sites</li>
<li><a href="ditib/list">List of DITIB</a> muslim prayer sites</li>
<li>Leaflet-based <a href="map">map</a></li>
</ul>
</body>
</html>
| <!DOCTYPE html>
<html lang="en"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:th="http://www.thymeleaf.org">
<head>
<title th:text="#{titleprefix} + ': ' + #{main.title}">OSM Mosques: Main Page</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
</head>
<body bgcolor="#fff">
<h1 th:text="#{titleprefix} + ': ' + #{main.title}">OSM Mosques: Main Page</h1>
<ul>
<li th:text="#{main.this-page}">This page here..</li>
<li><a th:href="@{/osm/list}">List of OSM</a> muslim prayer sites</li>
<li><a th:href="@{/ditib/list}">List of DITIB</a> muslim prayer sites</li>
<li>Leaflet-based <a th:href="@{/map}">map</a></li>
</ul>
</body>
</html>
| Use Thymeleaf for URL construction | Use Thymeleaf for URL construction
| HTML | apache-2.0 | osmmosques/ditib-tools,osmmosques/ditib-tools,hakan42/ditib-tools,hakan42/ditib-tools,osmmosques/ditib-tools,hakan42/ditib-tools | html | ## Code Before:
<!DOCTYPE html>
<html lang="en"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:th="http://www.thymeleaf.org">
<head>
<title th:text="#{titleprefix} + ': ' + #{main.title}">OSM Mosques: Main Page</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
</head>
<body bgcolor="#fff">
<h1 th:text="#{titleprefix} + ': ' + #{main.title}">OSM Mosques: Main Page</h1>
<ul>
<li th:text="#{main.this-page}">This page here..</li>
<li><a href="osm/list">List of OSM</a> muslim prayer sites</li>
<li><a href="ditib/list">List of DITIB</a> muslim prayer sites</li>
<li>Leaflet-based <a href="map">map</a></li>
</ul>
</body>
</html>
## Instruction:
Use Thymeleaf for URL construction
## Code After:
<!DOCTYPE html>
<html lang="en"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:th="http://www.thymeleaf.org">
<head>
<title th:text="#{titleprefix} + ': ' + #{main.title}">OSM Mosques: Main Page</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
</head>
<body bgcolor="#fff">
<h1 th:text="#{titleprefix} + ': ' + #{main.title}">OSM Mosques: Main Page</h1>
<ul>
<li th:text="#{main.this-page}">This page here..</li>
<li><a th:href="@{/osm/list}">List of OSM</a> muslim prayer sites</li>
<li><a th:href="@{/ditib/list}">List of DITIB</a> muslim prayer sites</li>
<li>Leaflet-based <a th:href="@{/map}">map</a></li>
</ul>
</body>
</html>
| <!DOCTYPE html>
<html lang="en"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:th="http://www.thymeleaf.org">
<head>
<title th:text="#{titleprefix} + ': ' + #{main.title}">OSM Mosques: Main Page</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
</head>
<body bgcolor="#fff">
<h1 th:text="#{titleprefix} + ': ' + #{main.title}">OSM Mosques: Main Page</h1>
<ul>
<li th:text="#{main.this-page}">This page here..</li>
- <li><a href="osm/list">List of OSM</a> muslim prayer sites</li>
+ <li><a th:href="@{/osm/list}">List of OSM</a> muslim prayer sites</li>
? +++ +++ +
- <li><a href="ditib/list">List of DITIB</a> muslim prayer sites</li>
+ <li><a th:href="@{/ditib/list}">List of DITIB</a> muslim prayer sites</li>
? +++ +++ +
- <li>Leaflet-based <a href="map">map</a></li>
+ <li>Leaflet-based <a th:href="@{/map}">map</a></li>
? +++ +++ +
</ul>
</body>
</html> | 6 | 0.3 | 3 | 3 |
a137e8a92211d3d344a38b5c97d81073d66a1668 | alembic/versions/17c1af634026_extract_publication_date.py | alembic/versions/17c1af634026_extract_publication_date.py | # revision identifiers, used by Alembic.
revision = '17c1af634026'
down_revision = '3c4c29f0a791'
import html5lib
from dateutil.parser import parse as parse_date
import pytips
from pytips.models import Tip
def _extract_publication_date(html):
root = html5lib.parse(html, treebuilder='lxml', namespaceHTMLElements=False)
publication_date_string = root.xpath("//a/@data-datetime")[0]
return parse_date(publication_date_string)
def _update_tip(tip):
tip.publication_date = _extract_publication_date(tip.rendered_html)
def _erase_publication_date(tip):
tip.publication_date = None
def upgrade():
tips = Tip.query.all()
map(_update_tip, tips)
pytips.db.session.commit()
def downgrade():
tips = Tip.query.all()
map(_erase_publication_date, tips)
pytips.db.session.commit()
| # revision identifiers, used by Alembic.
revision = '17c1af634026'
down_revision = '3c4c29f0a791'
import html5lib
from dateutil.parser import parse as parse_date
import pytips
from pytips.util import extract_publication_date
from pytips.models import Tip
def _update_tip(tip):
tip.publication_date = extract_publication_date(tip.rendered_html)
def _erase_publication_date(tip):
tip.publication_date = None
def upgrade():
tips = Tip.query.all()
map(_update_tip, tips)
pytips.db.session.commit()
def downgrade():
tips = Tip.query.all()
map(_erase_publication_date, tips)
pytips.db.session.commit()
| Use the utility module's extract_publication_date logic. | Use the utility module's extract_publication_date logic.
| Python | isc | gthank/pytips,gthank/pytips,gthank/pytips,gthank/pytips | python | ## Code Before:
# revision identifiers, used by Alembic.
revision = '17c1af634026'
down_revision = '3c4c29f0a791'
import html5lib
from dateutil.parser import parse as parse_date
import pytips
from pytips.models import Tip
def _extract_publication_date(html):
root = html5lib.parse(html, treebuilder='lxml', namespaceHTMLElements=False)
publication_date_string = root.xpath("//a/@data-datetime")[0]
return parse_date(publication_date_string)
def _update_tip(tip):
tip.publication_date = _extract_publication_date(tip.rendered_html)
def _erase_publication_date(tip):
tip.publication_date = None
def upgrade():
tips = Tip.query.all()
map(_update_tip, tips)
pytips.db.session.commit()
def downgrade():
tips = Tip.query.all()
map(_erase_publication_date, tips)
pytips.db.session.commit()
## Instruction:
Use the utility module's extract_publication_date logic.
## Code After:
# revision identifiers, used by Alembic.
revision = '17c1af634026'
down_revision = '3c4c29f0a791'
import html5lib
from dateutil.parser import parse as parse_date
import pytips
from pytips.util import extract_publication_date
from pytips.models import Tip
def _update_tip(tip):
tip.publication_date = extract_publication_date(tip.rendered_html)
def _erase_publication_date(tip):
tip.publication_date = None
def upgrade():
tips = Tip.query.all()
map(_update_tip, tips)
pytips.db.session.commit()
def downgrade():
tips = Tip.query.all()
map(_erase_publication_date, tips)
pytips.db.session.commit()
| # revision identifiers, used by Alembic.
revision = '17c1af634026'
down_revision = '3c4c29f0a791'
import html5lib
from dateutil.parser import parse as parse_date
import pytips
+ from pytips.util import extract_publication_date
from pytips.models import Tip
- def _extract_publication_date(html):
- root = html5lib.parse(html, treebuilder='lxml', namespaceHTMLElements=False)
- publication_date_string = root.xpath("//a/@data-datetime")[0]
- return parse_date(publication_date_string)
-
-
def _update_tip(tip):
- tip.publication_date = _extract_publication_date(tip.rendered_html)
? -
+ tip.publication_date = extract_publication_date(tip.rendered_html)
def _erase_publication_date(tip):
tip.publication_date = None
def upgrade():
tips = Tip.query.all()
map(_update_tip, tips)
pytips.db.session.commit()
def downgrade():
tips = Tip.query.all()
map(_erase_publication_date, tips)
pytips.db.session.commit() | 9 | 0.243243 | 2 | 7 |
5548b5ffdcdb3d851c66931068d12f00af8e9967 | views/meetup.jade | views/meetup.jade | extends layout
block content
#eventdesc
h1= event.name
p #{event.yes_rsvp_count} RSVPs
#winner
h1 Winner: #{rsvp.member.name}
if rsvp.member_photo
img.member(src='#{rsvp.member_photo.photo_link}')
else
p (no photo)
#links
a.button#rollagain(href='/#{title}')
p Roll again
| extends layout
block content
#eventdesc
h1= event.name
p #{event.yes_rsvp_count} RSVPs
#winner
h1 Winner is ...?
img.member(src='/images/default.jpg')
#links
.btn-group
button.btn.btn-danger.btn-lg#rolling Start Rolling
.btn-group
button.btn.btn-danger.btn-lg#stop Stop
p
#list
each val in rsvplist
.member-cell
if val.member_photo
img.list(src='#{val.member_photo.photo_link}', title='#{val.member.name}')
else
img.list(src='/images/default.jpg', title='#{val.member.name}') | Add rolling and stop button. | Add rolling and stop button.
Add a list of all the RSVPs for easier implementation. In this way, we
don't need another roundtrip to the server to get the member photo.
| Jade | mit | datacommunitydc/meetup-dice,datacommunitydc/meetup-dice | jade | ## Code Before:
extends layout
block content
#eventdesc
h1= event.name
p #{event.yes_rsvp_count} RSVPs
#winner
h1 Winner: #{rsvp.member.name}
if rsvp.member_photo
img.member(src='#{rsvp.member_photo.photo_link}')
else
p (no photo)
#links
a.button#rollagain(href='/#{title}')
p Roll again
## Instruction:
Add rolling and stop button.
Add a list of all the RSVPs for easier implementation. In this way, we
don't need another roundtrip to the server to get the member photo.
## Code After:
extends layout
block content
#eventdesc
h1= event.name
p #{event.yes_rsvp_count} RSVPs
#winner
h1 Winner is ...?
img.member(src='/images/default.jpg')
#links
.btn-group
button.btn.btn-danger.btn-lg#rolling Start Rolling
.btn-group
button.btn.btn-danger.btn-lg#stop Stop
p
#list
each val in rsvplist
.member-cell
if val.member_photo
img.list(src='#{val.member_photo.photo_link}', title='#{val.member.name}')
else
img.list(src='/images/default.jpg', title='#{val.member.name}') | extends layout
block content
#eventdesc
h1= event.name
p #{event.yes_rsvp_count} RSVPs
#winner
+ h1 Winner is ...?
+ img.member(src='/images/default.jpg')
- h1 Winner: #{rsvp.member.name}
- if rsvp.member_photo
- img.member(src='#{rsvp.member_photo.photo_link}')
- else
- p (no photo)
#links
- a.button#rollagain(href='/#{title}')
- p Roll again
-
-
-
+ .btn-group
+ button.btn.btn-danger.btn-lg#rolling Start Rolling
+ .btn-group
+ button.btn.btn-danger.btn-lg#stop Stop
+ p
+
+ #list
+ each val in rsvplist
+ .member-cell
+ if val.member_photo
+ img.list(src='#{val.member_photo.photo_link}', title='#{val.member.name}')
+ else
+ img.list(src='/images/default.jpg', title='#{val.member.name}') | 25 | 1.25 | 15 | 10 |
80529d5032b6728adcaad426310c30b5e6366ad4 | solution.py | solution.py | class Kiosk():
def __init__(self, visit_cost, location):
self.visit_cost = visit_cost
self.location = location
print 'initializing Kiosk'
#patient shold be Person
def visit(self, patient):
if not patient.location == self.location:
print 'patient not in correct location'
return False
if not patient.money>self.visit_cost:
print 'patient cannot afford treatment'
#patient should be Person
def visit(self, patient):
patient.money -= visit_cost
#improve patient.diabetes
#improve patient.cardio
return True
#Patient should be from class Person
def filter(self, patient):
if not patient.location == self.location:
print "patient not at proper location"
return False
if not patient.money>self.visit_cost:
print "patient cannot afford treatment"
return False
visit(self,patient)
| class Kiosk():
def __init__(self, location, visit_cost, diabetes_threshold,
cardio_threshold):
self.location = location
self.visit_cost = visit_cost
self.diabetes_threshold = diabetes_threshold
self.cardio_threshold = cardio_threshold
#Initial cost to create kiosk: $5000. We are measuring in rupees
self.money = -309900
print 'initializing Kiosk'
#patient shold be Person
def visit(self, patient):
if not patient.location == self.location:
print 'patient not in correct location'
return False
if not patient.money>self.visit_cost:
print 'patient cannot afford treatment'
patient.money -= visit_cost
kiosk.money += visit_cost
#If we diagnose diabetes
if patient.diabetes<diabetes_threshold:
#For now, we ignore the details and just improve the patient's
#health.
patient.diabetes = diabetes_threshold
#If we diagnose cardiovascular problems
if patient.cardio<cardio_threshold:
#For now, we ignore the details and just improve the patient's
#health.
patient.cardio = cardio_threshold
#The visit was successful
return True
| Clean up and finish Kiosk class | Clean up and finish Kiosk class
There was some redundancy because I merged it poorly
| Python | bsd-3-clause | rkawauchi/IHK,rkawauchi/IHK | python | ## Code Before:
class Kiosk():
def __init__(self, visit_cost, location):
self.visit_cost = visit_cost
self.location = location
print 'initializing Kiosk'
#patient shold be Person
def visit(self, patient):
if not patient.location == self.location:
print 'patient not in correct location'
return False
if not patient.money>self.visit_cost:
print 'patient cannot afford treatment'
#patient should be Person
def visit(self, patient):
patient.money -= visit_cost
#improve patient.diabetes
#improve patient.cardio
return True
#Patient should be from class Person
def filter(self, patient):
if not patient.location == self.location:
print "patient not at proper location"
return False
if not patient.money>self.visit_cost:
print "patient cannot afford treatment"
return False
visit(self,patient)
## Instruction:
Clean up and finish Kiosk class
There was some redundancy because I merged it poorly
## Code After:
class Kiosk():
def __init__(self, location, visit_cost, diabetes_threshold,
cardio_threshold):
self.location = location
self.visit_cost = visit_cost
self.diabetes_threshold = diabetes_threshold
self.cardio_threshold = cardio_threshold
#Initial cost to create kiosk: $5000. We are measuring in rupees
self.money = -309900
print 'initializing Kiosk'
#patient shold be Person
def visit(self, patient):
if not patient.location == self.location:
print 'patient not in correct location'
return False
if not patient.money>self.visit_cost:
print 'patient cannot afford treatment'
patient.money -= visit_cost
kiosk.money += visit_cost
#If we diagnose diabetes
if patient.diabetes<diabetes_threshold:
#For now, we ignore the details and just improve the patient's
#health.
patient.diabetes = diabetes_threshold
#If we diagnose cardiovascular problems
if patient.cardio<cardio_threshold:
#For now, we ignore the details and just improve the patient's
#health.
patient.cardio = cardio_threshold
#The visit was successful
return True
| class Kiosk():
- def __init__(self, visit_cost, location):
+ def __init__(self, location, visit_cost, diabetes_threshold,
+ cardio_threshold):
+ self.location = location
self.visit_cost = visit_cost
- self.location = location
+ self.diabetes_threshold = diabetes_threshold
+ self.cardio_threshold = cardio_threshold
+ #Initial cost to create kiosk: $5000. We are measuring in rupees
+ self.money = -309900
print 'initializing Kiosk'
#patient shold be Person
def visit(self, patient):
if not patient.location == self.location:
print 'patient not in correct location'
return False
if not patient.money>self.visit_cost:
print 'patient cannot afford treatment'
+ patient.money -= visit_cost
+ kiosk.money += visit_cost
+
+ #If we diagnose diabetes
+ if patient.diabetes<diabetes_threshold:
+ #For now, we ignore the details and just improve the patient's
+ #health.
+ patient.diabetes = diabetes_threshold
- #patient should be Person
- def visit(self, patient):
- patient.money -= visit_cost
- #improve patient.diabetes
- #improve patient.cardio
+ #If we diagnose cardiovascular problems
+ if patient.cardio<cardio_threshold:
+ #For now, we ignore the details and just improve the patient's
+ #health.
+ patient.cardio = cardio_threshold
+
+ #The visit was successful
return True
-
- #Patient should be from class Person
- def filter(self, patient):
- if not patient.location == self.location:
- print "patient not at proper location"
- return False
- if not patient.money>self.visit_cost:
- print "patient cannot afford treatment"
- return False
- visit(self,patient) | 39 | 1.3 | 22 | 17 |
0380b8d912e11fec3f3e89bcdbb8b8d34f82d736 | ruby/ruby.zsh | ruby/ruby.zsh | export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting
rvm() {
source "$HOME/.rvm/scripts/rvm"
rvm "$@"
}
# settings from: https://github.com/jruby/jruby/wiki/Improving-startup-time
export JRUBY_OPTS="-J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1 -J-noverify"
| export PATH="$HOME/.rvm/bin:$HOME/.rvm/rubies/default/bin:$PATH" # Add RVM to PATH for scripting
rvm() {
unfunction rvm
source "$HOME/.rvm/scripts/rvm"
rvm "$@"
}
# settings from: https://github.com/jruby/jruby/wiki/Improving-startup-time
export JRUBY_OPTS="-J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1 -J-noverify"
| Fix rvm and Ruby path | Fix rvm and Ruby path
| Shell | mit | michaelmior/dotfiles,michaelmior/dotfiles,michaelmior/dotfiles,michaelmior/dotfiles | shell | ## Code Before:
export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting
rvm() {
source "$HOME/.rvm/scripts/rvm"
rvm "$@"
}
# settings from: https://github.com/jruby/jruby/wiki/Improving-startup-time
export JRUBY_OPTS="-J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1 -J-noverify"
## Instruction:
Fix rvm and Ruby path
## Code After:
export PATH="$HOME/.rvm/bin:$HOME/.rvm/rubies/default/bin:$PATH" # Add RVM to PATH for scripting
rvm() {
unfunction rvm
source "$HOME/.rvm/scripts/rvm"
rvm "$@"
}
# settings from: https://github.com/jruby/jruby/wiki/Improving-startup-time
export JRUBY_OPTS="-J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1 -J-noverify"
| - export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting
+ export PATH="$HOME/.rvm/bin:$HOME/.rvm/rubies/default/bin:$PATH" # Add RVM to PATH for scripting
rvm() {
+ unfunction rvm
source "$HOME/.rvm/scripts/rvm"
rvm "$@"
}
# settings from: https://github.com/jruby/jruby/wiki/Improving-startup-time
export JRUBY_OPTS="-J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1 -J-noverify" | 3 | 0.375 | 2 | 1 |
f40266c2244fd758102a8b1a8e5333b5fa0f65d9 | requirements.txt | requirements.txt | numpy >= 1.9.1
scipy >= 0.14.0
pylru >= 1.0.6
pymdptoolbox >= 4.0b2
python-igraph >= 0.7
sortedcontainers >= 0.9.4
http://www.borgelt.net/src/pyfim.tar.gz
| numpy >= 1.9.1
scipy >= 0.14.0
pylru >= 1.0.6
python-igraph >= 0.7
sortedcontainers >= 0.9.4
git+git://github.com/sawcordwell/pymdptoolbox#egg=mdptoolbox
http://www.borgelt.net/src/pyfim.tar.gz
| Use GitHub version of pymdptoolbox | Use GitHub version of pymdptoolbox
| Text | apache-2.0 | yasserglez/configurator,yasserglez/configurator | text | ## Code Before:
numpy >= 1.9.1
scipy >= 0.14.0
pylru >= 1.0.6
pymdptoolbox >= 4.0b2
python-igraph >= 0.7
sortedcontainers >= 0.9.4
http://www.borgelt.net/src/pyfim.tar.gz
## Instruction:
Use GitHub version of pymdptoolbox
## Code After:
numpy >= 1.9.1
scipy >= 0.14.0
pylru >= 1.0.6
python-igraph >= 0.7
sortedcontainers >= 0.9.4
git+git://github.com/sawcordwell/pymdptoolbox#egg=mdptoolbox
http://www.borgelt.net/src/pyfim.tar.gz
| numpy >= 1.9.1
scipy >= 0.14.0
pylru >= 1.0.6
- pymdptoolbox >= 4.0b2
python-igraph >= 0.7
sortedcontainers >= 0.9.4
+ git+git://github.com/sawcordwell/pymdptoolbox#egg=mdptoolbox
http://www.borgelt.net/src/pyfim.tar.gz | 2 | 0.285714 | 1 | 1 |
600f1fb3cc42c2545c8223a9d536f8d4b40c49af | test/helper/leapHelperService.spec.js | test/helper/leapHelperService.spec.js | describe("A leapHelperService", function() {
beforeEach(module('angular-leap'));
}); | describe("A leapHelperService", function() {
beforeEach(module('angular-leap'));
it("should offer a timeout function", inject(function(leapHelperService) {
expect(leapHelperService.timeout).toBeDefined();
}));
}); | Add test for leapHelperService .timeout | Add test for leapHelperService .timeout
| JavaScript | mit | angular-leap/angular-leap | javascript | ## Code Before:
describe("A leapHelperService", function() {
beforeEach(module('angular-leap'));
});
## Instruction:
Add test for leapHelperService .timeout
## Code After:
describe("A leapHelperService", function() {
beforeEach(module('angular-leap'));
it("should offer a timeout function", inject(function(leapHelperService) {
expect(leapHelperService.timeout).toBeDefined();
}));
}); | describe("A leapHelperService", function() {
beforeEach(module('angular-leap'));
+
+ it("should offer a timeout function", inject(function(leapHelperService) {
+ expect(leapHelperService.timeout).toBeDefined();
+ }));
+
}); | 5 | 1.666667 | 5 | 0 |
eb454dc1124984c016e55639bca3d478cf02bf56 | README.md | README.md | ```
___ _ ___ _
| _ ) _ _ __ _ (_) _ _ ___ | _ ) ___ | |_
| _ \ | '_| / _` | | | | ' \ |_ / | _ \ / _ \ | _|
|___/ _|_|_ \__,_| _|_|_ |_||_| _/__| |___/ \___/ _\__|
_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|
"`-0-0-'"`-0-0-'"`-0-0-'"`-0-0-'"`-0-0-'"`-0-0-'"`-0-0-'"`-0-0-'"`-0-0-'
```
[](https://travis-ci.org/BotBotMe/botbot-web)
Botbot is collection of tools for running IRC bots. It has primarily been
used with Freenode channels but works with other IRC networks or servers.
This is a fork customized for use by the [MetaBrainz Foundation](https://metabrainz.org).
It can be seen in action at http://chatlogs.metabrainz.org/
[Documentation](http://botbot.readthedocs.org/en/latest/)
| ```
___ _ ___ _
| _ ) _ _ __ _ (_) _ _ ___ | _ ) ___ | |_
| _ \ | '_| / _` | | | | ' \ |_ / | _ \ / _ \ | _|
|___/ _|_|_ \__,_| _|_|_ |_||_| _/__| |___/ \___/ _\__|
_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|
"`-0-0-'"`-0-0-'"`-0-0-'"`-0-0-'"`-0-0-'"`-0-0-'"`-0-0-'"`-0-0-'"`-0-0-'
```
[](https://travis-ci.org/Metabrainz/brainzbot-core)
[](https://brainzbot.readthedocs.io/)
Botbot is collection of tools for running IRC bots. It has primarily been
used with Freenode channels but works with other IRC networks or servers.
This is a fork customized for use by the [MetaBrainz Foundation](https://metabrainz.org).
It can be seen in action at http://chatlogs.metabrainz.org/
| Update travis badge and add readthedocs one | Update travis badge and add readthedocs one
| Markdown | mit | metabrainz/botbot-web,metabrainz/botbot-web,metabrainz/botbot-web | markdown | ## Code Before:
```
___ _ ___ _
| _ ) _ _ __ _ (_) _ _ ___ | _ ) ___ | |_
| _ \ | '_| / _` | | | | ' \ |_ / | _ \ / _ \ | _|
|___/ _|_|_ \__,_| _|_|_ |_||_| _/__| |___/ \___/ _\__|
_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|
"`-0-0-'"`-0-0-'"`-0-0-'"`-0-0-'"`-0-0-'"`-0-0-'"`-0-0-'"`-0-0-'"`-0-0-'
```
[](https://travis-ci.org/BotBotMe/botbot-web)
Botbot is collection of tools for running IRC bots. It has primarily been
used with Freenode channels but works with other IRC networks or servers.
This is a fork customized for use by the [MetaBrainz Foundation](https://metabrainz.org).
It can be seen in action at http://chatlogs.metabrainz.org/
[Documentation](http://botbot.readthedocs.org/en/latest/)
## Instruction:
Update travis badge and add readthedocs one
## Code After:
```
___ _ ___ _
| _ ) _ _ __ _ (_) _ _ ___ | _ ) ___ | |_
| _ \ | '_| / _` | | | | ' \ |_ / | _ \ / _ \ | _|
|___/ _|_|_ \__,_| _|_|_ |_||_| _/__| |___/ \___/ _\__|
_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|
"`-0-0-'"`-0-0-'"`-0-0-'"`-0-0-'"`-0-0-'"`-0-0-'"`-0-0-'"`-0-0-'"`-0-0-'
```
[](https://travis-ci.org/Metabrainz/brainzbot-core)
[](https://brainzbot.readthedocs.io/)
Botbot is collection of tools for running IRC bots. It has primarily been
used with Freenode channels but works with other IRC networks or servers.
This is a fork customized for use by the [MetaBrainz Foundation](https://metabrainz.org).
It can be seen in action at http://chatlogs.metabrainz.org/
| ```
___ _ ___ _
| _ ) _ _ __ _ (_) _ _ ___ | _ ) ___ | |_
| _ \ | '_| / _` | | | | ' \ |_ / | _ \ / _ \ | _|
|___/ _|_|_ \__,_| _|_|_ |_||_| _/__| |___/ \___/ _\__|
_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|
"`-0-0-'"`-0-0-'"`-0-0-'"`-0-0-'"`-0-0-'"`-0-0-'"`-0-0-'"`-0-0-'"`-0-0-'
```
- [](https://travis-ci.org/BotBotMe/botbot-web)
? ^^ ^ - ------ ^^ ^ -
+ [](https://travis-ci.org/Metabrainz/brainzbot-core)
? ^^^^^ ^^^ ++++++++ ^^^^^ ^^^
+ [](https://brainzbot.readthedocs.io/)
Botbot is collection of tools for running IRC bots. It has primarily been
used with Freenode channels but works with other IRC networks or servers.
This is a fork customized for use by the [MetaBrainz Foundation](https://metabrainz.org).
It can be seen in action at http://chatlogs.metabrainz.org/
- [Documentation](http://botbot.readthedocs.org/en/latest/) | 4 | 0.222222 | 2 | 2 |
cc31b19846ce04541210c418db300b8230fc6b04 | README.md | README.md |
I threw together this plugin so I could use the Mac's text to speech system in Sublime Text 2. I use the "Speak selected text when key is pressed" [feature](http://support.apple.com/kb/PH11255) all the time. When Apple released Lion they changed the way this feature worked, breaking the functionality in a lot of applications. It use to just copy the selected text and read it from the clipboard, making it work in any application that allowed you to copy text. After Lion it uses an API that developers have to add into their application before the feature will work. Just from my day to day use, it seems like the old way worked better.
This plugin was designed for use with Mac OS X and is only needed with OS X 10.7 and higher.
## Installing
Once you have Git installed just go into Sublime's Packages folder and clone the repo.
```bash
$ cd ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/
$ git clone https://github.com/scottmartin/speak-selected-text-sublime.git "Speak Selected Text"
```
## Usage
From within Sublime Text 2 you can use the plugin on of 3 ways.
1. Right click your selection and choose "Speak Selected Text" from the context menu.
2. Use the command palette and search for "Speak Selected Text".
3. Set a keyboard shortcut to the "speak_selected_text" command.
**Note:** You can run the command again to stop the speech at any time.
|
I threw together this plugin so I could use the Mac's text to speech system in Sublime Text 2. I use the "Speak selected text when key is pressed" [feature](http://support.apple.com/kb/PH11255) all the time. When Apple released Lion they changed the way this feature worked, breaking the functionality in a lot of applications. It use to just copy the selected text and read it from the clipboard, making it work in any application that allowed you to copy text. After Lion it uses an API that developers have to add into their application before the feature will work. Just from my day to day use, it seems like the old way worked better.
This plugin was designed for use with Mac OS X and is only needed with OS X 10.7 and higher.
## Installing
Once you have Git installed just go into Sublime's Packages folder and clone the repo.
```bash
$ cd ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/
$ git clone https://github.com/scottmartin/speak-selected-text-sublime.git "Speak Selected Text"
```
## Usage
From within Sublime Text 2 you can use the plugin on of 3 ways.
1. Right click your selection and choose "Speak Selected Text" from the context menu.
2. Use the command palette and search for "Speak Selected Text".
3. Create a Sublime Text key-binding mapped to the "speak_selected_text" command (note that the key-binding cannot be the same as the OS shortcut, or the OS shortcut will override it).
**Note:** You can run the command again to stop the speech at any time.
| Improve clarity of third option. | Improve clarity of third option.
• Make clear that it's a Sublime Text "key binding", rather than a Mac OS Syst Prefs "keyboard shortcut" (right? or am I mistaken?).
• Make clear that Mac OS keyboard shortcuts take precedence over Sublime Text key-bindings. | Markdown | mit | scottmartin/speak-selected-text-sublime,scottmartin/speak-selected-text-sublime,yuryshulaev/speak-selected-text-sublime,yuryshulaev/speak-selected-text-sublime | markdown | ## Code Before:
I threw together this plugin so I could use the Mac's text to speech system in Sublime Text 2. I use the "Speak selected text when key is pressed" [feature](http://support.apple.com/kb/PH11255) all the time. When Apple released Lion they changed the way this feature worked, breaking the functionality in a lot of applications. It use to just copy the selected text and read it from the clipboard, making it work in any application that allowed you to copy text. After Lion it uses an API that developers have to add into their application before the feature will work. Just from my day to day use, it seems like the old way worked better.
This plugin was designed for use with Mac OS X and is only needed with OS X 10.7 and higher.
## Installing
Once you have Git installed just go into Sublime's Packages folder and clone the repo.
```bash
$ cd ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/
$ git clone https://github.com/scottmartin/speak-selected-text-sublime.git "Speak Selected Text"
```
## Usage
From within Sublime Text 2 you can use the plugin on of 3 ways.
1. Right click your selection and choose "Speak Selected Text" from the context menu.
2. Use the command palette and search for "Speak Selected Text".
3. Set a keyboard shortcut to the "speak_selected_text" command.
**Note:** You can run the command again to stop the speech at any time.
## Instruction:
Improve clarity of third option.
• Make clear that it's a Sublime Text "key binding", rather than a Mac OS Syst Prefs "keyboard shortcut" (right? or am I mistaken?).
• Make clear that Mac OS keyboard shortcuts take precedence over Sublime Text key-bindings.
## Code After:
I threw together this plugin so I could use the Mac's text to speech system in Sublime Text 2. I use the "Speak selected text when key is pressed" [feature](http://support.apple.com/kb/PH11255) all the time. When Apple released Lion they changed the way this feature worked, breaking the functionality in a lot of applications. It use to just copy the selected text and read it from the clipboard, making it work in any application that allowed you to copy text. After Lion it uses an API that developers have to add into their application before the feature will work. Just from my day to day use, it seems like the old way worked better.
This plugin was designed for use with Mac OS X and is only needed with OS X 10.7 and higher.
## Installing
Once you have Git installed just go into Sublime's Packages folder and clone the repo.
```bash
$ cd ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/
$ git clone https://github.com/scottmartin/speak-selected-text-sublime.git "Speak Selected Text"
```
## Usage
From within Sublime Text 2 you can use the plugin on of 3 ways.
1. Right click your selection and choose "Speak Selected Text" from the context menu.
2. Use the command palette and search for "Speak Selected Text".
3. Create a Sublime Text key-binding mapped to the "speak_selected_text" command (note that the key-binding cannot be the same as the OS shortcut, or the OS shortcut will override it).
**Note:** You can run the command again to stop the speech at any time.
|
I threw together this plugin so I could use the Mac's text to speech system in Sublime Text 2. I use the "Speak selected text when key is pressed" [feature](http://support.apple.com/kb/PH11255) all the time. When Apple released Lion they changed the way this feature worked, breaking the functionality in a lot of applications. It use to just copy the selected text and read it from the clipboard, making it work in any application that allowed you to copy text. After Lion it uses an API that developers have to add into their application before the feature will work. Just from my day to day use, it seems like the old way worked better.
This plugin was designed for use with Mac OS X and is only needed with OS X 10.7 and higher.
## Installing
Once you have Git installed just go into Sublime's Packages folder and clone the repo.
```bash
$ cd ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/
$ git clone https://github.com/scottmartin/speak-selected-text-sublime.git "Speak Selected Text"
```
## Usage
From within Sublime Text 2 you can use the plugin on of 3 ways.
1. Right click your selection and choose "Speak Selected Text" from the context menu.
2. Use the command palette and search for "Speak Selected Text".
- 3. Set a keyboard shortcut to the "speak_selected_text" command.
+ 3. Create a Sublime Text key-binding mapped to the "speak_selected_text" command (note that the key-binding cannot be the same as the OS shortcut, or the OS shortcut will override it).
**Note:** You can run the command again to stop the speech at any time. | 2 | 0.086957 | 1 | 1 |
aecddc8a8febcb03f1858dac30419e6a43a13cd5 | src/app/period/period.component.css | src/app/period/period.component.css | .editor-options { text-align: right }
.editor-options button { margin-left: 20px }
.title-buttons { margin-left: 20px }
.period-title { margin-bottom: 0 }
| .editor-options { text-align: right }
.editor-options button { margin-left: 20px }
.title-buttons { margin-left: 20px }
.title-buttons a { margin-right: 10px; }
.period-title { margin-bottom: 0 }
| Add margin-right to title buttons for spacing | Add margin-right to title buttons for spacing
| CSS | apache-2.0 | google/peoplemath,google/peoplemath,google/peoplemath,google/peoplemath,google/peoplemath | css | ## Code Before:
.editor-options { text-align: right }
.editor-options button { margin-left: 20px }
.title-buttons { margin-left: 20px }
.period-title { margin-bottom: 0 }
## Instruction:
Add margin-right to title buttons for spacing
## Code After:
.editor-options { text-align: right }
.editor-options button { margin-left: 20px }
.title-buttons { margin-left: 20px }
.title-buttons a { margin-right: 10px; }
.period-title { margin-bottom: 0 }
| .editor-options { text-align: right }
.editor-options button { margin-left: 20px }
.title-buttons { margin-left: 20px }
+ .title-buttons a { margin-right: 10px; }
.period-title { margin-bottom: 0 } | 1 | 0.25 | 1 | 0 |
4c3357f36dc78a70391e06e17697d572cc0a6792 | src/lib/value_hash.cr | src/lib/value_hash.cr | module Optarg
# :nodoc:
abstract class ValueHash(V) < Hash(String, V)
@fallbacked = {} of String => Bool
@parser : Parser
def initialize(@parser)
super()
end
def [](key)
fallback key
super
end
def []?(key)
fallback key
super
end
def fallback(key)
return if has_key?(key)
return if @fallbacked.has_key?(key)
@fallbacked[key] = true
if fb = @parser.definitions.values[key]?
fb.fallback_value @parser
end
end
end
end
| module Optarg
# :nodoc:
abstract class ValueHash(V)
@raw = {} of String => V
forward_missing_to @raw
@fallbacked = {} of String => Bool
@parser : Parser
def initialize(@parser)
end
def ==(other : Hash)
@raw == other
end
def [](key)
fallback key
@raw[key]
end
def []?(key)
fallback key
@raw[key]?
end
def fallback(key)
return if @raw.has_key?(key)
return if @fallbacked.has_key?(key)
@fallbacked[key] = true
if fb = @parser.definitions.values[key]?
fb.fallback_value @parser
end
end
end
end
| Use Hash composition over inheritance in ValueHash | Use Hash composition over inheritance in ValueHash
| Crystal | mit | mosop/optarg,mosop/optarg | crystal | ## Code Before:
module Optarg
# :nodoc:
abstract class ValueHash(V) < Hash(String, V)
@fallbacked = {} of String => Bool
@parser : Parser
def initialize(@parser)
super()
end
def [](key)
fallback key
super
end
def []?(key)
fallback key
super
end
def fallback(key)
return if has_key?(key)
return if @fallbacked.has_key?(key)
@fallbacked[key] = true
if fb = @parser.definitions.values[key]?
fb.fallback_value @parser
end
end
end
end
## Instruction:
Use Hash composition over inheritance in ValueHash
## Code After:
module Optarg
# :nodoc:
abstract class ValueHash(V)
@raw = {} of String => V
forward_missing_to @raw
@fallbacked = {} of String => Bool
@parser : Parser
def initialize(@parser)
end
def ==(other : Hash)
@raw == other
end
def [](key)
fallback key
@raw[key]
end
def []?(key)
fallback key
@raw[key]?
end
def fallback(key)
return if @raw.has_key?(key)
return if @fallbacked.has_key?(key)
@fallbacked[key] = true
if fb = @parser.definitions.values[key]?
fb.fallback_value @parser
end
end
end
end
| module Optarg
# :nodoc:
- abstract class ValueHash(V) < Hash(String, V)
? ------------------
+ abstract class ValueHash(V)
+ @raw = {} of String => V
+ forward_missing_to @raw
+
@fallbacked = {} of String => Bool
@parser : Parser
def initialize(@parser)
- super()
+ end
+
+ def ==(other : Hash)
+ @raw == other
end
def [](key)
fallback key
- super
+ @raw[key]
end
def []?(key)
fallback key
- super
+ @raw[key]?
end
def fallback(key)
- return if has_key?(key)
+ return if @raw.has_key?(key)
? +++++
return if @fallbacked.has_key?(key)
@fallbacked[key] = true
if fb = @parser.definitions.values[key]?
fb.fallback_value @parser
end
end
end
end | 16 | 0.533333 | 11 | 5 |
8ea9c9401cca7ea074d0e85ba57b2ccf42630cd7 | BBBAPI/BBBAPI/Classes/BBASearchServiceResult.h | BBBAPI/BBBAPI/Classes/BBASearchServiceResult.h | //
// BBASearchServiceResult.h
// BBBAPI
//
// Created by Owen Worley on 12/01/2015.
// Copyright (c) 2015 Blinkbox Entertainment Ltd. All rights reserved.
//
#import <Foundation/Foundation.h>
@class FEMObjectMapping;
/**
* Represents data provided from the search service when searching for books
*/
@interface BBASearchServiceResult : NSObject
@property (nonatomic, copy) NSString *type;
@property (nonatomic, copy) NSString *identifier;
@property (nonatomic, copy) NSArray *links;
@property (nonatomic, assign) NSInteger numberOfResults;
@property (nonatomic, copy) NSArray *books;
/**
* Object mapping to convert server search result to `BBASearchServiceResult`
*/
+ (FEMObjectMapping *) searchServiceResultMapping;
@end
| //
// BBASearchServiceResult.h
// BBBAPI
//
// Created by Owen Worley on 12/01/2015.
// Copyright (c) 2015 Blinkbox Entertainment Ltd. All rights reserved.
//
#import <Foundation/Foundation.h>
@class FEMObjectMapping;
/**
* Represents data provided from the search service when searching for books
*/
@interface BBASearchServiceResult : NSObject
@property (nonatomic, copy) NSString *type;
@property (nonatomic, copy) NSString *identifier;
/**
* Array of `BBALibraryItemLink` objects
*/
@property (nonatomic, copy) NSArray *links;
@property (nonatomic, assign) NSInteger numberOfResults;
@property (nonatomic, copy) NSArray *books;
/**
* Object mapping to convert server search result to `BBASearchServiceResult`
*/
+ (FEMObjectMapping *) searchServiceResultMapping;
@end
| Document contents of Links array | Document contents of Links array
| C | mit | blinkboxbooks/blinkbox-network.objc,blinkboxbooks/blinkbox-network.objc | c | ## Code Before:
//
// BBASearchServiceResult.h
// BBBAPI
//
// Created by Owen Worley on 12/01/2015.
// Copyright (c) 2015 Blinkbox Entertainment Ltd. All rights reserved.
//
#import <Foundation/Foundation.h>
@class FEMObjectMapping;
/**
* Represents data provided from the search service when searching for books
*/
@interface BBASearchServiceResult : NSObject
@property (nonatomic, copy) NSString *type;
@property (nonatomic, copy) NSString *identifier;
@property (nonatomic, copy) NSArray *links;
@property (nonatomic, assign) NSInteger numberOfResults;
@property (nonatomic, copy) NSArray *books;
/**
* Object mapping to convert server search result to `BBASearchServiceResult`
*/
+ (FEMObjectMapping *) searchServiceResultMapping;
@end
## Instruction:
Document contents of Links array
## Code After:
//
// BBASearchServiceResult.h
// BBBAPI
//
// Created by Owen Worley on 12/01/2015.
// Copyright (c) 2015 Blinkbox Entertainment Ltd. All rights reserved.
//
#import <Foundation/Foundation.h>
@class FEMObjectMapping;
/**
* Represents data provided from the search service when searching for books
*/
@interface BBASearchServiceResult : NSObject
@property (nonatomic, copy) NSString *type;
@property (nonatomic, copy) NSString *identifier;
/**
* Array of `BBALibraryItemLink` objects
*/
@property (nonatomic, copy) NSArray *links;
@property (nonatomic, assign) NSInteger numberOfResults;
@property (nonatomic, copy) NSArray *books;
/**
* Object mapping to convert server search result to `BBASearchServiceResult`
*/
+ (FEMObjectMapping *) searchServiceResultMapping;
@end
| //
// BBASearchServiceResult.h
// BBBAPI
//
// Created by Owen Worley on 12/01/2015.
// Copyright (c) 2015 Blinkbox Entertainment Ltd. All rights reserved.
//
#import <Foundation/Foundation.h>
@class FEMObjectMapping;
/**
* Represents data provided from the search service when searching for books
*/
@interface BBASearchServiceResult : NSObject
@property (nonatomic, copy) NSString *type;
@property (nonatomic, copy) NSString *identifier;
+ /**
+ * Array of `BBALibraryItemLink` objects
+ */
@property (nonatomic, copy) NSArray *links;
@property (nonatomic, assign) NSInteger numberOfResults;
@property (nonatomic, copy) NSArray *books;
/**
* Object mapping to convert server search result to `BBASearchServiceResult`
*/
+ (FEMObjectMapping *) searchServiceResultMapping;
@end | 3 | 0.115385 | 3 | 0 |
0549b0edd8138872db7c165f416ee1683e4fe288 | ckanext/orgportals/templates/portals/snippets/youtube_video_container.html | ckanext/orgportals/templates/portals/snippets/youtube_video_container.html | {% if video is not none %}
{% if video.video_size == 'single' %}
{% set video_size = 'col-md-4' %}
{% elif video.video_size == 'double' %}
{% set video_size = 'col-md-8' %}
{% else %}
{% set video_size = 'col-md-4' %}
{% endif %}
<div class="{{ video_size }} youtube-video-container content-container">
<div class="inner-video">
<h3><a href="{{ video.video_source }}" target="_blank">{{ video.video_title }}</a></h3>
<iframe width="100%" height="315" src="{{ video_source }}" frameborder="0" allowfullscreen></iframe>
</div>
<div class="social-buttons">
<a href="{{ video.video_source }}" class="fb-url"><i class="fa fa-facebook-square fa-lg share-graph-fb-btn" aria-hidden="true" title="Share image on Facebook"></i></a>
<a data-twitter-url="{{ video.video_source }}" class="twitter-url" ><i class="fa fa-twitter-square fa-lg share-graph-twitter-btn" aria-hidden="true" title="Share image on Twitter"></i></a>
</div>
</div>
{% endif %}
| {% if video is not none %}
{% if video.video_size == 'single' %}
{% set video_size = 'col-md-4' %}
{% set video_height = '315px' %}
{% elif video.video_size == 'double' %}
{% set video_size = 'col-md-8' %}
{% set video_height = '415px' %}
{% else %}
{% set video_size = 'col-md-4' %}
{% endif %}
<div class="{{ video_size }} youtube-video-container content-container">
<div class="inner-video">
<h3><a href="{{ video.video_source }}" target="_blank">{{ video.video_title }}</a></h3>
<iframe width="100%" height="{{ video_height }}px" src="{{ video_source }}" frameborder="0" allowfullscreen></iframe>
</div>
<div class="social-buttons">
<a href="{{ video.video_source }}" class="fb-url"><i class="fa fa-facebook-square fa-lg share-graph-fb-btn" aria-hidden="true" title="Share image on Facebook"></i></a>
<a data-twitter-url="{{ video.video_source }}" class="twitter-url" ><i class="fa fa-twitter-square fa-lg share-graph-twitter-btn" aria-hidden="true" title="Share image on Twitter"></i></a>
</div>
</div>
{% endif %}
| Adjust video height based on video size | Adjust video height based on video size
| HTML | agpl-3.0 | ViderumGlobal/ckanext-orgportals,ViderumGlobal/ckanext-orgportals,ViderumGlobal/ckanext-orgportals,ViderumGlobal/ckanext-orgportals | html | ## Code Before:
{% if video is not none %}
{% if video.video_size == 'single' %}
{% set video_size = 'col-md-4' %}
{% elif video.video_size == 'double' %}
{% set video_size = 'col-md-8' %}
{% else %}
{% set video_size = 'col-md-4' %}
{% endif %}
<div class="{{ video_size }} youtube-video-container content-container">
<div class="inner-video">
<h3><a href="{{ video.video_source }}" target="_blank">{{ video.video_title }}</a></h3>
<iframe width="100%" height="315" src="{{ video_source }}" frameborder="0" allowfullscreen></iframe>
</div>
<div class="social-buttons">
<a href="{{ video.video_source }}" class="fb-url"><i class="fa fa-facebook-square fa-lg share-graph-fb-btn" aria-hidden="true" title="Share image on Facebook"></i></a>
<a data-twitter-url="{{ video.video_source }}" class="twitter-url" ><i class="fa fa-twitter-square fa-lg share-graph-twitter-btn" aria-hidden="true" title="Share image on Twitter"></i></a>
</div>
</div>
{% endif %}
## Instruction:
Adjust video height based on video size
## Code After:
{% if video is not none %}
{% if video.video_size == 'single' %}
{% set video_size = 'col-md-4' %}
{% set video_height = '315px' %}
{% elif video.video_size == 'double' %}
{% set video_size = 'col-md-8' %}
{% set video_height = '415px' %}
{% else %}
{% set video_size = 'col-md-4' %}
{% endif %}
<div class="{{ video_size }} youtube-video-container content-container">
<div class="inner-video">
<h3><a href="{{ video.video_source }}" target="_blank">{{ video.video_title }}</a></h3>
<iframe width="100%" height="{{ video_height }}px" src="{{ video_source }}" frameborder="0" allowfullscreen></iframe>
</div>
<div class="social-buttons">
<a href="{{ video.video_source }}" class="fb-url"><i class="fa fa-facebook-square fa-lg share-graph-fb-btn" aria-hidden="true" title="Share image on Facebook"></i></a>
<a data-twitter-url="{{ video.video_source }}" class="twitter-url" ><i class="fa fa-twitter-square fa-lg share-graph-twitter-btn" aria-hidden="true" title="Share image on Twitter"></i></a>
</div>
</div>
{% endif %}
| {% if video is not none %}
{% if video.video_size == 'single' %}
{% set video_size = 'col-md-4' %}
+ {% set video_height = '315px' %}
{% elif video.video_size == 'double' %}
{% set video_size = 'col-md-8' %}
+ {% set video_height = '415px' %}
{% else %}
{% set video_size = 'col-md-4' %}
{% endif %}
<div class="{{ video_size }} youtube-video-container content-container">
<div class="inner-video">
<h3><a href="{{ video.video_source }}" target="_blank">{{ video.video_title }}</a></h3>
- <iframe width="100%" height="315" src="{{ video_source }}" frameborder="0" allowfullscreen></iframe>
? ^^^
+ <iframe width="100%" height="{{ video_height }}px" src="{{ video_source }}" frameborder="0" allowfullscreen></iframe>
? ^^^^^^^^^^^^^^^^^^^^
</div>
<div class="social-buttons">
<a href="{{ video.video_source }}" class="fb-url"><i class="fa fa-facebook-square fa-lg share-graph-fb-btn" aria-hidden="true" title="Share image on Facebook"></i></a>
<a data-twitter-url="{{ video.video_source }}" class="twitter-url" ><i class="fa fa-twitter-square fa-lg share-graph-twitter-btn" aria-hidden="true" title="Share image on Twitter"></i></a>
</div>
</div>
{% endif %} | 4 | 0.2 | 3 | 1 |
8217a59c2f061ea6ca17c67a38d26cf13f1c2b82 | app/views/reports/_asset_report_summary.html.haml | app/views/reports/_asset_report_summary.html.haml | %table.table.table-hover
%thead
%tr
%th.left Fiscal Year
%th.left Type
%th.left Sub Type
%th.right Count
%th.right Book Value
%th.right Replacement Cost
%tbody
- sum_cost = 0
- sum_book_val = 0
- assets.group_by(&:asset_subtype).each do |subtype, assets_by_subtype|
%tr{:data => {:target => "#{org.id}_#{subtype.id}"}}
%td.left= format_as_fiscal_year(@data.fy)
%td.left= subtype.asset_type
%td.left= subtype
%td.right= format_as_integer(assets_by_subtype.count)
- cost = assets_by_subtype.sum{ |a| a.estimated_replacement_cost.to_i }
- book_val = assets_by_subtype.sum{ |a| a.book_value.to_i }
- sum_cost += cost
- sum_book_val += book_val
%td.right= format_as_currency(book_val)
%td.right= format_as_currency(sum_book_val)
%tfoot
%tr
%td{:colspan => 3}
%td.right= format_as_integer(assets.count)
%td.right= format_as_currency(sum_book_val)
%td.right= format_as_currency(sum_cost)
| %table.table.table-hover
%thead
%tr
%th.left Fiscal Year
%th.left Type
%th.left Sub Type
%th.right Count
%th.right Book Value
%th.right Replacement Cost
%tbody
- sum_cost = 0
- sum_book_val = 0
- assets.group_by(&:asset_subtype).each do |subtype, assets_by_subtype|
%tr{:data => {:target => "#{org.id}_#{subtype.id}"}}
%td.left= format_as_fiscal_year(@data.fy)
%td.left= subtype.asset_type
%td.left= subtype
%td.right= format_as_integer(assets_by_subtype.count)
- cost = assets_by_subtype.sum{ |a| a.estimated_replacement_cost.to_i }
- book_val = assets_by_subtype.sum{ |a| a.book_value.to_i }
- sum_cost += cost
- sum_book_val += book_val
%td.right= format_as_currency(book_val)
%td.right= format_as_currency(cost)
%tfoot
%tr
%td{:colspan => 3}
%td.right= format_as_integer(assets.count)
%td.right= format_as_currency(sum_book_val)
%td.right= format_as_currency(sum_cost)
| Remove bug in asset report summary | Remove bug in asset report summary
| Haml | mit | camsys/transam_transit,camsys/transam_transit,camsys/transam_transit,camsys/transam_transit | haml | ## Code Before:
%table.table.table-hover
%thead
%tr
%th.left Fiscal Year
%th.left Type
%th.left Sub Type
%th.right Count
%th.right Book Value
%th.right Replacement Cost
%tbody
- sum_cost = 0
- sum_book_val = 0
- assets.group_by(&:asset_subtype).each do |subtype, assets_by_subtype|
%tr{:data => {:target => "#{org.id}_#{subtype.id}"}}
%td.left= format_as_fiscal_year(@data.fy)
%td.left= subtype.asset_type
%td.left= subtype
%td.right= format_as_integer(assets_by_subtype.count)
- cost = assets_by_subtype.sum{ |a| a.estimated_replacement_cost.to_i }
- book_val = assets_by_subtype.sum{ |a| a.book_value.to_i }
- sum_cost += cost
- sum_book_val += book_val
%td.right= format_as_currency(book_val)
%td.right= format_as_currency(sum_book_val)
%tfoot
%tr
%td{:colspan => 3}
%td.right= format_as_integer(assets.count)
%td.right= format_as_currency(sum_book_val)
%td.right= format_as_currency(sum_cost)
## Instruction:
Remove bug in asset report summary
## Code After:
%table.table.table-hover
%thead
%tr
%th.left Fiscal Year
%th.left Type
%th.left Sub Type
%th.right Count
%th.right Book Value
%th.right Replacement Cost
%tbody
- sum_cost = 0
- sum_book_val = 0
- assets.group_by(&:asset_subtype).each do |subtype, assets_by_subtype|
%tr{:data => {:target => "#{org.id}_#{subtype.id}"}}
%td.left= format_as_fiscal_year(@data.fy)
%td.left= subtype.asset_type
%td.left= subtype
%td.right= format_as_integer(assets_by_subtype.count)
- cost = assets_by_subtype.sum{ |a| a.estimated_replacement_cost.to_i }
- book_val = assets_by_subtype.sum{ |a| a.book_value.to_i }
- sum_cost += cost
- sum_book_val += book_val
%td.right= format_as_currency(book_val)
%td.right= format_as_currency(cost)
%tfoot
%tr
%td{:colspan => 3}
%td.right= format_as_integer(assets.count)
%td.right= format_as_currency(sum_book_val)
%td.right= format_as_currency(sum_cost)
| %table.table.table-hover
%thead
%tr
%th.left Fiscal Year
%th.left Type
%th.left Sub Type
%th.right Count
%th.right Book Value
%th.right Replacement Cost
%tbody
- sum_cost = 0
- sum_book_val = 0
- assets.group_by(&:asset_subtype).each do |subtype, assets_by_subtype|
%tr{:data => {:target => "#{org.id}_#{subtype.id}"}}
%td.left= format_as_fiscal_year(@data.fy)
%td.left= subtype.asset_type
%td.left= subtype
%td.right= format_as_integer(assets_by_subtype.count)
- cost = assets_by_subtype.sum{ |a| a.estimated_replacement_cost.to_i }
- book_val = assets_by_subtype.sum{ |a| a.book_value.to_i }
- sum_cost += cost
- sum_book_val += book_val
%td.right= format_as_currency(book_val)
- %td.right= format_as_currency(sum_book_val)
? ^^^^^^^^^^^
+ %td.right= format_as_currency(cost)
? ++ ^
%tfoot
%tr
%td{:colspan => 3}
%td.right= format_as_integer(assets.count)
%td.right= format_as_currency(sum_book_val)
%td.right= format_as_currency(sum_cost) | 2 | 0.066667 | 1 | 1 |
5d5917566ffcd16d204b1614a8dc8bc833b87174 | deps/ox/src/ox/clargs/CMakeLists.txt | deps/ox/src/ox/clargs/CMakeLists.txt | cmake_minimum_required(VERSION 3.10)
add_library(
OxClArgs
clargs.cpp
)
set_property(
TARGET
OxClArgs
PROPERTY
POSITION_INDEPENDENT_CODE ON
)
target_link_libraries(OxClArgs OxStd)
install(
FILES
clargs.hpp
DESTINATION
include/ox/clargs
)
install(
TARGETS
OxClArgs
LIBRARY DESTINATION lib/ox
ARCHIVE DESTINATION lib/ox
)
| cmake_minimum_required(VERSION 3.10)
add_library(
OxClArgs
clargs.cpp
)
set_property(
TARGET
OxClArgs
PROPERTY
POSITION_INDEPENDENT_CODE ON
)
target_link_libraries(
OxClArgs PUBLIC
OxStd
)
install(
FILES
clargs.hpp
DESTINATION
include/ox/clargs
)
install(
TARGETS
OxClArgs
LIBRARY DESTINATION lib/ox
ARCHIVE DESTINATION lib/ox
)
| Make OxClArgs pull in OxStd | [ox/clargs] Make OxClArgs pull in OxStd
| Text | mpl-2.0 | wombatant/nostalgia,wombatant/nostalgia,wombatant/nostalgia | text | ## Code Before:
cmake_minimum_required(VERSION 3.10)
add_library(
OxClArgs
clargs.cpp
)
set_property(
TARGET
OxClArgs
PROPERTY
POSITION_INDEPENDENT_CODE ON
)
target_link_libraries(OxClArgs OxStd)
install(
FILES
clargs.hpp
DESTINATION
include/ox/clargs
)
install(
TARGETS
OxClArgs
LIBRARY DESTINATION lib/ox
ARCHIVE DESTINATION lib/ox
)
## Instruction:
[ox/clargs] Make OxClArgs pull in OxStd
## Code After:
cmake_minimum_required(VERSION 3.10)
add_library(
OxClArgs
clargs.cpp
)
set_property(
TARGET
OxClArgs
PROPERTY
POSITION_INDEPENDENT_CODE ON
)
target_link_libraries(
OxClArgs PUBLIC
OxStd
)
install(
FILES
clargs.hpp
DESTINATION
include/ox/clargs
)
install(
TARGETS
OxClArgs
LIBRARY DESTINATION lib/ox
ARCHIVE DESTINATION lib/ox
)
| cmake_minimum_required(VERSION 3.10)
add_library(
OxClArgs
clargs.cpp
)
set_property(
TARGET
OxClArgs
PROPERTY
POSITION_INDEPENDENT_CODE ON
)
- target_link_libraries(OxClArgs OxStd)
+ target_link_libraries(
+ OxClArgs PUBLIC
+ OxStd
+ )
install(
FILES
clargs.hpp
DESTINATION
include/ox/clargs
)
install(
TARGETS
OxClArgs
LIBRARY DESTINATION lib/ox
ARCHIVE DESTINATION lib/ox
) | 5 | 0.172414 | 4 | 1 |
ffe6ba9cf99f0ae22f230b742d391204df057334 | docs/configuration.rst | docs/configuration.rst | .. _ref-configuration:
=============
Configuration
=============
The following section lists each of the settings that can be configured
within Cartridge. Each setting is registered using the ``mezzanine.conf``
module which is discussed in
`Mezzanine's Configuration <http://mezzanine.jupo.org/docs/configuration.html>`_.
.. include:: settings.rst
| .. _ref-configuration:
=============
Configuration
=============
The following section lists each of the settings that can be configured
within Cartridge. Each setting is registered using the ``mezzanine.conf``
module which is discussed in
`Mezzanine's Configuration <http://mezzanine.jupo.org/docs/configuration.html>`_.
Default Settings
================
Cartridge defines the following settings:
.. include:: settings.rst
| Move settings docs into a sub-section. | Move settings docs into a sub-section.
| reStructuredText | bsd-2-clause | wyzex/cartridge,jaywink/cartridge-reservable,stephenmcd/cartridge,wbtuomela/cartridge,dsanders11/cartridge,Kniyl/cartridge,viaregio/cartridge,stephenmcd/cartridge,ryneeverett/cartridge,traxxas/cartridge,syaiful6/cartridge,Kniyl/cartridge,Parisson/cartridge,Kniyl/cartridge,wbtuomela/cartridge,stephenmcd/cartridge,jaywink/cartridge-reservable,syaiful6/cartridge,dsanders11/cartridge,viaregio/cartridge,ryneeverett/cartridge,ryneeverett/cartridge,traxxas/cartridge,jaywink/cartridge-reservable,traxxas/cartridge,wyzex/cartridge,Parisson/cartridge,wyzex/cartridge,dsanders11/cartridge,syaiful6/cartridge,wbtuomela/cartridge,Parisson/cartridge | restructuredtext | ## Code Before:
.. _ref-configuration:
=============
Configuration
=============
The following section lists each of the settings that can be configured
within Cartridge. Each setting is registered using the ``mezzanine.conf``
module which is discussed in
`Mezzanine's Configuration <http://mezzanine.jupo.org/docs/configuration.html>`_.
.. include:: settings.rst
## Instruction:
Move settings docs into a sub-section.
## Code After:
.. _ref-configuration:
=============
Configuration
=============
The following section lists each of the settings that can be configured
within Cartridge. Each setting is registered using the ``mezzanine.conf``
module which is discussed in
`Mezzanine's Configuration <http://mezzanine.jupo.org/docs/configuration.html>`_.
Default Settings
================
Cartridge defines the following settings:
.. include:: settings.rst
| .. _ref-configuration:
=============
Configuration
=============
The following section lists each of the settings that can be configured
within Cartridge. Each setting is registered using the ``mezzanine.conf``
module which is discussed in
`Mezzanine's Configuration <http://mezzanine.jupo.org/docs/configuration.html>`_.
+ Default Settings
+ ================
+
+ Cartridge defines the following settings:
+
.. include:: settings.rst | 5 | 0.416667 | 5 | 0 |
964da81ef5a90130a47ff726839798a7a7b716ef | buildcert.py | buildcert.py |
import datetime
from subprocess import call
from ca import app, db, mail
from ca.models import Request
from flask import Flask, render_template
from flask_mail import Message
def mail_certificate(id, email):
msg = Message('Freifunk Vpn03 Key', sender = 'no-reply@ca.berlin.freifunk.net', recipients = [email])
msg.body = render_template('mail.txt')
with app.open_resource("/etc/openvpn/clients/freifunk_{}.tgz".format(id)) as fp:
msg.attach("freifunk_{}.tgz".format(id), "application/gzip", fp.read())
mail.send(msg)
for request in Request.query.filter(Request.generation_date == None).all(): # noqa
prompt = "Do you want to generate a certificate for {}, {} ?"
print(prompt.format(request.id, request.email))
print("Type y to continue")
confirm = input('>')
if confirm in ['Y', 'y']:
print('generating certificate')
call([app.config['COMMAND_BUILD'], request.id, request.email])
#call([app.config['COMMAND_MAIL'], request.id, request.email])
mail_certificate(request.id, request.email)
request.generation_date = datetime.date.today()
db.session.commit()
print()
else:
print('skipping generation \n')
|
import datetime
from subprocess import call
from ca import app, db, mail
from ca.models import Request
from flask import Flask, render_template
from flask_mail import Message
def mail_certificate(id, email):
with app.app_context():
msg = Message('Freifunk Vpn03 Key', sender = 'no-reply@ca.berlin.freifunk.net', recipients = [email])
msg.body = render_template('mail.txt')
with app.open_resource("/etc/openvpn/clients/freifunk_{}.tgz".format(id)) as fp:
msg.attach("freifunk_{}.tgz".format(id), "application/gzip", fp.read())
mail.send(msg)
for request in Request.query.filter(Request.generation_date == None).all(): # noqa
prompt = "Do you want to generate a certificate for {}, {} ?"
print(prompt.format(request.id, request.email))
print("Type y to continue")
confirm = input('>')
if confirm in ['Y', 'y']:
print('generating certificate')
call([app.config['COMMAND_BUILD'], request.id, request.email])
#call([app.config['COMMAND_MAIL'], request.id, request.email])
mail_certificate(request.id, request.email)
request.generation_date = datetime.date.today()
db.session.commit()
print()
else:
print('skipping generation \n')
| Add app.context() to populate context for render_template | Add app.context() to populate context for render_template
| Python | mit | freifunk-berlin/ca.berlin.freifunk.net,freifunk-berlin/ca.berlin.freifunk.net,freifunk-berlin/ca.berlin.freifunk.net | python | ## Code Before:
import datetime
from subprocess import call
from ca import app, db, mail
from ca.models import Request
from flask import Flask, render_template
from flask_mail import Message
def mail_certificate(id, email):
msg = Message('Freifunk Vpn03 Key', sender = 'no-reply@ca.berlin.freifunk.net', recipients = [email])
msg.body = render_template('mail.txt')
with app.open_resource("/etc/openvpn/clients/freifunk_{}.tgz".format(id)) as fp:
msg.attach("freifunk_{}.tgz".format(id), "application/gzip", fp.read())
mail.send(msg)
for request in Request.query.filter(Request.generation_date == None).all(): # noqa
prompt = "Do you want to generate a certificate for {}, {} ?"
print(prompt.format(request.id, request.email))
print("Type y to continue")
confirm = input('>')
if confirm in ['Y', 'y']:
print('generating certificate')
call([app.config['COMMAND_BUILD'], request.id, request.email])
#call([app.config['COMMAND_MAIL'], request.id, request.email])
mail_certificate(request.id, request.email)
request.generation_date = datetime.date.today()
db.session.commit()
print()
else:
print('skipping generation \n')
## Instruction:
Add app.context() to populate context for render_template
## Code After:
import datetime
from subprocess import call
from ca import app, db, mail
from ca.models import Request
from flask import Flask, render_template
from flask_mail import Message
def mail_certificate(id, email):
with app.app_context():
msg = Message('Freifunk Vpn03 Key', sender = 'no-reply@ca.berlin.freifunk.net', recipients = [email])
msg.body = render_template('mail.txt')
with app.open_resource("/etc/openvpn/clients/freifunk_{}.tgz".format(id)) as fp:
msg.attach("freifunk_{}.tgz".format(id), "application/gzip", fp.read())
mail.send(msg)
for request in Request.query.filter(Request.generation_date == None).all(): # noqa
prompt = "Do you want to generate a certificate for {}, {} ?"
print(prompt.format(request.id, request.email))
print("Type y to continue")
confirm = input('>')
if confirm in ['Y', 'y']:
print('generating certificate')
call([app.config['COMMAND_BUILD'], request.id, request.email])
#call([app.config['COMMAND_MAIL'], request.id, request.email])
mail_certificate(request.id, request.email)
request.generation_date = datetime.date.today()
db.session.commit()
print()
else:
print('skipping generation \n')
|
import datetime
from subprocess import call
from ca import app, db, mail
from ca.models import Request
from flask import Flask, render_template
from flask_mail import Message
def mail_certificate(id, email):
+ with app.app_context():
- msg = Message('Freifunk Vpn03 Key', sender = 'no-reply@ca.berlin.freifunk.net', recipients = [email])
+ msg = Message('Freifunk Vpn03 Key', sender = 'no-reply@ca.berlin.freifunk.net', recipients = [email])
? ++++
- msg.body = render_template('mail.txt')
+ msg.body = render_template('mail.txt')
? ++++
- with app.open_resource("/etc/openvpn/clients/freifunk_{}.tgz".format(id)) as fp:
+ with app.open_resource("/etc/openvpn/clients/freifunk_{}.tgz".format(id)) as fp:
? ++++
- msg.attach("freifunk_{}.tgz".format(id), "application/gzip", fp.read())
+ msg.attach("freifunk_{}.tgz".format(id), "application/gzip", fp.read())
? ++++
- mail.send(msg)
+ mail.send(msg)
? ++++
for request in Request.query.filter(Request.generation_date == None).all(): # noqa
prompt = "Do you want to generate a certificate for {}, {} ?"
print(prompt.format(request.id, request.email))
print("Type y to continue")
confirm = input('>')
if confirm in ['Y', 'y']:
print('generating certificate')
call([app.config['COMMAND_BUILD'], request.id, request.email])
#call([app.config['COMMAND_MAIL'], request.id, request.email])
mail_certificate(request.id, request.email)
request.generation_date = datetime.date.today()
db.session.commit()
print()
else:
print('skipping generation \n') | 11 | 0.333333 | 6 | 5 |
6b803c1e6a7e2f58d191f44d6f011fcfa693588f | templates/error503_upstream.php | templates/error503_upstream.php | <?php
##
## Copyright 2013-2017 Opera Software AS
##
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License.
## You may obtain a copy of the License at
##
## http://www.apache.org/licenses/LICENSE-2.0
##
## Unless required by applicable law or agreed to in writing, software
## distributed under the License is distributed on an "AS IS" BASIS,
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
## See the License for the specific language governing permissions and
## limitations under the License.
##
$active_user = $this->get('active_user');
?>
<h1>DNS server communication failure</h1>
<p>The DNS server is not responding.</p>
<?php if(!is_null($active_user) && $active_user->admin) { ?>
<p>Make sure that the following PowerDNS parameters are set correctly in <code>pdns.conf</code>:</p>
<pre>webserver=yes
webserver=yes
webserver-address=...
webserver-allow-from=...
webserver-port=...
api=yes
api-key=...</pre>
<p>Reload PowerDNS after making changes to this file.</p>
<p>Also check the values set in the <code>[powerdns]</code> section of the DNS UI configuration file (<code>config/config.ini</code>).</p>
<?php } ?>
| <?php
##
## Copyright 2013-2017 Opera Software AS
##
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License.
## You may obtain a copy of the License at
##
## http://www.apache.org/licenses/LICENSE-2.0
##
## Unless required by applicable law or agreed to in writing, software
## distributed under the License is distributed on an "AS IS" BASIS,
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
## See the License for the specific language governing permissions and
## limitations under the License.
##
$active_user = $this->get('active_user');
?>
<h1>DNS server communication failure</h1>
<p>The DNS server is not responding.</p>
<?php if(!is_null($active_user) && $active_user->admin) { ?>
<p>Make sure that the following PowerDNS parameters are set correctly in <code>pdns.conf</code>:</p>
<pre>webserver=yes
webserver-address=...
webserver-allow-from=...
webserver-port=...
api=yes
api-key=...</pre>
<p>Reload PowerDNS after making changes to this file.</p>
<p>Also check the values set in the <code>[powerdns]</code> section of the DNS UI configuration file (<code>config/config.ini</code>).</p>
<?php } ?>
| Remove duplicate line from suggested PowerDNS config | Remove duplicate line from suggested PowerDNS config
| PHP | apache-2.0 | operasoftware/dns-ui,operasoftware/dns-ui | php | ## Code Before:
<?php
##
## Copyright 2013-2017 Opera Software AS
##
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License.
## You may obtain a copy of the License at
##
## http://www.apache.org/licenses/LICENSE-2.0
##
## Unless required by applicable law or agreed to in writing, software
## distributed under the License is distributed on an "AS IS" BASIS,
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
## See the License for the specific language governing permissions and
## limitations under the License.
##
$active_user = $this->get('active_user');
?>
<h1>DNS server communication failure</h1>
<p>The DNS server is not responding.</p>
<?php if(!is_null($active_user) && $active_user->admin) { ?>
<p>Make sure that the following PowerDNS parameters are set correctly in <code>pdns.conf</code>:</p>
<pre>webserver=yes
webserver=yes
webserver-address=...
webserver-allow-from=...
webserver-port=...
api=yes
api-key=...</pre>
<p>Reload PowerDNS after making changes to this file.</p>
<p>Also check the values set in the <code>[powerdns]</code> section of the DNS UI configuration file (<code>config/config.ini</code>).</p>
<?php } ?>
## Instruction:
Remove duplicate line from suggested PowerDNS config
## Code After:
<?php
##
## Copyright 2013-2017 Opera Software AS
##
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License.
## You may obtain a copy of the License at
##
## http://www.apache.org/licenses/LICENSE-2.0
##
## Unless required by applicable law or agreed to in writing, software
## distributed under the License is distributed on an "AS IS" BASIS,
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
## See the License for the specific language governing permissions and
## limitations under the License.
##
$active_user = $this->get('active_user');
?>
<h1>DNS server communication failure</h1>
<p>The DNS server is not responding.</p>
<?php if(!is_null($active_user) && $active_user->admin) { ?>
<p>Make sure that the following PowerDNS parameters are set correctly in <code>pdns.conf</code>:</p>
<pre>webserver=yes
webserver-address=...
webserver-allow-from=...
webserver-port=...
api=yes
api-key=...</pre>
<p>Reload PowerDNS after making changes to this file.</p>
<p>Also check the values set in the <code>[powerdns]</code> section of the DNS UI configuration file (<code>config/config.ini</code>).</p>
<?php } ?>
| <?php
##
## Copyright 2013-2017 Opera Software AS
##
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License.
## You may obtain a copy of the License at
##
## http://www.apache.org/licenses/LICENSE-2.0
##
## Unless required by applicable law or agreed to in writing, software
## distributed under the License is distributed on an "AS IS" BASIS,
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
## See the License for the specific language governing permissions and
## limitations under the License.
##
$active_user = $this->get('active_user');
?>
<h1>DNS server communication failure</h1>
<p>The DNS server is not responding.</p>
<?php if(!is_null($active_user) && $active_user->admin) { ?>
<p>Make sure that the following PowerDNS parameters are set correctly in <code>pdns.conf</code>:</p>
<pre>webserver=yes
- webserver=yes
webserver-address=...
webserver-allow-from=...
webserver-port=...
api=yes
api-key=...</pre>
<p>Reload PowerDNS after making changes to this file.</p>
<p>Also check the values set in the <code>[powerdns]</code> section of the DNS UI configuration file (<code>config/config.ini</code>).</p>
<?php } ?> | 1 | 0.03125 | 0 | 1 |
c165eb94b23a47f939efc4b04b08e349afd1c8b5 | appveyor.yml | appveyor.yml | version: '{build}'
branches:
only:
- master
- develop
os: Visual Studio 2015
configuration: Release
platform: Any CPU
init:
- cmd: git config --global core.autocrlf true
environment:
PATH: C:\Program Files (x86)\MSBuild\14.0\Bin;%PATH%
nuget:
disable_publish_on_pr: true
before_build:
- cmd: >-
git submodule init
git submodule update
nuget restore source\KanColleViewer.sln -PackagesDirectory source\packages
build:
project: source\KanColleViewer.sln
publish_nuget: true
verbosity: minimal
artifacts:
- path: source\Grabacr07.KanColleViewer\bin\Release
name: KanColleViewer
deploy:
- provider: NuGet
api_key:
secure: GrOjr849MkxFz3v7VSIvDNd0ZNZDaUTDeHqRF0InDLzMSuFoDmrqiMaKtIz0MxG8
artifact: /KanColle.*\.nupkg/ | version: '{build}'
branches:
only:
- master
- develop
os: Visual Studio 2015
configuration: Release
platform: Any CPU
init:
- cmd: git config --global core.autocrlf true
environment:
PATH: C:\Program Files (x86)\MSBuild\14.0\Bin;%PATH%
nuget:
disable_publish_on_pr: true
before_build:
- cmd: >-
git submodule init
git submodule update
nuget restore source\KanColleViewer.sln -PackagesDirectory source\packages
build:
project: source\KanColleViewer.sln
publish_nuget: true
verbosity: minimal
artifacts:
- path: source\Grabacr07.KanColleViewer\bin\Release
name: KanColleViewer
deploy:
- provider: FTP
protocol: ftps
host: koumakan.jp
username: $(ftpuser)
password: $(ftppassword)
folder: $(appveyor_build_version)
artifact: /KanColle.*\.nupkg/ | Change deployment settings for AppVeyor | Change deployment settings for AppVeyor
| YAML | mit | Yuubari/KanColleViewer | yaml | ## Code Before:
version: '{build}'
branches:
only:
- master
- develop
os: Visual Studio 2015
configuration: Release
platform: Any CPU
init:
- cmd: git config --global core.autocrlf true
environment:
PATH: C:\Program Files (x86)\MSBuild\14.0\Bin;%PATH%
nuget:
disable_publish_on_pr: true
before_build:
- cmd: >-
git submodule init
git submodule update
nuget restore source\KanColleViewer.sln -PackagesDirectory source\packages
build:
project: source\KanColleViewer.sln
publish_nuget: true
verbosity: minimal
artifacts:
- path: source\Grabacr07.KanColleViewer\bin\Release
name: KanColleViewer
deploy:
- provider: NuGet
api_key:
secure: GrOjr849MkxFz3v7VSIvDNd0ZNZDaUTDeHqRF0InDLzMSuFoDmrqiMaKtIz0MxG8
artifact: /KanColle.*\.nupkg/
## Instruction:
Change deployment settings for AppVeyor
## Code After:
version: '{build}'
branches:
only:
- master
- develop
os: Visual Studio 2015
configuration: Release
platform: Any CPU
init:
- cmd: git config --global core.autocrlf true
environment:
PATH: C:\Program Files (x86)\MSBuild\14.0\Bin;%PATH%
nuget:
disable_publish_on_pr: true
before_build:
- cmd: >-
git submodule init
git submodule update
nuget restore source\KanColleViewer.sln -PackagesDirectory source\packages
build:
project: source\KanColleViewer.sln
publish_nuget: true
verbosity: minimal
artifacts:
- path: source\Grabacr07.KanColleViewer\bin\Release
name: KanColleViewer
deploy:
- provider: FTP
protocol: ftps
host: koumakan.jp
username: $(ftpuser)
password: $(ftppassword)
folder: $(appveyor_build_version)
artifact: /KanColle.*\.nupkg/ | version: '{build}'
branches:
only:
- master
- develop
os: Visual Studio 2015
configuration: Release
platform: Any CPU
init:
- cmd: git config --global core.autocrlf true
environment:
PATH: C:\Program Files (x86)\MSBuild\14.0\Bin;%PATH%
nuget:
disable_publish_on_pr: true
before_build:
- cmd: >-
git submodule init
git submodule update
nuget restore source\KanColleViewer.sln -PackagesDirectory source\packages
build:
project: source\KanColleViewer.sln
publish_nuget: true
verbosity: minimal
artifacts:
- path: source\Grabacr07.KanColleViewer\bin\Release
name: KanColleViewer
deploy:
- - provider: NuGet
? ^^^^^
+ - provider: FTP
? ^^^
- api_key:
- secure: GrOjr849MkxFz3v7VSIvDNd0ZNZDaUTDeHqRF0InDLzMSuFoDmrqiMaKtIz0MxG8
+ protocol: ftps
+ host: koumakan.jp
+ username: $(ftpuser)
+ password: $(ftppassword)
+ folder: $(appveyor_build_version)
artifact: /KanColle.*\.nupkg/ | 9 | 0.264706 | 6 | 3 |
218d79072f4c4d569790f819e84bea9f26f2340d | spec/lib/hours_spec.rb | spec/lib/hours_spec.rb | describe Hours do
context "helpful_enabled" do
it "returns false when there's no account or url" do
allow(Hours).to receive(:helpful_account).and_return false
allow(Hours).to receive(:helpful_url).and_return false
expect(Hours.helpful_enabled?).to eq(false)
end
it "raises an error when the account or url is empty" do
allow(Hours).to receive(:helpful_account).and_return ""
allow(Hours).to receive(:helpful_url).and_return ""
expect { Hours.helpful_enabled? }. to raise_error
end
it "returns true when account and url are set" do
allow(Hours).to receive(:helpful_account).and_return "Helpful account"
allow(Hours).to receive(:helpful_url).and_return "www.helpful.com/messages"
expect(Hours.helpful_enabled?).to eq(true)
end
end
end
| describe Hours do
context "helpful_enabled" do
it "returns false when there's no account or url" do
allow(Hours).to receive(:helpful_account).and_return false
allow(Hours).to receive(:helpful_url).and_return false
expect(Hours.helpful_enabled?).to eq(false)
end
it "raises an error when the account or url is empty" do
allow(Hours).to receive(:helpful_account).and_return ""
allow(Hours).to receive(:helpful_url).and_return ""
expect { Hours.helpful_enabled? }. to raise_error(RuntimeError)
end
it "returns true when account and url are set" do
allow(Hours).to receive(:helpful_account).and_return "Helpful account"
allow(Hours).to receive(:helpful_url).and_return "www.helpful.com/messages"
expect(Hours.helpful_enabled?).to eq(true)
end
end
end
| Fix using bare raise_error matcher | Fix using bare raise_error matcher
This is due to receiving a deprecation warning:
```sh
WARNING: Using the `raise_error` matcher without providing a specific error or message risks false positives, since `raise_error` will match
-- snip --
```
| Ruby | mit | DefactoSoftware/Hours,michalsz/Hours,DefactoSoftware/Hours,DefactoSoftware/Hours,michalsz/Hours,DefactoSoftware/Hours,michalsz/Hours,michalsz/Hours | ruby | ## Code Before:
describe Hours do
context "helpful_enabled" do
it "returns false when there's no account or url" do
allow(Hours).to receive(:helpful_account).and_return false
allow(Hours).to receive(:helpful_url).and_return false
expect(Hours.helpful_enabled?).to eq(false)
end
it "raises an error when the account or url is empty" do
allow(Hours).to receive(:helpful_account).and_return ""
allow(Hours).to receive(:helpful_url).and_return ""
expect { Hours.helpful_enabled? }. to raise_error
end
it "returns true when account and url are set" do
allow(Hours).to receive(:helpful_account).and_return "Helpful account"
allow(Hours).to receive(:helpful_url).and_return "www.helpful.com/messages"
expect(Hours.helpful_enabled?).to eq(true)
end
end
end
## Instruction:
Fix using bare raise_error matcher
This is due to receiving a deprecation warning:
```sh
WARNING: Using the `raise_error` matcher without providing a specific error or message risks false positives, since `raise_error` will match
-- snip --
```
## Code After:
describe Hours do
context "helpful_enabled" do
it "returns false when there's no account or url" do
allow(Hours).to receive(:helpful_account).and_return false
allow(Hours).to receive(:helpful_url).and_return false
expect(Hours.helpful_enabled?).to eq(false)
end
it "raises an error when the account or url is empty" do
allow(Hours).to receive(:helpful_account).and_return ""
allow(Hours).to receive(:helpful_url).and_return ""
expect { Hours.helpful_enabled? }. to raise_error(RuntimeError)
end
it "returns true when account and url are set" do
allow(Hours).to receive(:helpful_account).and_return "Helpful account"
allow(Hours).to receive(:helpful_url).and_return "www.helpful.com/messages"
expect(Hours.helpful_enabled?).to eq(true)
end
end
end
| describe Hours do
context "helpful_enabled" do
it "returns false when there's no account or url" do
allow(Hours).to receive(:helpful_account).and_return false
allow(Hours).to receive(:helpful_url).and_return false
expect(Hours.helpful_enabled?).to eq(false)
end
it "raises an error when the account or url is empty" do
allow(Hours).to receive(:helpful_account).and_return ""
allow(Hours).to receive(:helpful_url).and_return ""
- expect { Hours.helpful_enabled? }. to raise_error
+ expect { Hours.helpful_enabled? }. to raise_error(RuntimeError)
? ++++++++++++++
end
it "returns true when account and url are set" do
allow(Hours).to receive(:helpful_account).and_return "Helpful account"
allow(Hours).to receive(:helpful_url).and_return "www.helpful.com/messages"
expect(Hours.helpful_enabled?).to eq(true)
end
end
end
| 2 | 0.090909 | 1 | 1 |
495ea3347eec9d1a902779de8dd07ba91aa48f60 | server/validator.py | server/validator.py | from girder.api import access
from girder.api.rest import Resource
from girder.api.describe import Description
class Validator(Resource):
def __init__(self, celeryApp):
self.resourceName = 'romanesco_validator'
self.route('GET', (), self.find)
self.celeryApp = celeryApp
@access.public
def find(self, params):
return self.celeryApp.send_task('romanesco.validators', [
params.get('type', None),
params.get('format', None)]).get()
find.description = (
Description('List or search for validators.')
.param('type', 'Find validators with this type.', required=False)
.param('format', 'Find validators with this format.', required=False)
)
| from girder.api import access
from girder.api.rest import Resource
from girder.api.describe import Description
class Validator(Resource):
def __init__(self, celeryApp):
super(Validator, self).__init__()
self.resourceName = 'romanesco_validator'
self.route('GET', (), self.find)
self.celeryApp = celeryApp
@access.public
def find(self, params):
return self.celeryApp.send_task('romanesco.validators', [
params.get('type', None),
params.get('format', None)]).get()
find.description = (
Description('List or search for validators.')
.param('type', 'Find validators with this type.', required=False)
.param('format', 'Find validators with this format.', required=False)
)
| Call Resource constructor from Validator, fixing a Girder warning | Call Resource constructor from Validator, fixing a Girder warning
| Python | apache-2.0 | Kitware/romanesco,Kitware/romanesco,Kitware/romanesco,Kitware/romanesco | python | ## Code Before:
from girder.api import access
from girder.api.rest import Resource
from girder.api.describe import Description
class Validator(Resource):
def __init__(self, celeryApp):
self.resourceName = 'romanesco_validator'
self.route('GET', (), self.find)
self.celeryApp = celeryApp
@access.public
def find(self, params):
return self.celeryApp.send_task('romanesco.validators', [
params.get('type', None),
params.get('format', None)]).get()
find.description = (
Description('List or search for validators.')
.param('type', 'Find validators with this type.', required=False)
.param('format', 'Find validators with this format.', required=False)
)
## Instruction:
Call Resource constructor from Validator, fixing a Girder warning
## Code After:
from girder.api import access
from girder.api.rest import Resource
from girder.api.describe import Description
class Validator(Resource):
def __init__(self, celeryApp):
super(Validator, self).__init__()
self.resourceName = 'romanesco_validator'
self.route('GET', (), self.find)
self.celeryApp = celeryApp
@access.public
def find(self, params):
return self.celeryApp.send_task('romanesco.validators', [
params.get('type', None),
params.get('format', None)]).get()
find.description = (
Description('List or search for validators.')
.param('type', 'Find validators with this type.', required=False)
.param('format', 'Find validators with this format.', required=False)
)
| from girder.api import access
from girder.api.rest import Resource
from girder.api.describe import Description
class Validator(Resource):
def __init__(self, celeryApp):
+ super(Validator, self).__init__()
self.resourceName = 'romanesco_validator'
self.route('GET', (), self.find)
self.celeryApp = celeryApp
@access.public
def find(self, params):
return self.celeryApp.send_task('romanesco.validators', [
params.get('type', None),
params.get('format', None)]).get()
find.description = (
Description('List or search for validators.')
.param('type', 'Find validators with this type.', required=False)
.param('format', 'Find validators with this format.', required=False)
) | 1 | 0.047619 | 1 | 0 |
b4d153a179c76837e809549c173da81e13e07f1e | src/revert/Entities/EnemyFactory.java | src/revert/Entities/EnemyFactory.java | package revert.Entities;
import java.awt.Point;
import revert.AI.EnemyAi;
import revert.MainScene.World;
public class EnemyFactory {
Point[] spawnPoints;
World world;
public EnemyFactory(World world, Point... spawns)
{
this.spawnPoints = spawns;
this.world = world;
}
/**
* Create a data set array
* @param size
* @return
*/
public int[][] createWave(int size)
{
int[][] wave = new int[size][];
for (int i = 0; i < size; i++)
{
Point loc = spawnPoints[(int)(Math.random()*spawnPoints.length)];
int[] n = {loc.x, loc.y, (int)(Math.random()*3)};
wave[i] = n;
}
return wave;
}
public Enemy generateEnemy(int type)
{
Enemy e = new Enemy(world, world.getPlayer());
EnemyAi ai = null;
if (type == 0)
{
//ai = new PassiveAi();
}
else
{
System.out.println("No enemy type corresponds to value: " + type + ". Instantiating basic enemy");
}
e.setAI(ai);
return e;
}
}
| package revert.Entities;
import java.awt.Point;
import com.kgp.util.Vector2;
import revert.AI.EnemyAi;
import revert.MainScene.World;
public class EnemyFactory {
Vector2[] spawnPoints;
World world;
public EnemyFactory(World world, Vector2... spawns)
{
this.spawnPoints = spawns;
this.world = world;
}
/**
* Create a data set array
* @param size
* @return
*/
public int[][] createWave(int size)
{
int[][] wave = new int[size][];
for (int i = 0; i < size; i++)
{
Vector2 loc = spawnPoints[(int)(Math.random()*spawnPoints.length)];
int[] n = {(int)loc.x, (int)loc.y, (int)(Math.random()*3)};
wave[i] = n;
}
return wave;
}
public Enemy generateEnemy(int type)
{
Enemy e = new Enemy(world, world.getPlayer());
EnemyAi ai = null;
if (type == 0)
{
//ai = new PassiveAi();
}
else
{
System.out.println("No enemy type corresponds to value: " + type + ". Instantiating basic enemy");
}
e.setAI(ai);
return e;
}
}
| Fix enemy factory since world is now using vector2 | Fix enemy factory since world is now using vector2
| Java | mit | nhydock/revert | java | ## Code Before:
package revert.Entities;
import java.awt.Point;
import revert.AI.EnemyAi;
import revert.MainScene.World;
public class EnemyFactory {
Point[] spawnPoints;
World world;
public EnemyFactory(World world, Point... spawns)
{
this.spawnPoints = spawns;
this.world = world;
}
/**
* Create a data set array
* @param size
* @return
*/
public int[][] createWave(int size)
{
int[][] wave = new int[size][];
for (int i = 0; i < size; i++)
{
Point loc = spawnPoints[(int)(Math.random()*spawnPoints.length)];
int[] n = {loc.x, loc.y, (int)(Math.random()*3)};
wave[i] = n;
}
return wave;
}
public Enemy generateEnemy(int type)
{
Enemy e = new Enemy(world, world.getPlayer());
EnemyAi ai = null;
if (type == 0)
{
//ai = new PassiveAi();
}
else
{
System.out.println("No enemy type corresponds to value: " + type + ". Instantiating basic enemy");
}
e.setAI(ai);
return e;
}
}
## Instruction:
Fix enemy factory since world is now using vector2
## Code After:
package revert.Entities;
import java.awt.Point;
import com.kgp.util.Vector2;
import revert.AI.EnemyAi;
import revert.MainScene.World;
public class EnemyFactory {
Vector2[] spawnPoints;
World world;
public EnemyFactory(World world, Vector2... spawns)
{
this.spawnPoints = spawns;
this.world = world;
}
/**
* Create a data set array
* @param size
* @return
*/
public int[][] createWave(int size)
{
int[][] wave = new int[size][];
for (int i = 0; i < size; i++)
{
Vector2 loc = spawnPoints[(int)(Math.random()*spawnPoints.length)];
int[] n = {(int)loc.x, (int)loc.y, (int)(Math.random()*3)};
wave[i] = n;
}
return wave;
}
public Enemy generateEnemy(int type)
{
Enemy e = new Enemy(world, world.getPlayer());
EnemyAi ai = null;
if (type == 0)
{
//ai = new PassiveAi();
}
else
{
System.out.println("No enemy type corresponds to value: " + type + ". Instantiating basic enemy");
}
e.setAI(ai);
return e;
}
}
| package revert.Entities;
import java.awt.Point;
+
+ import com.kgp.util.Vector2;
import revert.AI.EnemyAi;
import revert.MainScene.World;
public class EnemyFactory {
- Point[] spawnPoints;
? ^ ^^^
+ Vector2[] spawnPoints;
? ^^^^ ^^
World world;
- public EnemyFactory(World world, Point... spawns)
? ^ ^^^
+ public EnemyFactory(World world, Vector2... spawns)
? ^^^^ ^^
{
this.spawnPoints = spawns;
this.world = world;
}
/**
* Create a data set array
* @param size
* @return
*/
public int[][] createWave(int size)
{
int[][] wave = new int[size][];
for (int i = 0; i < size; i++)
{
- Point loc = spawnPoints[(int)(Math.random()*spawnPoints.length)];
? ^ ^^^
+ Vector2 loc = spawnPoints[(int)(Math.random()*spawnPoints.length)];
? ^^^^ ^^
- int[] n = {loc.x, loc.y, (int)(Math.random()*3)};
+ int[] n = {(int)loc.x, (int)loc.y, (int)(Math.random()*3)};
? +++++ +++++
wave[i] = n;
}
return wave;
}
public Enemy generateEnemy(int type)
{
Enemy e = new Enemy(world, world.getPlayer());
EnemyAi ai = null;
if (type == 0)
{
//ai = new PassiveAi();
}
else
{
System.out.println("No enemy type corresponds to value: " + type + ". Instantiating basic enemy");
}
e.setAI(ai);
return e;
}
} | 10 | 0.172414 | 6 | 4 |
d06d65cea4ae9efa547af43a551e24a459e0627e | tbmodels/_legacy_decode.py | tbmodels/_legacy_decode.py | from ._tb_model import Model
def _decode(hf):
if 'tb_model' in hf or 'hop' in hf:
return _decode_model(hf)
elif 'val' in hf:
return _decode_val(hf)
elif '0' in hf:
return _decode_iterable(hf)
else:
raise ValueError('File structure not understood.')
def _decode_iterable(hf):
return [_decode(hf[key]) for key in sorted(hf, key=int)]
def _decode_model(hf):
return Model.from_hdf5(hf)
def _decode_val(hf):
return hf['val'].value
|
from ._tb_model import Model
def _decode(hdf5_handle):
"""
Decode the object at the given HDF5 node.
"""
if 'tb_model' in hdf5_handle or 'hop' in hdf5_handle:
return _decode_model(hdf5_handle)
elif 'val' in hdf5_handle:
return _decode_val(hdf5_handle)
elif '0' in hdf5_handle:
return _decode_iterable(hdf5_handle)
else:
raise ValueError('File structure not understood.')
def _decode_iterable(hdf5_handle):
return [_decode(hdf5_handle[key]) for key in sorted(hdf5_handle, key=int)]
def _decode_model(hdf5_handle):
return Model.from_hdf5(hdf5_handle)
def _decode_val(hdf5_handle):
return hdf5_handle['val'].value
| Fix pylint issues in legacy_decode. | Fix pylint issues in legacy_decode.
| Python | apache-2.0 | Z2PackDev/TBmodels,Z2PackDev/TBmodels | python | ## Code Before:
from ._tb_model import Model
def _decode(hf):
if 'tb_model' in hf or 'hop' in hf:
return _decode_model(hf)
elif 'val' in hf:
return _decode_val(hf)
elif '0' in hf:
return _decode_iterable(hf)
else:
raise ValueError('File structure not understood.')
def _decode_iterable(hf):
return [_decode(hf[key]) for key in sorted(hf, key=int)]
def _decode_model(hf):
return Model.from_hdf5(hf)
def _decode_val(hf):
return hf['val'].value
## Instruction:
Fix pylint issues in legacy_decode.
## Code After:
from ._tb_model import Model
def _decode(hdf5_handle):
"""
Decode the object at the given HDF5 node.
"""
if 'tb_model' in hdf5_handle or 'hop' in hdf5_handle:
return _decode_model(hdf5_handle)
elif 'val' in hdf5_handle:
return _decode_val(hdf5_handle)
elif '0' in hdf5_handle:
return _decode_iterable(hdf5_handle)
else:
raise ValueError('File structure not understood.')
def _decode_iterable(hdf5_handle):
return [_decode(hdf5_handle[key]) for key in sorted(hdf5_handle, key=int)]
def _decode_model(hdf5_handle):
return Model.from_hdf5(hdf5_handle)
def _decode_val(hdf5_handle):
return hdf5_handle['val'].value
| +
from ._tb_model import Model
- def _decode(hf):
+ def _decode(hdf5_handle):
? + ++++++++
+ """
+ Decode the object at the given HDF5 node.
+ """
- if 'tb_model' in hf or 'hop' in hf:
+ if 'tb_model' in hdf5_handle or 'hop' in hdf5_handle:
? + ++++++++ + ++++++++
- return _decode_model(hf)
+ return _decode_model(hdf5_handle)
? + ++++++++
- elif 'val' in hf:
+ elif 'val' in hdf5_handle:
? + ++++++++
- return _decode_val(hf)
+ return _decode_val(hdf5_handle)
? + ++++++++
- elif '0' in hf:
+ elif '0' in hdf5_handle:
? + ++++++++
- return _decode_iterable(hf)
+ return _decode_iterable(hdf5_handle)
? + ++++++++
else:
raise ValueError('File structure not understood.')
- def _decode_iterable(hf):
+ def _decode_iterable(hdf5_handle):
? + ++++++++
- return [_decode(hf[key]) for key in sorted(hf, key=int)]
+ return [_decode(hdf5_handle[key]) for key in sorted(hdf5_handle, key=int)]
? + ++++++++ + ++++++++
- def _decode_model(hf):
+ def _decode_model(hdf5_handle):
? + ++++++++
- return Model.from_hdf5(hf)
+ return Model.from_hdf5(hdf5_handle)
? + ++++++++
- def _decode_val(hf):
+ def _decode_val(hdf5_handle):
? + ++++++++
- return hf['val'].value
+ return hdf5_handle['val'].value
? + ++++++++
| 30 | 1.25 | 17 | 13 |
4ee1b1878a0f29160fdc4d5f8b3aee75c5576caa | .travis.yml | .travis.yml | sudo: required
dist: trusty
language: minimal
env:
matrix:
- ARCH=x86_64
- ARCH=armhf
- ARCH=aarch64
- ARCH=ppc64le
- ARCH=s390x
install:
- sudo ./alpine-chroot-install
script:
- /alpine/enter-chroot uname -a
- /alpine/enter-chroot env
- /alpine/enter-chroot -u $USER env
- sudo /alpine/enter-chroot -u $USER env
- test "$(/alpine/enter-chroot printf %s! 'Hello, world')" = 'Hello, world!'
| sudo: required
dist: trusty
language: minimal
env:
matrix:
- ARCH=x86_64
- ARCH=armhf
- ARCH=aarch64
- ARCH=ppc64le
install:
- sudo ./alpine-chroot-install
script:
- /alpine/enter-chroot uname -a
- /alpine/enter-chroot env
- /alpine/enter-chroot -u $USER env
- sudo /alpine/enter-chroot -u $USER env
- test "$(/alpine/enter-chroot printf %s! 'Hello, world')" = 'Hello, world!'
| Remove arch s390x, doesn't work on Travis anymore | CI: Remove arch s390x, doesn't work on Travis anymore
Illegal instruction (core dumped)
| YAML | mit | jirutka/alpine-chroot-install | yaml | ## Code Before:
sudo: required
dist: trusty
language: minimal
env:
matrix:
- ARCH=x86_64
- ARCH=armhf
- ARCH=aarch64
- ARCH=ppc64le
- ARCH=s390x
install:
- sudo ./alpine-chroot-install
script:
- /alpine/enter-chroot uname -a
- /alpine/enter-chroot env
- /alpine/enter-chroot -u $USER env
- sudo /alpine/enter-chroot -u $USER env
- test "$(/alpine/enter-chroot printf %s! 'Hello, world')" = 'Hello, world!'
## Instruction:
CI: Remove arch s390x, doesn't work on Travis anymore
Illegal instruction (core dumped)
## Code After:
sudo: required
dist: trusty
language: minimal
env:
matrix:
- ARCH=x86_64
- ARCH=armhf
- ARCH=aarch64
- ARCH=ppc64le
install:
- sudo ./alpine-chroot-install
script:
- /alpine/enter-chroot uname -a
- /alpine/enter-chroot env
- /alpine/enter-chroot -u $USER env
- sudo /alpine/enter-chroot -u $USER env
- test "$(/alpine/enter-chroot printf %s! 'Hello, world')" = 'Hello, world!'
| sudo: required
dist: trusty
language: minimal
env:
matrix:
- ARCH=x86_64
- ARCH=armhf
- ARCH=aarch64
- ARCH=ppc64le
- - ARCH=s390x
install:
- sudo ./alpine-chroot-install
script:
- /alpine/enter-chroot uname -a
- /alpine/enter-chroot env
- /alpine/enter-chroot -u $USER env
- sudo /alpine/enter-chroot -u $USER env
- test "$(/alpine/enter-chroot printf %s! 'Hello, world')" = 'Hello, world!' | 1 | 0.055556 | 0 | 1 |
a03f4fb536749bfe59c3c5aa2feb0003b80916a9 | .travis.yml | .travis.yml | language: ruby
sudo: false
env:
global:
- CC_TEST_REPORTER_ID=9f7f740ac1b6e264e1189fa07a6687a87bcdb9f3c0f4199d4344ab3b538e187e
rvm:
- 2.1
- 2.2
- 2.3
- 2.4
before_install:
- wget http://www.us.apache.org/dist/kafka/1.0.0/kafka_2.12-1.0.0.tgz -O kafka.tgz
- mkdir -p kafka && tar xzf kafka.tgz -C kafka --strip-components 1
- nohup bash -c "cd kafka && bin/zookeeper-server-start.sh config/zookeeper.properties &"
- nohup bash -c "cd kafka && bin/kafka-server-start.sh config/server.properties &"
before_script:
- cd ext && bundle exec rake && cd ..
- bundle exec rake create_topics
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build
script:
- bundle exec rspec
after_script:
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
| language: ruby
sudo: false
env:
global:
- CC_TEST_REPORTER_ID=9f7f740ac1b6e264e1189fa07a6687a87bcdb9f3c0f4199d4344ab3b538e187e
rvm:
- 2.1
- 2.2
- 2.3
- 2.4
before_install:
- wget http://www.us.apache.org/dist/kafka/1.0.0/kafka_2.12-1.0.0.tgz -O kafka.tgz
- mkdir -p kafka && tar xzf kafka.tgz -C kafka --strip-components 1
- nohup bash -c "cd kafka && bin/zookeeper-server-start.sh config/zookeeper.properties &"
- nohup bash -c "cd kafka && bin/kafka-server-start.sh config/server.properties &"
before_script:
- cd ext && bundle exec rake && cd ..
- bundle exec rake create_topics
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build
script:
- bundle exec rspec
after_script:
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
- killall -9 java
| Kill all java processes at the end of the Travis build | Kill all java processes at the end of the Travis build
| YAML | mit | thijsc/rdkafka-ruby | yaml | ## Code Before:
language: ruby
sudo: false
env:
global:
- CC_TEST_REPORTER_ID=9f7f740ac1b6e264e1189fa07a6687a87bcdb9f3c0f4199d4344ab3b538e187e
rvm:
- 2.1
- 2.2
- 2.3
- 2.4
before_install:
- wget http://www.us.apache.org/dist/kafka/1.0.0/kafka_2.12-1.0.0.tgz -O kafka.tgz
- mkdir -p kafka && tar xzf kafka.tgz -C kafka --strip-components 1
- nohup bash -c "cd kafka && bin/zookeeper-server-start.sh config/zookeeper.properties &"
- nohup bash -c "cd kafka && bin/kafka-server-start.sh config/server.properties &"
before_script:
- cd ext && bundle exec rake && cd ..
- bundle exec rake create_topics
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build
script:
- bundle exec rspec
after_script:
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
## Instruction:
Kill all java processes at the end of the Travis build
## Code After:
language: ruby
sudo: false
env:
global:
- CC_TEST_REPORTER_ID=9f7f740ac1b6e264e1189fa07a6687a87bcdb9f3c0f4199d4344ab3b538e187e
rvm:
- 2.1
- 2.2
- 2.3
- 2.4
before_install:
- wget http://www.us.apache.org/dist/kafka/1.0.0/kafka_2.12-1.0.0.tgz -O kafka.tgz
- mkdir -p kafka && tar xzf kafka.tgz -C kafka --strip-components 1
- nohup bash -c "cd kafka && bin/zookeeper-server-start.sh config/zookeeper.properties &"
- nohup bash -c "cd kafka && bin/kafka-server-start.sh config/server.properties &"
before_script:
- cd ext && bundle exec rake && cd ..
- bundle exec rake create_topics
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build
script:
- bundle exec rspec
after_script:
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
- killall -9 java
| language: ruby
sudo: false
env:
global:
- CC_TEST_REPORTER_ID=9f7f740ac1b6e264e1189fa07a6687a87bcdb9f3c0f4199d4344ab3b538e187e
rvm:
- 2.1
- 2.2
- 2.3
- 2.4
before_install:
- wget http://www.us.apache.org/dist/kafka/1.0.0/kafka_2.12-1.0.0.tgz -O kafka.tgz
- mkdir -p kafka && tar xzf kafka.tgz -C kafka --strip-components 1
- nohup bash -c "cd kafka && bin/zookeeper-server-start.sh config/zookeeper.properties &"
- nohup bash -c "cd kafka && bin/kafka-server-start.sh config/server.properties &"
before_script:
- cd ext && bundle exec rake && cd ..
- bundle exec rake create_topics
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build
script:
- bundle exec rspec
after_script:
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
+ - killall -9 java | 1 | 0.03125 | 1 | 0 |
6a3a24b30551e2f908455023311c74855fc323c6 | src/main/resources/db/migration/postgresql/V2.8.0.20201022120031__concept_ancestor_and_descendants.sql | src/main/resources/db/migration/postgresql/V2.8.0.20201022120031__concept_ancestor_and_descendants.sql | ALTER TABLE ${ohdsiSchema}.sec_permission ADD COLUMN for_role_id INTEGER;
INSERT INTO ${ohdsiSchema}.sec_permission (id, value, for_role_id)
SELECT nextval('${ohdsiSchema}.sec_permission_id_seq'),
REPLACE('vocabulary:%s:concept:*:ancestorAndDescendant:get', '%s', REPLACE(REPLACE(value, 'source:', ''), ':access', '')),
role_id
FROM ${ohdsiSchema}.sec_permission sp
JOIN ${ohdsiSchema}.sec_role_permission srp on sp.id = srp.permission_id
WHERE sp.value LIKE 'source:%:access';
INSERT INTO ${ohdsiSchema}.sec_role_permission (id, role_id, permission_id)
SELECT nextval('${ohdsiSchema}.sec_role_permission_sequence'), sp.for_role_id, sp.id
FROM ${ohdsiSchema}.sec_permission sp
WHERE sp.for_role_id IS NOT NULL;
ALTER TABLE ${ohdsiSchema}.sec_permission DROP COLUMN for_role_id; | CREATE TEMP TABLE temp_migration (
from_perm_id int,
new_value character varying(255)
);
INSERT INTO temp_migration (from_perm_id, new_value)
SELECT sp.id as from_id,
REPLACE('vocabulary:%s:concept:*:ancestorAndDescendant:get', '%s', REPLACE(REPLACE(value, 'source:', ''), ':access', '')) as new_value
FROM ${ohdsiSchema}.sec_permission sp
WHERE sp.value LIKE 'source:%:access';
INSERT INTO ${ohdsiSchema}.sec_permission (id, value)
SELECT nextval('${ohdsiSchema}.sec_permission_id_seq'), new_value
FROM temp_migration;
INSERT INTO ${ohdsiSchema}.sec_role_permission (id,role_id, permission_id)
SELECT nextval('${ohdsiSchema}.sec_role_permission_sequence'),
srp.role_id,
sp.id as permission_id
FROM temp_migration m
JOIN ${ohdsiSchema}.sec_permission sp on m.new_value = sp.value
JOIN ${ohdsiSchema}.sec_role_permission srp on m.from_perm_id = srp.permission_id;
| Use temp tables for migration. | Use temp tables for migration.
Fixes #2080 | SQL | apache-2.0 | OHDSI/WebAPI,OHDSI/WebAPI,OHDSI/WebAPI | sql | ## Code Before:
ALTER TABLE ${ohdsiSchema}.sec_permission ADD COLUMN for_role_id INTEGER;
INSERT INTO ${ohdsiSchema}.sec_permission (id, value, for_role_id)
SELECT nextval('${ohdsiSchema}.sec_permission_id_seq'),
REPLACE('vocabulary:%s:concept:*:ancestorAndDescendant:get', '%s', REPLACE(REPLACE(value, 'source:', ''), ':access', '')),
role_id
FROM ${ohdsiSchema}.sec_permission sp
JOIN ${ohdsiSchema}.sec_role_permission srp on sp.id = srp.permission_id
WHERE sp.value LIKE 'source:%:access';
INSERT INTO ${ohdsiSchema}.sec_role_permission (id, role_id, permission_id)
SELECT nextval('${ohdsiSchema}.sec_role_permission_sequence'), sp.for_role_id, sp.id
FROM ${ohdsiSchema}.sec_permission sp
WHERE sp.for_role_id IS NOT NULL;
ALTER TABLE ${ohdsiSchema}.sec_permission DROP COLUMN for_role_id;
## Instruction:
Use temp tables for migration.
Fixes #2080
## Code After:
CREATE TEMP TABLE temp_migration (
from_perm_id int,
new_value character varying(255)
);
INSERT INTO temp_migration (from_perm_id, new_value)
SELECT sp.id as from_id,
REPLACE('vocabulary:%s:concept:*:ancestorAndDescendant:get', '%s', REPLACE(REPLACE(value, 'source:', ''), ':access', '')) as new_value
FROM ${ohdsiSchema}.sec_permission sp
WHERE sp.value LIKE 'source:%:access';
INSERT INTO ${ohdsiSchema}.sec_permission (id, value)
SELECT nextval('${ohdsiSchema}.sec_permission_id_seq'), new_value
FROM temp_migration;
INSERT INTO ${ohdsiSchema}.sec_role_permission (id,role_id, permission_id)
SELECT nextval('${ohdsiSchema}.sec_role_permission_sequence'),
srp.role_id,
sp.id as permission_id
FROM temp_migration m
JOIN ${ohdsiSchema}.sec_permission sp on m.new_value = sp.value
JOIN ${ohdsiSchema}.sec_role_permission srp on m.from_perm_id = srp.permission_id;
| - ALTER TABLE ${ohdsiSchema}.sec_permission ADD COLUMN for_role_id INTEGER;
+ CREATE TEMP TABLE temp_migration (
+ from_perm_id int,
+ new_value character varying(255)
+ );
- INSERT INTO ${ohdsiSchema}.sec_permission (id, value, for_role_id)
- SELECT nextval('${ohdsiSchema}.sec_permission_id_seq'),
+ INSERT INTO temp_migration (from_perm_id, new_value)
+ SELECT sp.id as from_id,
- REPLACE('vocabulary:%s:concept:*:ancestorAndDescendant:get', '%s', REPLACE(REPLACE(value, 'source:', ''), ':access', '')),
? ^
+ REPLACE('vocabulary:%s:concept:*:ancestorAndDescendant:get', '%s', REPLACE(REPLACE(value, 'source:', ''), ':access', '')) as new_value
? ^^^^^^^^^^^^^
- role_id
FROM ${ohdsiSchema}.sec_permission sp
- JOIN ${ohdsiSchema}.sec_role_permission srp on sp.id = srp.permission_id
WHERE sp.value LIKE 'source:%:access';
- INSERT INTO ${ohdsiSchema}.sec_role_permission (id, role_id, permission_id)
? ----- ^^ ------------------
+ INSERT INTO ${ohdsiSchema}.sec_permission (id, value)
? ^^ +
- SELECT nextval('${ohdsiSchema}.sec_role_permission_sequence'), sp.for_role_id, sp.id
? ----- ----- ^^^^^^ ^^ ----------
+ SELECT nextval('${ohdsiSchema}.sec_permission_id_seq'), new_value
? +++ ^^^ ^^ +
+ FROM temp_migration;
- FROM ${ohdsiSchema}.sec_permission sp
- WHERE sp.for_role_id IS NOT NULL;
- ALTER TABLE ${ohdsiSchema}.sec_permission DROP COLUMN for_role_id;
+ INSERT INTO ${ohdsiSchema}.sec_role_permission (id,role_id, permission_id)
+ SELECT nextval('${ohdsiSchema}.sec_role_permission_sequence'),
+ srp.role_id,
+ sp.id as permission_id
+ FROM temp_migration m
+ JOIN ${ohdsiSchema}.sec_permission sp on m.new_value = sp.value
+ JOIN ${ohdsiSchema}.sec_role_permission srp on m.from_perm_id = srp.permission_id; | 28 | 1.75 | 17 | 11 |
eb38ecf0dc077f467078eac8543fc3d81d027a9d | package.json | package.json | {
"name": "color-thief",
"version": "2.0.1",
"author": {
"name": "Lokesh Dhakar",
"email": "lokesh.dhakar@gmail.com",
"url": "http://lokeshdhakar.com/"
},
"description": "Get the dominant color or color palette from an image.",
"keywords": [
"color",
"palette",
"sampling",
"image",
"picture",
"photo",
"canvas"
],
"homepage": "http://lokeshdhakar.com/projects/color-thief/",
"repository": {
"type": "git",
"url": "https://github.com/lokesh/color-thief.git"
},
"licenses": [
{
"type": "MIT",
"url": "https://raw.githubusercontent.com/lokesh/color-thief/master/LICENSE/"
}
],
"scripts": {
"build": "node ./build/build.js",
"dev": "http-server ./",
"test": "./node_modules/.bin/cypress open"
},
"main": "dist/color-thief.min.js",
"devDependencies": {
"@node-minify/core": "^4.0.5",
"@node-minify/uglify-es": "^4.0.5",
"cypress": "^3.2.0",
"http-server": "^0.11.1"
},
"engines": {
"node": ">=10.15.3"
}
}
| {
"name": "color-thief",
"version": "2.0.1",
"author": {
"name": "Lokesh Dhakar",
"email": "lokesh.dhakar@gmail.com",
"url": "http://lokeshdhakar.com/"
},
"description": "Get the dominant color or color palette from an image.",
"keywords": [
"color",
"palette",
"sampling",
"image",
"picture",
"photo",
"canvas"
],
"homepage": "http://lokeshdhakar.com/projects/color-thief/",
"repository": {
"type": "git",
"url": "https://github.com/lokesh/color-thief.git"
},
"licenses": [
{
"type": "MIT",
"url": "https://raw.githubusercontent.com/lokesh/color-thief/master/LICENSE/"
}
],
"scripts": {
"build": "node ./build/build.js",
"dev": "./node_modules/http-server/bin/http-server/",
"test": "./node_modules/.bin/cypress open"
},
"main": "dist/color-thief.min.js",
"devDependencies": {
"@node-minify/core": "^4.0.5",
"@node-minify/uglify-es": "^4.0.5",
"cypress": "^3.2.0",
"http-server": "^0.11.1"
},
"engines": {
"node": ">=10.15.3"
}
}
| Update npm dev task to ref http-server in local node_modules | chore: Update npm dev task to ref http-server in local node_modules
| JSON | mit | lokesh/color-thief,mikesprague/color-thief,lokesh/color-thief,mikesprague/color-thief | json | ## Code Before:
{
"name": "color-thief",
"version": "2.0.1",
"author": {
"name": "Lokesh Dhakar",
"email": "lokesh.dhakar@gmail.com",
"url": "http://lokeshdhakar.com/"
},
"description": "Get the dominant color or color palette from an image.",
"keywords": [
"color",
"palette",
"sampling",
"image",
"picture",
"photo",
"canvas"
],
"homepage": "http://lokeshdhakar.com/projects/color-thief/",
"repository": {
"type": "git",
"url": "https://github.com/lokesh/color-thief.git"
},
"licenses": [
{
"type": "MIT",
"url": "https://raw.githubusercontent.com/lokesh/color-thief/master/LICENSE/"
}
],
"scripts": {
"build": "node ./build/build.js",
"dev": "http-server ./",
"test": "./node_modules/.bin/cypress open"
},
"main": "dist/color-thief.min.js",
"devDependencies": {
"@node-minify/core": "^4.0.5",
"@node-minify/uglify-es": "^4.0.5",
"cypress": "^3.2.0",
"http-server": "^0.11.1"
},
"engines": {
"node": ">=10.15.3"
}
}
## Instruction:
chore: Update npm dev task to ref http-server in local node_modules
## Code After:
{
"name": "color-thief",
"version": "2.0.1",
"author": {
"name": "Lokesh Dhakar",
"email": "lokesh.dhakar@gmail.com",
"url": "http://lokeshdhakar.com/"
},
"description": "Get the dominant color or color palette from an image.",
"keywords": [
"color",
"palette",
"sampling",
"image",
"picture",
"photo",
"canvas"
],
"homepage": "http://lokeshdhakar.com/projects/color-thief/",
"repository": {
"type": "git",
"url": "https://github.com/lokesh/color-thief.git"
},
"licenses": [
{
"type": "MIT",
"url": "https://raw.githubusercontent.com/lokesh/color-thief/master/LICENSE/"
}
],
"scripts": {
"build": "node ./build/build.js",
"dev": "./node_modules/http-server/bin/http-server/",
"test": "./node_modules/.bin/cypress open"
},
"main": "dist/color-thief.min.js",
"devDependencies": {
"@node-minify/core": "^4.0.5",
"@node-minify/uglify-es": "^4.0.5",
"cypress": "^3.2.0",
"http-server": "^0.11.1"
},
"engines": {
"node": ">=10.15.3"
}
}
| {
"name": "color-thief",
"version": "2.0.1",
"author": {
"name": "Lokesh Dhakar",
"email": "lokesh.dhakar@gmail.com",
"url": "http://lokeshdhakar.com/"
},
"description": "Get the dominant color or color palette from an image.",
"keywords": [
"color",
"palette",
"sampling",
"image",
"picture",
"photo",
"canvas"
],
"homepage": "http://lokeshdhakar.com/projects/color-thief/",
"repository": {
"type": "git",
"url": "https://github.com/lokesh/color-thief.git"
},
"licenses": [
{
"type": "MIT",
"url": "https://raw.githubusercontent.com/lokesh/color-thief/master/LICENSE/"
}
],
"scripts": {
"build": "node ./build/build.js",
- "dev": "http-server ./",
+ "dev": "./node_modules/http-server/bin/http-server/",
"test": "./node_modules/.bin/cypress open"
},
"main": "dist/color-thief.min.js",
"devDependencies": {
"@node-minify/core": "^4.0.5",
"@node-minify/uglify-es": "^4.0.5",
"cypress": "^3.2.0",
"http-server": "^0.11.1"
},
"engines": {
"node": ">=10.15.3"
}
} | 2 | 0.044444 | 1 | 1 |
fac5b293fb66e131f0b84b437c17a2c9292dd2d8 | _posts/2013-11-05-funemployed.markdown | _posts/2013-11-05-funemployed.markdown | ---
title: Available for hire
layout: post
---
I'm now officially available for hire. I'm interested in positions in full stack product development
and I'm flexible what role to take in a project. I'm also very interested in DevOps positions.
Fulltime employment with 100% remote working is preferred.
[Ping me](mailto:me@christophh.net) if you have something interesting.
| ---
title: Available for hire
layout: post
short: true
---
I'm now officially available for hire. I'm interested in positions in full stack product development
and I'm flexible what role to take in a project. I'm also very interested in DevOps positions.
Fulltime employment with 100% remote working is preferred.
[Ping me](mailto:me@christophh.net) if you have something interesting.
| Make post a short post. | Make post a short post.
| Markdown | mit | CHH/CHH.github.io,CHH/CHH.github.io,CHH/CHH.github.io,CHH/CHH.github.io | markdown | ## Code Before:
---
title: Available for hire
layout: post
---
I'm now officially available for hire. I'm interested in positions in full stack product development
and I'm flexible what role to take in a project. I'm also very interested in DevOps positions.
Fulltime employment with 100% remote working is preferred.
[Ping me](mailto:me@christophh.net) if you have something interesting.
## Instruction:
Make post a short post.
## Code After:
---
title: Available for hire
layout: post
short: true
---
I'm now officially available for hire. I'm interested in positions in full stack product development
and I'm flexible what role to take in a project. I'm also very interested in DevOps positions.
Fulltime employment with 100% remote working is preferred.
[Ping me](mailto:me@christophh.net) if you have something interesting.
| ---
title: Available for hire
layout: post
+ short: true
---
I'm now officially available for hire. I'm interested in positions in full stack product development
and I'm flexible what role to take in a project. I'm also very interested in DevOps positions.
Fulltime employment with 100% remote working is preferred.
[Ping me](mailto:me@christophh.net) if you have something interesting. | 1 | 0.1 | 1 | 0 |
777ed567d43f6a3c9bbee376e9e1a4b9244f9bce | src/main/java/de/retest/recheck/ui/descriptors/AttributeUtil.java | src/main/java/de/retest/recheck/ui/descriptors/AttributeUtil.java | package de.retest.recheck.ui.descriptors;
import java.awt.Rectangle;
public class AttributeUtil {
public static Rectangle getOutline( final IdentifyingAttributes attributes ) {
final OutlineAttribute outlineAttribute =
(OutlineAttribute) attributes.getAttribute( OutlineAttribute.RELATIVE_OUTLINE );
if ( outlineAttribute == null ) {
return null;
}
return outlineAttribute.getValue();
}
public static Rectangle getAbsoluteOutline( final IdentifyingAttributes attributes ) {
final OutlineAttribute outlineAttribute =
(OutlineAttribute) attributes.getAttribute( OutlineAttribute.ABSOLUTE_OUTLINE );
if ( outlineAttribute == null ) {
return null;
}
return outlineAttribute.getValue();
}
}
| package de.retest.recheck.ui.descriptors;
import java.awt.Rectangle;
import java.util.List;
import de.retest.recheck.ui.diff.AttributeDifference;
import de.retest.recheck.ui.diff.ElementDifference;
import de.retest.recheck.ui.diff.IdentifyingAttributesDifference;
public class AttributeUtil {
public static Rectangle getActualOutline( final ElementDifference difference ) {
final Rectangle actualRelative = getActualOutline( difference, OutlineAttribute.RELATIVE_OUTLINE );
if ( actualRelative != null ) {
return actualRelative;
}
return getOutline( difference.getIdentifyingAttributes() );
}
public static Rectangle getActualAbsoluteOutline( final ElementDifference difference ) {
final Rectangle actualAbsolute = getActualOutline( difference, OutlineAttribute.ABSOLUTE_OUTLINE );
if ( actualAbsolute != null ) {
return actualAbsolute;
}
return getAbsoluteOutline( difference.getIdentifyingAttributes() );
}
public static Rectangle getOutline( final IdentifyingAttributes attributes ) {
final OutlineAttribute outlineAttribute =
(OutlineAttribute) attributes.getAttribute( OutlineAttribute.RELATIVE_OUTLINE );
if ( outlineAttribute == null ) {
return null;
}
return outlineAttribute.getValue();
}
public static Rectangle getAbsoluteOutline( final IdentifyingAttributes attributes ) {
final OutlineAttribute outlineAttribute =
(OutlineAttribute) attributes.getAttribute( OutlineAttribute.ABSOLUTE_OUTLINE );
if ( outlineAttribute == null ) {
return null;
}
return outlineAttribute.getValue();
}
private static Rectangle getActualOutline( final ElementDifference difference, final String type ) {
final IdentifyingAttributesDifference identifyingAttributesDifference =
(IdentifyingAttributesDifference) difference.getIdentifyingAttributesDifference();
if ( identifyingAttributesDifference != null ) {
final List<AttributeDifference> attributeDifferences =
identifyingAttributesDifference.getAttributeDifferences();
if ( attributeDifferences != null ) {
for ( final AttributeDifference aDiff : attributeDifferences ) {
if ( aDiff.getKey().equals( type ) ) {
return ((Rectangle) aDiff.getActual());
}
}
}
}
return null;
}
}
| Add methods for actual outline | Add methods for actual outline
| Java | agpl-3.0 | retest/recheck,retest/recheck | java | ## Code Before:
package de.retest.recheck.ui.descriptors;
import java.awt.Rectangle;
public class AttributeUtil {
public static Rectangle getOutline( final IdentifyingAttributes attributes ) {
final OutlineAttribute outlineAttribute =
(OutlineAttribute) attributes.getAttribute( OutlineAttribute.RELATIVE_OUTLINE );
if ( outlineAttribute == null ) {
return null;
}
return outlineAttribute.getValue();
}
public static Rectangle getAbsoluteOutline( final IdentifyingAttributes attributes ) {
final OutlineAttribute outlineAttribute =
(OutlineAttribute) attributes.getAttribute( OutlineAttribute.ABSOLUTE_OUTLINE );
if ( outlineAttribute == null ) {
return null;
}
return outlineAttribute.getValue();
}
}
## Instruction:
Add methods for actual outline
## Code After:
package de.retest.recheck.ui.descriptors;
import java.awt.Rectangle;
import java.util.List;
import de.retest.recheck.ui.diff.AttributeDifference;
import de.retest.recheck.ui.diff.ElementDifference;
import de.retest.recheck.ui.diff.IdentifyingAttributesDifference;
public class AttributeUtil {
public static Rectangle getActualOutline( final ElementDifference difference ) {
final Rectangle actualRelative = getActualOutline( difference, OutlineAttribute.RELATIVE_OUTLINE );
if ( actualRelative != null ) {
return actualRelative;
}
return getOutline( difference.getIdentifyingAttributes() );
}
public static Rectangle getActualAbsoluteOutline( final ElementDifference difference ) {
final Rectangle actualAbsolute = getActualOutline( difference, OutlineAttribute.ABSOLUTE_OUTLINE );
if ( actualAbsolute != null ) {
return actualAbsolute;
}
return getAbsoluteOutline( difference.getIdentifyingAttributes() );
}
public static Rectangle getOutline( final IdentifyingAttributes attributes ) {
final OutlineAttribute outlineAttribute =
(OutlineAttribute) attributes.getAttribute( OutlineAttribute.RELATIVE_OUTLINE );
if ( outlineAttribute == null ) {
return null;
}
return outlineAttribute.getValue();
}
public static Rectangle getAbsoluteOutline( final IdentifyingAttributes attributes ) {
final OutlineAttribute outlineAttribute =
(OutlineAttribute) attributes.getAttribute( OutlineAttribute.ABSOLUTE_OUTLINE );
if ( outlineAttribute == null ) {
return null;
}
return outlineAttribute.getValue();
}
private static Rectangle getActualOutline( final ElementDifference difference, final String type ) {
final IdentifyingAttributesDifference identifyingAttributesDifference =
(IdentifyingAttributesDifference) difference.getIdentifyingAttributesDifference();
if ( identifyingAttributesDifference != null ) {
final List<AttributeDifference> attributeDifferences =
identifyingAttributesDifference.getAttributeDifferences();
if ( attributeDifferences != null ) {
for ( final AttributeDifference aDiff : attributeDifferences ) {
if ( aDiff.getKey().equals( type ) ) {
return ((Rectangle) aDiff.getActual());
}
}
}
}
return null;
}
}
| package de.retest.recheck.ui.descriptors;
import java.awt.Rectangle;
+ import java.util.List;
+
+ import de.retest.recheck.ui.diff.AttributeDifference;
+ import de.retest.recheck.ui.diff.ElementDifference;
+ import de.retest.recheck.ui.diff.IdentifyingAttributesDifference;
public class AttributeUtil {
+
+ public static Rectangle getActualOutline( final ElementDifference difference ) {
+ final Rectangle actualRelative = getActualOutline( difference, OutlineAttribute.RELATIVE_OUTLINE );
+
+ if ( actualRelative != null ) {
+ return actualRelative;
+ }
+ return getOutline( difference.getIdentifyingAttributes() );
+ }
+
+ public static Rectangle getActualAbsoluteOutline( final ElementDifference difference ) {
+ final Rectangle actualAbsolute = getActualOutline( difference, OutlineAttribute.ABSOLUTE_OUTLINE );
+
+ if ( actualAbsolute != null ) {
+ return actualAbsolute;
+ }
+ return getAbsoluteOutline( difference.getIdentifyingAttributes() );
+ }
public static Rectangle getOutline( final IdentifyingAttributes attributes ) {
final OutlineAttribute outlineAttribute =
(OutlineAttribute) attributes.getAttribute( OutlineAttribute.RELATIVE_OUTLINE );
if ( outlineAttribute == null ) {
return null;
}
return outlineAttribute.getValue();
}
public static Rectangle getAbsoluteOutline( final IdentifyingAttributes attributes ) {
final OutlineAttribute outlineAttribute =
(OutlineAttribute) attributes.getAttribute( OutlineAttribute.ABSOLUTE_OUTLINE );
if ( outlineAttribute == null ) {
return null;
}
return outlineAttribute.getValue();
}
+
+ private static Rectangle getActualOutline( final ElementDifference difference, final String type ) {
+ final IdentifyingAttributesDifference identifyingAttributesDifference =
+ (IdentifyingAttributesDifference) difference.getIdentifyingAttributesDifference();
+
+ if ( identifyingAttributesDifference != null ) {
+
+ final List<AttributeDifference> attributeDifferences =
+ identifyingAttributesDifference.getAttributeDifferences();
+
+ if ( attributeDifferences != null ) {
+ for ( final AttributeDifference aDiff : attributeDifferences ) {
+ if ( aDiff.getKey().equals( type ) ) {
+ return ((Rectangle) aDiff.getActual());
+ }
+ }
+ }
+ }
+ return null;
+ }
+
} | 44 | 1.833333 | 44 | 0 |
c554a3fc4134e8378ca1fffd277a9eeec473dd24 | docs/manual/src/docs/asciidoc/_includes/servlet/architecture/filters.adoc | docs/manual/src/docs/asciidoc/_includes/servlet/architecture/filters.adoc | [[servlet-filters-review]]
= A Review of ``Filter``s
Spring Security's Servlet support is based on Servlet ``Filter``s, so it is helpful to look at the role of ``Filter``s generally first.
The picture below shows the typical layering of the handlers for a single HTTP request.
.FilterChain
[[servlet-filterchain-figure]]
image::{figures}/filterchain.png[]
The client sends a request to the application, and the container creates a `FilterChain` which contains the ``Filter``s and `Servlet` that should process the `HttpServletRequest` based on the path of the request URI.
At most one `Servlet` can handle a single `HttpServletRequest` and `HttpServletResponse`.
However, more than one `Filter` can be used to:
* Prevent downstream ``Filter``s or the `Servlet` from being invoked.
In this instance the `Filter` will typically write the `HttpServletResponse`.
* Modify the `HttpServletRequest` or `HttpServletResponse` used by the downstream ``Filter``s and `Servlet`
The power of the `Filter` comes from the `FilterChain` that is passed into it.
.`FilterChain` Usage Example
===
[source,java]
----
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) {
// do something before the rest of the application
chain.doFilter(request, response); // invoke the rest of the application
// do something after the rest of the application
}
----
===
Since a `Filter` only impacts downstream ``Filter``s and the `Servlet`, the order each `Filter` is invoked is extremely important.
| [[servlet-filters-review]]
= A Review of ``Filter``s
Spring Security's Servlet support is based on Servlet ``Filter``s, so it is helpful to look at the role of ``Filter``s generally first.
The picture below shows the typical layering of the handlers for a single HTTP request.
.FilterChain
[[servlet-filterchain-figure]]
image::{figures}/filterchain.png[]
The client sends a request to the application, and the container creates a `FilterChain` which contains the ``Filter``s and `Servlet` that should process the `HttpServletRequest` based on the path of the request URI.
In a Spring MVC application the `Servlet` is an instance of https://docs.spring.io/spring-security/site/docs/current-SNAPSHOT/reference/html5/#servlet-filters-review[`DispatcherServlet`].
At most one `Servlet` can handle a single `HttpServletRequest` and `HttpServletResponse`.
However, more than one `Filter` can be used to:
* Prevent downstream ``Filter``s or the `Servlet` from being invoked.
In this instance the `Filter` will typically write the `HttpServletResponse`.
* Modify the `HttpServletRequest` or `HttpServletResponse` used by the downstream ``Filter``s and `Servlet`
The power of the `Filter` comes from the `FilterChain` that is passed into it.
.`FilterChain` Usage Example
===
[source,java]
----
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) {
// do something before the rest of the application
chain.doFilter(request, response); // invoke the rest of the application
// do something after the rest of the application
}
----
===
Since a `Filter` only impacts downstream ``Filter``s and the `Servlet`, the order each `Filter` is invoked is extremely important.
| Add Link to DispatcherServlet in Filter Review Doc | Add Link to DispatcherServlet in Filter Review Doc
Closes gh-8036
| AsciiDoc | apache-2.0 | jgrandja/spring-security,jgrandja/spring-security,spring-projects/spring-security,fhanik/spring-security,rwinch/spring-security,spring-projects/spring-security,spring-projects/spring-security,jgrandja/spring-security,jgrandja/spring-security,djechelon/spring-security,spring-projects/spring-security,spring-projects/spring-security,rwinch/spring-security,djechelon/spring-security,rwinch/spring-security,djechelon/spring-security,fhanik/spring-security,fhanik/spring-security,rwinch/spring-security,djechelon/spring-security,rwinch/spring-security,djechelon/spring-security,fhanik/spring-security,fhanik/spring-security,jgrandja/spring-security,spring-projects/spring-security,jgrandja/spring-security,fhanik/spring-security,spring-projects/spring-security,rwinch/spring-security | asciidoc | ## Code Before:
[[servlet-filters-review]]
= A Review of ``Filter``s
Spring Security's Servlet support is based on Servlet ``Filter``s, so it is helpful to look at the role of ``Filter``s generally first.
The picture below shows the typical layering of the handlers for a single HTTP request.
.FilterChain
[[servlet-filterchain-figure]]
image::{figures}/filterchain.png[]
The client sends a request to the application, and the container creates a `FilterChain` which contains the ``Filter``s and `Servlet` that should process the `HttpServletRequest` based on the path of the request URI.
At most one `Servlet` can handle a single `HttpServletRequest` and `HttpServletResponse`.
However, more than one `Filter` can be used to:
* Prevent downstream ``Filter``s or the `Servlet` from being invoked.
In this instance the `Filter` will typically write the `HttpServletResponse`.
* Modify the `HttpServletRequest` or `HttpServletResponse` used by the downstream ``Filter``s and `Servlet`
The power of the `Filter` comes from the `FilterChain` that is passed into it.
.`FilterChain` Usage Example
===
[source,java]
----
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) {
// do something before the rest of the application
chain.doFilter(request, response); // invoke the rest of the application
// do something after the rest of the application
}
----
===
Since a `Filter` only impacts downstream ``Filter``s and the `Servlet`, the order each `Filter` is invoked is extremely important.
## Instruction:
Add Link to DispatcherServlet in Filter Review Doc
Closes gh-8036
## Code After:
[[servlet-filters-review]]
= A Review of ``Filter``s
Spring Security's Servlet support is based on Servlet ``Filter``s, so it is helpful to look at the role of ``Filter``s generally first.
The picture below shows the typical layering of the handlers for a single HTTP request.
.FilterChain
[[servlet-filterchain-figure]]
image::{figures}/filterchain.png[]
The client sends a request to the application, and the container creates a `FilterChain` which contains the ``Filter``s and `Servlet` that should process the `HttpServletRequest` based on the path of the request URI.
In a Spring MVC application the `Servlet` is an instance of https://docs.spring.io/spring-security/site/docs/current-SNAPSHOT/reference/html5/#servlet-filters-review[`DispatcherServlet`].
At most one `Servlet` can handle a single `HttpServletRequest` and `HttpServletResponse`.
However, more than one `Filter` can be used to:
* Prevent downstream ``Filter``s or the `Servlet` from being invoked.
In this instance the `Filter` will typically write the `HttpServletResponse`.
* Modify the `HttpServletRequest` or `HttpServletResponse` used by the downstream ``Filter``s and `Servlet`
The power of the `Filter` comes from the `FilterChain` that is passed into it.
.`FilterChain` Usage Example
===
[source,java]
----
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) {
// do something before the rest of the application
chain.doFilter(request, response); // invoke the rest of the application
// do something after the rest of the application
}
----
===
Since a `Filter` only impacts downstream ``Filter``s and the `Servlet`, the order each `Filter` is invoked is extremely important.
| [[servlet-filters-review]]
= A Review of ``Filter``s
Spring Security's Servlet support is based on Servlet ``Filter``s, so it is helpful to look at the role of ``Filter``s generally first.
The picture below shows the typical layering of the handlers for a single HTTP request.
.FilterChain
[[servlet-filterchain-figure]]
image::{figures}/filterchain.png[]
The client sends a request to the application, and the container creates a `FilterChain` which contains the ``Filter``s and `Servlet` that should process the `HttpServletRequest` based on the path of the request URI.
+ In a Spring MVC application the `Servlet` is an instance of https://docs.spring.io/spring-security/site/docs/current-SNAPSHOT/reference/html5/#servlet-filters-review[`DispatcherServlet`].
At most one `Servlet` can handle a single `HttpServletRequest` and `HttpServletResponse`.
However, more than one `Filter` can be used to:
* Prevent downstream ``Filter``s or the `Servlet` from being invoked.
In this instance the `Filter` will typically write the `HttpServletResponse`.
* Modify the `HttpServletRequest` or `HttpServletResponse` used by the downstream ``Filter``s and `Servlet`
The power of the `Filter` comes from the `FilterChain` that is passed into it.
.`FilterChain` Usage Example
===
[source,java]
----
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) {
// do something before the rest of the application
chain.doFilter(request, response); // invoke the rest of the application
// do something after the rest of the application
}
----
===
Since a `Filter` only impacts downstream ``Filter``s and the `Servlet`, the order each `Filter` is invoked is extremely important. | 1 | 0.030303 | 1 | 0 |
073f67fb0f821cec7ea366b30224c269c6b5964a | app/views/main.scala.html | app/views/main.scala.html | @(title: String)(content: Html)
@general(title) {
<div id="content" class="view row">
<div style="background-color: #0a4b5c; border: 1px solid black; color: white" class="stats-sidebar large-3 columns">
<form>
<div class="row">
<div class="large-12 columns">
<label>Course Code
<input type="text" />
</label>
</div>
</div>
<div class="row">
<div class="large-12 columns">
<label>Instructor
<input type="text" placeholder="Carberry, Josiah" />
</label>
</div>
</div>
<div class="row">
<div class="large-12 columns">
<label>Title
<input type="text" placeholder="Introduction to Psychoceramics" />
</label>
</div>
</div>
</form>
<a href="/help/search">Search Help</a>
</div>
<div style="background-color: #f2ecda; border: 1px solid black" class="large-9 columns">
@content
</div>
</div>
}
| @(title: String)(content: Html)
@general(title) {
<div id="content" class="view row">
<div style="background-color: #0a4b5c; border: 1px solid black; color: white; padding-bottom: 1em; text-align: center" class="stats-sidebar large-3 columns">
<form id="cr-search-form">
<div class="row">
<div class="large-12 columns">
<label>Course Code
<input type="text" />
</label>
</div>
</div>
<div class="row">
<div class="large-12 columns">
<label>Instructor
<input type="text" placeholder="Carberry, Josiah" />
</label>
</div>
</div>
<div class="row">
<div class="large-12 columns">
<label>Title
<input type="text" placeholder="Introduction to Psychoceramics" />
</label>
</div>
</div>
<div class="row">
<div class="large-12 columns">
<input type="checkbox" name="fall" value="1" id="fall-checkbox" checked="checked"><label for="fall-checkbox">Fall</label>
<input type="checkbox" name="spring" value="1" id="spring-checkbox" checked="checked"><label for="spring-checkbox">Spring</label>
</div>
</div>
<div class="row">
<div class="large-12 columns">
<input type="submit" value="Search" />
</div>
</div>
</form>
<a href="/help/search">Search Help</a>
</div>
<div style="background-color: #f2ecda; border: 1px solid black; padding-bottom: 1em;" class="large-9 columns">
@content
</div>
</div>
}
| Add more fields for search in left sidebar. | Add more fields for search in left sidebar.
| HTML | agpl-3.0 | browncr/cr-www | html | ## Code Before:
@(title: String)(content: Html)
@general(title) {
<div id="content" class="view row">
<div style="background-color: #0a4b5c; border: 1px solid black; color: white" class="stats-sidebar large-3 columns">
<form>
<div class="row">
<div class="large-12 columns">
<label>Course Code
<input type="text" />
</label>
</div>
</div>
<div class="row">
<div class="large-12 columns">
<label>Instructor
<input type="text" placeholder="Carberry, Josiah" />
</label>
</div>
</div>
<div class="row">
<div class="large-12 columns">
<label>Title
<input type="text" placeholder="Introduction to Psychoceramics" />
</label>
</div>
</div>
</form>
<a href="/help/search">Search Help</a>
</div>
<div style="background-color: #f2ecda; border: 1px solid black" class="large-9 columns">
@content
</div>
</div>
}
## Instruction:
Add more fields for search in left sidebar.
## Code After:
@(title: String)(content: Html)
@general(title) {
<div id="content" class="view row">
<div style="background-color: #0a4b5c; border: 1px solid black; color: white; padding-bottom: 1em; text-align: center" class="stats-sidebar large-3 columns">
<form id="cr-search-form">
<div class="row">
<div class="large-12 columns">
<label>Course Code
<input type="text" />
</label>
</div>
</div>
<div class="row">
<div class="large-12 columns">
<label>Instructor
<input type="text" placeholder="Carberry, Josiah" />
</label>
</div>
</div>
<div class="row">
<div class="large-12 columns">
<label>Title
<input type="text" placeholder="Introduction to Psychoceramics" />
</label>
</div>
</div>
<div class="row">
<div class="large-12 columns">
<input type="checkbox" name="fall" value="1" id="fall-checkbox" checked="checked"><label for="fall-checkbox">Fall</label>
<input type="checkbox" name="spring" value="1" id="spring-checkbox" checked="checked"><label for="spring-checkbox">Spring</label>
</div>
</div>
<div class="row">
<div class="large-12 columns">
<input type="submit" value="Search" />
</div>
</div>
</form>
<a href="/help/search">Search Help</a>
</div>
<div style="background-color: #f2ecda; border: 1px solid black; padding-bottom: 1em;" class="large-9 columns">
@content
</div>
</div>
}
| @(title: String)(content: Html)
@general(title) {
<div id="content" class="view row">
- <div style="background-color: #0a4b5c; border: 1px solid black; color: white" class="stats-sidebar large-3 columns">
+ <div style="background-color: #0a4b5c; border: 1px solid black; color: white; padding-bottom: 1em; text-align: center" class="stats-sidebar large-3 columns">
? +++++++++++++++++++++++++++++++++++++++++
- <form>
+ <form id="cr-search-form">
<div class="row">
<div class="large-12 columns">
<label>Course Code
<input type="text" />
</label>
</div>
</div>
<div class="row">
<div class="large-12 columns">
<label>Instructor
<input type="text" placeholder="Carberry, Josiah" />
</label>
</div>
</div>
<div class="row">
<div class="large-12 columns">
<label>Title
<input type="text" placeholder="Introduction to Psychoceramics" />
</label>
</div>
</div>
+ <div class="row">
+ <div class="large-12 columns">
+ <input type="checkbox" name="fall" value="1" id="fall-checkbox" checked="checked"><label for="fall-checkbox">Fall</label>
+ <input type="checkbox" name="spring" value="1" id="spring-checkbox" checked="checked"><label for="spring-checkbox">Spring</label>
+ </div>
+ </div>
+ <div class="row">
+ <div class="large-12 columns">
+ <input type="submit" value="Search" />
+ </div>
+ </div>
</form>
<a href="/help/search">Search Help</a>
</div>
- <div style="background-color: #f2ecda; border: 1px solid black" class="large-9 columns">
+ <div style="background-color: #f2ecda; border: 1px solid black; padding-bottom: 1em;" class="large-9 columns">
? ++++++++++++++++++++++
- @content
? --
+ @content
</div>
</div>
} | 19 | 0.527778 | 15 | 4 |
25052d27c787b4ca767eb4e2d970ea93aff6d664 | tsd.json | tsd.json | {
"version": "v4",
"repo": "borisyankov/DefinitelyTyped",
"ref": "master",
"path": "typings",
"bundle": "typings/tsd.d.ts",
"installed": {
"underscore/underscore.d.ts": {
"commit": "7acdb48f24afc060260818c5937f471d73331807"
},
"node/node.d.ts": {
"commit": "7acdb48f24afc060260818c5937f471d73331807"
},
"commander/commander.d.ts": {
"commit": "7acdb48f24afc060260818c5937f471d73331807"
}
}
}
| {
"version": "v4",
"repo": "borisyankov/DefinitelyTyped",
"ref": "master",
"path": "typings",
"bundle": "typings/tsd.d.ts",
"installed": {
"underscore/underscore.d.ts": {
"commit": "7acdb48f24afc060260818c5937f471d73331807"
},
"node/node.d.ts": {
"commit": "7acdb48f24afc060260818c5937f471d73331807"
},
"commander/commander.d.ts": {
"commit": "7acdb48f24afc060260818c5937f471d73331807"
},
"chai/chai.d.ts": {
"commit": "1c18e97550dda6a226cd66719edc37af0e5183c4"
},
"mocha/mocha.d.ts": {
"commit": "1c18e97550dda6a226cd66719edc37af0e5183c4"
},
"ncp/ncp.d.ts": {
"commit": "1c18e97550dda6a226cd66719edc37af0e5183c4"
},
"tmp/tmp.d.ts": {
"commit": "1400e07731048ae841bcebed658cb68539cbfb99"
}
}
}
| Add missing typescript description files | Add missing typescript description files
| JSON | mit | msurdi/tagit,msurdi/tagit | json | ## Code Before:
{
"version": "v4",
"repo": "borisyankov/DefinitelyTyped",
"ref": "master",
"path": "typings",
"bundle": "typings/tsd.d.ts",
"installed": {
"underscore/underscore.d.ts": {
"commit": "7acdb48f24afc060260818c5937f471d73331807"
},
"node/node.d.ts": {
"commit": "7acdb48f24afc060260818c5937f471d73331807"
},
"commander/commander.d.ts": {
"commit": "7acdb48f24afc060260818c5937f471d73331807"
}
}
}
## Instruction:
Add missing typescript description files
## Code After:
{
"version": "v4",
"repo": "borisyankov/DefinitelyTyped",
"ref": "master",
"path": "typings",
"bundle": "typings/tsd.d.ts",
"installed": {
"underscore/underscore.d.ts": {
"commit": "7acdb48f24afc060260818c5937f471d73331807"
},
"node/node.d.ts": {
"commit": "7acdb48f24afc060260818c5937f471d73331807"
},
"commander/commander.d.ts": {
"commit": "7acdb48f24afc060260818c5937f471d73331807"
},
"chai/chai.d.ts": {
"commit": "1c18e97550dda6a226cd66719edc37af0e5183c4"
},
"mocha/mocha.d.ts": {
"commit": "1c18e97550dda6a226cd66719edc37af0e5183c4"
},
"ncp/ncp.d.ts": {
"commit": "1c18e97550dda6a226cd66719edc37af0e5183c4"
},
"tmp/tmp.d.ts": {
"commit": "1400e07731048ae841bcebed658cb68539cbfb99"
}
}
}
| {
"version": "v4",
"repo": "borisyankov/DefinitelyTyped",
"ref": "master",
"path": "typings",
"bundle": "typings/tsd.d.ts",
"installed": {
"underscore/underscore.d.ts": {
"commit": "7acdb48f24afc060260818c5937f471d73331807"
},
"node/node.d.ts": {
"commit": "7acdb48f24afc060260818c5937f471d73331807"
},
"commander/commander.d.ts": {
"commit": "7acdb48f24afc060260818c5937f471d73331807"
+ },
+ "chai/chai.d.ts": {
+ "commit": "1c18e97550dda6a226cd66719edc37af0e5183c4"
+ },
+ "mocha/mocha.d.ts": {
+ "commit": "1c18e97550dda6a226cd66719edc37af0e5183c4"
+ },
+ "ncp/ncp.d.ts": {
+ "commit": "1c18e97550dda6a226cd66719edc37af0e5183c4"
+ },
+ "tmp/tmp.d.ts": {
+ "commit": "1400e07731048ae841bcebed658cb68539cbfb99"
}
}
} | 12 | 0.666667 | 12 | 0 |
4d5972df45daf00387289d3ee1a7f49696f4704d | app/locale/README.md | app/locale/README.md | UI Translations
===============
How to add a new UI language
----------------------------
#### Step 1
Create in here (`app/locale/`) the folder for the language.
The name of folder should be the ISO 639-3 language code.
There may be exceptions.
> For instance if you were adding Italian as a new UI language,
you would create a folder named `ita`.
#### Step 2
Inside of the language folder, create another folder named
`LC_MESSAGES`. In that folder, create an empty file named
`default.po`.
> For instance, for Italian, you would have a file with the path
`app/locale/ita/LC_MESSAGES/detault.po`.
If you do not create a file, you will not be able to commit the
new folders that you created.
In fact it doesn't really matter how the file is called, but it's
better to name it with the same name as the .po file on Transifex
so that it gets overriden with the actual Transifex file.
#### Step 3
Update the `.tx/config`. In the `lang_map`, you need to
add the Transifex code and the Tatoeba code. This
allows to use the transifex command line tool `tx`.
> For instance for Italian, you would add `it:ita`.
#### Step 4
Make the language available in the drop-down box
by adding it to the `UI.languages` list in the file
`app/config/core.php.template`. Read the comments in
that file for more information.
> For instance for Italian, you would add `array('ita', null, 'Italiano'),`
#### Step 5
Push your changes and create a pull request.
| UI Translations
===============
How to add a new UI language
----------------------------
#### Step 1
Update the `.tx/config`. In the `lang_map`, you need to
add the Transifex code and the Tatoeba code. This
allows to use the transifex command line tool `tx`.
> For instance for Italian, you would add `it:ita`.
#### Step 2
Make the language available in the drop-down box
by adding it to the `UI.languages` list in the file
`app/config/core.php.template`. Read the comments in
that file for more information.
> For instance for Italian, you would add `array('ita', null, 'Italiano'),`
#### Step 3
Push your changes and create a pull request. The language will
be available for testing on our [dev website](https://dev.tatoeba.org)
shortly after your pull requst is merged.
| Update again instructions to add a new UI language | Update again instructions to add a new UI language
There's no need to create folders, the `update-translations.py` scripts normally takes care of it. | Markdown | agpl-3.0 | Tatoeba/tatoeba2,Tatoeba/tatoeba2,Tatoeba/tatoeba2,Tatoeba/tatoeba2,Tatoeba/tatoeba2 | markdown | ## Code Before:
UI Translations
===============
How to add a new UI language
----------------------------
#### Step 1
Create in here (`app/locale/`) the folder for the language.
The name of folder should be the ISO 639-3 language code.
There may be exceptions.
> For instance if you were adding Italian as a new UI language,
you would create a folder named `ita`.
#### Step 2
Inside of the language folder, create another folder named
`LC_MESSAGES`. In that folder, create an empty file named
`default.po`.
> For instance, for Italian, you would have a file with the path
`app/locale/ita/LC_MESSAGES/detault.po`.
If you do not create a file, you will not be able to commit the
new folders that you created.
In fact it doesn't really matter how the file is called, but it's
better to name it with the same name as the .po file on Transifex
so that it gets overriden with the actual Transifex file.
#### Step 3
Update the `.tx/config`. In the `lang_map`, you need to
add the Transifex code and the Tatoeba code. This
allows to use the transifex command line tool `tx`.
> For instance for Italian, you would add `it:ita`.
#### Step 4
Make the language available in the drop-down box
by adding it to the `UI.languages` list in the file
`app/config/core.php.template`. Read the comments in
that file for more information.
> For instance for Italian, you would add `array('ita', null, 'Italiano'),`
#### Step 5
Push your changes and create a pull request.
## Instruction:
Update again instructions to add a new UI language
There's no need to create folders, the `update-translations.py` scripts normally takes care of it.
## Code After:
UI Translations
===============
How to add a new UI language
----------------------------
#### Step 1
Update the `.tx/config`. In the `lang_map`, you need to
add the Transifex code and the Tatoeba code. This
allows to use the transifex command line tool `tx`.
> For instance for Italian, you would add `it:ita`.
#### Step 2
Make the language available in the drop-down box
by adding it to the `UI.languages` list in the file
`app/config/core.php.template`. Read the comments in
that file for more information.
> For instance for Italian, you would add `array('ita', null, 'Italiano'),`
#### Step 3
Push your changes and create a pull request. The language will
be available for testing on our [dev website](https://dev.tatoeba.org)
shortly after your pull requst is merged.
| UI Translations
===============
How to add a new UI language
----------------------------
#### Step 1
- Create in here (`app/locale/`) the folder for the language.
- The name of folder should be the ISO 639-3 language code.
- There may be exceptions.
-
- > For instance if you were adding Italian as a new UI language,
- you would create a folder named `ita`.
-
-
- #### Step 2
-
- Inside of the language folder, create another folder named
- `LC_MESSAGES`. In that folder, create an empty file named
- `default.po`.
-
- > For instance, for Italian, you would have a file with the path
- `app/locale/ita/LC_MESSAGES/detault.po`.
-
- If you do not create a file, you will not be able to commit the
- new folders that you created.
- In fact it doesn't really matter how the file is called, but it's
- better to name it with the same name as the .po file on Transifex
- so that it gets overriden with the actual Transifex file.
-
-
- #### Step 3
-
Update the `.tx/config`. In the `lang_map`, you need to
add the Transifex code and the Tatoeba code. This
allows to use the transifex command line tool `tx`.
> For instance for Italian, you would add `it:ita`.
- #### Step 4
? ^
+ #### Step 2
? ^
Make the language available in the drop-down box
by adding it to the `UI.languages` list in the file
`app/config/core.php.template`. Read the comments in
that file for more information.
> For instance for Italian, you would add `array('ita', null, 'Italiano'),`
- #### Step 5
? ^
+ #### Step 3
? ^
- Push your changes and create a pull request.
+ Push your changes and create a pull request. The language will
? +++++++++++++++++++
+ be available for testing on our [dev website](https://dev.tatoeba.org)
+ shortly after your pull requst is merged. | 34 | 0.62963 | 5 | 29 |
1d5ccafad9112d201dcb1dd48bdce17f7bed49b4 | assets/scss/site/_wp-admin.scss | assets/scss/site/_wp-admin.scss | // Fix the issue where the WP adminbar overlaps the mobile menu
#wpadminbar {
position: fixed !important;
}
| // Fix the issue where the WP admin-bar overlaps the mobile menu
#wpadminbar {
position: fixed !important;
}
// Make sure that the WP admin-bar does not overlap the sticky top bar
body.admin-bar.f-topbar-fixed {
.sticky.fixed {
margin-top: rem-calc(32);
}
}
| Fix issue with wpadminbar overlap sticky topbar | Fix issue with wpadminbar overlap sticky topbar
| SCSS | mit | bellatl/FoundationPress,danferth/akio-theme,sneffadi/matthewssite,sunnyuxuan/Portfolio,luluwuluying/myportfolio,ryancanhelpyou/FoundationPress,circleb/SustainLife,Negative-Network/FoundationPress,petemurray74/LucyBlundenFoundationPress6,sneffadi/matthewssite,ozunaj/JaredPress,SenecaOne/starter-theme2,LaurenKett/lmkettportfolio,tvnweb/Euroma2017,lgilders/virginian,petemurray74/LucyBlundenFoundationPress6,Guang-han/portfolio,sarahkasiske/portfolio,danferth/Thomson-wp-theme,ableslayer/MMoserPress,JenHLab/Portfolio,karielaine/FoundationPress,alexbohariuc/FoundationPress,chirilo/FoundationPress,danferth/DJ-wp-theme,skoldin/FoundationPress,mcastre/bellmedia-a-to-z,danferth/Thomson-wp-theme,derweili/WAYT-WordPress-Themes,petemurray74/LucyBlundenFoundationPress,mcastre/bellmedia-a-to-z,uptownstudiosdev/newuptown,cfalzone/FoundationPress,cyponthemic/benhaines_redesign,EricRihlmann/FoundationPress,spacebetween/astral-wordpress,fabiolr/portfolio,olefredrik/FoundationPress,noskov/FoundationPress,Iamronan/FoundationPress,cibonaydames/cd-theme,derweili/WAYT-WordPress-Themes,spacebetween/astral-wordpress,chirilo/FoundationPress,spacebetween/astral-wordpress,uroy9ch/portfolio,HappyChapMedia/be-in-the-show,petemurray74/LucyBlundenFoundationPress,SenecaOne/starter-theme2,adamfeuer/FoundationPress,hfreitas92/portfolio,luluwuluying/myportfolio,colin-marshall/FoundationPress,sunnyuxuan/Portfolio,rasmuserik/theme-solsort,alexbohariuc/FoundationPress,HappyChapMedia/be-in-the-show,Guang-han/portfolio,petemurray74/HarveysFoundationPress,fabiolr/portfolio,andyow/Cream2016-FoundationPress,skmezanul/FoundationPress,jmvaranda/immortal-palm,davenaylor/FoundationPress,cfalzone/FoundationPress,pedro-mendonca/FoundationPress,scordes11/rachel-site,josh-rathke/FoundationPress,stirlingsohn/openeyes,Digio86/artena,JenHLab/Portfolio,skmezanul/FoundationPress,skoldin/FoundationPress,rollandwalsh/popart,codenamesrk/WP-Starter,adelllano/portfolio-angiedelllano,linaangel/portfolio,olefredrik/FoundationPress,uptownstudiosdev/newuptown,LepusSorbas/FoundationPress,joshsmith01/theme-elixir,KLVTZ/FoundationPress,uroy9ch/portfolio,colin-marshall/FoundationPress,uroy9ch/portfolio,LaurenKett/portfolio,zeppytoh/cruorgsg-fp,cyponthemic/benhaines_redesign,cibonaydames/cd-theme,mevrgior/foundationpress,danferth/DJ-wp-theme,spacebetween/astral-wordpress,karielaine/FoundationPress,petemurray74/HarveysFoundationPress,derweili/WAYT-WordPress-Themes,EricRihlmann/FoundationPress,namilwaukee/FoundationPress,philipptrenz/wkkv_theme,adriantomic/ramengalen,adelllano/portfolio-angiedelllano,pedro-mendonca/FoundationPress,namilwaukee/FoundationPress,philipptrenz/wkkv_theme,kateloschinina/KiRa,rollandwalsh/popart,YiTingChenJeffrey/Portfolio,petemurray74/TodFoundationPress,petemurray74/HebdenHandyman,fabiolr/portfolio,lgilders/virginian,jmvaranda/immortal-palm,fabianrios/blueprint,shadowin1126/sspecstheme,radel/FoundationPress,andyow/Cream2016-FoundationPress,Adagio-design/Adagio-Foundation-Starter,petemurray74/TodFoundationPress,rasmuserik/theme-solsort,circleb/SustainLife,Schploople/ryanjp-website,stirlingsohn/openeyes,ableslayer/MMoserPress,bellatl/FoundationPress,joshsmith01/theme-elixir,Digio86/artena,Xabadu/punta-lobos,Schploople/ryanjp-website,ozunaj/JaredPress,adamfeuer/FoundationPress,hfreitas92/portfolio,shadowin1126/sspecstheme,LaurenKett/portfolio,adriantomic/ramengalen,zeppytoh/cruorgsg-fp,hocu/FoundationPress,cyponthemic/benhaines_redesign,caseyburton/someguycasey,radel/FoundationPress,randmanrjr/FoundationPress-randman,danferth/DJ-wp-theme,randmanrjr/FoundationPress-randman,hocu/FoundationPress,rasmuserik/theme-solsort,YiTingChenJeffrey/Portfolio,suneric1/portfolio,tompepper/tp-foundationpress,noskov/FoundationPress,danferth/akio-theme,tompepper/tp-foundationpress,KLVTZ/FoundationPress,scordes11/rachel-site,Adagio-design/Adagio-Foundation-Starter,marc4it/pokegame-themes,hfreitas92/portfolio,linaangel/portfolio,suneric1/portfolio,ryancanhelpyou/FoundationPress,linuxbastard/FoundationPress,petemurray74/LucyBlundenFoundationPress,caseyburton/someguycasey,LepusSorbas/FoundationPress,linuxbastard/FoundationPress,Negative-Network/FoundationPress,HappyChapMedia/be-in-the-show,rollandwalsh/popart,petemurray74/HarveysFoundationPress,mevrgior/foundationpress,kateloschinina/KiRa,marc4it/pokegame-themes,fabianrios/blueprint,tvnweb/Euroma2017,sky1tech/tms,josh-rathke/FoundationPress,Schploople/ryanjp-website,Iamronan/FoundationPress,sky1tech/tms,sarahkasiske/portfolio,rollandwalsh/popart,LaurenKett/lmkettportfolio,Digio86/artena,mik-laj/FoundationPress,codenamesrk/WP-Starter,mik-laj/FoundationPress,Xabadu/punta-lobos,Digio86/artena,petemurray74/HebdenHandyman,davenaylor/FoundationPress | scss | ## Code Before:
// Fix the issue where the WP adminbar overlaps the mobile menu
#wpadminbar {
position: fixed !important;
}
## Instruction:
Fix issue with wpadminbar overlap sticky topbar
## Code After:
// Fix the issue where the WP admin-bar overlaps the mobile menu
#wpadminbar {
position: fixed !important;
}
// Make sure that the WP admin-bar does not overlap the sticky top bar
body.admin-bar.f-topbar-fixed {
.sticky.fixed {
margin-top: rem-calc(32);
}
}
| - // Fix the issue where the WP adminbar overlaps the mobile menu
+ // Fix the issue where the WP admin-bar overlaps the mobile menu
? +
#wpadminbar {
position: fixed !important;
}
+
+ // Make sure that the WP admin-bar does not overlap the sticky top bar
+ body.admin-bar.f-topbar-fixed {
+ .sticky.fixed {
+ margin-top: rem-calc(32);
+ }
+ } | 9 | 2.25 | 8 | 1 |
fe5721c9dfb711843a5c13da5ef9ed4cba57efff | .travis.yml | .travis.yml | notifications:
email: false
irc:
channels:
- "irc.mysociety.org#sayit"
use_notice: true
language: python
python:
- "2.7"
- "3.3"
services:
- elasticsearch
env:
- MODULES="Django>=1.4.2,<1.5 django-tastypie==0.9.16"
- MODULES="Django>=1.5,<1.6 django-tastypie"
- MODULES="Django>=1.6,<1.7 django-tastypie"
- MODULES="Django>=1.7,<1.8 django-tastypie"
# - MODULES="git+https://github.com/django/django.git@master#egg=django"
# Django 1.4 did not support Python 3.
matrix:
exclude:
- python: "3.3"
env: MODULES="Django>=1.4.2,<1.5 django-tastypie==0.9.16"
install:
- sudo apt-get update -qq
- sudo apt-get install -qq ffmpeg libavcodec-extra-53 iceweasel xvfb
- pip install $MODULES
- CFLAGS="-O0" pip install -e .[test]
before_script:
- psql -c 'create database "sayit-example-project";' -U postgres
- ./manage.py syncdb --noinput
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
script:
- SELENIUM_TESTS=1 ./manage.py test
| notifications:
email: false
irc:
channels:
- "irc.mysociety.org#sayit"
use_notice: true
language: python
python:
- "2.7"
- "3.3"
services:
- elasticsearch
env:
- MODULES="Django>=1.4.2,<1.5 django-tastypie==0.9.16"
- MODULES="Django>=1.6,<1.7 django-tastypie"
- MODULES="Django>=1.7,<1.8 django-tastypie"
# - MODULES="git+https://github.com/django/django.git@master#egg=django"
# Django 1.4 did not support Python 3.
matrix:
exclude:
- python: "3.3"
env: MODULES="Django>=1.4.2,<1.5 django-tastypie==0.9.16"
install:
- sudo apt-get update -qq
- sudo apt-get install -qq ffmpeg libavcodec-extra-53 iceweasel xvfb
- pip install $MODULES
- CFLAGS="-O0" pip install -e .[test]
before_script:
- psql -c 'create database "sayit-example-project";' -U postgres
- ./manage.py syncdb --noinput
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
script:
- SELENIUM_TESTS=1 ./manage.py test
| Stop testing on now unsupported Django 1.5 | Stop testing on now unsupported Django 1.5
| YAML | agpl-3.0 | opencorato/sayit,opencorato/sayit,opencorato/sayit,opencorato/sayit | yaml | ## Code Before:
notifications:
email: false
irc:
channels:
- "irc.mysociety.org#sayit"
use_notice: true
language: python
python:
- "2.7"
- "3.3"
services:
- elasticsearch
env:
- MODULES="Django>=1.4.2,<1.5 django-tastypie==0.9.16"
- MODULES="Django>=1.5,<1.6 django-tastypie"
- MODULES="Django>=1.6,<1.7 django-tastypie"
- MODULES="Django>=1.7,<1.8 django-tastypie"
# - MODULES="git+https://github.com/django/django.git@master#egg=django"
# Django 1.4 did not support Python 3.
matrix:
exclude:
- python: "3.3"
env: MODULES="Django>=1.4.2,<1.5 django-tastypie==0.9.16"
install:
- sudo apt-get update -qq
- sudo apt-get install -qq ffmpeg libavcodec-extra-53 iceweasel xvfb
- pip install $MODULES
- CFLAGS="-O0" pip install -e .[test]
before_script:
- psql -c 'create database "sayit-example-project";' -U postgres
- ./manage.py syncdb --noinput
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
script:
- SELENIUM_TESTS=1 ./manage.py test
## Instruction:
Stop testing on now unsupported Django 1.5
## Code After:
notifications:
email: false
irc:
channels:
- "irc.mysociety.org#sayit"
use_notice: true
language: python
python:
- "2.7"
- "3.3"
services:
- elasticsearch
env:
- MODULES="Django>=1.4.2,<1.5 django-tastypie==0.9.16"
- MODULES="Django>=1.6,<1.7 django-tastypie"
- MODULES="Django>=1.7,<1.8 django-tastypie"
# - MODULES="git+https://github.com/django/django.git@master#egg=django"
# Django 1.4 did not support Python 3.
matrix:
exclude:
- python: "3.3"
env: MODULES="Django>=1.4.2,<1.5 django-tastypie==0.9.16"
install:
- sudo apt-get update -qq
- sudo apt-get install -qq ffmpeg libavcodec-extra-53 iceweasel xvfb
- pip install $MODULES
- CFLAGS="-O0" pip install -e .[test]
before_script:
- psql -c 'create database "sayit-example-project";' -U postgres
- ./manage.py syncdb --noinput
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
script:
- SELENIUM_TESTS=1 ./manage.py test
| notifications:
email: false
irc:
channels:
- "irc.mysociety.org#sayit"
use_notice: true
language: python
python:
- "2.7"
- "3.3"
services:
- elasticsearch
env:
- MODULES="Django>=1.4.2,<1.5 django-tastypie==0.9.16"
- - MODULES="Django>=1.5,<1.6 django-tastypie"
- MODULES="Django>=1.6,<1.7 django-tastypie"
- MODULES="Django>=1.7,<1.8 django-tastypie"
# - MODULES="git+https://github.com/django/django.git@master#egg=django"
# Django 1.4 did not support Python 3.
matrix:
exclude:
- python: "3.3"
env: MODULES="Django>=1.4.2,<1.5 django-tastypie==0.9.16"
install:
- sudo apt-get update -qq
- sudo apt-get install -qq ffmpeg libavcodec-extra-53 iceweasel xvfb
- pip install $MODULES
- CFLAGS="-O0" pip install -e .[test]
before_script:
- psql -c 'create database "sayit-example-project";' -U postgres
- ./manage.py syncdb --noinput
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
script:
- SELENIUM_TESTS=1 ./manage.py test | 1 | 0.023256 | 0 | 1 |
177e6684569df512b3c1483cffad22cdf48ab35e | test/icinga/server_spec.rb | test/icinga/server_spec.rb | require 'icinga'
describe Icinga::Server do
before do
@icinga = Icinga::Server.new
end
describe "when initialized" do
it "should set the default port" do
@icinga.options[:port].should equal(80)
end
it "should set the default host" do
@icinga.options[:host].should match("localhost")
end
end
it "should create a connection" do
@icinga.connection.should be_kind_of(Net::HTTP)
end
it "should create a request" do
@icinga.new_request("/").should be_kind_of(Net::HTTP::Get)
end
it "should set basic auth" do
@icinga.options[:user] = "Foo"
@icinga.new_request("/").get_fields("Authorization").first.should match(/^Basic\s.*/)
end
end
| require 'icinga'
describe Icinga::Server do
before do
@icinga = Icinga::Server.new
end
describe "when initialized" do
it "should set the default port" do
@icinga.options[:port].should equal(80)
end
it "should set the default host" do
@icinga.options[:host].should match("localhost")
end
it "should set the default remote path" do
@icinga.options[:remote_path].should match("/icinga/cgi-bin/status.cgi")
end
end
it "should create a connection" do
@icinga.connection.should be_kind_of(Net::HTTP)
end
it "should create a request" do
@icinga.new_request("/").should be_kind_of(Net::HTTP::Get)
end
it "should set basic auth" do
@icinga.options[:user] = "Foo"
@icinga.new_request("/").get_fields("Authorization").first.should match(/^Basic\s.*/)
end
end
| Add test for remote path patch | Add test for remote path patch
| Ruby | mit | jbussdieker/icinga | ruby | ## Code Before:
require 'icinga'
describe Icinga::Server do
before do
@icinga = Icinga::Server.new
end
describe "when initialized" do
it "should set the default port" do
@icinga.options[:port].should equal(80)
end
it "should set the default host" do
@icinga.options[:host].should match("localhost")
end
end
it "should create a connection" do
@icinga.connection.should be_kind_of(Net::HTTP)
end
it "should create a request" do
@icinga.new_request("/").should be_kind_of(Net::HTTP::Get)
end
it "should set basic auth" do
@icinga.options[:user] = "Foo"
@icinga.new_request("/").get_fields("Authorization").first.should match(/^Basic\s.*/)
end
end
## Instruction:
Add test for remote path patch
## Code After:
require 'icinga'
describe Icinga::Server do
before do
@icinga = Icinga::Server.new
end
describe "when initialized" do
it "should set the default port" do
@icinga.options[:port].should equal(80)
end
it "should set the default host" do
@icinga.options[:host].should match("localhost")
end
it "should set the default remote path" do
@icinga.options[:remote_path].should match("/icinga/cgi-bin/status.cgi")
end
end
it "should create a connection" do
@icinga.connection.should be_kind_of(Net::HTTP)
end
it "should create a request" do
@icinga.new_request("/").should be_kind_of(Net::HTTP::Get)
end
it "should set basic auth" do
@icinga.options[:user] = "Foo"
@icinga.new_request("/").get_fields("Authorization").first.should match(/^Basic\s.*/)
end
end
| require 'icinga'
describe Icinga::Server do
before do
@icinga = Icinga::Server.new
end
describe "when initialized" do
it "should set the default port" do
@icinga.options[:port].should equal(80)
end
it "should set the default host" do
@icinga.options[:host].should match("localhost")
+ end
+ it "should set the default remote path" do
+ @icinga.options[:remote_path].should match("/icinga/cgi-bin/status.cgi")
end
end
it "should create a connection" do
@icinga.connection.should be_kind_of(Net::HTTP)
end
it "should create a request" do
@icinga.new_request("/").should be_kind_of(Net::HTTP::Get)
end
it "should set basic auth" do
@icinga.options[:user] = "Foo"
@icinga.new_request("/").get_fields("Authorization").first.should match(/^Basic\s.*/)
end
end | 3 | 0.103448 | 3 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.