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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
421aac1ccfe9fa8a5acd5031c28b98e945046703 | knife-wsfusion.gemspec | knife-wsfusion.gemspec | Gem::Specification.new do |s|
s.name = "knife-wsfusion"
s.version = "0.1.0"
s.summary = "VMware Workstation/Fusion support for Knife"
s.required_rubygems_version = \
Gem::Requirement.new('>= 0') if s.respond_to? :required_rubygems_version=
s.author = "Christian Hammond"
s.description = "VMware Workstation/Fusion support for Chef's Knife command."
s.email = "chipx86@chipx86.com"
s.files = Dir["lib/**/*"]
s.rubygems_version = "1.6.2"
s.add_dependency("chef", [">= 0.10.0"])
end
| Gem::Specification.new do |s|
s.name = "knife-wsfusion"
s.version = "0.1.0"
s.summary = "VMware Workstation/Fusion support for Knife"
s.required_rubygems_version = \
Gem::Requirement.new('>= 0') if s.respond_to? :required_rubygems_version=
s.author = "Christian Hammond"
s.description = "VMware Workstation/Fusion support for Chef's Knife command."
s.email = "chipx86@chipx86.com"
s.files = Dir["lib/**/*"]
s.rubygems_version = "1.6.2"
s.homepage = "https://github.com/chipx86/knife-wsfusion"
s.add_dependency("chef", [">= 0.11.0"])
end
| Add a homepage and safer dependency to the gemspec. | Add a homepage and safer dependency to the gemspec.
| Ruby | mit | chipx86/knife-wsfusion | ruby | ## Code Before:
Gem::Specification.new do |s|
s.name = "knife-wsfusion"
s.version = "0.1.0"
s.summary = "VMware Workstation/Fusion support for Knife"
s.required_rubygems_version = \
Gem::Requirement.new('>= 0') if s.respond_to? :required_rubygems_version=
s.author = "Christian Hammond"
s.description = "VMware Workstation/Fusion support for Chef's Knife command."
s.email = "chipx86@chipx86.com"
s.files = Dir["lib/**/*"]
s.rubygems_version = "1.6.2"
s.add_dependency("chef", [">= 0.10.0"])
end
## Instruction:
Add a homepage and safer dependency to the gemspec.
## Code After:
Gem::Specification.new do |s|
s.name = "knife-wsfusion"
s.version = "0.1.0"
s.summary = "VMware Workstation/Fusion support for Knife"
s.required_rubygems_version = \
Gem::Requirement.new('>= 0') if s.respond_to? :required_rubygems_version=
s.author = "Christian Hammond"
s.description = "VMware Workstation/Fusion support for Chef's Knife command."
s.email = "chipx86@chipx86.com"
s.files = Dir["lib/**/*"]
s.rubygems_version = "1.6.2"
s.homepage = "https://github.com/chipx86/knife-wsfusion"
s.add_dependency("chef", [">= 0.11.0"])
end
| Gem::Specification.new do |s|
s.name = "knife-wsfusion"
s.version = "0.1.0"
s.summary = "VMware Workstation/Fusion support for Knife"
s.required_rubygems_version = \
Gem::Requirement.new('>= 0') if s.respond_to? :required_rubygems_version=
s.author = "Christian Hammond"
s.description = "VMware Workstation/Fusion support for Chef's Knife command."
s.email = "chipx86@chipx86.com"
s.files = Dir["lib/**/*"]
s.rubygems_version = "1.6.2"
+ s.homepage = "https://github.com/chipx86/knife-wsfusion"
- s.add_dependency("chef", [">= 0.10.0"])
? ^
+ s.add_dependency("chef", [">= 0.11.0"])
? ^
end | 3 | 0.1875 | 2 | 1 |
2a1cc42366e21ca4accac7d47d895d17073c8196 | spec/recipes/default_spec.rb | spec/recipes/default_spec.rb | require 'spec_helper'
describe 's3_dir::default' do
let(:chef_run) { ChefSpec::Runner.new.converge(described_recipe) }
before do
allow(Chef::EncryptedDataBagItem).to receive(:load).with('secrets', 'aws_credentials')
.and_return(
'RailsDeploy-dev' => {
'access_key_id' => 'SAMPLE_ACCESS_KEY_ID',
'secret_access_key' => 'SECRET_ACCESS_KEY'
}
)
end
it 'includes the `et_fog::default` recipe' do
expect(chef_run).to include_recipe 'et_fog::default'
end
it 'downloads `/tmp/provisioning` from S3' do
expect(chef_run).to create_s3_dir('/tmp/provisioning').with(
bucket: 'provisioning.evertrue.com',
dir: '/s3_dir_test',
access_key_id: 'SAMPLE_ACCESS_KEY_ID',
secret_access_key: 'SECRET_ACCESS_KEY'
)
end
end
| require 'spec_helper'
describe 's3_dir::default' do
let(:chef_run) { ChefSpec::Runner.new.converge(described_recipe) }
it 'includes the `et_fog::default` recipe' do
expect(chef_run).to include_recipe 'et_fog::default'
end
it 'downloads `/tmp/provisioning` from S3' do
expect(chef_run).to create_s3_dir('/tmp/provisioning').with(
bucket: 'test-directory',
dir: '/s3_dir_test',
access_key_id: 'TEST_KEY',
secret_access_key: 'TEST_SECRET'
)
end
end
| Fix the unit tests to match the code | Fix the unit tests to match the code
| Ruby | apache-2.0 | evertrue/s3_dir | ruby | ## Code Before:
require 'spec_helper'
describe 's3_dir::default' do
let(:chef_run) { ChefSpec::Runner.new.converge(described_recipe) }
before do
allow(Chef::EncryptedDataBagItem).to receive(:load).with('secrets', 'aws_credentials')
.and_return(
'RailsDeploy-dev' => {
'access_key_id' => 'SAMPLE_ACCESS_KEY_ID',
'secret_access_key' => 'SECRET_ACCESS_KEY'
}
)
end
it 'includes the `et_fog::default` recipe' do
expect(chef_run).to include_recipe 'et_fog::default'
end
it 'downloads `/tmp/provisioning` from S3' do
expect(chef_run).to create_s3_dir('/tmp/provisioning').with(
bucket: 'provisioning.evertrue.com',
dir: '/s3_dir_test',
access_key_id: 'SAMPLE_ACCESS_KEY_ID',
secret_access_key: 'SECRET_ACCESS_KEY'
)
end
end
## Instruction:
Fix the unit tests to match the code
## Code After:
require 'spec_helper'
describe 's3_dir::default' do
let(:chef_run) { ChefSpec::Runner.new.converge(described_recipe) }
it 'includes the `et_fog::default` recipe' do
expect(chef_run).to include_recipe 'et_fog::default'
end
it 'downloads `/tmp/provisioning` from S3' do
expect(chef_run).to create_s3_dir('/tmp/provisioning').with(
bucket: 'test-directory',
dir: '/s3_dir_test',
access_key_id: 'TEST_KEY',
secret_access_key: 'TEST_SECRET'
)
end
end
| require 'spec_helper'
describe 's3_dir::default' do
let(:chef_run) { ChefSpec::Runner.new.converge(described_recipe) }
-
- before do
- allow(Chef::EncryptedDataBagItem).to receive(:load).with('secrets', 'aws_credentials')
- .and_return(
- 'RailsDeploy-dev' => {
- 'access_key_id' => 'SAMPLE_ACCESS_KEY_ID',
- 'secret_access_key' => 'SECRET_ACCESS_KEY'
- }
- )
- end
it 'includes the `et_fog::default` recipe' do
expect(chef_run).to include_recipe 'et_fog::default'
end
it 'downloads `/tmp/provisioning` from S3' do
expect(chef_run).to create_s3_dir('/tmp/provisioning').with(
- bucket: 'provisioning.evertrue.com',
+ bucket: 'test-directory',
dir: '/s3_dir_test',
- access_key_id: 'SAMPLE_ACCESS_KEY_ID',
? ^^^^^^^^^^ ^ ---
+ access_key_id: 'TEST_KEY',
? ^ ^
- secret_access_key: 'SECRET_ACCESS_KEY'
? -----------
+ secret_access_key: 'TEST_SECRET'
? +++++
)
end
end | 16 | 0.571429 | 3 | 13 |
12b73fb52a7d311a187033299d504f07d04c4407 | src/containers/gui.jsx | src/containers/gui.jsx | const React = require('react');
const VM = require('scratch-vm');
const vmListenerHOC = require('../lib/vm-listener-hoc.jsx');
const GUIComponent = require('../components/gui/gui.jsx');
class GUI extends React.Component {
componentDidMount () {
this.props.vm.loadProject(this.props.projectData);
this.props.vm.start();
}
componentWillReceiveProps (nextProps) {
if (this.props.projectData !== nextProps.projectData) {
this.props.vm.loadProject(nextProps.projectData);
}
}
componentWillUnmount () {
this.props.vm.stopAll();
}
render () {
const {
projectData, // eslint-disable-line no-unused-vars
vm,
...componentProps
} = this.props;
return (
<GUIComponent
vm={vm}
{...componentProps}
/>
);
}
}
GUI.propTypes = {
...GUIComponent.propTypes,
projectData: React.PropTypes.string,
vm: React.PropTypes.instanceOf(VM)
};
GUI.defaultProps = GUIComponent.defaultProps;
module.exports = vmListenerHOC(GUI);
| const React = require('react');
const VM = require('scratch-vm');
const vmListenerHOC = require('../lib/vm-listener-hoc.jsx');
const GUIComponent = require('../components/gui/gui.jsx');
class GUI extends React.Component {
componentDidMount () {
this.props.vm.loadProject(this.props.projectData);
this.props.vm.setCompatibilityMode(true);
this.props.vm.start();
}
componentWillReceiveProps (nextProps) {
if (this.props.projectData !== nextProps.projectData) {
this.props.vm.loadProject(nextProps.projectData);
}
}
componentWillUnmount () {
this.props.vm.stopAll();
}
render () {
const {
projectData, // eslint-disable-line no-unused-vars
vm,
...componentProps
} = this.props;
return (
<GUIComponent
vm={vm}
{...componentProps}
/>
);
}
}
GUI.propTypes = {
...GUIComponent.propTypes,
projectData: React.PropTypes.string,
vm: React.PropTypes.instanceOf(VM)
};
GUI.defaultProps = GUIComponent.defaultProps;
module.exports = vmListenerHOC(GUI);
| Make Compatibility Mode on By Default | Make Compatibility Mode on By Default | JSX | bsd-3-clause | cwillisf/scratch-gui,cwillisf/scratch-gui,cwillisf/scratch-gui,LLK/scratch-gui,LLK/scratch-gui | jsx | ## Code Before:
const React = require('react');
const VM = require('scratch-vm');
const vmListenerHOC = require('../lib/vm-listener-hoc.jsx');
const GUIComponent = require('../components/gui/gui.jsx');
class GUI extends React.Component {
componentDidMount () {
this.props.vm.loadProject(this.props.projectData);
this.props.vm.start();
}
componentWillReceiveProps (nextProps) {
if (this.props.projectData !== nextProps.projectData) {
this.props.vm.loadProject(nextProps.projectData);
}
}
componentWillUnmount () {
this.props.vm.stopAll();
}
render () {
const {
projectData, // eslint-disable-line no-unused-vars
vm,
...componentProps
} = this.props;
return (
<GUIComponent
vm={vm}
{...componentProps}
/>
);
}
}
GUI.propTypes = {
...GUIComponent.propTypes,
projectData: React.PropTypes.string,
vm: React.PropTypes.instanceOf(VM)
};
GUI.defaultProps = GUIComponent.defaultProps;
module.exports = vmListenerHOC(GUI);
## Instruction:
Make Compatibility Mode on By Default
## Code After:
const React = require('react');
const VM = require('scratch-vm');
const vmListenerHOC = require('../lib/vm-listener-hoc.jsx');
const GUIComponent = require('../components/gui/gui.jsx');
class GUI extends React.Component {
componentDidMount () {
this.props.vm.loadProject(this.props.projectData);
this.props.vm.setCompatibilityMode(true);
this.props.vm.start();
}
componentWillReceiveProps (nextProps) {
if (this.props.projectData !== nextProps.projectData) {
this.props.vm.loadProject(nextProps.projectData);
}
}
componentWillUnmount () {
this.props.vm.stopAll();
}
render () {
const {
projectData, // eslint-disable-line no-unused-vars
vm,
...componentProps
} = this.props;
return (
<GUIComponent
vm={vm}
{...componentProps}
/>
);
}
}
GUI.propTypes = {
...GUIComponent.propTypes,
projectData: React.PropTypes.string,
vm: React.PropTypes.instanceOf(VM)
};
GUI.defaultProps = GUIComponent.defaultProps;
module.exports = vmListenerHOC(GUI);
| const React = require('react');
const VM = require('scratch-vm');
const vmListenerHOC = require('../lib/vm-listener-hoc.jsx');
const GUIComponent = require('../components/gui/gui.jsx');
class GUI extends React.Component {
componentDidMount () {
this.props.vm.loadProject(this.props.projectData);
+ this.props.vm.setCompatibilityMode(true);
this.props.vm.start();
}
componentWillReceiveProps (nextProps) {
if (this.props.projectData !== nextProps.projectData) {
this.props.vm.loadProject(nextProps.projectData);
}
}
componentWillUnmount () {
this.props.vm.stopAll();
}
render () {
const {
projectData, // eslint-disable-line no-unused-vars
vm,
...componentProps
} = this.props;
return (
<GUIComponent
vm={vm}
{...componentProps}
/>
);
}
}
GUI.propTypes = {
...GUIComponent.propTypes,
projectData: React.PropTypes.string,
vm: React.PropTypes.instanceOf(VM)
};
GUI.defaultProps = GUIComponent.defaultProps;
module.exports = vmListenerHOC(GUI); | 1 | 0.022727 | 1 | 0 |
3feb0b610151286b09509af8ea273b4f8e9f9b94 | src/crike_django/crike_django/templates/crike_django/lesson_pick.html | src/crike_django/crike_django/templates/crike_django/lesson_pick.html | {% extends 'crike_django/lesson_base.html' %}
{% block subcontent %}
<div class='jumbotron'>
{% for word in words %}
<h1><strong style='font-size:150%'>{{word.name|capfirst}} </strong> [{{ word.phonetics }}]
<a onmouseover="delayPlay('/media/audios/{{ word.name }}.mp3');"
onmouseout ="clearTimeout(timer);"
onclick="playSound('/media/audios/{{ word.name }}.mp3');"
title="发音" href="javascript:;"><img src="/static/images/s-audio.png"/></a>
</h1>
{% endfor %}
</div>
<form action="/learn_pick/" method='post'>
<div class='row'>
{% for option in options %}
<div class="col-6 col-sm-6 col-lg-3">
<input type="radio" name="pick" value="{{option.mean}}">
{% for m in option.mean %}
<li style="font-size:150%">{{m}}</li>
{% endfor %}
</div>
{% endfor %}
<input type="submit" value="submit" style="float:right;">
</div>
</form>
{% endblock %}
| {% extends 'crike_django/lesson_base.html' %}
{% block subcontent %}
<div class='jumbotron'>
{% for word in words %}
<h1><strong style='font-size:150%'>{{word.name|capfirst}} </strong> [{{ word.phonetics }}]
<a onmouseover="delayPlay('/media/audios/{{ word.name }}.mp3');"
onmouseout ="clearTimeout(timer);"
onclick="playSound('/media/audios/{{ word.name }}.mp3');"
title="发音" href="javascript:;"><img src="/static/images/s-audio.png"/></a>
</h1>
{% endfor %}
</div>
<form action="/learn_pick/" method='post'>
<input type="submit" value="submit" style="margin-right:20px;margin-bottom:10px;">
<div class='row'>
{% for option in options %}
<div class="col-6 col-sm-6 col-lg-3">
<input type="radio" name="pick" value="{{option.mean}}">
{% for m in option.mean %}
<li style="font-size:150%">{{m}}</li>
{% endfor %}
</div>
{% endfor %}
</div>
</form>
{% endblock %}
| Fix the submit button in pick | Fix the submit button in pick
| HTML | apache-2.0 | crike/crike,crike/crike,crike/crike,crike/crike | html | ## Code Before:
{% extends 'crike_django/lesson_base.html' %}
{% block subcontent %}
<div class='jumbotron'>
{% for word in words %}
<h1><strong style='font-size:150%'>{{word.name|capfirst}} </strong> [{{ word.phonetics }}]
<a onmouseover="delayPlay('/media/audios/{{ word.name }}.mp3');"
onmouseout ="clearTimeout(timer);"
onclick="playSound('/media/audios/{{ word.name }}.mp3');"
title="发音" href="javascript:;"><img src="/static/images/s-audio.png"/></a>
</h1>
{% endfor %}
</div>
<form action="/learn_pick/" method='post'>
<div class='row'>
{% for option in options %}
<div class="col-6 col-sm-6 col-lg-3">
<input type="radio" name="pick" value="{{option.mean}}">
{% for m in option.mean %}
<li style="font-size:150%">{{m}}</li>
{% endfor %}
</div>
{% endfor %}
<input type="submit" value="submit" style="float:right;">
</div>
</form>
{% endblock %}
## Instruction:
Fix the submit button in pick
## Code After:
{% extends 'crike_django/lesson_base.html' %}
{% block subcontent %}
<div class='jumbotron'>
{% for word in words %}
<h1><strong style='font-size:150%'>{{word.name|capfirst}} </strong> [{{ word.phonetics }}]
<a onmouseover="delayPlay('/media/audios/{{ word.name }}.mp3');"
onmouseout ="clearTimeout(timer);"
onclick="playSound('/media/audios/{{ word.name }}.mp3');"
title="发音" href="javascript:;"><img src="/static/images/s-audio.png"/></a>
</h1>
{% endfor %}
</div>
<form action="/learn_pick/" method='post'>
<input type="submit" value="submit" style="margin-right:20px;margin-bottom:10px;">
<div class='row'>
{% for option in options %}
<div class="col-6 col-sm-6 col-lg-3">
<input type="radio" name="pick" value="{{option.mean}}">
{% for m in option.mean %}
<li style="font-size:150%">{{m}}</li>
{% endfor %}
</div>
{% endfor %}
</div>
</form>
{% endblock %}
| {% extends 'crike_django/lesson_base.html' %}
{% block subcontent %}
<div class='jumbotron'>
{% for word in words %}
<h1><strong style='font-size:150%'>{{word.name|capfirst}} </strong> [{{ word.phonetics }}]
<a onmouseover="delayPlay('/media/audios/{{ word.name }}.mp3');"
onmouseout ="clearTimeout(timer);"
onclick="playSound('/media/audios/{{ word.name }}.mp3');"
title="发音" href="javascript:;"><img src="/static/images/s-audio.png"/></a>
</h1>
{% endfor %}
</div>
<form action="/learn_pick/" method='post'>
+ <input type="submit" value="submit" style="margin-right:20px;margin-bottom:10px;">
<div class='row'>
{% for option in options %}
<div class="col-6 col-sm-6 col-lg-3">
<input type="radio" name="pick" value="{{option.mean}}">
{% for m in option.mean %}
<li style="font-size:150%">{{m}}</li>
{% endfor %}
</div>
{% endfor %}
- <input type="submit" value="submit" style="float:right;">
</div>
</form>
{% endblock %} | 2 | 0.074074 | 1 | 1 |
04a67dacd615fcad4f4679a81ce0bfea1193265a | app/workers/course_data_update_worker.rb | app/workers/course_data_update_worker.rb | require_dependency "#{Rails.root}/app/services/update_course_stats"
class CourseDataUpdateWorker
include Sidekiq::Worker
sidekiq_options unique: :until_executed
def self.update_course(course_id:, queue:)
CourseDataUpdateWorker.set(queue: queue).perform_async(course_id)
end
def perform(course_id)
course = Course.find(course_id)
UpdateCourseStats.new(course)
end
end
| require_dependency "#{Rails.root}/app/services/update_course_stats"
class CourseDataUpdateWorker
THIRTY_DAYS = 60 * 60 * 24 * 30
include Sidekiq::Worker
sidekiq_options unique: :until_executed, unique_expiration: THIRTY_DAYS
def self.update_course(course_id:, queue:)
CourseDataUpdateWorker.set(queue: queue).perform_async(course_id)
end
def perform(course_id)
course = Course.find(course_id)
UpdateCourseStats.new(course)
end
end
| Set unique_expiration timeout for course update workers | Set unique_expiration timeout for course update workers
By default, unique job locks expire after 30 minutes, so duplicate jobs have been accumulating on P&E Dashboard, where updating all current courses takes longer than that.
| Ruby | mit | sejalkhatri/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,sejalkhatri/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,sejalkhatri/WikiEduDashboard,sejalkhatri/WikiEduDashboard,sejalkhatri/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard | ruby | ## Code Before:
require_dependency "#{Rails.root}/app/services/update_course_stats"
class CourseDataUpdateWorker
include Sidekiq::Worker
sidekiq_options unique: :until_executed
def self.update_course(course_id:, queue:)
CourseDataUpdateWorker.set(queue: queue).perform_async(course_id)
end
def perform(course_id)
course = Course.find(course_id)
UpdateCourseStats.new(course)
end
end
## Instruction:
Set unique_expiration timeout for course update workers
By default, unique job locks expire after 30 minutes, so duplicate jobs have been accumulating on P&E Dashboard, where updating all current courses takes longer than that.
## Code After:
require_dependency "#{Rails.root}/app/services/update_course_stats"
class CourseDataUpdateWorker
THIRTY_DAYS = 60 * 60 * 24 * 30
include Sidekiq::Worker
sidekiq_options unique: :until_executed, unique_expiration: THIRTY_DAYS
def self.update_course(course_id:, queue:)
CourseDataUpdateWorker.set(queue: queue).perform_async(course_id)
end
def perform(course_id)
course = Course.find(course_id)
UpdateCourseStats.new(course)
end
end
| require_dependency "#{Rails.root}/app/services/update_course_stats"
class CourseDataUpdateWorker
+ THIRTY_DAYS = 60 * 60 * 24 * 30
include Sidekiq::Worker
- sidekiq_options unique: :until_executed
+ sidekiq_options unique: :until_executed, unique_expiration: THIRTY_DAYS
def self.update_course(course_id:, queue:)
CourseDataUpdateWorker.set(queue: queue).perform_async(course_id)
end
def perform(course_id)
course = Course.find(course_id)
UpdateCourseStats.new(course)
end
end | 3 | 0.2 | 2 | 1 |
e60e8c81309dc8af171ab459e20d07365d7d5425 | lib_test/mkiso.sh | lib_test/mkiso.sh |
if type "mkisofs" > /dev/null; then
mkdir test_iso
echo "hello, world!" > test_iso/hello.txt
mkisofs -o test.iso -R test_iso
else
curl http://www.recoil.org/~jon/ocaml-iso9660-test.iso -o test.iso
fi
|
if type "mkisofs" > /dev/null; then
mkdir test_iso
echo "hello, world!" > test_iso/hello.txt
echo "old file" > test_iso/old.txt
touch -t 197001010001 test_iso/old.txt
mkisofs -o test.iso -R test_iso
else
curl http://www.recoil.org/~jon/ocaml-iso9660-test.iso -o test.iso
fi
| Add a file to the test iso with an old timestamp | Add a file to the test iso with an old timestamp
Signed-off-by: Jon Ludlam <e7e3380887a8f95cc9dc4f0d51dedc7e849a287a@citrix.com>
| Shell | isc | jonludlam/ocaml-iso-filesystem | shell | ## Code Before:
if type "mkisofs" > /dev/null; then
mkdir test_iso
echo "hello, world!" > test_iso/hello.txt
mkisofs -o test.iso -R test_iso
else
curl http://www.recoil.org/~jon/ocaml-iso9660-test.iso -o test.iso
fi
## Instruction:
Add a file to the test iso with an old timestamp
Signed-off-by: Jon Ludlam <e7e3380887a8f95cc9dc4f0d51dedc7e849a287a@citrix.com>
## Code After:
if type "mkisofs" > /dev/null; then
mkdir test_iso
echo "hello, world!" > test_iso/hello.txt
echo "old file" > test_iso/old.txt
touch -t 197001010001 test_iso/old.txt
mkisofs -o test.iso -R test_iso
else
curl http://www.recoil.org/~jon/ocaml-iso9660-test.iso -o test.iso
fi
|
if type "mkisofs" > /dev/null; then
mkdir test_iso
echo "hello, world!" > test_iso/hello.txt
+ echo "old file" > test_iso/old.txt
+ touch -t 197001010001 test_iso/old.txt
mkisofs -o test.iso -R test_iso
else
curl http://www.recoil.org/~jon/ocaml-iso9660-test.iso -o test.iso
fi
| 2 | 0.2 | 2 | 0 |
6dc0dabebb1ce6bf419cbb53d83c42b017c467a6 | src/components/datepicker/utils.js | src/components/datepicker/utils.js | import { DateUtils } from 'react-day-picker/lib/src/index';
export const convertModifiersToClassnames = (modifiers, theme) => {
if (!modifiers) {
return {};
}
return Object.keys(modifiers).reduce((convertedModifiers, key) => {
return {
...convertedModifiers,
[theme[key]]: modifiers[key],
};
}, {});
};
export const isSelectingFirstDay = (from, to, day) => {
const isBeforeFirstDay = from && DateUtils.isDayBefore(day, from);
const isRangeSelected = from && to;
return !from || isBeforeFirstDay || isRangeSelected;
};
| import { DateUtils } from 'react-day-picker/lib/src/index';
import { DateTime } from 'luxon';
export const convertModifiersToClassnames = (modifiers, theme) => {
if (!modifiers) {
return {};
}
return Object.keys(modifiers).reduce((convertedModifiers, key) => {
return {
...convertedModifiers,
[theme[key]]: modifiers[key],
};
}, {});
};
export const isSelectingFirstDay = (from, to, day) => {
const isBeforeFirstDay = from && DateUtils.isDayBefore(day, from);
const isRangeSelected = from && to;
return !from || isBeforeFirstDay || isRangeSelected;
};
export function JSDateToLocaleString(date, locale, format = DateTime.DATE_SHORT) {
return DateTime.fromJSDate(date)
.setLocale(locale)
.toLocaleString(format);
}
| Add util function to convert a JS date to locale string | Add util function to convert a JS date to locale string
| JavaScript | mit | teamleadercrm/teamleader-ui | javascript | ## Code Before:
import { DateUtils } from 'react-day-picker/lib/src/index';
export const convertModifiersToClassnames = (modifiers, theme) => {
if (!modifiers) {
return {};
}
return Object.keys(modifiers).reduce((convertedModifiers, key) => {
return {
...convertedModifiers,
[theme[key]]: modifiers[key],
};
}, {});
};
export const isSelectingFirstDay = (from, to, day) => {
const isBeforeFirstDay = from && DateUtils.isDayBefore(day, from);
const isRangeSelected = from && to;
return !from || isBeforeFirstDay || isRangeSelected;
};
## Instruction:
Add util function to convert a JS date to locale string
## Code After:
import { DateUtils } from 'react-day-picker/lib/src/index';
import { DateTime } from 'luxon';
export const convertModifiersToClassnames = (modifiers, theme) => {
if (!modifiers) {
return {};
}
return Object.keys(modifiers).reduce((convertedModifiers, key) => {
return {
...convertedModifiers,
[theme[key]]: modifiers[key],
};
}, {});
};
export const isSelectingFirstDay = (from, to, day) => {
const isBeforeFirstDay = from && DateUtils.isDayBefore(day, from);
const isRangeSelected = from && to;
return !from || isBeforeFirstDay || isRangeSelected;
};
export function JSDateToLocaleString(date, locale, format = DateTime.DATE_SHORT) {
return DateTime.fromJSDate(date)
.setLocale(locale)
.toLocaleString(format);
}
| import { DateUtils } from 'react-day-picker/lib/src/index';
+ import { DateTime } from 'luxon';
export const convertModifiersToClassnames = (modifiers, theme) => {
if (!modifiers) {
return {};
}
return Object.keys(modifiers).reduce((convertedModifiers, key) => {
return {
...convertedModifiers,
[theme[key]]: modifiers[key],
};
}, {});
};
export const isSelectingFirstDay = (from, to, day) => {
const isBeforeFirstDay = from && DateUtils.isDayBefore(day, from);
const isRangeSelected = from && to;
return !from || isBeforeFirstDay || isRangeSelected;
};
+
+ export function JSDateToLocaleString(date, locale, format = DateTime.DATE_SHORT) {
+ return DateTime.fromJSDate(date)
+ .setLocale(locale)
+ .toLocaleString(format);
+ } | 7 | 0.35 | 7 | 0 |
99e9cbfc9dacc1dddb6d61cf1c8943dfa5443454 | resources/views/frontend/donations/onlineDonation.blade.php | resources/views/frontend/donations/onlineDonation.blade.php | @extends('layouts.master')
@section('content')
<div class="container main-container">
<div class="online-donations">
<div class="col-md-12">
<div class="col-md-12">
<ul class="list-group">
<li class="list-group-item" style="padding: 2%; font-size: 40px"><a href="http://takas.lk/tag/product/list/tagId/196" target="_blank">takas.lk</a></li>
<li class="list-group-item" style="padding: 2%; font-size: 40px"><a href="http://imcds.org/about-us" target="_blank">ICMD</a></li>
<li class="list-group-item" style="padding: 2%;font-size: 40px"><a href="http://www.kapruka.com/contactUs/donate.jsp" target="_blank">kapruka.com</a></li>
</ul>
<div>
<div>
</div>
</div><!-- /.container -->
@endsection | @extends('layouts.master')
@section('content')
<div class="container main-container">
<div class="online-donations">
<div class="col-md-12">
<div class="col-md-12">
<ul class="list-group">
<li class="list-group-item" style="padding: 2%; font-size: 40px"><a href="http://takas.lk/tag/product/list/tagId/196" target="_blank">takas.lk</a></li>
<li class="list-group-item" style="padding: 2%; font-size: 40px"><a href="http://imcds.org/about-us" target="_blank">ICMD</a></li>
</ul>
<div>
<div>
</div>
</div><!-- /.container -->
@endsection | Remove kapruka link from online donation list | Remove kapruka link from online donation list
| PHP | mit | gayanhewa/reliefsupports.org,gayanhewa/reliefsupports.org,gayanhewa/reliefsupports.org,gayanhewa/reliefsupports.org | php | ## Code Before:
@extends('layouts.master')
@section('content')
<div class="container main-container">
<div class="online-donations">
<div class="col-md-12">
<div class="col-md-12">
<ul class="list-group">
<li class="list-group-item" style="padding: 2%; font-size: 40px"><a href="http://takas.lk/tag/product/list/tagId/196" target="_blank">takas.lk</a></li>
<li class="list-group-item" style="padding: 2%; font-size: 40px"><a href="http://imcds.org/about-us" target="_blank">ICMD</a></li>
<li class="list-group-item" style="padding: 2%;font-size: 40px"><a href="http://www.kapruka.com/contactUs/donate.jsp" target="_blank">kapruka.com</a></li>
</ul>
<div>
<div>
</div>
</div><!-- /.container -->
@endsection
## Instruction:
Remove kapruka link from online donation list
## Code After:
@extends('layouts.master')
@section('content')
<div class="container main-container">
<div class="online-donations">
<div class="col-md-12">
<div class="col-md-12">
<ul class="list-group">
<li class="list-group-item" style="padding: 2%; font-size: 40px"><a href="http://takas.lk/tag/product/list/tagId/196" target="_blank">takas.lk</a></li>
<li class="list-group-item" style="padding: 2%; font-size: 40px"><a href="http://imcds.org/about-us" target="_blank">ICMD</a></li>
</ul>
<div>
<div>
</div>
</div><!-- /.container -->
@endsection | @extends('layouts.master')
@section('content')
<div class="container main-container">
<div class="online-donations">
<div class="col-md-12">
<div class="col-md-12">
<ul class="list-group">
<li class="list-group-item" style="padding: 2%; font-size: 40px"><a href="http://takas.lk/tag/product/list/tagId/196" target="_blank">takas.lk</a></li>
<li class="list-group-item" style="padding: 2%; font-size: 40px"><a href="http://imcds.org/about-us" target="_blank">ICMD</a></li>
- <li class="list-group-item" style="padding: 2%;font-size: 40px"><a href="http://www.kapruka.com/contactUs/donate.jsp" target="_blank">kapruka.com</a></li>
</ul>
<div>
<div>
</div>
</div><!-- /.container -->
@endsection | 1 | 0.055556 | 0 | 1 |
3679a62c59dde625a18416f15aadaa6845bc8cfd | NSData+ImageMIMEDetection/NSData+ImageMIMEDetection.h | NSData+ImageMIMEDetection/NSData+ImageMIMEDetection.h |
@interface NSData (ImageMIMEDetection)
@end
|
@interface NSData (ImageMIMEDetection)
/**
Try to deduce the MIME type.
@return string representation of detected MIME type. `nil` if not able to
detect the MIME type.
@see http://en.wikipedia.org/wiki/Internet_media_type
*/
- (NSString *)tdt_MIMEType;
@end
| Add interface for the category | Add interface for the category
| C | bsd-3-clause | talk-to/NSData-TDTImageMIMEDetection | c | ## Code Before:
@interface NSData (ImageMIMEDetection)
@end
## Instruction:
Add interface for the category
## Code After:
@interface NSData (ImageMIMEDetection)
/**
Try to deduce the MIME type.
@return string representation of detected MIME type. `nil` if not able to
detect the MIME type.
@see http://en.wikipedia.org/wiki/Internet_media_type
*/
- (NSString *)tdt_MIMEType;
@end
|
@interface NSData (ImageMIMEDetection)
+ /**
+ Try to deduce the MIME type.
+
+ @return string representation of detected MIME type. `nil` if not able to
+ detect the MIME type.
+
+ @see http://en.wikipedia.org/wiki/Internet_media_type
+ */
+ - (NSString *)tdt_MIMEType;
+
@end | 10 | 2.5 | 10 | 0 |
d2f43460cb9794d7b33e54c654669ae5affa39f8 | README.md | README.md | StackStorm
============

**StackStorm** is a platform for integration and automation across services and tools, taking actions in response to events. Learn more at [www.stackstorm.com](http://www.stackstorm.com/product).
## Documentation
Please refer to [StackStorm Docs](http://docs.stackstorm.com).
## Hacking
To set up dev environment and run StackStorm from sources, follow [these instructions](docs/source/install/sources.rst).
## Copyright, License, and Contributors Agreement
<br>Copyright 2014 StackStorm, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this work except in compliance with the License. You may obtain a copy of the License in the [LICENSE](LICENSE) file, or at:
[http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)
By contributing you agree that these contributions are your own (or approved by your employer) and you grant a full, complete, irrevocable copyright license to all users and developers of the project, present and future, pursuant to the license of the project.
|
[](http://www.stackstorm.com)
**StackStorm** is a platform for integration and automation across services and tools, taking actions in response to events. Learn more at [www.stackstorm.com](http://www.stackstorm.com/product).
## Documentation
Please refer to [StackStorm Docs](http://docs.stackstorm.com).
## Hacking
To set up dev environment and run StackStorm from sources, follow [these instructions](docs/source/install/sources.rst).
## Copyright, License, and Contributors Agreement
<br>Copyright 2014 StackStorm, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this work except in compliance with the License. You may obtain a copy of the License in the [LICENSE](LICENSE) file, or at:
[http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)
By contributing you agree that these contributions are your own (or approved by your employer) and you grant a full, complete, irrevocable copyright license to all users and developers of the project, present and future, pursuant to the license of the project.
| Make logo link to the homepage. | Make logo link to the homepage.
| Markdown | apache-2.0 | Plexxi/st2,nzlosh/st2,Itxaka/st2,pixelrebel/st2,dennybaa/st2,emedvedev/st2,lakshmi-kannan/st2,alfasin/st2,pinterb/st2,nzlosh/st2,StackStorm/st2,StackStorm/st2,pixelrebel/st2,dennybaa/st2,grengojbo/st2,pixelrebel/st2,Plexxi/st2,tonybaloney/st2,jtopjian/st2,Itxaka/st2,lakshmi-kannan/st2,StackStorm/st2,alfasin/st2,nzlosh/st2,peak6/st2,armab/st2,armab/st2,grengojbo/st2,grengojbo/st2,punalpatel/st2,dennybaa/st2,tonybaloney/st2,StackStorm/st2,emedvedev/st2,Plexxi/st2,punalpatel/st2,nzlosh/st2,peak6/st2,alfasin/st2,peak6/st2,emedvedev/st2,tonybaloney/st2,Plexxi/st2,jtopjian/st2,punalpatel/st2,pinterb/st2,pinterb/st2,Itxaka/st2,jtopjian/st2,armab/st2,lakshmi-kannan/st2 | markdown | ## Code Before:
StackStorm
============

**StackStorm** is a platform for integration and automation across services and tools, taking actions in response to events. Learn more at [www.stackstorm.com](http://www.stackstorm.com/product).
## Documentation
Please refer to [StackStorm Docs](http://docs.stackstorm.com).
## Hacking
To set up dev environment and run StackStorm from sources, follow [these instructions](docs/source/install/sources.rst).
## Copyright, License, and Contributors Agreement
<br>Copyright 2014 StackStorm, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this work except in compliance with the License. You may obtain a copy of the License in the [LICENSE](LICENSE) file, or at:
[http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)
By contributing you agree that these contributions are your own (or approved by your employer) and you grant a full, complete, irrevocable copyright license to all users and developers of the project, present and future, pursuant to the license of the project.
## Instruction:
Make logo link to the homepage.
## Code After:
[](http://www.stackstorm.com)
**StackStorm** is a platform for integration and automation across services and tools, taking actions in response to events. Learn more at [www.stackstorm.com](http://www.stackstorm.com/product).
## Documentation
Please refer to [StackStorm Docs](http://docs.stackstorm.com).
## Hacking
To set up dev environment and run StackStorm from sources, follow [these instructions](docs/source/install/sources.rst).
## Copyright, License, and Contributors Agreement
<br>Copyright 2014 StackStorm, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this work except in compliance with the License. You may obtain a copy of the License in the [LICENSE](LICENSE) file, or at:
[http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)
By contributing you agree that these contributions are your own (or approved by your employer) and you grant a full, complete, irrevocable copyright license to all users and developers of the project, present and future, pursuant to the license of the project.
| +
- StackStorm
- ============
- 
+ [](http://www.stackstorm.com)
? + ++++++++++++++++++++++++++++
**StackStorm** is a platform for integration and automation across services and tools, taking actions in response to events. Learn more at [www.stackstorm.com](http://www.stackstorm.com/product).
## Documentation
Please refer to [StackStorm Docs](http://docs.stackstorm.com).
## Hacking
To set up dev environment and run StackStorm from sources, follow [these instructions](docs/source/install/sources.rst).
## Copyright, License, and Contributors Agreement
<br>Copyright 2014 StackStorm, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this work except in compliance with the License. You may obtain a copy of the License in the [LICENSE](LICENSE) file, or at:
[http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)
By contributing you agree that these contributions are your own (or approved by your employer) and you grant a full, complete, irrevocable copyright license to all users and developers of the project, present and future, pursuant to the license of the project. | 5 | 0.25 | 2 | 3 |
84571a1f4bc547e45501a5b4aa73dcadde25b980 | src/vm.rs | src/vm.rs | type Cell = u8;
pub struct VM {
cells: [Cell; 30_000],
data_pointer: usize,
}
impl VM {
pub fn new() -> VM {
VM { cells: [0; 30_000], data_pointer: 0 }
}
pub fn output(&self) -> Cell {
self.cells[self.data_pointer]
}
pub fn increment(&mut self) {
let value = self.cells[self.data_pointer];
self.cells[self.data_pointer] = value + 1;
}
pub fn decrement(&mut self) {
self.cells[self.data_pointer] = self.cells[self.data_pointer] - 1;
}
pub fn right_shift(&mut self) {
self.data_pointer = self.data_pointer + 1;
}
pub fn left_shift(&mut self) {
self.data_pointer = self.data_pointer - 1;
}
}
| type Cell = u8;
pub struct VM {
cells: [Cell; 30_000],
data_pointer: usize,
}
impl VM {
pub fn new() -> VM {
VM { cells: [0; 30_000], data_pointer: 0 }
}
pub fn output(&self) -> Cell {
self.cells[self.data_pointer]
}
pub fn increment(&mut self) {
self.cells[self.data_pointer] = self.cells[self.data_pointer] + 1;
}
pub fn decrement(&mut self) {
self.cells[self.data_pointer] = self.cells[self.data_pointer] - 1;
}
pub fn right_shift(&mut self) {
self.data_pointer = self.data_pointer + 1;
}
pub fn left_shift(&mut self) {
self.data_pointer = self.data_pointer - 1;
}
}
| Simplify definition of increment function | Simplify definition of increment function
| Rust | mit | nafarlee/thoughtfuck | rust | ## Code Before:
type Cell = u8;
pub struct VM {
cells: [Cell; 30_000],
data_pointer: usize,
}
impl VM {
pub fn new() -> VM {
VM { cells: [0; 30_000], data_pointer: 0 }
}
pub fn output(&self) -> Cell {
self.cells[self.data_pointer]
}
pub fn increment(&mut self) {
let value = self.cells[self.data_pointer];
self.cells[self.data_pointer] = value + 1;
}
pub fn decrement(&mut self) {
self.cells[self.data_pointer] = self.cells[self.data_pointer] - 1;
}
pub fn right_shift(&mut self) {
self.data_pointer = self.data_pointer + 1;
}
pub fn left_shift(&mut self) {
self.data_pointer = self.data_pointer - 1;
}
}
## Instruction:
Simplify definition of increment function
## Code After:
type Cell = u8;
pub struct VM {
cells: [Cell; 30_000],
data_pointer: usize,
}
impl VM {
pub fn new() -> VM {
VM { cells: [0; 30_000], data_pointer: 0 }
}
pub fn output(&self) -> Cell {
self.cells[self.data_pointer]
}
pub fn increment(&mut self) {
self.cells[self.data_pointer] = self.cells[self.data_pointer] + 1;
}
pub fn decrement(&mut self) {
self.cells[self.data_pointer] = self.cells[self.data_pointer] - 1;
}
pub fn right_shift(&mut self) {
self.data_pointer = self.data_pointer + 1;
}
pub fn left_shift(&mut self) {
self.data_pointer = self.data_pointer - 1;
}
}
| type Cell = u8;
pub struct VM {
cells: [Cell; 30_000],
data_pointer: usize,
}
impl VM {
pub fn new() -> VM {
VM { cells: [0; 30_000], data_pointer: 0 }
}
pub fn output(&self) -> Cell {
self.cells[self.data_pointer]
}
pub fn increment(&mut self) {
- let value = self.cells[self.data_pointer];
- self.cells[self.data_pointer] = value + 1;
? ^ ^^
+ self.cells[self.data_pointer] = self.cells[self.data_pointer] + 1;
? ^^^^^^^^^^^^^^^^^ ^^^^^^^^ ++
}
pub fn decrement(&mut self) {
self.cells[self.data_pointer] = self.cells[self.data_pointer] - 1;
}
pub fn right_shift(&mut self) {
self.data_pointer = self.data_pointer + 1;
}
pub fn left_shift(&mut self) {
self.data_pointer = self.data_pointer - 1;
}
} | 3 | 0.076923 | 1 | 2 |
06197a9bacebc612cb3d0b1f37b58e692990f801 | .github/workflows/workflow.yaml | .github/workflows/workflow.yaml | name: CI
on:
pull_request:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [8.x, 10.x, 12.x, 14.x]
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: pre-build
run: npm install && npx bower install
- name: build
run: npx gulp dev:build && npx gulp prod:build
- name: deploy
if: github.event_name == 'push' && matrix.node-version == '8.x'
run: |
python -m pip install --upgrade pip
pip install ghp-import
ghp-import -n dist/dev
git push -fq https://${GITHUB_TOKEN}@github.com/AzHicham/navitia-playground.git gh-pages
| name: CI
on:
pull_request:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
# We deploy with Node 8.x ! We test with Node 14.x for futur upgrade
node-version: [8.x, 14.x]
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: pre-build
run: npm install && npx bower install
- name: build
run: npx gulp dev:build && npx gulp prod:build
- name: deploy
if: github.event_name == 'push' && matrix.node-version == '8.x'
run: |
python -m pip install --upgrade pip
pip install ghp-import
ghp-import -n dist/dev
git push -fq https://${GITHUB_TOKEN}@github.com/AzHicham/navitia-playground.git gh-pages
| Remove Node 10 and 12 | Remove Node 10 and 12
| YAML | mit | CanalTP/navitia-playground,CanalTP/navitia-playground | yaml | ## Code Before:
name: CI
on:
pull_request:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [8.x, 10.x, 12.x, 14.x]
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: pre-build
run: npm install && npx bower install
- name: build
run: npx gulp dev:build && npx gulp prod:build
- name: deploy
if: github.event_name == 'push' && matrix.node-version == '8.x'
run: |
python -m pip install --upgrade pip
pip install ghp-import
ghp-import -n dist/dev
git push -fq https://${GITHUB_TOKEN}@github.com/AzHicham/navitia-playground.git gh-pages
## Instruction:
Remove Node 10 and 12
## Code After:
name: CI
on:
pull_request:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
# We deploy with Node 8.x ! We test with Node 14.x for futur upgrade
node-version: [8.x, 14.x]
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: pre-build
run: npm install && npx bower install
- name: build
run: npx gulp dev:build && npx gulp prod:build
- name: deploy
if: github.event_name == 'push' && matrix.node-version == '8.x'
run: |
python -m pip install --upgrade pip
pip install ghp-import
ghp-import -n dist/dev
git push -fq https://${GITHUB_TOKEN}@github.com/AzHicham/navitia-playground.git gh-pages
| name: CI
on:
pull_request:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
+ # We deploy with Node 8.x ! We test with Node 14.x for futur upgrade
- node-version: [8.x, 10.x, 12.x, 14.x]
? ------------
+ node-version: [8.x, 14.x]
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: pre-build
run: npm install && npx bower install
- name: build
run: npx gulp dev:build && npx gulp prod:build
- name: deploy
if: github.event_name == 'push' && matrix.node-version == '8.x'
run: |
python -m pip install --upgrade pip
pip install ghp-import
ghp-import -n dist/dev
git push -fq https://${GITHUB_TOKEN}@github.com/AzHicham/navitia-playground.git gh-pages | 3 | 0.069767 | 2 | 1 |
0892df4f9306ddee39e7b1bc58fc456636fb3277 | app/styles/ui/_foldout-list.scss | app/styles/ui/_foldout-list.scss | @import '../mixins';
.foldout-list {
height: 100%;
display: flex;
flex-direction: row;
.foldout-list-contents {
display: flex;
flex-direction: column;
flex: 1;
min-width: inherit;
border-right: var(--box-border-color);
border-right-width: 1px;
border-right-style: solid;
.filter-field {
padding-left: var(--spacing);
padding-right: var(--spacing);
}
}
}
| @import '../mixins';
.foldout-list {
height: 100%;
display: flex;
flex-direction: row;
.foldout-list-contents {
display: flex;
flex-direction: column;
flex: 1;
min-width: inherit;
border-right: var(--box-border-color);
border-right-width: 1px;
border-right-style: solid;
.filter-field {
padding-left: var(--spacing);
padding-right: var(--spacing);
padding-bottom: var(--spacing);
}
}
}
| Add some padding below the filter | Add some padding below the filter
| SCSS | mit | artivilla/desktop,gengjiawen/desktop,desktop/desktop,BugTesterTest/desktops,shiftkey/desktop,kactus-io/kactus,shiftkey/desktop,artivilla/desktop,artivilla/desktop,shiftkey/desktop,artivilla/desktop,kactus-io/kactus,desktop/desktop,j-f1/forked-desktop,say25/desktop,hjobrien/desktop,say25/desktop,gengjiawen/desktop,BugTesterTest/desktops,desktop/desktop,BugTesterTest/desktops,gengjiawen/desktop,kactus-io/kactus,shiftkey/desktop,say25/desktop,desktop/desktop,say25/desktop,j-f1/forked-desktop,hjobrien/desktop,BugTesterTest/desktops,hjobrien/desktop,kactus-io/kactus,j-f1/forked-desktop,hjobrien/desktop,gengjiawen/desktop,j-f1/forked-desktop | scss | ## Code Before:
@import '../mixins';
.foldout-list {
height: 100%;
display: flex;
flex-direction: row;
.foldout-list-contents {
display: flex;
flex-direction: column;
flex: 1;
min-width: inherit;
border-right: var(--box-border-color);
border-right-width: 1px;
border-right-style: solid;
.filter-field {
padding-left: var(--spacing);
padding-right: var(--spacing);
}
}
}
## Instruction:
Add some padding below the filter
## Code After:
@import '../mixins';
.foldout-list {
height: 100%;
display: flex;
flex-direction: row;
.foldout-list-contents {
display: flex;
flex-direction: column;
flex: 1;
min-width: inherit;
border-right: var(--box-border-color);
border-right-width: 1px;
border-right-style: solid;
.filter-field {
padding-left: var(--spacing);
padding-right: var(--spacing);
padding-bottom: var(--spacing);
}
}
}
| @import '../mixins';
.foldout-list {
height: 100%;
display: flex;
flex-direction: row;
.foldout-list-contents {
display: flex;
flex-direction: column;
flex: 1;
min-width: inherit;
border-right: var(--box-border-color);
border-right-width: 1px;
border-right-style: solid;
.filter-field {
padding-left: var(--spacing);
padding-right: var(--spacing);
+ padding-bottom: var(--spacing);
}
}
} | 1 | 0.041667 | 1 | 0 |
4edb58841c53e454302174aaf4f5d7eedeca2390 | src/services/vuestic-ui/global-config.ts | src/services/vuestic-ui/global-config.ts | import VaIcon from './components/va-icon'
import VaToast from './components/va-toast'
import VaButton from './components/va-button'
import iconsConfig from './icons-config/icons-config'
import { COLOR_THEMES } from './themes'
export default {
components: {
VaIcon,
VaToast,
VaButton,
},
colors: COLOR_THEMES[0].colors,
icons: iconsConfig
}
| import VaIcon from './components/va-icon'
import VaToast from './components/va-toast'
import VaButton from './components/va-button'
import iconsConfig from './icons-config/icons-config'
import { COLOR_THEMES } from './themes'
export default {
components: {
VaIcon,
VaToast,
VaButton,
...COLOR_THEMES[0].components
},
colors: COLOR_THEMES[0].colors,
icons: iconsConfig
}
| Set Navbar and Sidebar color from theme before render. | Set Navbar and Sidebar color from theme before render.
| TypeScript | mit | epicmaxco/vuestic-admin,epicmaxco/vuestic-admin,epicmaxco/vuestic-admin,epicmaxco/vuestic-admin | typescript | ## Code Before:
import VaIcon from './components/va-icon'
import VaToast from './components/va-toast'
import VaButton from './components/va-button'
import iconsConfig from './icons-config/icons-config'
import { COLOR_THEMES } from './themes'
export default {
components: {
VaIcon,
VaToast,
VaButton,
},
colors: COLOR_THEMES[0].colors,
icons: iconsConfig
}
## Instruction:
Set Navbar and Sidebar color from theme before render.
## Code After:
import VaIcon from './components/va-icon'
import VaToast from './components/va-toast'
import VaButton from './components/va-button'
import iconsConfig from './icons-config/icons-config'
import { COLOR_THEMES } from './themes'
export default {
components: {
VaIcon,
VaToast,
VaButton,
...COLOR_THEMES[0].components
},
colors: COLOR_THEMES[0].colors,
icons: iconsConfig
}
| import VaIcon from './components/va-icon'
import VaToast from './components/va-toast'
import VaButton from './components/va-button'
import iconsConfig from './icons-config/icons-config'
import { COLOR_THEMES } from './themes'
export default {
components: {
VaIcon,
VaToast,
VaButton,
+ ...COLOR_THEMES[0].components
},
colors: COLOR_THEMES[0].colors,
icons: iconsConfig
} | 1 | 0.066667 | 1 | 0 |
f61afa4ae436f61ebbbfe4f48f57b18cab1158bd | templates/polls/poll_list.haml | templates/polls/poll_list.haml | -extends "smartmin/list.html"
-load i18n
-block table-buttons
-if view.add_button
<a class="btn btn-primary pull-right" href="./create/">{% trans "Add" %}</a>
-block extra-style
:css
td.field_created_on {
white-space: nowrap;
}
td.field_sync_status {
white-space: nowrap;
}
td.field_category {
white-space: nowrap;
}
td.field_questions {
text-align: center;
}
td.field_featured_responses {
text-align: center;
}
td.field_images {
text-align: center;
} | -extends "smartmin/list.html"
-load i18n
-block table-buttons
-if view.add_button
<a class="btn btn-primary pull-right" href="./create/">{% trans "Add" %}</a>
-block extra-style
:css
td.field_created_on {
white-space: nowrap;
}
td.field_sync_status {
width: 150px;
}
td.field_category {
max-width: 150px;
}
td.field_questions {
text-align: center;
}
td.field_featured_responses {
text-align: center;
}
td.field_images {
text-align: center;
} | Fix poll admin list styles | Fix poll admin list styles
| Haml | agpl-3.0 | rapidpro/ureport,rapidpro/ureport,rapidpro/ureport,Ilhasoft/ureport,rapidpro/ureport,Ilhasoft/ureport,Ilhasoft/ureport,Ilhasoft/ureport | haml | ## Code Before:
-extends "smartmin/list.html"
-load i18n
-block table-buttons
-if view.add_button
<a class="btn btn-primary pull-right" href="./create/">{% trans "Add" %}</a>
-block extra-style
:css
td.field_created_on {
white-space: nowrap;
}
td.field_sync_status {
white-space: nowrap;
}
td.field_category {
white-space: nowrap;
}
td.field_questions {
text-align: center;
}
td.field_featured_responses {
text-align: center;
}
td.field_images {
text-align: center;
}
## Instruction:
Fix poll admin list styles
## Code After:
-extends "smartmin/list.html"
-load i18n
-block table-buttons
-if view.add_button
<a class="btn btn-primary pull-right" href="./create/">{% trans "Add" %}</a>
-block extra-style
:css
td.field_created_on {
white-space: nowrap;
}
td.field_sync_status {
width: 150px;
}
td.field_category {
max-width: 150px;
}
td.field_questions {
text-align: center;
}
td.field_featured_responses {
text-align: center;
}
td.field_images {
text-align: center;
} | -extends "smartmin/list.html"
-load i18n
-block table-buttons
-if view.add_button
<a class="btn btn-primary pull-right" href="./create/">{% trans "Add" %}</a>
-block extra-style
:css
td.field_created_on {
white-space: nowrap;
}
td.field_sync_status {
- white-space: nowrap;
+ width: 150px;
}
td.field_category {
- white-space: nowrap;
+ max-width: 150px;
}
td.field_questions {
text-align: center;
}
td.field_featured_responses {
text-align: center;
}
td.field_images {
text-align: center;
} | 4 | 0.125 | 2 | 2 |
52123ccc36eafdf7d103b61d290d700b8968cece | test/unit/accept.coffee | test/unit/accept.coffee | each frameworks, (framework) ->
module "#{framework} - Accept",
setup: ->
setupFrame this, "/#{framework}.html"
asyncTest "default accept header prefers scripts", ->
@$.ajax
type: 'POST'
url: "/echo"
success: (env) =>
if typeof env is 'string'
env = JSON.parse env
if @win.Zepto?
equal env['HTTP_ACCEPT'], "*/*;q=0.5, text/javascript, application/javascript"
else
equal env['HTTP_ACCEPT'], "*/*;q=0.5, text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
start()
asyncTest "dataType overrides default accept header", ->
@$.ajax
type: 'POST'
url: "/echo"
dataType: 'json'
success: (env) =>
if @win.Zepto?
equal env['HTTP_ACCEPT'], "application/json"
else
equal env['HTTP_ACCEPT'], "application/json, text/javascript, */*; q=0.01"
start()
| each frameworks, (framework) ->
module "#{framework} - Accept",
setup: ->
setupFrame this, "/#{framework}.html"
asyncTest "default accept header prefers scripts", ->
@$.ajax
type: 'POST'
url: "/echo"
success: (env) =>
if typeof env is 'string'
env = JSON.parse env
if @win.Zepto?
equal env['HTTP_ACCEPT'].indexOf("*/*;q=0.5, text/javascript, application/javascript"), 0
else
equal env['HTTP_ACCEPT'], "*/*;q=0.5, text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
start()
asyncTest "dataType overrides default accept header", ->
@$.ajax
type: 'POST'
url: "/echo"
dataType: 'json'
success: (env) =>
if @win.Zepto?
equal env['HTTP_ACCEPT'], "application/json"
else
equal env['HTTP_ACCEPT'], "application/json, text/javascript, */*; q=0.01"
start()
| Fix "Accept" header test for Zepto 1.1.6 | Fix "Accept" header test for Zepto 1.1.6
The "Accept" header values differ slightly between Zepto 1.0 and 1.1,
but they start with the same string.
| CoffeeScript | mit | josh/rails-behaviors,josh/rails-behaviors,josh/rails-behaviors,josh/rails-behaviors | coffeescript | ## Code Before:
each frameworks, (framework) ->
module "#{framework} - Accept",
setup: ->
setupFrame this, "/#{framework}.html"
asyncTest "default accept header prefers scripts", ->
@$.ajax
type: 'POST'
url: "/echo"
success: (env) =>
if typeof env is 'string'
env = JSON.parse env
if @win.Zepto?
equal env['HTTP_ACCEPT'], "*/*;q=0.5, text/javascript, application/javascript"
else
equal env['HTTP_ACCEPT'], "*/*;q=0.5, text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
start()
asyncTest "dataType overrides default accept header", ->
@$.ajax
type: 'POST'
url: "/echo"
dataType: 'json'
success: (env) =>
if @win.Zepto?
equal env['HTTP_ACCEPT'], "application/json"
else
equal env['HTTP_ACCEPT'], "application/json, text/javascript, */*; q=0.01"
start()
## Instruction:
Fix "Accept" header test for Zepto 1.1.6
The "Accept" header values differ slightly between Zepto 1.0 and 1.1,
but they start with the same string.
## Code After:
each frameworks, (framework) ->
module "#{framework} - Accept",
setup: ->
setupFrame this, "/#{framework}.html"
asyncTest "default accept header prefers scripts", ->
@$.ajax
type: 'POST'
url: "/echo"
success: (env) =>
if typeof env is 'string'
env = JSON.parse env
if @win.Zepto?
equal env['HTTP_ACCEPT'].indexOf("*/*;q=0.5, text/javascript, application/javascript"), 0
else
equal env['HTTP_ACCEPT'], "*/*;q=0.5, text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
start()
asyncTest "dataType overrides default accept header", ->
@$.ajax
type: 'POST'
url: "/echo"
dataType: 'json'
success: (env) =>
if @win.Zepto?
equal env['HTTP_ACCEPT'], "application/json"
else
equal env['HTTP_ACCEPT'], "application/json, text/javascript, */*; q=0.01"
start()
| each frameworks, (framework) ->
module "#{framework} - Accept",
setup: ->
setupFrame this, "/#{framework}.html"
asyncTest "default accept header prefers scripts", ->
@$.ajax
type: 'POST'
url: "/echo"
success: (env) =>
if typeof env is 'string'
env = JSON.parse env
if @win.Zepto?
- equal env['HTTP_ACCEPT'], "*/*;q=0.5, text/javascript, application/javascript"
? ^^
+ equal env['HTTP_ACCEPT'].indexOf("*/*;q=0.5, text/javascript, application/javascript"), 0
? ^^^^^^^^^ ++++
else
equal env['HTTP_ACCEPT'], "*/*;q=0.5, text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
start()
asyncTest "dataType overrides default accept header", ->
@$.ajax
type: 'POST'
url: "/echo"
dataType: 'json'
success: (env) =>
if @win.Zepto?
equal env['HTTP_ACCEPT'], "application/json"
else
equal env['HTTP_ACCEPT'], "application/json, text/javascript, */*; q=0.01"
start() | 2 | 0.066667 | 1 | 1 |
7bee4652421740029b3f9e20842ed6524510aff6 | README.md | README.md | 


# Code Test Bot Server
The API server for the Code Test Bot application.
### Installing
##### System Dependencies
- Ruby 2.1.1
- PostgreSQL
##### Bundler
User Bundler to install Gem dependencies.
```sh
bundle install
```
##### Database
You'll need to create a `codetestbot` role for Postgres (-d gives permission to create databases).
```sh
createuser -d codetestbot
```
Note that before you can run the `createuser` script, you'll need to have created at least one Postgres database using `createdb`.
Then you can run Rake to create and seed the database.
```sh
bundle exec rake db:create db:migrate db:seed RAILS_ENV=development
bundle exec rake db:create db:migrate RAILS_ENV=test
```
Note that `db:seed` is not called for the test environment, since rspec calls it prior to running each test.
##### Running Tests
Once the test DB is setup, you should be able to run the tests with RSpec.
```sh
bundle exec rspec
```
| [](https://travis-ci.org/cyrusinnovation/CodeTestBotServer)
[](https://codeclimate.com/github/cyrusinnovation/CodeTestBotServer)
[](https://coveralls.io/repos/cyrusinnovation/CodeTestBotServer)
# Code Test Bot Server
The API server for the Code Test Bot application.
### Installing
##### System Dependencies
- Ruby 2.1.1
- PostgreSQL
##### Bundler
User Bundler to install Gem dependencies.
```sh
bundle install
```
##### Database
You'll need to create a `codetestbot` role for Postgres (-d gives permission to create databases).
```sh
createuser -d codetestbot
```
Note that before you can run the `createuser` script, you'll need to have created at least one Postgres database using `createdb`.
Then you can run Rake to create and seed the database.
```sh
bundle exec rake db:create db:migrate db:seed RAILS_ENV=development
bundle exec rake db:create db:migrate RAILS_ENV=test
```
Note that `db:seed` is not called for the test environment, since rspec calls it prior to running each test.
##### Running Tests
Once the test DB is setup, you should be able to run the tests with RSpec.
```sh
bundle exec rspec
```
| Make badges links to the respective services. | Make badges links to the respective services.
| Markdown | mit | cyrusinnovation/CodeTestBotServer,cyrusinnovation/CodeTestBotServer,cyrusinnovation/CodeTestBotServer | markdown | ## Code Before:



# Code Test Bot Server
The API server for the Code Test Bot application.
### Installing
##### System Dependencies
- Ruby 2.1.1
- PostgreSQL
##### Bundler
User Bundler to install Gem dependencies.
```sh
bundle install
```
##### Database
You'll need to create a `codetestbot` role for Postgres (-d gives permission to create databases).
```sh
createuser -d codetestbot
```
Note that before you can run the `createuser` script, you'll need to have created at least one Postgres database using `createdb`.
Then you can run Rake to create and seed the database.
```sh
bundle exec rake db:create db:migrate db:seed RAILS_ENV=development
bundle exec rake db:create db:migrate RAILS_ENV=test
```
Note that `db:seed` is not called for the test environment, since rspec calls it prior to running each test.
##### Running Tests
Once the test DB is setup, you should be able to run the tests with RSpec.
```sh
bundle exec rspec
```
## Instruction:
Make badges links to the respective services.
## Code After:
[](https://travis-ci.org/cyrusinnovation/CodeTestBotServer)
[](https://codeclimate.com/github/cyrusinnovation/CodeTestBotServer)
[](https://coveralls.io/repos/cyrusinnovation/CodeTestBotServer)
# Code Test Bot Server
The API server for the Code Test Bot application.
### Installing
##### System Dependencies
- Ruby 2.1.1
- PostgreSQL
##### Bundler
User Bundler to install Gem dependencies.
```sh
bundle install
```
##### Database
You'll need to create a `codetestbot` role for Postgres (-d gives permission to create databases).
```sh
createuser -d codetestbot
```
Note that before you can run the `createuser` script, you'll need to have created at least one Postgres database using `createdb`.
Then you can run Rake to create and seed the database.
```sh
bundle exec rake db:create db:migrate db:seed RAILS_ENV=development
bundle exec rake db:create db:migrate RAILS_ENV=test
```
Note that `db:seed` is not called for the test environment, since rspec calls it prior to running each test.
##### Running Tests
Once the test DB is setup, you should be able to run the tests with RSpec.
```sh
bundle exec rspec
```
| - 
+ [](https://travis-ci.org/cyrusinnovation/CodeTestBotServer)
? + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- 
- 
+ [](https://codeclimate.com/github/cyrusinnovation/CodeTestBotServer)
+ [](https://coveralls.io/repos/cyrusinnovation/CodeTestBotServer)
# Code Test Bot Server
The API server for the Code Test Bot application.
### Installing
##### System Dependencies
- Ruby 2.1.1
- PostgreSQL
##### Bundler
User Bundler to install Gem dependencies.
```sh
bundle install
```
##### Database
You'll need to create a `codetestbot` role for Postgres (-d gives permission to create databases).
```sh
createuser -d codetestbot
```
Note that before you can run the `createuser` script, you'll need to have created at least one Postgres database using `createdb`.
Then you can run Rake to create and seed the database.
```sh
bundle exec rake db:create db:migrate db:seed RAILS_ENV=development
bundle exec rake db:create db:migrate RAILS_ENV=test
```
Note that `db:seed` is not called for the test environment, since rspec calls it prior to running each test.
##### Running Tests
Once the test DB is setup, you should be able to run the tests with RSpec.
```sh
bundle exec rspec
``` | 6 | 0.146341 | 3 | 3 |
65b7d1f1eafd32d3895e3ec15a559dca608b5c23 | addons/sale_coupon/models/mail_compose_message.py | addons/sale_coupon/models/mail_compose_message.py |
from odoo import models
class MailComposeMessage(models.TransientModel):
_inherit = 'mail.compose.message'
def send_mail(self, **kwargs):
for wizard in self:
if self._context.get('mark_coupon_as_sent') and wizard.model == 'sale.coupon' and wizard.partner_ids:
self.env[wizard.model].browse(wizard.res_id).state = 'sent'
return super().send_mail(**kwargs)
|
from odoo import models
class MailComposeMessage(models.TransientModel):
_inherit = 'mail.compose.message'
def send_mail(self, **kwargs):
for wizard in self:
if self._context.get('mark_coupon_as_sent') and wizard.model == 'sale.coupon' and wizard.partner_ids:
# Mark coupon as sent in sudo, as helpdesk users don't have the right to write on coupons
self.env[wizard.model].sudo().browse(wizard.res_id).state = 'sent'
return super().send_mail(**kwargs)
| Allow helpdesk users to send coupon by email | [IMP] sale_coupon: Allow helpdesk users to send coupon by email
Purpose
=======
Helpdesk users don't have the right to write on a coupon.
When sending a coupon by email, the coupon is marked as 'sent'.
Allow users to send coupons by executing the state change in sudo.
closes odoo/odoo#45091
Taskid: 2179609
Related: odoo/enterprise#8143
Signed-off-by: Yannick Tivisse (yti) <200a91eb0e5cc4726d6a3430713b580138f34298@odoo.com>
| Python | agpl-3.0 | ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo | python | ## Code Before:
from odoo import models
class MailComposeMessage(models.TransientModel):
_inherit = 'mail.compose.message'
def send_mail(self, **kwargs):
for wizard in self:
if self._context.get('mark_coupon_as_sent') and wizard.model == 'sale.coupon' and wizard.partner_ids:
self.env[wizard.model].browse(wizard.res_id).state = 'sent'
return super().send_mail(**kwargs)
## Instruction:
[IMP] sale_coupon: Allow helpdesk users to send coupon by email
Purpose
=======
Helpdesk users don't have the right to write on a coupon.
When sending a coupon by email, the coupon is marked as 'sent'.
Allow users to send coupons by executing the state change in sudo.
closes odoo/odoo#45091
Taskid: 2179609
Related: odoo/enterprise#8143
Signed-off-by: Yannick Tivisse (yti) <200a91eb0e5cc4726d6a3430713b580138f34298@odoo.com>
## Code After:
from odoo import models
class MailComposeMessage(models.TransientModel):
_inherit = 'mail.compose.message'
def send_mail(self, **kwargs):
for wizard in self:
if self._context.get('mark_coupon_as_sent') and wizard.model == 'sale.coupon' and wizard.partner_ids:
# Mark coupon as sent in sudo, as helpdesk users don't have the right to write on coupons
self.env[wizard.model].sudo().browse(wizard.res_id).state = 'sent'
return super().send_mail(**kwargs)
|
from odoo import models
class MailComposeMessage(models.TransientModel):
_inherit = 'mail.compose.message'
def send_mail(self, **kwargs):
for wizard in self:
if self._context.get('mark_coupon_as_sent') and wizard.model == 'sale.coupon' and wizard.partner_ids:
+ # Mark coupon as sent in sudo, as helpdesk users don't have the right to write on coupons
- self.env[wizard.model].browse(wizard.res_id).state = 'sent'
+ self.env[wizard.model].sudo().browse(wizard.res_id).state = 'sent'
? +++++++
return super().send_mail(**kwargs) | 3 | 0.25 | 2 | 1 |
eac857f80e66664a65566294e479034ff9dcac1d | .travis.yml | .travis.yml | sudo: false
language: php
php:
- 5.3.3
- 5.3
- 5.4
- 5.5
- 5.6
- hhvm
env:
global:
secure: xE4epwGRaSy7FlkjckXvyApeWqtRtKxQOAlLpNGgXe2ba7tBRGZCXvAVyrlr0jcV1shWhR89K3/kPCGHyR/gdBiQzyZgREdE08bdkq6x+i+Hk3hIgH3CickhMT7ls3C0NDoZiTN46MPRYJNhmKjahpHk5DiyEGE86D9w0/lUfbw=
before_script:
- composer install --dev --prefer-source
script:
- phpunit --coverage-text --coverage-clover build/logs/clover.xml
after_script:
- ./vendor/bin/test-reporter --stdout > build/logs/coverage.json
- "curl -X POST -d @build/logs/coverage.json -H 'Content-Type: application/json' -H 'User-Agent: Code Climate (PHP Test Reporter v1.0.1-dev)' https://codeclimate.com/test_reports"
| sudo: false
language: php
php:
- 5.3
- 5.4
- 5.5
- 5.6
- hhvm
env:
global:
secure: xE4epwGRaSy7FlkjckXvyApeWqtRtKxQOAlLpNGgXe2ba7tBRGZCXvAVyrlr0jcV1shWhR89K3/kPCGHyR/gdBiQzyZgREdE08bdkq6x+i+Hk3hIgH3CickhMT7ls3C0NDoZiTN46MPRYJNhmKjahpHk5DiyEGE86D9w0/lUfbw=
before_script:
- composer install --dev --prefer-source
script:
- phpunit --coverage-text --coverage-clover build/logs/clover.xml
after_script:
- ./vendor/bin/test-reporter --stdout > build/logs/coverage.json
- "curl -X POST -d @build/logs/coverage.json -H 'Content-Type: application/json' -H 'User-Agent: Code Climate (PHP Test Reporter v1.0.1-dev)' https://codeclimate.com/test_reports"
| Fix PHP 5.3.3 openssl issue. | Fix PHP 5.3.3 openssl issue.
| YAML | mit | tableau-mkt/elomentary | yaml | ## Code Before:
sudo: false
language: php
php:
- 5.3.3
- 5.3
- 5.4
- 5.5
- 5.6
- hhvm
env:
global:
secure: xE4epwGRaSy7FlkjckXvyApeWqtRtKxQOAlLpNGgXe2ba7tBRGZCXvAVyrlr0jcV1shWhR89K3/kPCGHyR/gdBiQzyZgREdE08bdkq6x+i+Hk3hIgH3CickhMT7ls3C0NDoZiTN46MPRYJNhmKjahpHk5DiyEGE86D9w0/lUfbw=
before_script:
- composer install --dev --prefer-source
script:
- phpunit --coverage-text --coverage-clover build/logs/clover.xml
after_script:
- ./vendor/bin/test-reporter --stdout > build/logs/coverage.json
- "curl -X POST -d @build/logs/coverage.json -H 'Content-Type: application/json' -H 'User-Agent: Code Climate (PHP Test Reporter v1.0.1-dev)' https://codeclimate.com/test_reports"
## Instruction:
Fix PHP 5.3.3 openssl issue.
## Code After:
sudo: false
language: php
php:
- 5.3
- 5.4
- 5.5
- 5.6
- hhvm
env:
global:
secure: xE4epwGRaSy7FlkjckXvyApeWqtRtKxQOAlLpNGgXe2ba7tBRGZCXvAVyrlr0jcV1shWhR89K3/kPCGHyR/gdBiQzyZgREdE08bdkq6x+i+Hk3hIgH3CickhMT7ls3C0NDoZiTN46MPRYJNhmKjahpHk5DiyEGE86D9w0/lUfbw=
before_script:
- composer install --dev --prefer-source
script:
- phpunit --coverage-text --coverage-clover build/logs/clover.xml
after_script:
- ./vendor/bin/test-reporter --stdout > build/logs/coverage.json
- "curl -X POST -d @build/logs/coverage.json -H 'Content-Type: application/json' -H 'User-Agent: Code Climate (PHP Test Reporter v1.0.1-dev)' https://codeclimate.com/test_reports"
| sudo: false
language: php
php:
- - 5.3.3
- 5.3
- 5.4
- 5.5
- 5.6
- hhvm
env:
global:
secure: xE4epwGRaSy7FlkjckXvyApeWqtRtKxQOAlLpNGgXe2ba7tBRGZCXvAVyrlr0jcV1shWhR89K3/kPCGHyR/gdBiQzyZgREdE08bdkq6x+i+Hk3hIgH3CickhMT7ls3C0NDoZiTN46MPRYJNhmKjahpHk5DiyEGE86D9w0/lUfbw=
before_script:
- composer install --dev --prefer-source
script:
- phpunit --coverage-text --coverage-clover build/logs/clover.xml
after_script:
- ./vendor/bin/test-reporter --stdout > build/logs/coverage.json
- "curl -X POST -d @build/logs/coverage.json -H 'Content-Type: application/json' -H 'User-Agent: Code Climate (PHP Test Reporter v1.0.1-dev)' https://codeclimate.com/test_reports" | 1 | 0.04 | 0 | 1 |
e30eeaefc10d07c66f946f77f024880429175e15 | README.md | README.md |
* License: LGPL 2.1
* © Estonian Information System Authority
## Building
Note: currently only supports Linux (Debian derivatives).
[](https://travis-ci.org/open-eid/chrome-token-signing)
[](https://scan.coverity.com/projects/2449)
1. Install dependencies
sudo apt-get install libgtkmm-3.0-dev libssl-dev Xvfb google-chrome
2. Fetch the source
git clone --recursive https://github.com/open-eid/chrome-token-signing
cd chrome-token-signing
3. Build
make
4. Test
make test
5. Install
sudo make install
* Then go to `chrome://extensions` in and press "Load unpacked extensions..."
* Technical testing: https://www.openxades.org/web_sign_demo/sign.html
## Support
Official builds are provided through official distribution point [installer.id.ee](https://installer.id.ee). If you want support, you need to be using official builds.
Source code is provided on "as is" terms with no warranty (see license for more information). Do not file Github issues with generic support requests.
Contact for assistance by email abi@id.ee or http://www.id.ee
|
**Now available from [Chrome Web Store](https://chrome.google.com/webstore/detail/ckjefchnfjhjfedoccjbhjpbncimppeg)**
* License: LGPL 2.1
* © Estonian Information System Authority
## Building
Note: currently only supports Linux (Debian derivatives).
[](https://travis-ci.org/open-eid/chrome-token-signing)
[](https://scan.coverity.com/projects/2449)
1. Install dependencies
sudo apt-get install libgtkmm-3.0-dev libssl-dev
2. Fetch the source
git clone --recursive https://github.com/open-eid/chrome-token-signing
cd chrome-token-signing
3. Build
make
## Support
Official builds are provided through official distribution point [installer.id.ee](https://installer.id.ee). If you want support, you need to be using official builds.
Source code is provided on "as is" terms with no warranty (see license for more information). Do not file Github issues with generic support requests.
Contact for assistance by email abi@id.ee or http://www.id.ee
| Update the reademe a bit. | Update the reademe a bit.
| Markdown | lgpl-2.1 | metsma/chrome-token-signing,fabiorusso/chrome-token-signing,metsma/chrome-token-signing,open-eid/chrome-token-signing,open-eid/chrome-token-signing,fabiorusso/chrome-token-signing,metsma/chrome-token-signing,cristiano-andrade/chrome-token-signing,cristiano-andrade/chrome-token-signing,open-eid/chrome-token-signing,metsma/chrome-token-signing,cristiano-andrade/chrome-token-signing,open-eid/chrome-token-signing,fabiorusso/chrome-token-signing,open-eid/chrome-token-signing,fabiorusso/chrome-token-signing,cristiano-andrade/chrome-token-signing,metsma/chrome-token-signing | markdown | ## Code Before:
* License: LGPL 2.1
* © Estonian Information System Authority
## Building
Note: currently only supports Linux (Debian derivatives).
[](https://travis-ci.org/open-eid/chrome-token-signing)
[](https://scan.coverity.com/projects/2449)
1. Install dependencies
sudo apt-get install libgtkmm-3.0-dev libssl-dev Xvfb google-chrome
2. Fetch the source
git clone --recursive https://github.com/open-eid/chrome-token-signing
cd chrome-token-signing
3. Build
make
4. Test
make test
5. Install
sudo make install
* Then go to `chrome://extensions` in and press "Load unpacked extensions..."
* Technical testing: https://www.openxades.org/web_sign_demo/sign.html
## Support
Official builds are provided through official distribution point [installer.id.ee](https://installer.id.ee). If you want support, you need to be using official builds.
Source code is provided on "as is" terms with no warranty (see license for more information). Do not file Github issues with generic support requests.
Contact for assistance by email abi@id.ee or http://www.id.ee
## Instruction:
Update the reademe a bit.
## Code After:
**Now available from [Chrome Web Store](https://chrome.google.com/webstore/detail/ckjefchnfjhjfedoccjbhjpbncimppeg)**
* License: LGPL 2.1
* © Estonian Information System Authority
## Building
Note: currently only supports Linux (Debian derivatives).
[](https://travis-ci.org/open-eid/chrome-token-signing)
[](https://scan.coverity.com/projects/2449)
1. Install dependencies
sudo apt-get install libgtkmm-3.0-dev libssl-dev
2. Fetch the source
git clone --recursive https://github.com/open-eid/chrome-token-signing
cd chrome-token-signing
3. Build
make
## Support
Official builds are provided through official distribution point [installer.id.ee](https://installer.id.ee). If you want support, you need to be using official builds.
Source code is provided on "as is" terms with no warranty (see license for more information). Do not file Github issues with generic support requests.
Contact for assistance by email abi@id.ee or http://www.id.ee
| +
+ **Now available from [Chrome Web Store](https://chrome.google.com/webstore/detail/ckjefchnfjhjfedoccjbhjpbncimppeg)**
* License: LGPL 2.1
* © Estonian Information System Authority
## Building
Note: currently only supports Linux (Debian derivatives).
[](https://travis-ci.org/open-eid/chrome-token-signing)
[](https://scan.coverity.com/projects/2449)
1. Install dependencies
- sudo apt-get install libgtkmm-3.0-dev libssl-dev Xvfb google-chrome
? -------------------
+ sudo apt-get install libgtkmm-3.0-dev libssl-dev
2. Fetch the source
git clone --recursive https://github.com/open-eid/chrome-token-signing
cd chrome-token-signing
+
3. Build
make
-
- 4. Test
-
- make test
-
- 5. Install
-
- sudo make install
-
- * Then go to `chrome://extensions` in and press "Load unpacked extensions..."
- * Technical testing: https://www.openxades.org/web_sign_demo/sign.html
## Support
Official builds are provided through official distribution point [installer.id.ee](https://installer.id.ee). If you want support, you need to be using official builds.
Source code is provided on "as is" terms with no warranty (see license for more information). Do not file Github issues with generic support requests.
Contact for assistance by email abi@id.ee or http://www.id.ee | 16 | 0.421053 | 4 | 12 |
2b08465f8132e145c6c3026d14f49a90ae4b4584 | ImageCache/Sources/Classes/DiskCache.swift | ImageCache/Sources/Classes/DiskCache.swift | //
// DiskCache.swift
// ImageCache
//
// Created by Julian Grosshauser on 27/06/15.
// Copyright © 2015 Julian Grosshauser. All rights reserved.
//
/**
Caches data on disk asynchronously
*/
public class DiskCache {
}
| //
// DiskCache.swift
// ImageCache
//
// Created by Julian Grosshauser on 27/06/15.
// Copyright © 2015 Julian Grosshauser. All rights reserved.
//
/**
Caches data on disk asynchronously
*/
public class DiskCache {
//MARK: Properties
/**
Data will be cached at this path, e.g. `Library/Caches/com.domain.App.DiskCache`
*/
public let path: String
//MARK: Initialization
public init(identifier: String) {
let paths = NSSearchPathForDirectoriesInDomains(.CachesDirectory, .UserDomainMask, true)
let cachePath = paths.first!
if let bundleIdentifier = NSBundle.mainBundle().bundleIdentifier {
path = cachePath.stringByAppendingPathComponent("\(bundleIdentifier).\(identifier)")
} else {
path = cachePath.stringByAppendingPathComponent("DiskCache.\(identifier)")
}
}
}
| Add `init` and `path` property | Add `init` and `path` property
| Swift | mit | juliangrosshauser/ImageCache | swift | ## Code Before:
//
// DiskCache.swift
// ImageCache
//
// Created by Julian Grosshauser on 27/06/15.
// Copyright © 2015 Julian Grosshauser. All rights reserved.
//
/**
Caches data on disk asynchronously
*/
public class DiskCache {
}
## Instruction:
Add `init` and `path` property
## Code After:
//
// DiskCache.swift
// ImageCache
//
// Created by Julian Grosshauser on 27/06/15.
// Copyright © 2015 Julian Grosshauser. All rights reserved.
//
/**
Caches data on disk asynchronously
*/
public class DiskCache {
//MARK: Properties
/**
Data will be cached at this path, e.g. `Library/Caches/com.domain.App.DiskCache`
*/
public let path: String
//MARK: Initialization
public init(identifier: String) {
let paths = NSSearchPathForDirectoriesInDomains(.CachesDirectory, .UserDomainMask, true)
let cachePath = paths.first!
if let bundleIdentifier = NSBundle.mainBundle().bundleIdentifier {
path = cachePath.stringByAppendingPathComponent("\(bundleIdentifier).\(identifier)")
} else {
path = cachePath.stringByAppendingPathComponent("DiskCache.\(identifier)")
}
}
}
| //
// DiskCache.swift
// ImageCache
//
// Created by Julian Grosshauser on 27/06/15.
// Copyright © 2015 Julian Grosshauser. All rights reserved.
//
/**
Caches data on disk asynchronously
*/
public class DiskCache {
+ //MARK: Properties
+
+ /**
+ Data will be cached at this path, e.g. `Library/Caches/com.domain.App.DiskCache`
+ */
+ public let path: String
+
+ //MARK: Initialization
+
+ public init(identifier: String) {
+ let paths = NSSearchPathForDirectoriesInDomains(.CachesDirectory, .UserDomainMask, true)
+ let cachePath = paths.first!
+
+ if let bundleIdentifier = NSBundle.mainBundle().bundleIdentifier {
+ path = cachePath.stringByAppendingPathComponent("\(bundleIdentifier).\(identifier)")
+ } else {
+ path = cachePath.stringByAppendingPathComponent("DiskCache.\(identifier)")
+ }
+ }
} | 19 | 1.357143 | 19 | 0 |
87dffff365ed31045ffdbca6da4d8c8da7dd4fb4 | spec/unit/support_spec.rb | spec/unit/support_spec.rb | describe "PM::Support" do
before do
@app = TestDelegate.new
@screen = BasicScreen.new
end
it "has a convenience method for UIApplication.sharedApplication" do
@app.app.should == UIApplication.sharedApplication
@screen.app.should == UIApplication.sharedApplication
end
it "has a convenience method for UIApplication.sharedApplication.delegate" do
@app.app_delegate.should == UIApplication.sharedApplication.delegate
@screen.app_delegate.should == UIApplication.sharedApplication.delegate
end
it "has a convenience method for UIApplication.sharedApplication.delegate.window" do
@app.app_window.should == UIApplication.sharedApplication.delegate.window
@screen.app_window.should == UIApplication.sharedApplication.delegate.window
end
it "has a try method" do
@app.try(:some_method).should == nil
@screen.try(:some_method).should == nil
end
end
| describe "PM::Support" do
before do
@app = TestDelegate.new
@screen = BasicScreen.new
@tab_screen = TabScreen.new
@table_screen = TestTableScreen.new
@web_screen = TestWebScreen.new
end
it "has a convenience method for UIApplication.sharedApplication" do
@app.app.should == UIApplication.sharedApplication
@screen.app.should == UIApplication.sharedApplication
@tab_screen.app.should == UIApplication.sharedApplication
@table_screen.app.should == UIApplication.sharedApplication
@web_screen.app.should == UIApplication.sharedApplication
end
it "has a convenience method for UIApplication.sharedApplication.delegate" do
@app.app_delegate.should == UIApplication.sharedApplication.delegate
@screen.app_delegate.should == UIApplication.sharedApplication.delegate
@tab_screen.app_delegate.should == UIApplication.sharedApplication.delegate
@table_screen.app_delegate.should == UIApplication.sharedApplication.delegate
@web_screen.app_delegate.should == UIApplication.sharedApplication.delegate
end
it "has a convenience method for UIApplication.sharedApplication.delegate.window" do
@app.app_window.should == UIApplication.sharedApplication.delegate.window
@screen.app_window.should == UIApplication.sharedApplication.delegate.window
@tab_screen.app_window.should == UIApplication.sharedApplication.delegate.window
@table_screen.app_window.should == UIApplication.sharedApplication.delegate.window
@web_screen.app_window.should == UIApplication.sharedApplication.delegate.window
end
it "has a try method" do
@app.try(:some_method).should == nil
@screen.try(:some_method).should == nil
@tab_screen.try(:some_method).should == nil
@table_screen.try(:some_method).should == nil
@web_screen.try(:some_method).should == nil
end
end
| Make sure the support methods make it into all screens | Make sure the support methods make it into all screens
| Ruby | mit | bmichotte/ProMotion,kayhide/ProMotion,ryanlntn/ProMotion,andrewhavens/ProMotion,cavalryjim/ProMotion,dam13n/ProMotion,Brian-Egan/ProMotion,infinitered/ProMotion,bmichotte/ProMotion,infinitered/ProMotion,Brian-Egan/ProMotion,dchersey/ProMotion,mborromeo/ProMotion,samuelnp/ProMotion,bjlxj2008/ProMotion,bjlxj2008/ProMotion,kayhide/ProMotion,clearsightstudio/ProMotion,samuelnp/ProMotion,mborromeo/ProMotion,clearsightstudio/ProMotion,dam13n/ProMotion,ryanlntn/ProMotion,squidpunch/ProMotion,andrewhavens/ProMotion,cavalryjim/ProMotion,squidpunch/ProMotion | ruby | ## Code Before:
describe "PM::Support" do
before do
@app = TestDelegate.new
@screen = BasicScreen.new
end
it "has a convenience method for UIApplication.sharedApplication" do
@app.app.should == UIApplication.sharedApplication
@screen.app.should == UIApplication.sharedApplication
end
it "has a convenience method for UIApplication.sharedApplication.delegate" do
@app.app_delegate.should == UIApplication.sharedApplication.delegate
@screen.app_delegate.should == UIApplication.sharedApplication.delegate
end
it "has a convenience method for UIApplication.sharedApplication.delegate.window" do
@app.app_window.should == UIApplication.sharedApplication.delegate.window
@screen.app_window.should == UIApplication.sharedApplication.delegate.window
end
it "has a try method" do
@app.try(:some_method).should == nil
@screen.try(:some_method).should == nil
end
end
## Instruction:
Make sure the support methods make it into all screens
## Code After:
describe "PM::Support" do
before do
@app = TestDelegate.new
@screen = BasicScreen.new
@tab_screen = TabScreen.new
@table_screen = TestTableScreen.new
@web_screen = TestWebScreen.new
end
it "has a convenience method for UIApplication.sharedApplication" do
@app.app.should == UIApplication.sharedApplication
@screen.app.should == UIApplication.sharedApplication
@tab_screen.app.should == UIApplication.sharedApplication
@table_screen.app.should == UIApplication.sharedApplication
@web_screen.app.should == UIApplication.sharedApplication
end
it "has a convenience method for UIApplication.sharedApplication.delegate" do
@app.app_delegate.should == UIApplication.sharedApplication.delegate
@screen.app_delegate.should == UIApplication.sharedApplication.delegate
@tab_screen.app_delegate.should == UIApplication.sharedApplication.delegate
@table_screen.app_delegate.should == UIApplication.sharedApplication.delegate
@web_screen.app_delegate.should == UIApplication.sharedApplication.delegate
end
it "has a convenience method for UIApplication.sharedApplication.delegate.window" do
@app.app_window.should == UIApplication.sharedApplication.delegate.window
@screen.app_window.should == UIApplication.sharedApplication.delegate.window
@tab_screen.app_window.should == UIApplication.sharedApplication.delegate.window
@table_screen.app_window.should == UIApplication.sharedApplication.delegate.window
@web_screen.app_window.should == UIApplication.sharedApplication.delegate.window
end
it "has a try method" do
@app.try(:some_method).should == nil
@screen.try(:some_method).should == nil
@tab_screen.try(:some_method).should == nil
@table_screen.try(:some_method).should == nil
@web_screen.try(:some_method).should == nil
end
end
| describe "PM::Support" do
before do
@app = TestDelegate.new
@screen = BasicScreen.new
+ @tab_screen = TabScreen.new
+ @table_screen = TestTableScreen.new
+ @web_screen = TestWebScreen.new
end
it "has a convenience method for UIApplication.sharedApplication" do
@app.app.should == UIApplication.sharedApplication
@screen.app.should == UIApplication.sharedApplication
+ @tab_screen.app.should == UIApplication.sharedApplication
+ @table_screen.app.should == UIApplication.sharedApplication
+ @web_screen.app.should == UIApplication.sharedApplication
end
it "has a convenience method for UIApplication.sharedApplication.delegate" do
@app.app_delegate.should == UIApplication.sharedApplication.delegate
@screen.app_delegate.should == UIApplication.sharedApplication.delegate
+ @tab_screen.app_delegate.should == UIApplication.sharedApplication.delegate
+ @table_screen.app_delegate.should == UIApplication.sharedApplication.delegate
+ @web_screen.app_delegate.should == UIApplication.sharedApplication.delegate
end
it "has a convenience method for UIApplication.sharedApplication.delegate.window" do
@app.app_window.should == UIApplication.sharedApplication.delegate.window
@screen.app_window.should == UIApplication.sharedApplication.delegate.window
+ @tab_screen.app_window.should == UIApplication.sharedApplication.delegate.window
+ @table_screen.app_window.should == UIApplication.sharedApplication.delegate.window
+ @web_screen.app_window.should == UIApplication.sharedApplication.delegate.window
end
it "has a try method" do
@app.try(:some_method).should == nil
@screen.try(:some_method).should == nil
+ @tab_screen.try(:some_method).should == nil
+ @table_screen.try(:some_method).should == nil
+ @web_screen.try(:some_method).should == nil
end
end
| 15 | 0.5 | 15 | 0 |
5d16b6e08eedf3e5576063e266212f8027a21e1e | README.md | README.md |
Here you can find how I passed through [React](http://facebook.github.io/react/index.html) [Tutorial](http://facebook.github.io/react/docs/tutorial.html) with [TypeScript](http://www.typescriptlang.org) and [Webpack](http://webpack.github.io/). It was very fun.
If you want to start to use `TypeScript + Reactjs + Webpack` and start from React tutorial then you can find here answers for some questions like *why `this.state` is undefined* or *why `this.ref` doesn't has property "author"* or *How use `setInterval` in TypeScript?* (that about `lambda` and `this` in TypeScript) and other.
But I want advise to peep into the repository only when you have used [google](http://google.com), [StackOverflow](http://stackoverflow.com/), [TypeScript Handbook](http://www.typescriptlang.org/Handbook) and saw generated `JS` code and if after all of that you can't understand why nothing is worked.
|
Here's how I passed through [React](http://facebook.github.io/react/index.html) [Tutorial](http://facebook.github.io/react/docs/tutorial.html) with [TypeScript](http://www.typescriptlang.org) and [Webpack](http://webpack.github.io/). It was very fun.
If you want to start, use `TypeScript + Reactjs + Webpack`.
If you start from React tutorial, you will find some answers for some questions like
* why `this.state` is `undefined`?
* why `this.ref` doesn't have property "author"?
* how to use `setInterval` in TypeScript? (this is about `lambda` and `this` in TypeScript)
* and others.
I will advise readers to use this repository only after they have tried
[Google](http://google.com), [StackOverflow](http://stackoverflow.com/),
[TypeScript Handbook](http://www.typescriptlang.org/Handbook) and generated native `javascript` code without any results.
| Rewrite with more correct English | Rewrite with more correct English
| Markdown | mit | DbIHbKA/react-tutorial-typescript,DbIHbKA/react-tutorial-typescript,DbIHbKA/react-tutorial-typescript | markdown | ## Code Before:
Here you can find how I passed through [React](http://facebook.github.io/react/index.html) [Tutorial](http://facebook.github.io/react/docs/tutorial.html) with [TypeScript](http://www.typescriptlang.org) and [Webpack](http://webpack.github.io/). It was very fun.
If you want to start to use `TypeScript + Reactjs + Webpack` and start from React tutorial then you can find here answers for some questions like *why `this.state` is undefined* or *why `this.ref` doesn't has property "author"* or *How use `setInterval` in TypeScript?* (that about `lambda` and `this` in TypeScript) and other.
But I want advise to peep into the repository only when you have used [google](http://google.com), [StackOverflow](http://stackoverflow.com/), [TypeScript Handbook](http://www.typescriptlang.org/Handbook) and saw generated `JS` code and if after all of that you can't understand why nothing is worked.
## Instruction:
Rewrite with more correct English
## Code After:
Here's how I passed through [React](http://facebook.github.io/react/index.html) [Tutorial](http://facebook.github.io/react/docs/tutorial.html) with [TypeScript](http://www.typescriptlang.org) and [Webpack](http://webpack.github.io/). It was very fun.
If you want to start, use `TypeScript + Reactjs + Webpack`.
If you start from React tutorial, you will find some answers for some questions like
* why `this.state` is `undefined`?
* why `this.ref` doesn't have property "author"?
* how to use `setInterval` in TypeScript? (this is about `lambda` and `this` in TypeScript)
* and others.
I will advise readers to use this repository only after they have tried
[Google](http://google.com), [StackOverflow](http://stackoverflow.com/),
[TypeScript Handbook](http://www.typescriptlang.org/Handbook) and generated native `javascript` code without any results.
|
- Here you can find how I passed through [React](http://facebook.github.io/react/index.html) [Tutorial](http://facebook.github.io/react/docs/tutorial.html) with [TypeScript](http://www.typescriptlang.org) and [Webpack](http://webpack.github.io/). It was very fun.
? ^^^^^^^^^^^^^
+ Here's how I passed through [React](http://facebook.github.io/react/index.html) [Tutorial](http://facebook.github.io/react/docs/tutorial.html) with [TypeScript](http://www.typescriptlang.org) and [Webpack](http://webpack.github.io/). It was very fun.
? ^^
- If you want to start to use `TypeScript + Reactjs + Webpack` and start from React tutorial then you can find here answers for some questions like *why `this.state` is undefined* or *why `this.ref` doesn't has property "author"* or *How use `setInterval` in TypeScript?* (that about `lambda` and `this` in TypeScript) and other.
+ If you want to start, use `TypeScript + Reactjs + Webpack`.
+ If you start from React tutorial, you will find some answers for some questions like
+ * why `this.state` is `undefined`?
+ * why `this.ref` doesn't have property "author"?
+ * how to use `setInterval` in TypeScript? (this is about `lambda` and `this` in TypeScript)
+ * and others.
- But I want advise to peep into the repository only when you have used [google](http://google.com), [StackOverflow](http://stackoverflow.com/), [TypeScript Handbook](http://www.typescriptlang.org/Handbook) and saw generated `JS` code and if after all of that you can't understand why nothing is worked.
+ I will advise readers to use this repository only after they have tried
+ [Google](http://google.com), [StackOverflow](http://stackoverflow.com/),
+ [TypeScript Handbook](http://www.typescriptlang.org/Handbook) and generated native `javascript` code without any results. | 13 | 2.166667 | 10 | 3 |
1077aa5844463b0c1c9e2dffe2095f0f4e71e30b | lib/terrible_apples.rb | lib/terrible_apples.rb | class TerribleApples
def gross
if true
unless false
if true && true
unless not false && false
puts "what!"
end
end
end
end
end
end
| class TerribleApples
def gross
if true
unless false
if true && true
unless not false && false
puts "what!"
end
end
end
end
end
def ick
if true
unless false
if true && true
unless not false && false
if true
unless false
if true && true
unless not false && false
puts "what!"
end
end
end
end
end
end
end
end
end
end
| Make things a lot worse | Make things a lot worse
| Ruby | mit | toddtesttest/noms,toddtesttest/noms,toddtesttest/noms | ruby | ## Code Before:
class TerribleApples
def gross
if true
unless false
if true && true
unless not false && false
puts "what!"
end
end
end
end
end
end
## Instruction:
Make things a lot worse
## Code After:
class TerribleApples
def gross
if true
unless false
if true && true
unless not false && false
puts "what!"
end
end
end
end
end
def ick
if true
unless false
if true && true
unless not false && false
if true
unless false
if true && true
unless not false && false
puts "what!"
end
end
end
end
end
end
end
end
end
end
| class TerribleApples
def gross
if true
unless false
if true && true
unless not false && false
puts "what!"
end
end
end
end
end
+
+ def ick
+ if true
+ unless false
+ if true && true
+ unless not false && false
+ if true
+ unless false
+ if true && true
+ unless not false && false
+ puts "what!"
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
end | 20 | 1.538462 | 20 | 0 |
513ee6393a997a5792a5ebcf3844e386a055601a | app/assets/javascripts/templates/product_modal.html.haml | app/assets/javascripts/templates/product_modal.html.haml | .row
.columns.small-12.large-6.product-header
%h3{"ng-bind" => "::product.name"}
%span
%em {{'products_from' | t}}
%span{"ng-bind" => "::enterprise.name"}
%br
.filter-shopfront.property-selectors.inline-block
%filter-selector{ 'selector-set' => "productPropertySelectors", objects: "[product] | propertiesWithValuesOf" }
.product-description{"ng-if" => "product.description_html"}
%p.text-small{"ng-bind-html" => "::product.description_html"}
.columns.small-12.large-6
%img.product-img{"ng-src" => "{{::product.largeImage}}", "ng-if" => "::product.largeImage"}
%img.product-img.placeholder{ src: "/assets/noimage/large.png", "ng-if" => "::!product.largeImage"}
%ng-include{src: "'partials/close.html'"}
| .row
.columns.small-12.medium-6.large-6.product-header
%h3{"ng-bind" => "::product.name"}
%span
%em {{'products_from' | t}}
%span{"ng-bind" => "::enterprise.name"}
%br
.filter-shopfront.property-selectors.inline-block
%filter-selector{ 'selector-set' => "productPropertySelectors", objects: "[product] | propertiesWithValuesOf" }
.product-description{"ng-if" => "product.description_html"}
%p.text-small{"ng-bind-html" => "::product.description_html"}
.columns.small-12.medium-6.large-6
%img.product-img{"ng-src" => "{{::product.largeImage}}", "ng-if" => "::product.largeImage"}
%img.product-img.placeholder{ src: "/assets/noimage/large.png", "ng-if" => "::!product.largeImage"}
%ng-include{src: "'partials/close.html'"}
| Make product modal display image on the right for medium screens like it was doing for large screens | Make product modal display image on the right for medium screens like it was doing for large screens
| Haml | agpl-3.0 | mkllnk/openfoodnetwork,Matt-Yorkley/openfoodnetwork,mkllnk/openfoodnetwork,openfoodfoundation/openfoodnetwork,openfoodfoundation/openfoodnetwork,lin-d-hop/openfoodnetwork,lin-d-hop/openfoodnetwork,Matt-Yorkley/openfoodnetwork,Matt-Yorkley/openfoodnetwork,lin-d-hop/openfoodnetwork,mkllnk/openfoodnetwork,lin-d-hop/openfoodnetwork,openfoodfoundation/openfoodnetwork,Matt-Yorkley/openfoodnetwork,mkllnk/openfoodnetwork,openfoodfoundation/openfoodnetwork | haml | ## Code Before:
.row
.columns.small-12.large-6.product-header
%h3{"ng-bind" => "::product.name"}
%span
%em {{'products_from' | t}}
%span{"ng-bind" => "::enterprise.name"}
%br
.filter-shopfront.property-selectors.inline-block
%filter-selector{ 'selector-set' => "productPropertySelectors", objects: "[product] | propertiesWithValuesOf" }
.product-description{"ng-if" => "product.description_html"}
%p.text-small{"ng-bind-html" => "::product.description_html"}
.columns.small-12.large-6
%img.product-img{"ng-src" => "{{::product.largeImage}}", "ng-if" => "::product.largeImage"}
%img.product-img.placeholder{ src: "/assets/noimage/large.png", "ng-if" => "::!product.largeImage"}
%ng-include{src: "'partials/close.html'"}
## Instruction:
Make product modal display image on the right for medium screens like it was doing for large screens
## Code After:
.row
.columns.small-12.medium-6.large-6.product-header
%h3{"ng-bind" => "::product.name"}
%span
%em {{'products_from' | t}}
%span{"ng-bind" => "::enterprise.name"}
%br
.filter-shopfront.property-selectors.inline-block
%filter-selector{ 'selector-set' => "productPropertySelectors", objects: "[product] | propertiesWithValuesOf" }
.product-description{"ng-if" => "product.description_html"}
%p.text-small{"ng-bind-html" => "::product.description_html"}
.columns.small-12.medium-6.large-6
%img.product-img{"ng-src" => "{{::product.largeImage}}", "ng-if" => "::product.largeImage"}
%img.product-img.placeholder{ src: "/assets/noimage/large.png", "ng-if" => "::!product.largeImage"}
%ng-include{src: "'partials/close.html'"}
| .row
- .columns.small-12.large-6.product-header
+ .columns.small-12.medium-6.large-6.product-header
? +++++++++
%h3{"ng-bind" => "::product.name"}
%span
%em {{'products_from' | t}}
%span{"ng-bind" => "::enterprise.name"}
%br
.filter-shopfront.property-selectors.inline-block
%filter-selector{ 'selector-set' => "productPropertySelectors", objects: "[product] | propertiesWithValuesOf" }
.product-description{"ng-if" => "product.description_html"}
%p.text-small{"ng-bind-html" => "::product.description_html"}
- .columns.small-12.large-6
+ .columns.small-12.medium-6.large-6
? +++++++++
%img.product-img{"ng-src" => "{{::product.largeImage}}", "ng-if" => "::product.largeImage"}
%img.product-img.placeholder{ src: "/assets/noimage/large.png", "ng-if" => "::!product.largeImage"}
%ng-include{src: "'partials/close.html'"} | 4 | 0.2 | 2 | 2 |
0bd6c1126a111084d69990ef25440ad6d858d936 | config/schedule.rb | config/schedule.rb |
@root_path = File.expand_path('../..', __FILE__)
set :output, "#{@root_path}/tmp/cron_log.log"
every :sunday, :at => '18:13pm' do
command "#{@root_path}/bin/deliciousletter"
end
|
@root_path = File.expand_path('../..', __FILE__)
set :output, "#{@root_path}/tmp/cron_log.log"
every :sunday, :at => '18:13pm' do
command "bundle exec #{@root_path}/bin/deliciousletter"
end
| Use bundler when calling wheneverized commands | Use bundler when calling wheneverized commands
| Ruby | mit | shakaman/DeliciousLetter | ruby | ## Code Before:
@root_path = File.expand_path('../..', __FILE__)
set :output, "#{@root_path}/tmp/cron_log.log"
every :sunday, :at => '18:13pm' do
command "#{@root_path}/bin/deliciousletter"
end
## Instruction:
Use bundler when calling wheneverized commands
## Code After:
@root_path = File.expand_path('../..', __FILE__)
set :output, "#{@root_path}/tmp/cron_log.log"
every :sunday, :at => '18:13pm' do
command "bundle exec #{@root_path}/bin/deliciousletter"
end
|
@root_path = File.expand_path('../..', __FILE__)
set :output, "#{@root_path}/tmp/cron_log.log"
every :sunday, :at => '18:13pm' do
- command "#{@root_path}/bin/deliciousletter"
+ command "bundle exec #{@root_path}/bin/deliciousletter"
? ++++++++++++
end | 2 | 0.285714 | 1 | 1 |
2d34f7018e001a933e89bd1803637269cfc9524d | README.md | README.md | 3PC
===
Printable Planning Poker Cards
### About
This project provides printable planning poker cards built with nothing
more than HTML and CSS. Simply load `src/cards.html` in your browser and
print the page.
### Screenshots

| 3PC
===
[](https://opensource.org/licenses/MIT)
Printable Planning Poker Cards
### About
This project provides printable planning poker cards built with nothing
more than HTML and CSS. Simply load `src/cards.html` in your browser,
print the page and cut out the cards.
### Screenshots

| Add license badge and add note about cutting | Add license badge and add note about cutting
| Markdown | mit | Johennes/3PC | markdown | ## Code Before:
3PC
===
Printable Planning Poker Cards
### About
This project provides printable planning poker cards built with nothing
more than HTML and CSS. Simply load `src/cards.html` in your browser and
print the page.
### Screenshots

## Instruction:
Add license badge and add note about cutting
## Code After:
3PC
===
[](https://opensource.org/licenses/MIT)
Printable Planning Poker Cards
### About
This project provides printable planning poker cards built with nothing
more than HTML and CSS. Simply load `src/cards.html` in your browser,
print the page and cut out the cards.
### Screenshots

| 3PC
===
+
+ [](https://opensource.org/licenses/MIT)
Printable Planning Poker Cards
### About
This project provides printable planning poker cards built with nothing
- more than HTML and CSS. Simply load `src/cards.html` in your browser and
? ^^^^
+ more than HTML and CSS. Simply load `src/cards.html` in your browser,
? ^
- print the page.
+ print the page and cut out the cards.
### Screenshots
 | 6 | 0.428571 | 4 | 2 |
f14331f7d6879bafb951f1305757c4955dfb1fa8 | recipes/capytaine/meta.yaml | recipes/capytaine/meta.yaml | {% set version = "1.0" %}
package:
name: capytaine
version: {{ version }}
source:
url: https://github.com/mancellin/capytaine/archive/v{{version}}.tar.gz
sha256: 072de801b50b4052277b5eb3d634734a11079b69789e5fb3bccb7363d199f637
build:
skip: True # [py<36]
number: 0
script: "{{ PYTHON }} -m pip install . --no-deps -vv"
requirements:
build:
- {{ compiler('fortran') }}
- {{ compiler('c') }}
- llvm-openmp # [osx]
host:
- python
- pip
- setuptools
- numpy
- llvm-openmp # [osx]
run:
- python
- attrs
- {{ pin_compatible('numpy') }}
- pandas
- matplotlib
- scipy
- vtk
- xarray
- llvm-openmp # [osx]
test:
imports:
- capytaine
about:
home: https://github.com/mancellin/capytaine
license: GPL-3.0
license_family: GPL
license_file: LICENSE
summary: A Python-based linear potential flow solver based on Nemoh
extra:
recipe-maintainers:
- mancellin
| {% set version = "1.0" %}
package:
name: capytaine
version: {{ version }}
source:
url: https://github.com/mancellin/capytaine/archive/v{{version}}.tar.gz
sha256: 072de801b50b4052277b5eb3d634734a11079b69789e5fb3bccb7363d199f637
build:
skip: True # [py<36]
number: 0
script: "{{ PYTHON }} -m pip install . --no-deps -vv"
requirements:
build:
- {{ compiler('fortran') }}
- {{ compiler('c') }}
- llvm-openmp # [osx]
host:
- python
- pip
- setuptools
- numpy
- llvm-openmp # [osx]
run:
- python
- attrs
- {{ pin_compatible('numpy') }}
- pandas
- matplotlib
- scipy
- vtk
- xarray
- llvm-openmp # [osx]
test:
imports:
- capytaine
requires:
- pytest
source_files:
- pytest/*.py
- pytest/**/*
commands:
- pytest
about:
home: https://github.com/mancellin/capytaine
license: GPL-3.0
license_family: GPL
license_file: LICENSE
summary: A Python-based linear potential flow solver based on Nemoh
extra:
recipe-maintainers:
- mancellin
| Copy test files for testing. | Copy test files for testing.
| YAML | bsd-3-clause | johanneskoester/staged-recipes,mariusvniekerk/staged-recipes,conda-forge/staged-recipes,jochym/staged-recipes,kwilcox/staged-recipes,petrushy/staged-recipes,johanneskoester/staged-recipes,jochym/staged-recipes,jakirkham/staged-recipes,isuruf/staged-recipes,ceholden/staged-recipes,scopatz/staged-recipes,Juanlu001/staged-recipes,mariusvniekerk/staged-recipes,SylvainCorlay/staged-recipes,dschreij/staged-recipes,ocefpaf/staged-recipes,chrisburr/staged-recipes,isuruf/staged-recipes,synapticarbors/staged-recipes,cpaulik/staged-recipes,igortg/staged-recipes,conda-forge/staged-recipes,hadim/staged-recipes,birdsarah/staged-recipes,dschreij/staged-recipes,hadim/staged-recipes,kwilcox/staged-recipes,patricksnape/staged-recipes,rmcgibbo/staged-recipes,goanpeca/staged-recipes,jjhelmus/staged-recipes,scopatz/staged-recipes,ocefpaf/staged-recipes,Juanlu001/staged-recipes,igortg/staged-recipes,mcs07/staged-recipes,patricksnape/staged-recipes,ceholden/staged-recipes,goanpeca/staged-recipes,ReimarBauer/staged-recipes,jjhelmus/staged-recipes,SylvainCorlay/staged-recipes,stuertz/staged-recipes,jakirkham/staged-recipes,cpaulik/staged-recipes,chrisburr/staged-recipes,petrushy/staged-recipes,stuertz/staged-recipes,rmcgibbo/staged-recipes,asmeurer/staged-recipes,mcs07/staged-recipes,synapticarbors/staged-recipes,ReimarBauer/staged-recipes,basnijholt/staged-recipes,asmeurer/staged-recipes,basnijholt/staged-recipes,birdsarah/staged-recipes | yaml | ## Code Before:
{% set version = "1.0" %}
package:
name: capytaine
version: {{ version }}
source:
url: https://github.com/mancellin/capytaine/archive/v{{version}}.tar.gz
sha256: 072de801b50b4052277b5eb3d634734a11079b69789e5fb3bccb7363d199f637
build:
skip: True # [py<36]
number: 0
script: "{{ PYTHON }} -m pip install . --no-deps -vv"
requirements:
build:
- {{ compiler('fortran') }}
- {{ compiler('c') }}
- llvm-openmp # [osx]
host:
- python
- pip
- setuptools
- numpy
- llvm-openmp # [osx]
run:
- python
- attrs
- {{ pin_compatible('numpy') }}
- pandas
- matplotlib
- scipy
- vtk
- xarray
- llvm-openmp # [osx]
test:
imports:
- capytaine
about:
home: https://github.com/mancellin/capytaine
license: GPL-3.0
license_family: GPL
license_file: LICENSE
summary: A Python-based linear potential flow solver based on Nemoh
extra:
recipe-maintainers:
- mancellin
## Instruction:
Copy test files for testing.
## Code After:
{% set version = "1.0" %}
package:
name: capytaine
version: {{ version }}
source:
url: https://github.com/mancellin/capytaine/archive/v{{version}}.tar.gz
sha256: 072de801b50b4052277b5eb3d634734a11079b69789e5fb3bccb7363d199f637
build:
skip: True # [py<36]
number: 0
script: "{{ PYTHON }} -m pip install . --no-deps -vv"
requirements:
build:
- {{ compiler('fortran') }}
- {{ compiler('c') }}
- llvm-openmp # [osx]
host:
- python
- pip
- setuptools
- numpy
- llvm-openmp # [osx]
run:
- python
- attrs
- {{ pin_compatible('numpy') }}
- pandas
- matplotlib
- scipy
- vtk
- xarray
- llvm-openmp # [osx]
test:
imports:
- capytaine
requires:
- pytest
source_files:
- pytest/*.py
- pytest/**/*
commands:
- pytest
about:
home: https://github.com/mancellin/capytaine
license: GPL-3.0
license_family: GPL
license_file: LICENSE
summary: A Python-based linear potential flow solver based on Nemoh
extra:
recipe-maintainers:
- mancellin
| {% set version = "1.0" %}
package:
name: capytaine
version: {{ version }}
source:
url: https://github.com/mancellin/capytaine/archive/v{{version}}.tar.gz
sha256: 072de801b50b4052277b5eb3d634734a11079b69789e5fb3bccb7363d199f637
build:
skip: True # [py<36]
number: 0
script: "{{ PYTHON }} -m pip install . --no-deps -vv"
requirements:
build:
- {{ compiler('fortran') }}
- {{ compiler('c') }}
- llvm-openmp # [osx]
host:
- python
- pip
- setuptools
- numpy
- llvm-openmp # [osx]
run:
- python
- attrs
- {{ pin_compatible('numpy') }}
- pandas
- matplotlib
- scipy
- vtk
- xarray
- llvm-openmp # [osx]
test:
imports:
- capytaine
+ requires:
+ - pytest
+ source_files:
+ - pytest/*.py
+ - pytest/**/*
+ commands:
+ - pytest
about:
home: https://github.com/mancellin/capytaine
license: GPL-3.0
license_family: GPL
license_file: LICENSE
summary: A Python-based linear potential flow solver based on Nemoh
extra:
recipe-maintainers:
- mancellin | 7 | 0.137255 | 7 | 0 |
27e7db50ae93d77c8578a4b104efe3f56fce064e | src/childrensize.js | src/childrensize.js | var computedStyle = require('computed-style');
module.exports = function(container) {
if (!container) { return; }
var children = [].slice.call(container.children, 0).filter(function (el) {
var pos = computedStyle(el, 'position');
el.rect = el.getBoundingClientRect(); // store rect for later
return !(
(pos === 'absolute' || pos === 'fixed') ||
(el.rect.width === 0 && el.rect.height === 0)
);
});
if (children.length === 0) {
return { width: 0, height: 0 };
}
var totRect = children.reduce(function (tot, el) {
return (!tot ?
el.rect :
{
top : Math.min(tot.top, el.rect.top),
left : Math.min(tot.left, el.rect.left),
right : Math.max(tot.right, el.rect.right),
bottom : Math.max(tot.bottom, el.rect.bottom)
});
}, null);
return {
width: totRect.right - totRect.left,
height: totRect.bottom - totRect.top
};
};
| var computedStyle = require('computed-style');
function toArray (nodeList) {
var arr = [];
for (var i=0, l=nodeList.length; i<l; i++) { arr.push(nodeList[i]); }
return arr;
}
module.exports = function(container) {
if (!container) { return; }
var children = toArray(container.children).filter(function (el) {
var pos = computedStyle(el, 'position');
el.rect = el.getBoundingClientRect(); // store rect for later
return !(
(pos === 'absolute' || pos === 'fixed') ||
(el.rect.width === 0 && el.rect.height === 0)
);
});
if (children.length === 0) {
return { width: 0, height: 0 };
}
var totRect = children.reduce(function (tot, el) {
return (!tot ?
el.rect :
{
top : Math.min(tot.top, el.rect.top),
left : Math.min(tot.left, el.rect.left),
right : Math.max(tot.right, el.rect.right),
bottom : Math.max(tot.bottom, el.rect.bottom)
});
}, null);
return {
width: totRect.right - totRect.left,
height: totRect.bottom - totRect.top
};
};
| Fix IE8 error when converting NodeList to Array | Fix IE8 error when converting NodeList to Array
| JavaScript | mit | gardr/ext,gardr/ext | javascript | ## Code Before:
var computedStyle = require('computed-style');
module.exports = function(container) {
if (!container) { return; }
var children = [].slice.call(container.children, 0).filter(function (el) {
var pos = computedStyle(el, 'position');
el.rect = el.getBoundingClientRect(); // store rect for later
return !(
(pos === 'absolute' || pos === 'fixed') ||
(el.rect.width === 0 && el.rect.height === 0)
);
});
if (children.length === 0) {
return { width: 0, height: 0 };
}
var totRect = children.reduce(function (tot, el) {
return (!tot ?
el.rect :
{
top : Math.min(tot.top, el.rect.top),
left : Math.min(tot.left, el.rect.left),
right : Math.max(tot.right, el.rect.right),
bottom : Math.max(tot.bottom, el.rect.bottom)
});
}, null);
return {
width: totRect.right - totRect.left,
height: totRect.bottom - totRect.top
};
};
## Instruction:
Fix IE8 error when converting NodeList to Array
## Code After:
var computedStyle = require('computed-style');
function toArray (nodeList) {
var arr = [];
for (var i=0, l=nodeList.length; i<l; i++) { arr.push(nodeList[i]); }
return arr;
}
module.exports = function(container) {
if (!container) { return; }
var children = toArray(container.children).filter(function (el) {
var pos = computedStyle(el, 'position');
el.rect = el.getBoundingClientRect(); // store rect for later
return !(
(pos === 'absolute' || pos === 'fixed') ||
(el.rect.width === 0 && el.rect.height === 0)
);
});
if (children.length === 0) {
return { width: 0, height: 0 };
}
var totRect = children.reduce(function (tot, el) {
return (!tot ?
el.rect :
{
top : Math.min(tot.top, el.rect.top),
left : Math.min(tot.left, el.rect.left),
right : Math.max(tot.right, el.rect.right),
bottom : Math.max(tot.bottom, el.rect.bottom)
});
}, null);
return {
width: totRect.right - totRect.left,
height: totRect.bottom - totRect.top
};
};
| var computedStyle = require('computed-style');
+
+ function toArray (nodeList) {
+ var arr = [];
+ for (var i=0, l=nodeList.length; i<l; i++) { arr.push(nodeList[i]); }
+ return arr;
+ }
module.exports = function(container) {
if (!container) { return; }
- var children = [].slice.call(container.children, 0).filter(function (el) {
? ^^^^^^^^^^ ^^ ---
+ var children = toArray(container.children).filter(function (el) {
? ^^^^^ ^
var pos = computedStyle(el, 'position');
el.rect = el.getBoundingClientRect(); // store rect for later
return !(
(pos === 'absolute' || pos === 'fixed') ||
(el.rect.width === 0 && el.rect.height === 0)
);
});
if (children.length === 0) {
return { width: 0, height: 0 };
}
var totRect = children.reduce(function (tot, el) {
return (!tot ?
el.rect :
{
top : Math.min(tot.top, el.rect.top),
left : Math.min(tot.left, el.rect.left),
right : Math.max(tot.right, el.rect.right),
bottom : Math.max(tot.bottom, el.rect.bottom)
});
}, null);
return {
width: totRect.right - totRect.left,
height: totRect.bottom - totRect.top
};
}; | 8 | 0.242424 | 7 | 1 |
112f786717f405f0b2b708fe67d4b6df780386ea | models/Author.js | models/Author.js | var keystone = require('keystone');
var Types = keystone.Field.Types;
/**
* Author Model
* ==========
*/
var Author = new keystone.List('Author');
Author.add({
firstName: { type: Types.Text, initial: true, required: true, index: true },
lastName: { type: Types.Text, initial: true, required: true, index: true },
email: { type: Types.Email },
affiliations: { type: Types.Relationship, ref: 'Organization', many: true },
});
/**
* Registration
*/
Author.defaultColumns = 'firstName, lastName';
Author.register();
| var keystone = require('keystone');
var Types = keystone.Field.Types;
/**
* Author Model
* ==========
*/
var Author = new keystone.List('Author');
Author.add({
name: { type: Types.Name, initial: true, required: true, index: true },
email: { type: Types.Email },
affiliations: { type: Types.Relationship, ref: 'Organization', many: true },
});
/**
* Registration
*/
Author.defaultColumns = 'name, affiliations';
Author.register();
| Use single name field for authors | Use single name field for authors
| JavaScript | mit | zharley/papers,zharley/papers | javascript | ## Code Before:
var keystone = require('keystone');
var Types = keystone.Field.Types;
/**
* Author Model
* ==========
*/
var Author = new keystone.List('Author');
Author.add({
firstName: { type: Types.Text, initial: true, required: true, index: true },
lastName: { type: Types.Text, initial: true, required: true, index: true },
email: { type: Types.Email },
affiliations: { type: Types.Relationship, ref: 'Organization', many: true },
});
/**
* Registration
*/
Author.defaultColumns = 'firstName, lastName';
Author.register();
## Instruction:
Use single name field for authors
## Code After:
var keystone = require('keystone');
var Types = keystone.Field.Types;
/**
* Author Model
* ==========
*/
var Author = new keystone.List('Author');
Author.add({
name: { type: Types.Name, initial: true, required: true, index: true },
email: { type: Types.Email },
affiliations: { type: Types.Relationship, ref: 'Organization', many: true },
});
/**
* Registration
*/
Author.defaultColumns = 'name, affiliations';
Author.register();
| var keystone = require('keystone');
var Types = keystone.Field.Types;
/**
* Author Model
* ==========
*/
var Author = new keystone.List('Author');
Author.add({
- firstName: { type: Types.Text, initial: true, required: true, index: true },
- lastName: { type: Types.Text, initial: true, required: true, index: true },
? ^^^^^ ^ --
+ name: { type: Types.Name, initial: true, required: true, index: true },
? ^ ^^^
email: { type: Types.Email },
affiliations: { type: Types.Relationship, ref: 'Organization', many: true },
});
/**
* Registration
*/
- Author.defaultColumns = 'firstName, lastName';
? ^^^^^^ -----
+ Author.defaultColumns = 'name, affiliations';
? ^ ++++ + ++++
Author.register(); | 5 | 0.238095 | 2 | 3 |
3802e70c8f9a3c2d88ba7a9ae55ebfc1508f00bb | Magic/src/main/resources/examples/survival/mobs/arena.yml | Magic/src/main/resources/examples/survival/mobs/arena.yml | fireproof_zombie:
type: zombie
combustible: false
brain:
remove_goals:
- flee_sun
fireproof_drowned:
type: drowned
combustible: false
item: fishing_rod
brain:
remove_goals:
- flee_sun
trident_drowned:
type: drowned
combustible: false
item: trident
fireproof_stray:
type: stray
combustible: false
item: bow
brain:
remove_goals:
- flee_sun
fireproof_skeleton:
type: skeleton
combustible: false
item: bow
brain:
remove_goals:
- flee_sun
contained_enderman:
type: enderman
prevent_teleport: true
armed_wither_skeleton:
type: wither_skeleton
item: stone_sword
fireproof_baby_zombie:
type: zombie
baby: true
combustible: false
brain:
remove_goals:
- flee_sun
| fireproof_zombie:
type: zombie
combustible: false
brain:
remove_goals:
- flee_sun
- restrict_sun
fireproof_drowned:
type: drowned
combustible: false
item: fishing_rod
brain:
remove_goals:
- flee_sun
- restrict_sun
trident_drowned:
type: drowned
combustible: false
item: trident
fireproof_stray:
type: stray
combustible: false
item: bow
brain:
remove_goals:
- flee_sun
- restrict_sun
fireproof_skeleton:
type: skeleton
combustible: false
item: bow
brain:
remove_goals:
- flee_sun
- restrict_sun
contained_enderman:
type: enderman
prevent_teleport: true
armed_wither_skeleton:
type: wither_skeleton
item: stone_sword
fireproof_baby_zombie:
type: zombie
baby: true
combustible: false
brain:
remove_goals:
- flee_sun
- restrict_sun
| Remove restrict_sun goal as well as flee_sun from fireproof mobs | Remove restrict_sun goal as well as flee_sun from fireproof mobs
I think only skeletons actually use these goals though .. zombies are dumb
| YAML | mit | elBukkit/MagicPlugin,elBukkit/MagicPlugin,elBukkit/MagicPlugin | yaml | ## Code Before:
fireproof_zombie:
type: zombie
combustible: false
brain:
remove_goals:
- flee_sun
fireproof_drowned:
type: drowned
combustible: false
item: fishing_rod
brain:
remove_goals:
- flee_sun
trident_drowned:
type: drowned
combustible: false
item: trident
fireproof_stray:
type: stray
combustible: false
item: bow
brain:
remove_goals:
- flee_sun
fireproof_skeleton:
type: skeleton
combustible: false
item: bow
brain:
remove_goals:
- flee_sun
contained_enderman:
type: enderman
prevent_teleport: true
armed_wither_skeleton:
type: wither_skeleton
item: stone_sword
fireproof_baby_zombie:
type: zombie
baby: true
combustible: false
brain:
remove_goals:
- flee_sun
## Instruction:
Remove restrict_sun goal as well as flee_sun from fireproof mobs
I think only skeletons actually use these goals though .. zombies are dumb
## Code After:
fireproof_zombie:
type: zombie
combustible: false
brain:
remove_goals:
- flee_sun
- restrict_sun
fireproof_drowned:
type: drowned
combustible: false
item: fishing_rod
brain:
remove_goals:
- flee_sun
- restrict_sun
trident_drowned:
type: drowned
combustible: false
item: trident
fireproof_stray:
type: stray
combustible: false
item: bow
brain:
remove_goals:
- flee_sun
- restrict_sun
fireproof_skeleton:
type: skeleton
combustible: false
item: bow
brain:
remove_goals:
- flee_sun
- restrict_sun
contained_enderman:
type: enderman
prevent_teleport: true
armed_wither_skeleton:
type: wither_skeleton
item: stone_sword
fireproof_baby_zombie:
type: zombie
baby: true
combustible: false
brain:
remove_goals:
- flee_sun
- restrict_sun
| fireproof_zombie:
type: zombie
combustible: false
brain:
remove_goals:
- flee_sun
+ - restrict_sun
fireproof_drowned:
type: drowned
combustible: false
item: fishing_rod
brain:
remove_goals:
- flee_sun
+ - restrict_sun
trident_drowned:
type: drowned
combustible: false
item: trident
fireproof_stray:
type: stray
combustible: false
item: bow
brain:
remove_goals:
- flee_sun
+ - restrict_sun
fireproof_skeleton:
type: skeleton
combustible: false
item: bow
brain:
remove_goals:
- flee_sun
+ - restrict_sun
contained_enderman:
type: enderman
prevent_teleport: true
armed_wither_skeleton:
type: wither_skeleton
item: stone_sword
fireproof_baby_zombie:
type: zombie
baby: true
combustible: false
brain:
remove_goals:
- flee_sun
+ - restrict_sun | 5 | 0.098039 | 5 | 0 |
34f29937906f61a02456a3dbc98fd35031e360d4 | apps/getting_started/templates/index.jade | apps/getting_started/templates/index.jade | extends ../../../components/layout/index--info
block vars
- extraClasses = 'no-messages body--static'
block body
.gs
h1 Are.na / Getting Started
.gs__body
include ./slides/1-channels.jade
include ./slides/2-blocks.jade
include ./slides/3-connections.jade
include ./slides/4-users.jade
include ./slides/5-feed.jade
if user
.gs__profile
a.btn(href="/#{user.get('slug')}") Go to your profile | extends ../../../components/layout/index--info
block vars
- extraClasses = 'no-messages body--static'
block body
.gs
h1 Are.na / Getting Started
.gs__body
include ./slides/1-channels.jade
include ./slides/2-blocks.jade
include ./slides/3-connections.jade
include ./slides/4-users.jade
include ./slides/5-feed.jade
.gs__profile
if user
a.btn(href="/#{user.get('slug')}") Go to your profile
else
a.btn(href="/#{user.get('slug')}") Sign up | Add sign up button if not logged in | Add sign up button if not logged in
| Jade | mit | aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell | jade | ## Code Before:
extends ../../../components/layout/index--info
block vars
- extraClasses = 'no-messages body--static'
block body
.gs
h1 Are.na / Getting Started
.gs__body
include ./slides/1-channels.jade
include ./slides/2-blocks.jade
include ./slides/3-connections.jade
include ./slides/4-users.jade
include ./slides/5-feed.jade
if user
.gs__profile
a.btn(href="/#{user.get('slug')}") Go to your profile
## Instruction:
Add sign up button if not logged in
## Code After:
extends ../../../components/layout/index--info
block vars
- extraClasses = 'no-messages body--static'
block body
.gs
h1 Are.na / Getting Started
.gs__body
include ./slides/1-channels.jade
include ./slides/2-blocks.jade
include ./slides/3-connections.jade
include ./slides/4-users.jade
include ./slides/5-feed.jade
.gs__profile
if user
a.btn(href="/#{user.get('slug')}") Go to your profile
else
a.btn(href="/#{user.get('slug')}") Sign up | extends ../../../components/layout/index--info
block vars
- extraClasses = 'no-messages body--static'
block body
.gs
h1 Are.na / Getting Started
.gs__body
include ./slides/1-channels.jade
include ./slides/2-blocks.jade
include ./slides/3-connections.jade
include ./slides/4-users.jade
include ./slides/5-feed.jade
- if user
- .gs__profile
? --
+ .gs__profile
+ if user
a.btn(href="/#{user.get('slug')}") Go to your profile
+ else
+ a.btn(href="/#{user.get('slug')}") Sign up | 6 | 0.352941 | 4 | 2 |
9825859eca1c54ad05454b958b9e0991ebbdf136 | website/static/js/pages/profile-account-settings-page.js | website/static/js/pages/profile-account-settings-page.js | 'use strict';
var $ = require('jquery');
var $osf = require('js/osfHelpers.js');
var accountSettings = require('js/accountSettings.js');
var changePassword = require('js/setPassword');
$(function() {
var viewModel = new accountSettings.UserProfileViewModel();
$osf.applyBindings(viewModel, '#connectedEmails');
viewModel.init();
new changePassword('#changePassword', 'change');
$osf.applyBindings(
new accountSettings.DeactivateAccountViewModel(),
'#deactivateAccount'
);
$osf.applyBindings(
new accountSettings.ExportAccountViewModel(),
'#exportAccount'
);
});
| 'use strict';
var $ = require('jquery');
var $osf = require('js/osfHelpers.js');
var accountSettings = require('js/accountSettings.js');
var SetPassword = require('js/setPassword');
$(function() {
var viewModel = new accountSettings.UserProfileViewModel();
$osf.applyBindings(viewModel, '#connectedEmails');
viewModel.init();
new SetPassword('#changePassword', 'change');
$osf.applyBindings(
new accountSettings.DeactivateAccountViewModel(),
'#deactivateAccount'
);
$osf.applyBindings(
new accountSettings.ExportAccountViewModel(),
'#exportAccount'
);
});
| Use proper name and args for setPassword | Use proper name and args for setPassword
| JavaScript | apache-2.0 | Johnetordoff/osf.io,HalcyonChimera/osf.io,monikagrabowska/osf.io,pattisdr/osf.io,cwisecarver/osf.io,alexschiller/osf.io,hmoco/osf.io,emetsger/osf.io,emetsger/osf.io,acshi/osf.io,wearpants/osf.io,samchrisinger/osf.io,mluo613/osf.io,Nesiehr/osf.io,felliott/osf.io,mfraezz/osf.io,Johnetordoff/osf.io,CenterForOpenScience/osf.io,cwisecarver/osf.io,samchrisinger/osf.io,felliott/osf.io,adlius/osf.io,amyshi188/osf.io,chennan47/osf.io,Nesiehr/osf.io,saradbowman/osf.io,Nesiehr/osf.io,cslzchen/osf.io,TomBaxter/osf.io,mluo613/osf.io,chrisseto/osf.io,leb2dg/osf.io,caneruguz/osf.io,sloria/osf.io,acshi/osf.io,erinspace/osf.io,mfraezz/osf.io,mfraezz/osf.io,baylee-d/osf.io,cslzchen/osf.io,samchrisinger/osf.io,alexschiller/osf.io,acshi/osf.io,rdhyee/osf.io,SSJohns/osf.io,sloria/osf.io,wearpants/osf.io,baylee-d/osf.io,brianjgeiger/osf.io,monikagrabowska/osf.io,laurenrevere/osf.io,felliott/osf.io,sloria/osf.io,SSJohns/osf.io,Nesiehr/osf.io,cwisecarver/osf.io,SSJohns/osf.io,DanielSBrown/osf.io,wearpants/osf.io,mluo613/osf.io,hmoco/osf.io,pattisdr/osf.io,mluo613/osf.io,mluo613/osf.io,caneruguz/osf.io,HalcyonChimera/osf.io,monikagrabowska/osf.io,saradbowman/osf.io,erinspace/osf.io,baylee-d/osf.io,DanielSBrown/osf.io,leb2dg/osf.io,leb2dg/osf.io,mfraezz/osf.io,CenterForOpenScience/osf.io,laurenrevere/osf.io,brianjgeiger/osf.io,chrisseto/osf.io,aaxelb/osf.io,caseyrollins/osf.io,chrisseto/osf.io,amyshi188/osf.io,cslzchen/osf.io,brianjgeiger/osf.io,HalcyonChimera/osf.io,caneruguz/osf.io,rdhyee/osf.io,alexschiller/osf.io,crcresearch/osf.io,icereval/osf.io,felliott/osf.io,chennan47/osf.io,Johnetordoff/osf.io,cslzchen/osf.io,aaxelb/osf.io,aaxelb/osf.io,rdhyee/osf.io,binoculars/osf.io,monikagrabowska/osf.io,acshi/osf.io,SSJohns/osf.io,adlius/osf.io,pattisdr/osf.io,acshi/osf.io,emetsger/osf.io,CenterForOpenScience/osf.io,caneruguz/osf.io,adlius/osf.io,icereval/osf.io,adlius/osf.io,DanielSBrown/osf.io,TomBaxter/osf.io,mattclark/osf.io,alexschiller/osf.io,crcresearch/osf.io,icereval/osf.io,CenterForOpenScience/osf.io,mattclark/osf.io,aaxelb/osf.io,hmoco/osf.io,binoculars/osf.io,rdhyee/osf.io,caseyrollins/osf.io,laurenrevere/osf.io,monikagrabowska/osf.io,TomBaxter/osf.io,cwisecarver/osf.io,Johnetordoff/osf.io,DanielSBrown/osf.io,brianjgeiger/osf.io,leb2dg/osf.io,crcresearch/osf.io,hmoco/osf.io,emetsger/osf.io,binoculars/osf.io,erinspace/osf.io,samchrisinger/osf.io,chrisseto/osf.io,HalcyonChimera/osf.io,mattclark/osf.io,amyshi188/osf.io,chennan47/osf.io,caseyrollins/osf.io,amyshi188/osf.io,wearpants/osf.io,alexschiller/osf.io | javascript | ## Code Before:
'use strict';
var $ = require('jquery');
var $osf = require('js/osfHelpers.js');
var accountSettings = require('js/accountSettings.js');
var changePassword = require('js/setPassword');
$(function() {
var viewModel = new accountSettings.UserProfileViewModel();
$osf.applyBindings(viewModel, '#connectedEmails');
viewModel.init();
new changePassword('#changePassword', 'change');
$osf.applyBindings(
new accountSettings.DeactivateAccountViewModel(),
'#deactivateAccount'
);
$osf.applyBindings(
new accountSettings.ExportAccountViewModel(),
'#exportAccount'
);
});
## Instruction:
Use proper name and args for setPassword
## Code After:
'use strict';
var $ = require('jquery');
var $osf = require('js/osfHelpers.js');
var accountSettings = require('js/accountSettings.js');
var SetPassword = require('js/setPassword');
$(function() {
var viewModel = new accountSettings.UserProfileViewModel();
$osf.applyBindings(viewModel, '#connectedEmails');
viewModel.init();
new SetPassword('#changePassword', 'change');
$osf.applyBindings(
new accountSettings.DeactivateAccountViewModel(),
'#deactivateAccount'
);
$osf.applyBindings(
new accountSettings.ExportAccountViewModel(),
'#exportAccount'
);
});
| 'use strict';
var $ = require('jquery');
var $osf = require('js/osfHelpers.js');
var accountSettings = require('js/accountSettings.js');
- var changePassword = require('js/setPassword');
? ^^^^^
+ var SetPassword = require('js/setPassword');
? ^ +
+
$(function() {
var viewModel = new accountSettings.UserProfileViewModel();
$osf.applyBindings(viewModel, '#connectedEmails');
viewModel.init();
- new changePassword('#changePassword', 'change');
? ^^^^^
+ new SetPassword('#changePassword', 'change');
? ^ +
$osf.applyBindings(
new accountSettings.DeactivateAccountViewModel(),
'#deactivateAccount'
);
$osf.applyBindings(
new accountSettings.ExportAccountViewModel(),
'#exportAccount'
);
}); | 5 | 0.208333 | 3 | 2 |
2bdfb9c7c5c51c86c46fcf724ffe0ce08ea0ebed | server/routes/index.js | server/routes/index.js | var _ = require('underscore');
var routes = [
'users',
'building',
'units'
];
module.exports.mount = function(app) {
_(routes).each(function(route){
require('./'+route+'_routes').mount(app);
});
};
| var _ = require('underscore');
var routes = [
'users',
'building'
];
module.exports.mount = function(app) {
_(routes).each(function(route){
require('./'+route+'_routes').mount(app);
});
};
| Fix server fatal error (loading non existant route) | Fix server fatal error (loading non existant route)
| JavaScript | mit | romain-grelet/HackersWars,romain-grelet/HackersWars | javascript | ## Code Before:
var _ = require('underscore');
var routes = [
'users',
'building',
'units'
];
module.exports.mount = function(app) {
_(routes).each(function(route){
require('./'+route+'_routes').mount(app);
});
};
## Instruction:
Fix server fatal error (loading non existant route)
## Code After:
var _ = require('underscore');
var routes = [
'users',
'building'
];
module.exports.mount = function(app) {
_(routes).each(function(route){
require('./'+route+'_routes').mount(app);
});
};
| var _ = require('underscore');
var routes = [
'users',
- 'building',
? -
+ 'building'
- 'units'
];
module.exports.mount = function(app) {
_(routes).each(function(route){
require('./'+route+'_routes').mount(app);
});
}; | 3 | 0.230769 | 1 | 2 |
359094d4a1a738527e788e851662b6a599e08c91 | lib/language_pack/ruby-rgeo.rb | lib/language_pack/ruby-rgeo.rb | class LanguagePack::Ruby < LanguagePack::Base
def rgeo_url(filename = nil)
"https://s3.amazonaws.com/camenischcreative/heroku-binaries/rgeo/#{filename}"
end
def binaries
{geos: '3.3', proj: '4.8'}
end
def binary_names
binaries.keys
end
alias_method :orig_default_config_vars, :default_config_vars
def default_config_vars
orig_default_config_vars.tap do |vars|
vars['BUNDLE_BUILD__RGEO'] = binary_names.map{|name| "--with-#{name}-dir=/app/bin/#{name}/lib" }.join(' ')
end
end
def install_rgeo_binary(name, version)
bin_dir = "bin/#{name}"
FileUtils.mkdir_p bin_dir
filename = "#{name}-#{version}.tgz"
topic("Downloading #{name} from #{rgeo_url(filename)}")
Dir.chdir(bin_dir) do |dir|
run("curl #{rgeo_url(filename)} -s -o - | tar xzf -")
end
end
def pwd
run('pwd').chomp
end
alias_method :orig_compile, :compile
def compile
binaries.each do |(name, version)|
install_rgeo_binary(name, version)
end
orig_compile
end
end
| class LanguagePack::Ruby < LanguagePack::Base
def rgeo_url(filename = nil)
"https://s3.amazonaws.com/camenischcreative/heroku-binaries/rgeo/#{filename}"
end
def binaries
{geos: '3.3', proj: '4.8'}
end
def binary_names
binaries.keys
end
alias_method :orig_default_config_vars, :default_config_vars
def default_config_vars
orig_default_config_vars.tap do |vars|
vars['BUNDLE_BUILD__RGEO'] = binary_names.map{|name| "--with-#{name}-dir=/app/bin/#{name}/lib" }.join(' ')
end
end
def install_rgeo_binary(name, version)
bin_dir = "bin/#{name}"
FileUtils.mkdir_p bin_dir
filename = "#{name}-#{version}.tgz"
topic("Downloading #{name} from #{rgeo_url(filename)}")
Dir.chdir(bin_dir) do |dir|
run("curl #{rgeo_url(filename)} -s -o - | tar xzf -")
end
end
def pwd
run('pwd').chomp
end
alias_method :orig_compile, :compile
def compile
# Recompile all gems if 'requested' via environment variable
cache_clear("vendor/bundle") if ENV['RECOMPILE_ALL_GEMS'] =~ /^(true|on|yes|1)$/
binaries.each do |(name, version)|
install_rgeo_binary(name, version)
end
orig_compile
end
end
| Allow the forced recopilation of all gems during slug compilation. | Allow the forced recopilation of all gems during slug compilation.
| Ruby | mit | jcamenisch/heroku-buildpack-rgeo,jcamenisch/heroku-buildpack-rgeo | ruby | ## Code Before:
class LanguagePack::Ruby < LanguagePack::Base
def rgeo_url(filename = nil)
"https://s3.amazonaws.com/camenischcreative/heroku-binaries/rgeo/#{filename}"
end
def binaries
{geos: '3.3', proj: '4.8'}
end
def binary_names
binaries.keys
end
alias_method :orig_default_config_vars, :default_config_vars
def default_config_vars
orig_default_config_vars.tap do |vars|
vars['BUNDLE_BUILD__RGEO'] = binary_names.map{|name| "--with-#{name}-dir=/app/bin/#{name}/lib" }.join(' ')
end
end
def install_rgeo_binary(name, version)
bin_dir = "bin/#{name}"
FileUtils.mkdir_p bin_dir
filename = "#{name}-#{version}.tgz"
topic("Downloading #{name} from #{rgeo_url(filename)}")
Dir.chdir(bin_dir) do |dir|
run("curl #{rgeo_url(filename)} -s -o - | tar xzf -")
end
end
def pwd
run('pwd').chomp
end
alias_method :orig_compile, :compile
def compile
binaries.each do |(name, version)|
install_rgeo_binary(name, version)
end
orig_compile
end
end
## Instruction:
Allow the forced recopilation of all gems during slug compilation.
## Code After:
class LanguagePack::Ruby < LanguagePack::Base
def rgeo_url(filename = nil)
"https://s3.amazonaws.com/camenischcreative/heroku-binaries/rgeo/#{filename}"
end
def binaries
{geos: '3.3', proj: '4.8'}
end
def binary_names
binaries.keys
end
alias_method :orig_default_config_vars, :default_config_vars
def default_config_vars
orig_default_config_vars.tap do |vars|
vars['BUNDLE_BUILD__RGEO'] = binary_names.map{|name| "--with-#{name}-dir=/app/bin/#{name}/lib" }.join(' ')
end
end
def install_rgeo_binary(name, version)
bin_dir = "bin/#{name}"
FileUtils.mkdir_p bin_dir
filename = "#{name}-#{version}.tgz"
topic("Downloading #{name} from #{rgeo_url(filename)}")
Dir.chdir(bin_dir) do |dir|
run("curl #{rgeo_url(filename)} -s -o - | tar xzf -")
end
end
def pwd
run('pwd').chomp
end
alias_method :orig_compile, :compile
def compile
# Recompile all gems if 'requested' via environment variable
cache_clear("vendor/bundle") if ENV['RECOMPILE_ALL_GEMS'] =~ /^(true|on|yes|1)$/
binaries.each do |(name, version)|
install_rgeo_binary(name, version)
end
orig_compile
end
end
| class LanguagePack::Ruby < LanguagePack::Base
def rgeo_url(filename = nil)
"https://s3.amazonaws.com/camenischcreative/heroku-binaries/rgeo/#{filename}"
end
def binaries
{geos: '3.3', proj: '4.8'}
end
def binary_names
binaries.keys
end
alias_method :orig_default_config_vars, :default_config_vars
def default_config_vars
orig_default_config_vars.tap do |vars|
vars['BUNDLE_BUILD__RGEO'] = binary_names.map{|name| "--with-#{name}-dir=/app/bin/#{name}/lib" }.join(' ')
end
end
def install_rgeo_binary(name, version)
bin_dir = "bin/#{name}"
FileUtils.mkdir_p bin_dir
filename = "#{name}-#{version}.tgz"
topic("Downloading #{name} from #{rgeo_url(filename)}")
Dir.chdir(bin_dir) do |dir|
run("curl #{rgeo_url(filename)} -s -o - | tar xzf -")
end
end
def pwd
run('pwd').chomp
end
alias_method :orig_compile, :compile
def compile
+ # Recompile all gems if 'requested' via environment variable
+ cache_clear("vendor/bundle") if ENV['RECOMPILE_ALL_GEMS'] =~ /^(true|on|yes|1)$/
binaries.each do |(name, version)|
install_rgeo_binary(name, version)
end
orig_compile
end
end | 2 | 0.047619 | 2 | 0 |
30a32766d842f44ff1ebd5dee9dc480091227126 | README.rst | README.rst | .. image:: https://magnum.travis-ci.com/camptocamp/mapfish-printV3.svg?token=MAvNLXTm92VaWzkhpFvd&branch=development
:target: https://magnum.travis-ci.com/camptocamp/mapfish-printV3
Please read the documentation available here:
http://mapfish.github.io/mapfish-print/#/overview
Build
-----
Execute the following command():
.. code::
> ./gradlew build
This will build three artifacts: print-servlet-xxx.war, print-lib.jar, print-standalone.jar
Deploy
------
The following command will build and upload all artifacts to the maven central repository.
.. code::
> ./gradlew uploadArchives -DsshPassphrase=...
To use in Eclipse
-----------------
Create Eclipse project metadata:
.. code::
> ./gradlew eclipse
Import project into Eclipse
Run from commandline
--------------------
The following command will run the mapfish printer. The arguments must be supplied to the -PprintArgs="..." parameter.
To list all the commandline options then execute:
.. code::
> ./gradlew run -PprintArgs="-help"
.. code::
> ./gradlew run -PprintArgs="-config examples/config.yaml -spec examples/spec.json -output ./output.pdf"
Run in Eclipse
--------------
- Create new Java Run Configuration
- Main class is org.mapfish.print.cli.Main
- Program arguments: -config samples/config.yaml -spec samples/spec.json -output $HOME/print.pdf
| .. image:: https://travis-ci.org/camptocamp/mapfish-printV3.svg?branch=development
:target: https://travis-ci.org/camptocamp/mapfish-printV3
Please read the documentation available here:
http://mapfish.github.io/mapfish-print/#/overview
Build
-----
Execute the following command():
.. code::
> ./gradlew build
This will build three artifacts: print-servlet-xxx.war, print-lib.jar, print-standalone.jar
Deploy
------
The following command will build and upload all artifacts to the maven central repository.
.. code::
> ./gradlew uploadArchives -DsshPassphrase=...
To use in Eclipse
-----------------
Create Eclipse project metadata:
.. code::
> ./gradlew eclipse
Import project into Eclipse
Run from commandline
--------------------
The following command will run the mapfish printer. The arguments must be supplied to the -PprintArgs="..." parameter.
To list all the commandline options then execute:
.. code::
> ./gradlew run -PprintArgs="-help"
.. code::
> ./gradlew run -PprintArgs="-config examples/config.yaml -spec examples/spec.json -output ./output.pdf"
Run in Eclipse
--------------
- Create new Java Run Configuration
- Main class is org.mapfish.print.cli.Main
- Program arguments: -config samples/config.yaml -spec samples/spec.json -output $HOME/print.pdf
| Fix Travis image in readme | Fix Travis image in readme
| reStructuredText | bsd-2-clause | sbrunner/mapfish-print,marcjansen/mapfish-print,Galigeo/mapfish-print,jesseeichar/mapfish-printV3,mapfish/mapfish-print,marcjansen/mapfish-print,jesseeichar/mapfish-printV3,Galigeo/mapfish-print,sbrunner/mapfish-print,jesseeichar/mapfish-printV3,sbrunner/mapfish-print,marcjansen/mapfish-print,jesseeichar/mapfish-printV3,jesseeichar/mapfish-printV3,mapfish/mapfish-print,Galigeo/mapfish-print,mapfish/mapfish-print,mapfish/mapfish-print,marcjansen/mapfish-print,mapfish/mapfish-print | restructuredtext | ## Code Before:
.. image:: https://magnum.travis-ci.com/camptocamp/mapfish-printV3.svg?token=MAvNLXTm92VaWzkhpFvd&branch=development
:target: https://magnum.travis-ci.com/camptocamp/mapfish-printV3
Please read the documentation available here:
http://mapfish.github.io/mapfish-print/#/overview
Build
-----
Execute the following command():
.. code::
> ./gradlew build
This will build three artifacts: print-servlet-xxx.war, print-lib.jar, print-standalone.jar
Deploy
------
The following command will build and upload all artifacts to the maven central repository.
.. code::
> ./gradlew uploadArchives -DsshPassphrase=...
To use in Eclipse
-----------------
Create Eclipse project metadata:
.. code::
> ./gradlew eclipse
Import project into Eclipse
Run from commandline
--------------------
The following command will run the mapfish printer. The arguments must be supplied to the -PprintArgs="..." parameter.
To list all the commandline options then execute:
.. code::
> ./gradlew run -PprintArgs="-help"
.. code::
> ./gradlew run -PprintArgs="-config examples/config.yaml -spec examples/spec.json -output ./output.pdf"
Run in Eclipse
--------------
- Create new Java Run Configuration
- Main class is org.mapfish.print.cli.Main
- Program arguments: -config samples/config.yaml -spec samples/spec.json -output $HOME/print.pdf
## Instruction:
Fix Travis image in readme
## Code After:
.. image:: https://travis-ci.org/camptocamp/mapfish-printV3.svg?branch=development
:target: https://travis-ci.org/camptocamp/mapfish-printV3
Please read the documentation available here:
http://mapfish.github.io/mapfish-print/#/overview
Build
-----
Execute the following command():
.. code::
> ./gradlew build
This will build three artifacts: print-servlet-xxx.war, print-lib.jar, print-standalone.jar
Deploy
------
The following command will build and upload all artifacts to the maven central repository.
.. code::
> ./gradlew uploadArchives -DsshPassphrase=...
To use in Eclipse
-----------------
Create Eclipse project metadata:
.. code::
> ./gradlew eclipse
Import project into Eclipse
Run from commandline
--------------------
The following command will run the mapfish printer. The arguments must be supplied to the -PprintArgs="..." parameter.
To list all the commandline options then execute:
.. code::
> ./gradlew run -PprintArgs="-help"
.. code::
> ./gradlew run -PprintArgs="-config examples/config.yaml -spec examples/spec.json -output ./output.pdf"
Run in Eclipse
--------------
- Create new Java Run Configuration
- Main class is org.mapfish.print.cli.Main
- Program arguments: -config samples/config.yaml -spec samples/spec.json -output $HOME/print.pdf
| - .. image:: https://magnum.travis-ci.com/camptocamp/mapfish-printV3.svg?token=MAvNLXTm92VaWzkhpFvd&branch=development
? ------- - ^ --------------------------- ---
+ .. image:: https://travis-ci.org/camptocamp/mapfish-printV3.svg?branch=development
? ^^
- :target: https://magnum.travis-ci.com/camptocamp/mapfish-printV3
? ------- - ^
+ :target: https://travis-ci.org/camptocamp/mapfish-printV3
? + ^^
-
Please read the documentation available here:
http://mapfish.github.io/mapfish-print/#/overview
Build
-----
Execute the following command():
.. code::
> ./gradlew build
This will build three artifacts: print-servlet-xxx.war, print-lib.jar, print-standalone.jar
Deploy
------
The following command will build and upload all artifacts to the maven central repository.
.. code::
> ./gradlew uploadArchives -DsshPassphrase=...
To use in Eclipse
-----------------
Create Eclipse project metadata:
.. code::
> ./gradlew eclipse
Import project into Eclipse
Run from commandline
--------------------
The following command will run the mapfish printer. The arguments must be supplied to the -PprintArgs="..." parameter.
To list all the commandline options then execute:
.. code::
> ./gradlew run -PprintArgs="-help"
.. code::
> ./gradlew run -PprintArgs="-config examples/config.yaml -spec examples/spec.json -output ./output.pdf"
Run in Eclipse
--------------
- Create new Java Run Configuration
- Main class is org.mapfish.print.cli.Main
- Program arguments: -config samples/config.yaml -spec samples/spec.json -output $HOME/print.pdf | 5 | 0.078125 | 2 | 3 |
0d8de7de0b4e847bfa2c3ea75af7493627f8f2d1 | tests/custom_decorator.spec.ts | tests/custom_decorator.spec.ts | import {
getType,
mustGetType
} from '../src';
function UserDecorator(target: any) { }
function OtherDecorator(target: any) { }
@UserDecorator
export class MyClassA {
a: string;
}
@OtherDecorator
export class MyClassB {
a: string;
}
describe('Custom Decorators', () => {
// Note UserDecorator is configured in webpack.test.js
it('should allow UserDecorator', () => {
const clsType = getType(MyClassA);
expect(clsType).not.toBeNull();
});
it('should throw on non-decorated', () => {
expect(() => {
mustGetType(MyClassB);
}).toThrow();
});
});
| import {
getType,
mustGetType
} from '../src';
function UserDecorator(target: any) {
// Verifies that tsruntime decorations are
// available before user decorator is applied.
const clsType = mustGetType(target);
}
function OtherDecorator(target: any) { }
@UserDecorator
export class MyClassA {
a: string;
}
@OtherDecorator
export class MyClassB {
a: string;
}
describe('Custom Decorators', () => {
// Note UserDecorator is configured in webpack.test.js
it('should allow UserDecorator', () => {
const clsType = getType(MyClassA);
expect(clsType).not.toBeNull();
});
it('should throw on non-decorated', () => {
expect(() => {
mustGetType(MyClassB);
}).toThrow();
});
});
| Add a test to check the decorator ordering. | Add a test to check the decorator ordering.
This makes sure we have runtime information while the decorators
are executing.
| TypeScript | mit | goloveychuk/tsruntime,goloveychuk/tsruntime | typescript | ## Code Before:
import {
getType,
mustGetType
} from '../src';
function UserDecorator(target: any) { }
function OtherDecorator(target: any) { }
@UserDecorator
export class MyClassA {
a: string;
}
@OtherDecorator
export class MyClassB {
a: string;
}
describe('Custom Decorators', () => {
// Note UserDecorator is configured in webpack.test.js
it('should allow UserDecorator', () => {
const clsType = getType(MyClassA);
expect(clsType).not.toBeNull();
});
it('should throw on non-decorated', () => {
expect(() => {
mustGetType(MyClassB);
}).toThrow();
});
});
## Instruction:
Add a test to check the decorator ordering.
This makes sure we have runtime information while the decorators
are executing.
## Code After:
import {
getType,
mustGetType
} from '../src';
function UserDecorator(target: any) {
// Verifies that tsruntime decorations are
// available before user decorator is applied.
const clsType = mustGetType(target);
}
function OtherDecorator(target: any) { }
@UserDecorator
export class MyClassA {
a: string;
}
@OtherDecorator
export class MyClassB {
a: string;
}
describe('Custom Decorators', () => {
// Note UserDecorator is configured in webpack.test.js
it('should allow UserDecorator', () => {
const clsType = getType(MyClassA);
expect(clsType).not.toBeNull();
});
it('should throw on non-decorated', () => {
expect(() => {
mustGetType(MyClassB);
}).toThrow();
});
});
| import {
getType,
mustGetType
} from '../src';
- function UserDecorator(target: any) { }
? --
+ function UserDecorator(target: any) {
+ // Verifies that tsruntime decorations are
+ // available before user decorator is applied.
+ const clsType = mustGetType(target);
+ }
function OtherDecorator(target: any) { }
@UserDecorator
export class MyClassA {
a: string;
}
@OtherDecorator
export class MyClassB {
a: string;
}
describe('Custom Decorators', () => {
// Note UserDecorator is configured in webpack.test.js
it('should allow UserDecorator', () => {
const clsType = getType(MyClassA);
expect(clsType).not.toBeNull();
});
it('should throw on non-decorated', () => {
expect(() => {
mustGetType(MyClassB);
}).toThrow();
});
});
| 6 | 0.171429 | 5 | 1 |
5446bf5fd6990ce10eee5620e367c0348a3f1b90 | src/Service/AgentsDescription.php | src/Service/AgentsDescription.php | <?php
namespace GrooveHQ\Service;
class AgentsDescription extends BasicServiceDescription
{
protected function getServiceDescription()
{
return [
'operations' => [
'find' => [
'summary' => 'Finding one agent',
'httpMethod' => 'GET',
'uri' => '/agents/{agent_email}',
'parameters' => [
'agent_email' => [
'description' => 'The agent email',
'type' => 'string',
'location' => 'uri',
],
]
],
]
];
}
}
| <?php
namespace GrooveHQ\Service;
class AgentsDescription extends BasicServiceDescription
{
protected function getServiceDescription()
{
return [
'operations' => [
'list' => [
'summary' => 'Listing agents',
'httpMethod' => 'GET',
'uri' => '/agents',
'parameters' => [
'group' => [
'description' => 'The ID of a Group to filter by',
'type' => 'string',
'required' => false,
'location' => 'query'
]
],
],
'find' => [
'summary' => 'Finding one agent',
'httpMethod' => 'GET',
'uri' => '/agents/{agent_email}',
'parameters' => [
'agent_email' => [
'description' => 'The agent email',
'type' => 'string',
'location' => 'uri',
],
]
],
]
];
}
}
| Add method for listing agents | Add method for listing agents
| PHP | mit | jadb/php-groovehq,chefsplate/php-groovehq | php | ## Code Before:
<?php
namespace GrooveHQ\Service;
class AgentsDescription extends BasicServiceDescription
{
protected function getServiceDescription()
{
return [
'operations' => [
'find' => [
'summary' => 'Finding one agent',
'httpMethod' => 'GET',
'uri' => '/agents/{agent_email}',
'parameters' => [
'agent_email' => [
'description' => 'The agent email',
'type' => 'string',
'location' => 'uri',
],
]
],
]
];
}
}
## Instruction:
Add method for listing agents
## Code After:
<?php
namespace GrooveHQ\Service;
class AgentsDescription extends BasicServiceDescription
{
protected function getServiceDescription()
{
return [
'operations' => [
'list' => [
'summary' => 'Listing agents',
'httpMethod' => 'GET',
'uri' => '/agents',
'parameters' => [
'group' => [
'description' => 'The ID of a Group to filter by',
'type' => 'string',
'required' => false,
'location' => 'query'
]
],
],
'find' => [
'summary' => 'Finding one agent',
'httpMethod' => 'GET',
'uri' => '/agents/{agent_email}',
'parameters' => [
'agent_email' => [
'description' => 'The agent email',
'type' => 'string',
'location' => 'uri',
],
]
],
]
];
}
}
| <?php
namespace GrooveHQ\Service;
class AgentsDescription extends BasicServiceDescription
{
protected function getServiceDescription()
{
return [
'operations' => [
+ 'list' => [
+ 'summary' => 'Listing agents',
+ 'httpMethod' => 'GET',
+ 'uri' => '/agents',
+ 'parameters' => [
+ 'group' => [
+ 'description' => 'The ID of a Group to filter by',
+ 'type' => 'string',
+ 'required' => false,
+ 'location' => 'query'
+ ]
+ ],
+ ],
'find' => [
'summary' => 'Finding one agent',
'httpMethod' => 'GET',
'uri' => '/agents/{agent_email}',
'parameters' => [
'agent_email' => [
'description' => 'The agent email',
'type' => 'string',
'location' => 'uri',
],
]
],
]
];
}
} | 13 | 0.464286 | 13 | 0 |
1da89c8332dadfe8e4f169caef6df2a6bc73411f | scripts/release.sh | scripts/release.sh |
set -e
function run {
if [[ -z "$DRY_RUN" ]]
then
$@
else
echo "[dry-run] $@"
fi
}
function setup_ssh {
mkdir -p /root/.ssh
if [[ -d "/ssh" ]]
then
cp /ssh/* /root/.ssh
chmod -R 600 /root/.ssh
fi
printf "Host github.com\n\tStrictHostKeyChecking no\n" >> /root/.ssh/config
}
function publish {
pip install twine
twine_cmd="twine upload dist/*"
run $twine_cmd -u "$TWINE_USERNAME" -p "$TWINE_PASSWORD"
}
function tag {
version=$(grep __version__ construi/__version__.py | cut -d "'" -f2)
git_tag="v$version"
run "git tag $git_tag && git push origin $git_tag"
}
setup_ssh
publish
tag
|
set -e
function run {
if [[ -z "$DRY_RUN" ]]
then
$@
else
echo "[dry-run] $@"
fi
}
function setup_ssh {
mkdir -p /root/.ssh
if [[ -d "/ssh" ]]
then
cp /ssh/* /root/.ssh
chmod -R 600 /root/.ssh
fi
printf "Host github.com\n\tStrictHostKeyChecking no\n" >> /root/.ssh/config
}
function publish {
pip install twine
twine_cmd="twine upload dist/*"
run $twine_cmd -u "$TWINE_USERNAME" -p "$TWINE_PASSWORD"
}
function tag {
version=$(grep __version__ construi/__version__.py | cut -d "'" -f2)
git_tag="v$version"
run git tag "$git_tag"
run git push origin "$git_tag"
}
setup_ssh
echo "Publising..."
publish
echo "Tagging..."
tag
echo "Done."
| Fix bug in git tagging | Fix bug in git tagging
| Shell | apache-2.0 | lstephen/construi | shell | ## Code Before:
set -e
function run {
if [[ -z "$DRY_RUN" ]]
then
$@
else
echo "[dry-run] $@"
fi
}
function setup_ssh {
mkdir -p /root/.ssh
if [[ -d "/ssh" ]]
then
cp /ssh/* /root/.ssh
chmod -R 600 /root/.ssh
fi
printf "Host github.com\n\tStrictHostKeyChecking no\n" >> /root/.ssh/config
}
function publish {
pip install twine
twine_cmd="twine upload dist/*"
run $twine_cmd -u "$TWINE_USERNAME" -p "$TWINE_PASSWORD"
}
function tag {
version=$(grep __version__ construi/__version__.py | cut -d "'" -f2)
git_tag="v$version"
run "git tag $git_tag && git push origin $git_tag"
}
setup_ssh
publish
tag
## Instruction:
Fix bug in git tagging
## Code After:
set -e
function run {
if [[ -z "$DRY_RUN" ]]
then
$@
else
echo "[dry-run] $@"
fi
}
function setup_ssh {
mkdir -p /root/.ssh
if [[ -d "/ssh" ]]
then
cp /ssh/* /root/.ssh
chmod -R 600 /root/.ssh
fi
printf "Host github.com\n\tStrictHostKeyChecking no\n" >> /root/.ssh/config
}
function publish {
pip install twine
twine_cmd="twine upload dist/*"
run $twine_cmd -u "$TWINE_USERNAME" -p "$TWINE_PASSWORD"
}
function tag {
version=$(grep __version__ construi/__version__.py | cut -d "'" -f2)
git_tag="v$version"
run git tag "$git_tag"
run git push origin "$git_tag"
}
setup_ssh
echo "Publising..."
publish
echo "Tagging..."
tag
echo "Done."
|
set -e
function run {
if [[ -z "$DRY_RUN" ]]
then
$@
else
echo "[dry-run] $@"
fi
}
function setup_ssh {
mkdir -p /root/.ssh
if [[ -d "/ssh" ]]
then
cp /ssh/* /root/.ssh
chmod -R 600 /root/.ssh
fi
printf "Host github.com\n\tStrictHostKeyChecking no\n" >> /root/.ssh/config
}
function publish {
pip install twine
twine_cmd="twine upload dist/*"
run $twine_cmd -u "$TWINE_USERNAME" -p "$TWINE_PASSWORD"
}
function tag {
version=$(grep __version__ construi/__version__.py | cut -d "'" -f2)
git_tag="v$version"
- run "git tag $git_tag && git push origin $git_tag"
+ run git tag "$git_tag"
+ run git push origin "$git_tag"
}
setup_ssh
+
+ echo "Publising..."
publish
+
+ echo "Tagging..."
tag
+ echo "Done."
+ | 9 | 0.209302 | 8 | 1 |
e6f4faff9aca236ce4bbd89f9795ef4f1fb8aa98 | service/app/Model/ProductSuggestion.php | service/app/Model/ProductSuggestion.php | <?php
App::uses('AppModel', 'Model');
/**
* Product model
*/
class ProductSuggestion extends AppModel
{
public $belongsTo = array(
'Person',
'Product'
);
}
| <?php
App::uses('AppModel', 'Model');
/**
* Product model
*/
class ProductSuggestion extends AppModel
{
public $belongsTo = array(
'Person',
'Product',
'Recommender' => array(
'className' => 'Person',
'foreignKey' => 'recommender_id'
)
);
}
| Define the recommender of a product. | Define the recommender of a product.
| PHP | mit | burnflare/CrowdBuy,burnflare/CrowdBuy | php | ## Code Before:
<?php
App::uses('AppModel', 'Model');
/**
* Product model
*/
class ProductSuggestion extends AppModel
{
public $belongsTo = array(
'Person',
'Product'
);
}
## Instruction:
Define the recommender of a product.
## Code After:
<?php
App::uses('AppModel', 'Model');
/**
* Product model
*/
class ProductSuggestion extends AppModel
{
public $belongsTo = array(
'Person',
'Product',
'Recommender' => array(
'className' => 'Person',
'foreignKey' => 'recommender_id'
)
);
}
| <?php
App::uses('AppModel', 'Model');
/**
* Product model
*/
class ProductSuggestion extends AppModel
{
public $belongsTo = array(
'Person',
- 'Product'
+ 'Product',
? +
+ 'Recommender' => array(
+ 'className' => 'Person',
+ 'foreignKey' => 'recommender_id'
+ )
);
} | 6 | 0.461538 | 5 | 1 |
f856d6b0a30a4c07f86346a4b8b049b5c16ec49a | connectivity/drivers/mbedtls/FEATURE_CRYPTOCELL310/CMakeLists.txt | connectivity/drivers/mbedtls/FEATURE_CRYPTOCELL310/CMakeLists.txt |
mbed_add_cmake_directory_if_labels("TARGET")
add_subdirectory(binaries)
target_include_directories(mbed-os
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/include
${CMAKE_CURRENT_SOURCE_DIR}/include/cryptocell310
${CMAKE_CURRENT_SOURCE_DIR}/include/internal
)
target_sources(mbed-os
PRIVATE
source/aes_alt.c
source/cc_internal.c
source/ccm_alt.c
source/cmac_alt.c
source/ecdh_alt.c
source/ecdsa_alt.c
source/sha1_alt.c
source/sha256_alt.c
source/sha512_alt.c
source/trng.c
)
|
mbed_add_cmake_directory_if_labels("TARGET")
add_subdirectory(binaries)
target_include_directories(mbed-os
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/include
${CMAKE_CURRENT_SOURCE_DIR}/include/cryptocell310
${CMAKE_CURRENT_SOURCE_DIR}/include/cryptocell310/internal
)
target_sources(mbed-os
PRIVATE
source/aes_alt.c
source/cc_internal.c
source/ccm_alt.c
source/cmac_alt.c
source/ecdh_alt.c
source/ecdsa_alt.c
source/sha1_alt.c
source/sha256_alt.c
source/sha512_alt.c
source/trng.c
)
| Fix include path for Cryptocell | CMake: Fix include path for Cryptocell
| Text | apache-2.0 | mbedmicro/mbed,mbedmicro/mbed,mbedmicro/mbed,mbedmicro/mbed,mbedmicro/mbed | text | ## Code Before:
mbed_add_cmake_directory_if_labels("TARGET")
add_subdirectory(binaries)
target_include_directories(mbed-os
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/include
${CMAKE_CURRENT_SOURCE_DIR}/include/cryptocell310
${CMAKE_CURRENT_SOURCE_DIR}/include/internal
)
target_sources(mbed-os
PRIVATE
source/aes_alt.c
source/cc_internal.c
source/ccm_alt.c
source/cmac_alt.c
source/ecdh_alt.c
source/ecdsa_alt.c
source/sha1_alt.c
source/sha256_alt.c
source/sha512_alt.c
source/trng.c
)
## Instruction:
CMake: Fix include path for Cryptocell
## Code After:
mbed_add_cmake_directory_if_labels("TARGET")
add_subdirectory(binaries)
target_include_directories(mbed-os
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/include
${CMAKE_CURRENT_SOURCE_DIR}/include/cryptocell310
${CMAKE_CURRENT_SOURCE_DIR}/include/cryptocell310/internal
)
target_sources(mbed-os
PRIVATE
source/aes_alt.c
source/cc_internal.c
source/ccm_alt.c
source/cmac_alt.c
source/ecdh_alt.c
source/ecdsa_alt.c
source/sha1_alt.c
source/sha256_alt.c
source/sha512_alt.c
source/trng.c
)
|
mbed_add_cmake_directory_if_labels("TARGET")
add_subdirectory(binaries)
target_include_directories(mbed-os
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/include
${CMAKE_CURRENT_SOURCE_DIR}/include/cryptocell310
- ${CMAKE_CURRENT_SOURCE_DIR}/include/internal
+ ${CMAKE_CURRENT_SOURCE_DIR}/include/cryptocell310/internal
? ++++++++++++++
)
target_sources(mbed-os
PRIVATE
source/aes_alt.c
source/cc_internal.c
source/ccm_alt.c
source/cmac_alt.c
source/ecdh_alt.c
source/ecdsa_alt.c
source/sha1_alt.c
source/sha256_alt.c
source/sha512_alt.c
source/trng.c
) | 2 | 0.08 | 1 | 1 |
fc54df21433659506729f05f7b3164d6fa7219f9 | code/administrator/components/com_pages/views/modules/html.php | code/administrator/components/com_pages/views/modules/html.php | <?php
/**
* @version $Id$
* @package Nooku_Server
* @subpackage Pages
* @copyright Copyright (C) 2011 - 2012 Timble CVBA and Contributors. (http://www.timble.net).
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
* @link http://www.nooku.org
*/
/**
* Modules Html View Class
*
* @author Stian Didriksen <http://nooku.assembla.com/profile/stiandidriksen>
* @package Nooku_Server
* @subpackage Pages
*/
class ComPagesViewModulesHtml extends ComDefaultViewHtml
{
public function display()
{
//Load language files for each module
if($this->getLayout() == 'list')
{
foreach($this->getModel()->getList() as $module)
{
$path = $this->getIdentifier()->getApplication($module->application);
JFactory::getLanguage()->load('mod_'.$module->module->path[1], $path );
}
}
return parent::display();
}
} | <?php
/**
* @version $Id$
* @package Nooku_Server
* @subpackage Pages
* @copyright Copyright (C) 2011 - 2012 Timble CVBA and Contributors. (http://www.timble.net).
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
* @link http://www.nooku.org
*/
/**
* Modules Html View Class
*
* @author Stian Didriksen <http://nooku.assembla.com/profile/stiandidriksen>
* @package Nooku_Server
* @subpackage Pages
*/
class ComPagesViewModulesHtml extends ComDefaultViewHtml
{
public function display()
{
//Load language files for each module
if($this->getLayout() == 'list')
{
foreach($this->getModel()->getList() as $module)
{
$path = $this->getIdentifier()->getApplication($module->application);
JFactory::getLanguage()->load($module->getIdentifier()->package, $module->name, $path );
}
}
return parent::display();
}
} | Load module language files using package and module name. | Load module language files using package and module name.
| PHP | mpl-2.0 | nooku/nooku-platform,nooku/nooku-platform,timble/kodekit-platform,timble/kodekit-platform,timble/kodekit-platform,timble/kodekit-platform,nooku/nooku-platform,nooku/nooku-platform,nooku/nooku-platform,timble/kodekit-platform | php | ## Code Before:
<?php
/**
* @version $Id$
* @package Nooku_Server
* @subpackage Pages
* @copyright Copyright (C) 2011 - 2012 Timble CVBA and Contributors. (http://www.timble.net).
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
* @link http://www.nooku.org
*/
/**
* Modules Html View Class
*
* @author Stian Didriksen <http://nooku.assembla.com/profile/stiandidriksen>
* @package Nooku_Server
* @subpackage Pages
*/
class ComPagesViewModulesHtml extends ComDefaultViewHtml
{
public function display()
{
//Load language files for each module
if($this->getLayout() == 'list')
{
foreach($this->getModel()->getList() as $module)
{
$path = $this->getIdentifier()->getApplication($module->application);
JFactory::getLanguage()->load('mod_'.$module->module->path[1], $path );
}
}
return parent::display();
}
}
## Instruction:
Load module language files using package and module name.
## Code After:
<?php
/**
* @version $Id$
* @package Nooku_Server
* @subpackage Pages
* @copyright Copyright (C) 2011 - 2012 Timble CVBA and Contributors. (http://www.timble.net).
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
* @link http://www.nooku.org
*/
/**
* Modules Html View Class
*
* @author Stian Didriksen <http://nooku.assembla.com/profile/stiandidriksen>
* @package Nooku_Server
* @subpackage Pages
*/
class ComPagesViewModulesHtml extends ComDefaultViewHtml
{
public function display()
{
//Load language files for each module
if($this->getLayout() == 'list')
{
foreach($this->getModel()->getList() as $module)
{
$path = $this->getIdentifier()->getApplication($module->application);
JFactory::getLanguage()->load($module->getIdentifier()->package, $module->name, $path );
}
}
return parent::display();
}
} | <?php
/**
* @version $Id$
* @package Nooku_Server
* @subpackage Pages
* @copyright Copyright (C) 2011 - 2012 Timble CVBA and Contributors. (http://www.timble.net).
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
* @link http://www.nooku.org
*/
/**
* Modules Html View Class
*
* @author Stian Didriksen <http://nooku.assembla.com/profile/stiandidriksen>
* @package Nooku_Server
* @subpackage Pages
*/
class ComPagesViewModulesHtml extends ComDefaultViewHtml
{
public function display()
{
//Load language files for each module
if($this->getLayout() == 'list')
{
foreach($this->getModel()->getList() as $module)
{
$path = $this->getIdentifier()->getApplication($module->application);
- JFactory::getLanguage()->load('mod_'.$module->module->path[1], $path );
? ------- ^ ^^^^^
+ JFactory::getLanguage()->load($module->getIdentifier()->package, $module->name, $path );
? +++++++++++++++++++++++++++ ^ ^^
}
}
return parent::display();
}
} | 2 | 0.058824 | 1 | 1 |
8564a355473afe76c307701c5c347d58d0f7ca18 | test_ir.py | test_ir.py | import unittest
import kerneltest
class IRkernelTests(kerneltest.KernelTests):
kernel_name = "ir"
language_name = "R"
code_hello_world = "print('hello, world')"
completion_samples = [
{
'text': 'zi',
'matches': {'zip'},
},
]
if __name__ == '__main__':
unittest.main()
| import unittest
import kerneltest
class IRkernelTests(kerneltest.KernelTests):
kernel_name = "ir"
language_name = "R"
code_hello_world = "print('hello, world')"
completion_samples = [
{
'text': 'zi',
'matches': {'zip'},
},
]
complete_code_samples = ['1', "print('hello, world')", "f <- function(x) {\n x*2\n}"]
incomplete_code_samples = ["print('hello", "f <- function(x) {\n x*2"]
if __name__ == '__main__':
unittest.main()
| Add tests for is_complete requests | Add tests for is_complete requests
| Python | mit | ibm-et/IRkernel,ibm-et/IRkernel | python | ## Code Before:
import unittest
import kerneltest
class IRkernelTests(kerneltest.KernelTests):
kernel_name = "ir"
language_name = "R"
code_hello_world = "print('hello, world')"
completion_samples = [
{
'text': 'zi',
'matches': {'zip'},
},
]
if __name__ == '__main__':
unittest.main()
## Instruction:
Add tests for is_complete requests
## Code After:
import unittest
import kerneltest
class IRkernelTests(kerneltest.KernelTests):
kernel_name = "ir"
language_name = "R"
code_hello_world = "print('hello, world')"
completion_samples = [
{
'text': 'zi',
'matches': {'zip'},
},
]
complete_code_samples = ['1', "print('hello, world')", "f <- function(x) {\n x*2\n}"]
incomplete_code_samples = ["print('hello", "f <- function(x) {\n x*2"]
if __name__ == '__main__':
unittest.main()
| import unittest
import kerneltest
class IRkernelTests(kerneltest.KernelTests):
kernel_name = "ir"
language_name = "R"
code_hello_world = "print('hello, world')"
completion_samples = [
{
'text': 'zi',
'matches': {'zip'},
},
]
+ complete_code_samples = ['1', "print('hello, world')", "f <- function(x) {\n x*2\n}"]
+ incomplete_code_samples = ["print('hello", "f <- function(x) {\n x*2"]
+
if __name__ == '__main__':
unittest.main() | 3 | 0.157895 | 3 | 0 |
2d1c8a62295ed5150f31e11cdbbf98d4d74498d8 | bin/cgroup-limits.py | bin/cgroup-limits.py |
env_vars = {}
def read_file(path):
try:
with open(path, 'r') as f:
return f.read().strip()
except IOError:
return None
def get_memory_limit():
limit = read_file('/sys/fs/cgroup/memory/memory.limit_in_bytes')
if limit:
env_vars['MEMORY_LIMIT_IN_BYTES'] = limit
def get_number_of_cores():
core_count = 0
line = read_file('/sys/fs/cgroup/cpuset/cpuset.cpus')
if line is None:
return
for group in line.split(','):
core_ids = list(map(int, group.split('-')))
if len(core_ids) == 2:
core_count += core_ids[1] - core_ids[0] + 1
else:
core_count += 1
env_vars['NUMBER_OF_CORES'] = str(core_count)
get_memory_limit()
get_number_of_cores()
for item in env_vars.items():
print("=".join(item))
|
env_vars = {}
def read_file(path):
try:
with open(path, 'r') as f:
return f.read().strip()
except IOError:
return None
def get_memory_limit():
limit = read_file('/sys/fs/cgroup/memory/memory.limit_in_bytes')
if limit:
env_vars['MEMORY_LIMIT_IN_BYTES'] = limit
def get_number_of_cores():
core_count = 0
line = read_file('/sys/fs/cgroup/cpuset/cpuset.cpus')
if line is None:
return
for group in line.split(','):
core_ids = list(map(int, group.split('-')))
if len(core_ids) == 2:
core_count += core_ids[1] - core_ids[0] + 1
else:
core_count += 1
env_vars['NUMBER_OF_CORES'] = str(core_count)
get_memory_limit()
get_number_of_cores()
print("MAX_MEMORY_LIMIT_IN_BYTES=9223372036854775807")
for item in env_vars.items():
print("=".join(item))
| Set MAX_MEMORY_LIMIT_IN_BYTES to number returned by cgroups where there is no limit | Set MAX_MEMORY_LIMIT_IN_BYTES to number returned by cgroups where there is no limit
| Python | apache-2.0 | openshift/sti-base,hhorak/sti-base,soltysh/sti-base,openshift/sti-base,bparees/sti-base,sclorg/s2i-base-container,mfojtik/sti-base,mfojtik/sti-base,bparees/sti-base | python | ## Code Before:
env_vars = {}
def read_file(path):
try:
with open(path, 'r') as f:
return f.read().strip()
except IOError:
return None
def get_memory_limit():
limit = read_file('/sys/fs/cgroup/memory/memory.limit_in_bytes')
if limit:
env_vars['MEMORY_LIMIT_IN_BYTES'] = limit
def get_number_of_cores():
core_count = 0
line = read_file('/sys/fs/cgroup/cpuset/cpuset.cpus')
if line is None:
return
for group in line.split(','):
core_ids = list(map(int, group.split('-')))
if len(core_ids) == 2:
core_count += core_ids[1] - core_ids[0] + 1
else:
core_count += 1
env_vars['NUMBER_OF_CORES'] = str(core_count)
get_memory_limit()
get_number_of_cores()
for item in env_vars.items():
print("=".join(item))
## Instruction:
Set MAX_MEMORY_LIMIT_IN_BYTES to number returned by cgroups where there is no limit
## Code After:
env_vars = {}
def read_file(path):
try:
with open(path, 'r') as f:
return f.read().strip()
except IOError:
return None
def get_memory_limit():
limit = read_file('/sys/fs/cgroup/memory/memory.limit_in_bytes')
if limit:
env_vars['MEMORY_LIMIT_IN_BYTES'] = limit
def get_number_of_cores():
core_count = 0
line = read_file('/sys/fs/cgroup/cpuset/cpuset.cpus')
if line is None:
return
for group in line.split(','):
core_ids = list(map(int, group.split('-')))
if len(core_ids) == 2:
core_count += core_ids[1] - core_ids[0] + 1
else:
core_count += 1
env_vars['NUMBER_OF_CORES'] = str(core_count)
get_memory_limit()
get_number_of_cores()
print("MAX_MEMORY_LIMIT_IN_BYTES=9223372036854775807")
for item in env_vars.items():
print("=".join(item))
|
env_vars = {}
def read_file(path):
try:
with open(path, 'r') as f:
return f.read().strip()
except IOError:
return None
def get_memory_limit():
limit = read_file('/sys/fs/cgroup/memory/memory.limit_in_bytes')
if limit:
env_vars['MEMORY_LIMIT_IN_BYTES'] = limit
def get_number_of_cores():
core_count = 0
line = read_file('/sys/fs/cgroup/cpuset/cpuset.cpus')
if line is None:
return
for group in line.split(','):
core_ids = list(map(int, group.split('-')))
if len(core_ids) == 2:
core_count += core_ids[1] - core_ids[0] + 1
else:
core_count += 1
env_vars['NUMBER_OF_CORES'] = str(core_count)
get_memory_limit()
get_number_of_cores()
+ print("MAX_MEMORY_LIMIT_IN_BYTES=9223372036854775807")
for item in env_vars.items():
print("=".join(item)) | 1 | 0.025641 | 1 | 0 |
8f53eba3320e9255a721db21f45d8d09c13c3caf | jobs/splunk-full/templates/ctl.sh.erb | jobs/splunk-full/templates/ctl.sh.erb |
RUN_DIR=/var/vcap/sys/run/splunk-full
LOG_DIR=/var/vcap/sys/log/splunk-full
JOB_DIR=/var/vcap/jobs/splunk-full
PACKAGE_DIR=/var/vcap/packages/splunk
PIDFILE=${RUN_DIR}/pid
case $1 in
start)
mkdir -p ${RUN_DIR} ${LOG_DIR}
mkdir -p ${PACKAGE_DIR}/etc/system/local
chown -R vcap:vcap ${RUN_DIR} ${LOG_DIR} ${PACKAGE_DIR}/
echo $$ > ${PIDFILE}
ln -fs ${JOB_DIR}/config/system_local/* ${PACKAGE_DIR}/etc/system/local/
exec chpst -u vcap:vcap ${PACKAGE_DIR}/bin/splunk start --accept-license \
>> $LOG_DIR/splunk.stdout.log \
2>> $LOG_DIR/splunk.stderr.log
;;
stop)
/var/vcap/packages/splunk/bin/splunk stop
rm -f $PIDFILE
;;
*)
echo "Usage: ctl.sh {start|stop}" ;;
esac
|
RUN_DIR=/var/vcap/sys/run/splunk-full
LOG_DIR=/var/vcap/sys/log/splunk-full
JOB_DIR=/var/vcap/jobs/splunk-full
PACKAGE_DIR=/var/vcap/packages/splunk
PIDFILE=${RUN_DIR}/pid
SPLUNK_DB=/var/vcap/store/splunk_db
case $1 in
start)
mkdir -p ${RUN_DIR} ${LOG_DIR}
mkdir -p ${PACKAGE_DIR}/etc/system/local
chown -R vcap:vcap ${RUN_DIR} ${LOG_DIR} ${PACKAGE_DIR}/
mkdir -p ${SPLUNK_DB}
echo $$ > ${PIDFILE}
ln -fs ${JOB_DIR}/config/system_local/* ${PACKAGE_DIR}/etc/system/local/
exec chpst -u vcap:vcap ${PACKAGE_DIR}/bin/splunk start --accept-license \
>> $LOG_DIR/splunk.stdout.log \
2>> $LOG_DIR/splunk.stderr.log
;;
stop)
/var/vcap/packages/splunk/bin/splunk stop
rm -f $PIDFILE
;;
*)
echo "Usage: ctl.sh {start|stop}" ;;
esac
| Add SPLUNK_DB indexes to persistent disk /var/vcap/store | Add SPLUNK_DB indexes to persistent disk /var/vcap/store
| HTML+ERB | apache-2.0 | ntdt/splunk-firehose-nozzle-release,ntdt/splunk-firehose-nozzle-release | html+erb | ## Code Before:
RUN_DIR=/var/vcap/sys/run/splunk-full
LOG_DIR=/var/vcap/sys/log/splunk-full
JOB_DIR=/var/vcap/jobs/splunk-full
PACKAGE_DIR=/var/vcap/packages/splunk
PIDFILE=${RUN_DIR}/pid
case $1 in
start)
mkdir -p ${RUN_DIR} ${LOG_DIR}
mkdir -p ${PACKAGE_DIR}/etc/system/local
chown -R vcap:vcap ${RUN_DIR} ${LOG_DIR} ${PACKAGE_DIR}/
echo $$ > ${PIDFILE}
ln -fs ${JOB_DIR}/config/system_local/* ${PACKAGE_DIR}/etc/system/local/
exec chpst -u vcap:vcap ${PACKAGE_DIR}/bin/splunk start --accept-license \
>> $LOG_DIR/splunk.stdout.log \
2>> $LOG_DIR/splunk.stderr.log
;;
stop)
/var/vcap/packages/splunk/bin/splunk stop
rm -f $PIDFILE
;;
*)
echo "Usage: ctl.sh {start|stop}" ;;
esac
## Instruction:
Add SPLUNK_DB indexes to persistent disk /var/vcap/store
## Code After:
RUN_DIR=/var/vcap/sys/run/splunk-full
LOG_DIR=/var/vcap/sys/log/splunk-full
JOB_DIR=/var/vcap/jobs/splunk-full
PACKAGE_DIR=/var/vcap/packages/splunk
PIDFILE=${RUN_DIR}/pid
SPLUNK_DB=/var/vcap/store/splunk_db
case $1 in
start)
mkdir -p ${RUN_DIR} ${LOG_DIR}
mkdir -p ${PACKAGE_DIR}/etc/system/local
chown -R vcap:vcap ${RUN_DIR} ${LOG_DIR} ${PACKAGE_DIR}/
mkdir -p ${SPLUNK_DB}
echo $$ > ${PIDFILE}
ln -fs ${JOB_DIR}/config/system_local/* ${PACKAGE_DIR}/etc/system/local/
exec chpst -u vcap:vcap ${PACKAGE_DIR}/bin/splunk start --accept-license \
>> $LOG_DIR/splunk.stdout.log \
2>> $LOG_DIR/splunk.stderr.log
;;
stop)
/var/vcap/packages/splunk/bin/splunk stop
rm -f $PIDFILE
;;
*)
echo "Usage: ctl.sh {start|stop}" ;;
esac
|
RUN_DIR=/var/vcap/sys/run/splunk-full
LOG_DIR=/var/vcap/sys/log/splunk-full
JOB_DIR=/var/vcap/jobs/splunk-full
PACKAGE_DIR=/var/vcap/packages/splunk
PIDFILE=${RUN_DIR}/pid
+ SPLUNK_DB=/var/vcap/store/splunk_db
case $1 in
start)
mkdir -p ${RUN_DIR} ${LOG_DIR}
mkdir -p ${PACKAGE_DIR}/etc/system/local
chown -R vcap:vcap ${RUN_DIR} ${LOG_DIR} ${PACKAGE_DIR}/
+
+ mkdir -p ${SPLUNK_DB}
echo $$ > ${PIDFILE}
ln -fs ${JOB_DIR}/config/system_local/* ${PACKAGE_DIR}/etc/system/local/
exec chpst -u vcap:vcap ${PACKAGE_DIR}/bin/splunk start --accept-license \
>> $LOG_DIR/splunk.stdout.log \
2>> $LOG_DIR/splunk.stderr.log
;;
stop)
/var/vcap/packages/splunk/bin/splunk stop
rm -f $PIDFILE
;;
*)
echo "Usage: ctl.sh {start|stop}" ;;
esac | 3 | 0.085714 | 3 | 0 |
87ea6fbc07c547a0c92f0b85811edc0645cb4303 | pysyte/oss/linux.py | pysyte/oss/linux.py | """Linux-specific code"""
import os
from pysyte.types import paths
def xdg_home():
"""path to $XDG_CONFIG_HOME
>>> assert xdg_home() == os.path.expanduser('~/.config')
"""
return paths.environ_path('XDG_CONFIG_HOME', '~/.config')
def xdg_home_config(filename):
"""path to that file in $XDG_CONFIG_HOME
>>> assert xdg_home_config('fred') == os.path.expanduser('~/.config/fred')
"""
return xdg_home() / filename
def xdg_dirs():
"""paths in $XDG_CONFIG_DIRS"""
return paths.environ_paths('XDG_CONFIG_DIRS')
def xdg_homes():
return [xdg_home()]
bash_paste = 'xclip -selection clipboard'
bash_copy = 'xclip -selection clipboard -o'
| """Linux-specific code"""
from pysyte.types import paths
def xdg_home():
"""path to $XDG_CONFIG_HOME
>>> assert xdg_home() == paths.path('~/.config').expand()
"""
return paths.environ_path('XDG_CONFIG_HOME', '~/.config')
def xdg_home_config(filename):
"""path to that file in $XDG_CONFIG_HOME
>>> assert xdg_home_config('fred') == paths.path('~/.config/fred').expand()
"""
return xdg_home() / filename
def xdg_dirs():
"""paths in $XDG_CONFIG_DIRS"""
return paths.environ_paths('XDG_CONFIG_DIRS')
def xdg_homes():
return [xdg_home()]
bash_paste = 'xclip -selection clipboard'
bash_copy = 'xclip -selection clipboard -o'
| Remove unused import of "os" | Remove unused import of "os"
| Python | mit | jalanb/dotsite | python | ## Code Before:
"""Linux-specific code"""
import os
from pysyte.types import paths
def xdg_home():
"""path to $XDG_CONFIG_HOME
>>> assert xdg_home() == os.path.expanduser('~/.config')
"""
return paths.environ_path('XDG_CONFIG_HOME', '~/.config')
def xdg_home_config(filename):
"""path to that file in $XDG_CONFIG_HOME
>>> assert xdg_home_config('fred') == os.path.expanduser('~/.config/fred')
"""
return xdg_home() / filename
def xdg_dirs():
"""paths in $XDG_CONFIG_DIRS"""
return paths.environ_paths('XDG_CONFIG_DIRS')
def xdg_homes():
return [xdg_home()]
bash_paste = 'xclip -selection clipboard'
bash_copy = 'xclip -selection clipboard -o'
## Instruction:
Remove unused import of "os"
## Code After:
"""Linux-specific code"""
from pysyte.types import paths
def xdg_home():
"""path to $XDG_CONFIG_HOME
>>> assert xdg_home() == paths.path('~/.config').expand()
"""
return paths.environ_path('XDG_CONFIG_HOME', '~/.config')
def xdg_home_config(filename):
"""path to that file in $XDG_CONFIG_HOME
>>> assert xdg_home_config('fred') == paths.path('~/.config/fred').expand()
"""
return xdg_home() / filename
def xdg_dirs():
"""paths in $XDG_CONFIG_DIRS"""
return paths.environ_paths('XDG_CONFIG_DIRS')
def xdg_homes():
return [xdg_home()]
bash_paste = 'xclip -selection clipboard'
bash_copy = 'xclip -selection clipboard -o'
| """Linux-specific code"""
- import os
from pysyte.types import paths
def xdg_home():
"""path to $XDG_CONFIG_HOME
- >>> assert xdg_home() == os.path.expanduser('~/.config')
? ^ -----------
+ >>> assert xdg_home() == paths.path('~/.config').expand()
? ^^^^ +++++++++
"""
return paths.environ_path('XDG_CONFIG_HOME', '~/.config')
def xdg_home_config(filename):
"""path to that file in $XDG_CONFIG_HOME
- >>> assert xdg_home_config('fred') == os.path.expanduser('~/.config/fred')
? ^ -----------
+ >>> assert xdg_home_config('fred') == paths.path('~/.config/fred').expand()
? ^^^^ +++++++++
"""
return xdg_home() / filename
def xdg_dirs():
"""paths in $XDG_CONFIG_DIRS"""
return paths.environ_paths('XDG_CONFIG_DIRS')
def xdg_homes():
return [xdg_home()]
bash_paste = 'xclip -selection clipboard'
bash_copy = 'xclip -selection clipboard -o' | 5 | 0.147059 | 2 | 3 |
b8d29b19d3c3dd84b9879ede3a823730922c42dd | app/views/main/index.html.haml | app/views/main/index.html.haml | %h2
Cuttlefish — lovely open source transactional email
%p
Ensure your emails arrive at their destination. And a whole lot more…
%h3 How to send email via Cuttlefish
%p
Simply point your application to send emails via SMTP to port #{Rails.configuration.cuttlefish_smtp_port} on this machine.
.row#status-counts
= render "main/status_counts"
| %h2
Cuttlefish — lovely open source transactional email
%p
Ensure your emails arrive at their destination. And a whole lot more…
%h3 How to send email via Cuttlefish
%p
- if App.normal_apps?
Start by picking an #{link_to "existing App", apps_path} or #{link_to "create a new one", new_app_path}.
Then you'll see how to send an email specifically for that App.
- else
Simply point your application to send emails via SMTP to port #{Rails.configuration.cuttlefish_smtp_port} on this machine.
.row#status-counts
= render "main/status_counts"
| Add instructions on the home page for when there are apps | Add instructions on the home page for when there are apps
| Haml | agpl-3.0 | pratyushmittal/cuttlefish,pratyushmittal/cuttlefish,idlweb/cuttlefish,pratyushmittal/cuttlefish,idlweb/cuttlefish,idlweb/cuttlefish,idlweb/cuttlefish,pratyushmittal/cuttlefish | haml | ## Code Before:
%h2
Cuttlefish — lovely open source transactional email
%p
Ensure your emails arrive at their destination. And a whole lot more…
%h3 How to send email via Cuttlefish
%p
Simply point your application to send emails via SMTP to port #{Rails.configuration.cuttlefish_smtp_port} on this machine.
.row#status-counts
= render "main/status_counts"
## Instruction:
Add instructions on the home page for when there are apps
## Code After:
%h2
Cuttlefish — lovely open source transactional email
%p
Ensure your emails arrive at their destination. And a whole lot more…
%h3 How to send email via Cuttlefish
%p
- if App.normal_apps?
Start by picking an #{link_to "existing App", apps_path} or #{link_to "create a new one", new_app_path}.
Then you'll see how to send an email specifically for that App.
- else
Simply point your application to send emails via SMTP to port #{Rails.configuration.cuttlefish_smtp_port} on this machine.
.row#status-counts
= render "main/status_counts"
| %h2
Cuttlefish — lovely open source transactional email
%p
Ensure your emails arrive at their destination. And a whole lot more…
%h3 How to send email via Cuttlefish
%p
+ - if App.normal_apps?
+ Start by picking an #{link_to "existing App", apps_path} or #{link_to "create a new one", new_app_path}.
+ Then you'll see how to send an email specifically for that App.
+ - else
- Simply point your application to send emails via SMTP to port #{Rails.configuration.cuttlefish_smtp_port} on this machine.
+ Simply point your application to send emails via SMTP to port #{Rails.configuration.cuttlefish_smtp_port} on this machine.
? ++
.row#status-counts
= render "main/status_counts" | 6 | 0.5 | 5 | 1 |
cf76348674a396483d92a25dd6fddeb9c55896ee | server/root/index.jade | server/root/index.jade | extends ../views/layout
block content
.pool
.pool-id Pool ##{id}
.question= question
ul.choices
for choice in choices
li.choice= choice
| extends ../views/layout
block content
.pool
.pool-id
a(href='/pool/#{id}') Pool ##{id}
.question= question
ul.choices
for choice, i in choices
li.choice
a(href='/pool/#{id}/choose/#{i}')= choice
| Add href to Pool ID and Choices. | Add href to Pool ID and Choices.
| Jade | mit | gregwym/fiPool | jade | ## Code Before:
extends ../views/layout
block content
.pool
.pool-id Pool ##{id}
.question= question
ul.choices
for choice in choices
li.choice= choice
## Instruction:
Add href to Pool ID and Choices.
## Code After:
extends ../views/layout
block content
.pool
.pool-id
a(href='/pool/#{id}') Pool ##{id}
.question= question
ul.choices
for choice, i in choices
li.choice
a(href='/pool/#{id}/choose/#{i}')= choice
| extends ../views/layout
block content
.pool
- .pool-id Pool ##{id}
+ .pool-id
+ a(href='/pool/#{id}') Pool ##{id}
.question= question
ul.choices
- for choice in choices
+ for choice, i in choices
? +++
- li.choice= choice
? --------
+ li.choice
+ a(href='/pool/#{id}/choose/#{i}')= choice | 8 | 0.888889 | 5 | 3 |
d14a273dbf91c2d8f218f2d2154014ec25a6d969 | app/views/juntos_bootstrap/shared/_footer_big.html.slim | app/views/juntos_bootstrap/shared/_footer_big.html.slim | footer.main-footer.main-footer-neg
.w-container
.w-row
.w-col.w-col-12
.w-row
.w-col.w-col-3.w-col-small-3.w-col-tiny-3.w-hidden-tiny
= render 'shared/footer_welcome'
.w-col.w-col-3.w-col-small-3.w-col-tiny-3.footer-full-firstcolumn
= render 'shared/footer_about'
.w-col.w-col-2.w-col-small-2.w-col-tiny-2.w-hidden-tiny
= render 'shared/footer_navigate'
.w-col.w-col-2.w-col-small-2.w-col-tiny-2
= render 'shared/footer_legal'
.w-col.w-col-2.w-col-small-2.w-col-tiny-2.w-hidden-tiny.footer-full-lastcolumn
= render 'shared/footer_contact'
.w-container
.footer-full-copyleft
.juntos
| Copyright 2013 Juntos.com.vc - Todos os direitos reservados
.engage
strong= link_to "power to the crowd", "http://www.engage.is", target: '_blank'
| footer.main-footer.main-footer-neg
.w-container
.w-row
.w-col.w-col-12
.w-row
.w-col.w-col-3.w-col-small-3.w-col-tiny-3.w-hidden-tiny
= render 'shared/footer_welcome'
.w-col.w-col-3.w-col-small-3.w-col-tiny-3.footer-full-firstcolumn
= render 'shared/footer_about'
.w-col.w-col-2.w-col-small-2.w-col-tiny-2.w-hidden-tiny
= render 'shared/footer_navigate'
.w-col.w-col-2.w-col-small-2.w-col-tiny-2
= render 'shared/footer_legal'
.w-col.w-col-2.w-col-small-2.w-col-tiny-2.w-hidden-tiny.footer-full-lastcolumn
= render 'shared/footer_contact'
.w-container
.footer-full-copyleft
.juntos
= "Copyright #{Time.current.year} Juntos.com.vc - Todos os direitos reservados"
.engage
strong= link_to "power to the crowd", "http://www.engage.is", target: '_blank'
| Use current year on footer | Use current year on footer
| Slim | mit | juntos-com-vc/juntos.com.vc,juntos-com-vc/juntos.com.vc,juntos-com-vc/juntos.com.vc,engageis/juntos.com.vc,engageis/juntos.com.vc,engageis/juntos.com.vc | slim | ## Code Before:
footer.main-footer.main-footer-neg
.w-container
.w-row
.w-col.w-col-12
.w-row
.w-col.w-col-3.w-col-small-3.w-col-tiny-3.w-hidden-tiny
= render 'shared/footer_welcome'
.w-col.w-col-3.w-col-small-3.w-col-tiny-3.footer-full-firstcolumn
= render 'shared/footer_about'
.w-col.w-col-2.w-col-small-2.w-col-tiny-2.w-hidden-tiny
= render 'shared/footer_navigate'
.w-col.w-col-2.w-col-small-2.w-col-tiny-2
= render 'shared/footer_legal'
.w-col.w-col-2.w-col-small-2.w-col-tiny-2.w-hidden-tiny.footer-full-lastcolumn
= render 'shared/footer_contact'
.w-container
.footer-full-copyleft
.juntos
| Copyright 2013 Juntos.com.vc - Todos os direitos reservados
.engage
strong= link_to "power to the crowd", "http://www.engage.is", target: '_blank'
## Instruction:
Use current year on footer
## Code After:
footer.main-footer.main-footer-neg
.w-container
.w-row
.w-col.w-col-12
.w-row
.w-col.w-col-3.w-col-small-3.w-col-tiny-3.w-hidden-tiny
= render 'shared/footer_welcome'
.w-col.w-col-3.w-col-small-3.w-col-tiny-3.footer-full-firstcolumn
= render 'shared/footer_about'
.w-col.w-col-2.w-col-small-2.w-col-tiny-2.w-hidden-tiny
= render 'shared/footer_navigate'
.w-col.w-col-2.w-col-small-2.w-col-tiny-2
= render 'shared/footer_legal'
.w-col.w-col-2.w-col-small-2.w-col-tiny-2.w-hidden-tiny.footer-full-lastcolumn
= render 'shared/footer_contact'
.w-container
.footer-full-copyleft
.juntos
= "Copyright #{Time.current.year} Juntos.com.vc - Todos os direitos reservados"
.engage
strong= link_to "power to the crowd", "http://www.engage.is", target: '_blank'
| footer.main-footer.main-footer-neg
.w-container
.w-row
.w-col.w-col-12
.w-row
.w-col.w-col-3.w-col-small-3.w-col-tiny-3.w-hidden-tiny
= render 'shared/footer_welcome'
.w-col.w-col-3.w-col-small-3.w-col-tiny-3.footer-full-firstcolumn
= render 'shared/footer_about'
.w-col.w-col-2.w-col-small-2.w-col-tiny-2.w-hidden-tiny
= render 'shared/footer_navigate'
.w-col.w-col-2.w-col-small-2.w-col-tiny-2
= render 'shared/footer_legal'
.w-col.w-col-2.w-col-small-2.w-col-tiny-2.w-hidden-tiny.footer-full-lastcolumn
= render 'shared/footer_contact'
.w-container
.footer-full-copyleft
.juntos
- | Copyright 2013 Juntos.com.vc - Todos os direitos reservados
? ^ ^^^^
+ = "Copyright #{Time.current.year} Juntos.com.vc - Todos os direitos reservados"
? ^ + ^^^^^^^^^^^^^^^^^^^^ +
.engage
strong= link_to "power to the crowd", "http://www.engage.is", target: '_blank' | 2 | 0.095238 | 1 | 1 |
d8f8d7d2e6b9c7537a4f5cdd2c3b7251017186a3 | xutils/util.py | xutils/util.py |
from subprocess import check_output
def which(command, which="/usr/bin/which"):
"""Find and return the first absolute path of command used by `which`.
If not found, return "".
"""
try:
return check_output([which, command]).split("\n")[0]
except Exception:
return ""
|
from subprocess import check_output as _check_output
from xutils import PY3, to_unicode
if PY3:
def check_output(cmd, timeout=None, encoding=None, **kwargs):
return _check_output(cmd, timeout=timeout, encoding=encoding, **kwargs)
else:
def check_output(cmd, timeout=None, encoding=None, **kwargs):
out = _check_output(cmd, **kwargs)
return to_unicode(out, encoding) if encoding else out
def which(command, which="/usr/bin/which"):
"""Find and return the first absolute path of command used by `which`.
If not found, return "".
"""
try:
return check_output([which, command]).split("\n")[0]
except Exception:
return ""
| Add check_output to be compatible with Py2 and Py3 | Add check_output to be compatible with Py2 and Py3
| Python | mit | xgfone/xutils,xgfone/pycom | python | ## Code Before:
from subprocess import check_output
def which(command, which="/usr/bin/which"):
"""Find and return the first absolute path of command used by `which`.
If not found, return "".
"""
try:
return check_output([which, command]).split("\n")[0]
except Exception:
return ""
## Instruction:
Add check_output to be compatible with Py2 and Py3
## Code After:
from subprocess import check_output as _check_output
from xutils import PY3, to_unicode
if PY3:
def check_output(cmd, timeout=None, encoding=None, **kwargs):
return _check_output(cmd, timeout=timeout, encoding=encoding, **kwargs)
else:
def check_output(cmd, timeout=None, encoding=None, **kwargs):
out = _check_output(cmd, **kwargs)
return to_unicode(out, encoding) if encoding else out
def which(command, which="/usr/bin/which"):
"""Find and return the first absolute path of command used by `which`.
If not found, return "".
"""
try:
return check_output([which, command]).split("\n")[0]
except Exception:
return ""
|
- from subprocess import check_output
+ from subprocess import check_output as _check_output
? +++++++++++++++++
+ from xutils import PY3, to_unicode
+
+
+ if PY3:
+ def check_output(cmd, timeout=None, encoding=None, **kwargs):
+ return _check_output(cmd, timeout=timeout, encoding=encoding, **kwargs)
+ else:
+ def check_output(cmd, timeout=None, encoding=None, **kwargs):
+ out = _check_output(cmd, **kwargs)
+ return to_unicode(out, encoding) if encoding else out
def which(command, which="/usr/bin/which"):
"""Find and return the first absolute path of command used by `which`.
If not found, return "".
"""
try:
return check_output([which, command]).split("\n")[0]
except Exception:
return "" | 12 | 0.857143 | 11 | 1 |
fd8f8e90eccb260c67f5cbe1458a9227a7e6b0f4 | lib/van_helsing/bundler.rb | lib/van_helsing/bundler.rb |
settings.bundle_path ||= './vendor/bundle'
settings.bundle_options ||= lambda { %{--without development:test --path "#{bundle_path}" --binstubs bin/ --deployment"} }
namespace :bundle do
desc "Install gem dependencies using Bundler."
task :install do
bundle_path = "./vendor/bundle"
queue %{
echo "-----> Installing gem dependencies using Bundler"
mkdir -p "#{shared_path}/bundle"
mkdir -p "./vendor"
ln -s "#{shared_path}/bundle" "#{bundle_path}"
bundle install #{bundle_options}
}
end
end
|
settings.bundle_path ||= './vendor/bundle'
settings.bundle_options ||= lambda { %{--without development:test --path "#{bundle_path}" --binstubs bin/ --deployment"} }
namespace :bundle do
desc "Install gem dependencies using Bundler."
task :install do
queue %{
echo "-----> Installing gem dependencies using Bundler"
mkdir -p "#{shared_path}/bundle"
mkdir -p "#{File.dirname bundle_path}"
ln -s "#{shared_path}/bundle" "#{bundle_path}"
bundle install #{bundle_options}
}
end
end
| Fix bundle:install to make bundle_path configurable. | Fix bundle:install to make bundle_path configurable.
| Ruby | mit | allantatter/mina,ianks/mina,Zhomart/mina,whhx/mina,flowerett/mina,dcalixto/mina,Zhomart/mina,flowerett/mina,whhx/mina,estum/mina,dcalixto/mina,cyberwolfru/mina,openaustralia/mina,scalp42/mina,ianks/mina,cyberwolfru/mina,estum/mina,stereodenis/mina,openaustralia/mina,scalp42/mina,mfinelli/mina,allantatter/mina,mfinelli/mina,chip/mina | ruby | ## Code Before:
settings.bundle_path ||= './vendor/bundle'
settings.bundle_options ||= lambda { %{--without development:test --path "#{bundle_path}" --binstubs bin/ --deployment"} }
namespace :bundle do
desc "Install gem dependencies using Bundler."
task :install do
bundle_path = "./vendor/bundle"
queue %{
echo "-----> Installing gem dependencies using Bundler"
mkdir -p "#{shared_path}/bundle"
mkdir -p "./vendor"
ln -s "#{shared_path}/bundle" "#{bundle_path}"
bundle install #{bundle_options}
}
end
end
## Instruction:
Fix bundle:install to make bundle_path configurable.
## Code After:
settings.bundle_path ||= './vendor/bundle'
settings.bundle_options ||= lambda { %{--without development:test --path "#{bundle_path}" --binstubs bin/ --deployment"} }
namespace :bundle do
desc "Install gem dependencies using Bundler."
task :install do
queue %{
echo "-----> Installing gem dependencies using Bundler"
mkdir -p "#{shared_path}/bundle"
mkdir -p "#{File.dirname bundle_path}"
ln -s "#{shared_path}/bundle" "#{bundle_path}"
bundle install #{bundle_options}
}
end
end
|
settings.bundle_path ||= './vendor/bundle'
settings.bundle_options ||= lambda { %{--without development:test --path "#{bundle_path}" --binstubs bin/ --deployment"} }
namespace :bundle do
desc "Install gem dependencies using Bundler."
task :install do
- bundle_path = "./vendor/bundle"
queue %{
echo "-----> Installing gem dependencies using Bundler"
mkdir -p "#{shared_path}/bundle"
- mkdir -p "./vendor"
+ mkdir -p "#{File.dirname bundle_path}"
ln -s "#{shared_path}/bundle" "#{bundle_path}"
bundle install #{bundle_options}
}
end
end | 3 | 0.176471 | 1 | 2 |
81ef758a8eb25ab9e30d45829eb6651d7640eb6d | ngApp/src/app/operate-form/operate-form.component.html | ngApp/src/app/operate-form/operate-form.component.html | <form>
<div class="row inline-form">
<div class="tp-2">
<label for="revenue">Revenue</label>
</div>
<div class="tp-2">
<input type="number" name="revenue" id="revenue"
[(ngModel)]="revenue">
</div>
<div class="tp-2">
<button name="full" (click)="full()">Full dividend</button>
</div>
</div>
</form>
| <form>
<div class="row inline-form">
<div class="tp-2">
<label for="revenue">Revenue</label>
</div>
<div class="tp-2">
<input type="number" name="revenue" id="revenue"
[(ngModel)]="revenue">
</div>
<div class="tp-8">
<button name="full" (click)="full()">Full dividend</button>
<button name="half" (click)="half()">50/50</button>
</div>
</div>
</form>
| Add 50/50 button to operate form | Add 50/50 button to operate form
| HTML | mit | XeryusTC/18xx-accountant,XeryusTC/18xx-accountant,XeryusTC/18xx-accountant,XeryusTC/18xx-accountant,XeryusTC/18xx-accountant | html | ## Code Before:
<form>
<div class="row inline-form">
<div class="tp-2">
<label for="revenue">Revenue</label>
</div>
<div class="tp-2">
<input type="number" name="revenue" id="revenue"
[(ngModel)]="revenue">
</div>
<div class="tp-2">
<button name="full" (click)="full()">Full dividend</button>
</div>
</div>
</form>
## Instruction:
Add 50/50 button to operate form
## Code After:
<form>
<div class="row inline-form">
<div class="tp-2">
<label for="revenue">Revenue</label>
</div>
<div class="tp-2">
<input type="number" name="revenue" id="revenue"
[(ngModel)]="revenue">
</div>
<div class="tp-8">
<button name="full" (click)="full()">Full dividend</button>
<button name="half" (click)="half()">50/50</button>
</div>
</div>
</form>
| <form>
<div class="row inline-form">
<div class="tp-2">
<label for="revenue">Revenue</label>
</div>
<div class="tp-2">
<input type="number" name="revenue" id="revenue"
[(ngModel)]="revenue">
</div>
- <div class="tp-2">
? ^
+ <div class="tp-8">
? ^
<button name="full" (click)="full()">Full dividend</button>
+ <button name="half" (click)="half()">50/50</button>
</div>
</div>
</form> | 3 | 0.214286 | 2 | 1 |
74480edd7007f19bc97deed0581d14b107bc2365 | client/middlewares/call-api.js | client/middlewares/call-api.js | import liqen from 'liqen'
export const CALL_API = Symbol('call api')
export default store => next => action => {
const callAPI = action[CALL_API]
if (typeof callAPI === 'undefined') {
return next(action)
}
const { ref, target, tag } = callAPI
// Send a pending
next({
type: 'CREATE_ANNOTATION_PENDING',
ref,
target,
tag
})
// Send to the server the update
liqen()
.annotations
.create({
article_id: 1,
target: {
type: 'TextQuoteSelector',
prefix: target.prefix,
exact: target.exact,
suffix: target.suffix
},
tags: [tag]
})
.then(({id}) => next({
type: 'CREATE_ANNOTATION_SUCCESS',
ref,
id,
target,
tag
}))
.catch(() => next({
type: 'CREATE_ANNOTATION_FAILURE',
ref,
target,
tag
}))
}
| import liqen from 'liqen'
import fakeLiqen from '../../server/local-liqen'
import cookies from 'cookies-js'
export const CALL_API = Symbol('call api')
export default store => next => action => {
const callAPI = action[CALL_API]
if (typeof callAPI === 'undefined') {
return next(action)
}
const token = cookies.get('access_token')
let core = liqen(token)
if (process.env.NODE_ENV === 'development') {
core = fakeLiqen(token)
}
const { ref, target, tag } = callAPI
// Send a pending
next({
type: 'CREATE_ANNOTATION_PENDING',
ref,
target,
tag
})
// Send to the server the update
core
.annotations
.create({
article_id: 1,
target: {
type: 'TextQuoteSelector',
prefix: target.prefix,
exact: target.exact,
suffix: target.suffix
},
tags: [tag]
})
.then(({id}) => next({
type: 'CREATE_ANNOTATION_SUCCESS',
ref,
id,
target,
tag
}))
.catch(() => next({
type: 'CREATE_ANNOTATION_FAILURE',
ref,
target,
tag
}))
}
| Set token and fake liqen in redux middleware | Set token and fake liqen in redux middleware
| JavaScript | mit | CommonActionForum/liqen-face,exacs/liqen-face,CommonActionForum/liqen-face,exacs/liqen-face | javascript | ## Code Before:
import liqen from 'liqen'
export const CALL_API = Symbol('call api')
export default store => next => action => {
const callAPI = action[CALL_API]
if (typeof callAPI === 'undefined') {
return next(action)
}
const { ref, target, tag } = callAPI
// Send a pending
next({
type: 'CREATE_ANNOTATION_PENDING',
ref,
target,
tag
})
// Send to the server the update
liqen()
.annotations
.create({
article_id: 1,
target: {
type: 'TextQuoteSelector',
prefix: target.prefix,
exact: target.exact,
suffix: target.suffix
},
tags: [tag]
})
.then(({id}) => next({
type: 'CREATE_ANNOTATION_SUCCESS',
ref,
id,
target,
tag
}))
.catch(() => next({
type: 'CREATE_ANNOTATION_FAILURE',
ref,
target,
tag
}))
}
## Instruction:
Set token and fake liqen in redux middleware
## Code After:
import liqen from 'liqen'
import fakeLiqen from '../../server/local-liqen'
import cookies from 'cookies-js'
export const CALL_API = Symbol('call api')
export default store => next => action => {
const callAPI = action[CALL_API]
if (typeof callAPI === 'undefined') {
return next(action)
}
const token = cookies.get('access_token')
let core = liqen(token)
if (process.env.NODE_ENV === 'development') {
core = fakeLiqen(token)
}
const { ref, target, tag } = callAPI
// Send a pending
next({
type: 'CREATE_ANNOTATION_PENDING',
ref,
target,
tag
})
// Send to the server the update
core
.annotations
.create({
article_id: 1,
target: {
type: 'TextQuoteSelector',
prefix: target.prefix,
exact: target.exact,
suffix: target.suffix
},
tags: [tag]
})
.then(({id}) => next({
type: 'CREATE_ANNOTATION_SUCCESS',
ref,
id,
target,
tag
}))
.catch(() => next({
type: 'CREATE_ANNOTATION_FAILURE',
ref,
target,
tag
}))
}
| import liqen from 'liqen'
+ import fakeLiqen from '../../server/local-liqen'
+ import cookies from 'cookies-js'
+
export const CALL_API = Symbol('call api')
export default store => next => action => {
const callAPI = action[CALL_API]
if (typeof callAPI === 'undefined') {
return next(action)
+ }
+
+ const token = cookies.get('access_token')
+ let core = liqen(token)
+
+ if (process.env.NODE_ENV === 'development') {
+ core = fakeLiqen(token)
}
const { ref, target, tag } = callAPI
// Send a pending
next({
type: 'CREATE_ANNOTATION_PENDING',
ref,
target,
tag
})
// Send to the server the update
- liqen()
+ core
.annotations
.create({
article_id: 1,
target: {
type: 'TextQuoteSelector',
prefix: target.prefix,
exact: target.exact,
suffix: target.suffix
},
tags: [tag]
})
.then(({id}) => next({
type: 'CREATE_ANNOTATION_SUCCESS',
ref,
id,
target,
tag
}))
.catch(() => next({
type: 'CREATE_ANNOTATION_FAILURE',
ref,
target,
tag
}))
} | 12 | 0.255319 | 11 | 1 |
00f5d84102ba624cf9766aaaa6ca106645eada3c | app/assets/javascripts/rglossa/views/cwb/result/table_view.coffee | app/assets/javascripts/rglossa/views/cwb/result/table_view.coffee | App.CwbResultTableView = Em.View.extend
didInsertElement: ->
@$('[data-ot]').each (index, token) ->
new Opentip(token, $(token).data('ot'), {style: 'dark'})
| App.CwbResultTableView = Em.View.extend
didInsertElement: ->
@$('[data-ot]').each (index, token) ->
new Opentip token, $(token).data('ot'),
style: 'dark'
fixed: true
| Fix the position of the token info tooltip | Fix the position of the token info tooltip
| CoffeeScript | mit | textlab/glossa,textlab/glossa,textlab/rglossa,textlab/glossa,textlab/rglossa,textlab/rglossa,textlab/rglossa,textlab/rglossa,textlab/glossa,textlab/glossa | coffeescript | ## Code Before:
App.CwbResultTableView = Em.View.extend
didInsertElement: ->
@$('[data-ot]').each (index, token) ->
new Opentip(token, $(token).data('ot'), {style: 'dark'})
## Instruction:
Fix the position of the token info tooltip
## Code After:
App.CwbResultTableView = Em.View.extend
didInsertElement: ->
@$('[data-ot]').each (index, token) ->
new Opentip token, $(token).data('ot'),
style: 'dark'
fixed: true
| App.CwbResultTableView = Em.View.extend
didInsertElement: ->
@$('[data-ot]').each (index, token) ->
- new Opentip(token, $(token).data('ot'), {style: 'dark'})
? ^ -----------------
+ new Opentip token, $(token).data('ot'),
? ^
+ style: 'dark'
+ fixed: true | 4 | 0.8 | 3 | 1 |
35f9bdd4d52083950445b9efadbee53c6b26a022 | test/App.spec.js | test/App.spec.js | /* eslint-env mocha */
const { expect } = require('chai')
describe('<Search />', () => {
it('should pass', () => {
expect(1 + 1 === 2).to.be.true
})
})
| /* eslint-env mocha */
const { expect } = require('chai')
const React = require('react')
const Search = require('../js/Search')
const ShowCard = require('../js/ShowCard')
const { shallow, mount } = require('enzyme')
const { shows } = require('../public/data')
describe('<Search />', () => {
it('should render the brand', () => {
const wrapper = shallow(<Search />)
expect(wrapper.contains(<h1 className='brand'>svideo</h1>)).to.be.true
})
it('should render as many shows as there are data for', () => {
const wrapper = shallow(<Search />)
expect(wrapper.find(ShowCard).length).to.equal(shows.length)
})
it('should filter correctly given new state', () => {
const wrapper = mount(<Search />)
const input = wrapper.find('.search-input')
input.node.value = 'house'
input.simulate('change')
expect(wrapper.state('searchTerm')).to.equal('house')
expect(wrapper.find('.show-card').length).to.equal(2)
})
})
| Add actual test cases for the Search component | Add actual test cases for the Search component
| JavaScript | mit | bencodezen/cloneflix-react-with-bholt,bencodezen/cloneflix-react-with-bholt | javascript | ## Code Before:
/* eslint-env mocha */
const { expect } = require('chai')
describe('<Search />', () => {
it('should pass', () => {
expect(1 + 1 === 2).to.be.true
})
})
## Instruction:
Add actual test cases for the Search component
## Code After:
/* eslint-env mocha */
const { expect } = require('chai')
const React = require('react')
const Search = require('../js/Search')
const ShowCard = require('../js/ShowCard')
const { shallow, mount } = require('enzyme')
const { shows } = require('../public/data')
describe('<Search />', () => {
it('should render the brand', () => {
const wrapper = shallow(<Search />)
expect(wrapper.contains(<h1 className='brand'>svideo</h1>)).to.be.true
})
it('should render as many shows as there are data for', () => {
const wrapper = shallow(<Search />)
expect(wrapper.find(ShowCard).length).to.equal(shows.length)
})
it('should filter correctly given new state', () => {
const wrapper = mount(<Search />)
const input = wrapper.find('.search-input')
input.node.value = 'house'
input.simulate('change')
expect(wrapper.state('searchTerm')).to.equal('house')
expect(wrapper.find('.show-card').length).to.equal(2)
})
})
| /* eslint-env mocha */
const { expect } = require('chai')
+ const React = require('react')
+ const Search = require('../js/Search')
+ const ShowCard = require('../js/ShowCard')
+ const { shallow, mount } = require('enzyme')
+ const { shows } = require('../public/data')
describe('<Search />', () => {
- it('should pass', () => {
- expect(1 + 1 === 2).to.be.true
+ it('should render the brand', () => {
+ const wrapper = shallow(<Search />)
+ expect(wrapper.contains(<h1 className='brand'>svideo</h1>)).to.be.true
+ })
+
+ it('should render as many shows as there are data for', () => {
+ const wrapper = shallow(<Search />)
+ expect(wrapper.find(ShowCard).length).to.equal(shows.length)
+ })
+
+ it('should filter correctly given new state', () => {
+ const wrapper = mount(<Search />)
+ const input = wrapper.find('.search-input')
+ input.node.value = 'house'
+ input.simulate('change')
+ expect(wrapper.state('searchTerm')).to.equal('house')
+ expect(wrapper.find('.show-card').length).to.equal(2)
})
}) | 24 | 2.666667 | 22 | 2 |
00067baf89ec348a85ba27c92bb8d816de0fc2a0 | spec/private_attr/everywhere_spec.rb | spec/private_attr/everywhere_spec.rb | require 'minitest/autorun'
describe 'private_attr/everywhere' do
it 'requiring only private_attr keeps Classes and Modules intact' do
require 'private_attr'
-> { class Cla; private_attr_reader :priv; end }.must_raise NoMethodError
-> { module Mod; private_attr_reader :priv; end }.must_raise NoMethodError
end
it 'requiring private_attr/everywhere adds it to all Classes and Modules' do
require 'private_attr/everywhere'
class Cla; private_attr_reader :priv; end
module Mod; private_attr_reader :priv; end
end
end
| require 'minitest/autorun'
describe 'private_attr/everywhere' do
# these particular tests must be ran in order
def self.test_order
:alpha
end
it 'requiring only private_attr keeps Classes and Modules intact' do
require 'private_attr'
-> { class Cla; private_attr_reader :priv; end }.must_raise NoMethodError
-> { module Mod; private_attr_reader :priv; end }.must_raise NoMethodError
end
it 'requiring private_attr/everywhere adds it to all Classes and Modules' do
require 'private_attr/everywhere'
class Cla; private_attr_reader :priv; end
module Mod; private_attr_reader :priv; end
end
end
| Make private_attr/everywhere tests run in order | Make private_attr/everywhere tests run in order
| Ruby | mit | jswanner/private_attr | ruby | ## Code Before:
require 'minitest/autorun'
describe 'private_attr/everywhere' do
it 'requiring only private_attr keeps Classes and Modules intact' do
require 'private_attr'
-> { class Cla; private_attr_reader :priv; end }.must_raise NoMethodError
-> { module Mod; private_attr_reader :priv; end }.must_raise NoMethodError
end
it 'requiring private_attr/everywhere adds it to all Classes and Modules' do
require 'private_attr/everywhere'
class Cla; private_attr_reader :priv; end
module Mod; private_attr_reader :priv; end
end
end
## Instruction:
Make private_attr/everywhere tests run in order
## Code After:
require 'minitest/autorun'
describe 'private_attr/everywhere' do
# these particular tests must be ran in order
def self.test_order
:alpha
end
it 'requiring only private_attr keeps Classes and Modules intact' do
require 'private_attr'
-> { class Cla; private_attr_reader :priv; end }.must_raise NoMethodError
-> { module Mod; private_attr_reader :priv; end }.must_raise NoMethodError
end
it 'requiring private_attr/everywhere adds it to all Classes and Modules' do
require 'private_attr/everywhere'
class Cla; private_attr_reader :priv; end
module Mod; private_attr_reader :priv; end
end
end
| require 'minitest/autorun'
describe 'private_attr/everywhere' do
+ # these particular tests must be ran in order
+ def self.test_order
+ :alpha
+ end
+
it 'requiring only private_attr keeps Classes and Modules intact' do
require 'private_attr'
-> { class Cla; private_attr_reader :priv; end }.must_raise NoMethodError
-> { module Mod; private_attr_reader :priv; end }.must_raise NoMethodError
end
it 'requiring private_attr/everywhere adds it to all Classes and Modules' do
require 'private_attr/everywhere'
class Cla; private_attr_reader :priv; end
module Mod; private_attr_reader :priv; end
end
end | 5 | 0.333333 | 5 | 0 |
f2ca059d6e3e9e593b053e6483ad071d58cc99d2 | tests/core/admin.py | tests/core/admin.py | from django.contrib import admin
from import_export.admin import ImportExportMixin
from .models import Book, Category, Author
class BookAdmin(ImportExportMixin, admin.ModelAdmin):
pass
admin.site.register(Book, BookAdmin)
admin.site.register(Category)
admin.site.register(Author)
| from django.contrib import admin
from import_export.admin import ImportExportMixin
from .models import Book, Category, Author
class BookAdmin(ImportExportMixin, admin.ModelAdmin):
list_filter = ['categories', 'author']
admin.site.register(Book, BookAdmin)
admin.site.register(Category)
admin.site.register(Author)
| Add BookAdmin options in test app | Add BookAdmin options in test app
| Python | bsd-2-clause | PetrDlouhy/django-import-export,copperleaftech/django-import-export,Akoten/django-import-export,daniell/django-import-export,pajod/django-import-export,piran/django-import-export,bmihelac/django-import-export,sergei-maertens/django-import-export,bmihelac/django-import-export,PetrDlouhy/django-import-export,copperleaftech/django-import-export,SalahAdDin/django-import-export,piran/django-import-export,ericdwang/django-import-export,ericdwang/django-import-export,bmihelac/django-import-export,daniell/django-import-export,bmihelac/django-import-export,django-import-export/django-import-export,rhunwicks/django-import-export,manelclos/django-import-export,SalahAdDin/django-import-export,copperleaftech/django-import-export,luto/django-import-export,Akoten/django-import-export,PetrDlouhy/django-import-export,daniell/django-import-export,brillgen/django-import-export,PetrDlouhy/django-import-export,Apkawa/django-import-export,luto/django-import-export,ylteq/dj-import-export,pajod/django-import-export,brillgen/django-import-export,jnns/django-import-export,sergei-maertens/django-import-export,brillgen/django-import-export,copperleaftech/django-import-export,Apkawa/django-import-export,brillgen/django-import-export,piran/django-import-export,ylteq/dj-import-export,daniell/django-import-export,jnns/django-import-export,jnns/django-import-export,django-import-export/django-import-export,rhunwicks/django-import-export,SalahAdDin/django-import-export,pajod/django-import-export,ericdwang/django-import-export,Akoten/django-import-export,jnns/django-import-export,luto/django-import-export,manelclos/django-import-export,pajod/django-import-export,django-import-export/django-import-export,manelclos/django-import-export,rhunwicks/django-import-export,Apkawa/django-import-export,django-import-export/django-import-export,sergei-maertens/django-import-export,ylteq/dj-import-export | python | ## Code Before:
from django.contrib import admin
from import_export.admin import ImportExportMixin
from .models import Book, Category, Author
class BookAdmin(ImportExportMixin, admin.ModelAdmin):
pass
admin.site.register(Book, BookAdmin)
admin.site.register(Category)
admin.site.register(Author)
## Instruction:
Add BookAdmin options in test app
## Code After:
from django.contrib import admin
from import_export.admin import ImportExportMixin
from .models import Book, Category, Author
class BookAdmin(ImportExportMixin, admin.ModelAdmin):
list_filter = ['categories', 'author']
admin.site.register(Book, BookAdmin)
admin.site.register(Category)
admin.site.register(Author)
| from django.contrib import admin
from import_export.admin import ImportExportMixin
from .models import Book, Category, Author
class BookAdmin(ImportExportMixin, admin.ModelAdmin):
- pass
+ list_filter = ['categories', 'author']
admin.site.register(Book, BookAdmin)
admin.site.register(Category)
admin.site.register(Author) | 2 | 0.142857 | 1 | 1 |
4b5663feb1b4e84f4bb42ed49bc9e429a8f3ac48 | lib/tasks/migrate.rake | lib/tasks/migrate.rake | namespace :migrate do
desc 'Call Branch.recount! on each branch'
task :recount => :environment do
Branch.all.each do |branch|
branch.recount!
end
Branch.all.each do |branch|
Redis.current.del("#{ branch.name }:srpms:counter")
end
end
desc 'Migrate :size string to :size integer'
task :size => :environment do
Srpm.find_each do |srpm|
srpm.size_integer = srpm.size.to_i
srpm.save(validate: false)
end
Package.find_each do |package|
package.size_integer = package.size.to_i
package.save(validate: false)
end
end
end
| namespace :migrate do
desc 'Call Branch.recount! on each branch'
task :recount => :environment do
Branch.all.each do |branch|
branch.recount!
end
Branch.all.each do |branch|
Redis.current.del("#{ branch.name }:srpms:counter")
end
end
desc 'Migrate :size string to :size integer'
task :size => :environment do
ThinkingSphinx::Deltas.suspend!
Srpm.find_each do |srpm|
srpm.size_integer = srpm.size.to_i
srpm.save(validate: false)
end
Package.find_each do |package|
package.size_integer = package.size.to_i
package.save(validate: false)
end
ThinkingSphinx::Deltas.resume!
end
end
| Disable indexing while updating data | Disable indexing while updating data
| Ruby | mit | biow0lf/prometheus2.0,biow0lf/prometheus2.0,biow0lf/prometheus2.0,biow0lf/prometheus2.0 | ruby | ## Code Before:
namespace :migrate do
desc 'Call Branch.recount! on each branch'
task :recount => :environment do
Branch.all.each do |branch|
branch.recount!
end
Branch.all.each do |branch|
Redis.current.del("#{ branch.name }:srpms:counter")
end
end
desc 'Migrate :size string to :size integer'
task :size => :environment do
Srpm.find_each do |srpm|
srpm.size_integer = srpm.size.to_i
srpm.save(validate: false)
end
Package.find_each do |package|
package.size_integer = package.size.to_i
package.save(validate: false)
end
end
end
## Instruction:
Disable indexing while updating data
## Code After:
namespace :migrate do
desc 'Call Branch.recount! on each branch'
task :recount => :environment do
Branch.all.each do |branch|
branch.recount!
end
Branch.all.each do |branch|
Redis.current.del("#{ branch.name }:srpms:counter")
end
end
desc 'Migrate :size string to :size integer'
task :size => :environment do
ThinkingSphinx::Deltas.suspend!
Srpm.find_each do |srpm|
srpm.size_integer = srpm.size.to_i
srpm.save(validate: false)
end
Package.find_each do |package|
package.size_integer = package.size.to_i
package.save(validate: false)
end
ThinkingSphinx::Deltas.resume!
end
end
| namespace :migrate do
desc 'Call Branch.recount! on each branch'
task :recount => :environment do
Branch.all.each do |branch|
branch.recount!
end
Branch.all.each do |branch|
Redis.current.del("#{ branch.name }:srpms:counter")
end
end
desc 'Migrate :size string to :size integer'
task :size => :environment do
+ ThinkingSphinx::Deltas.suspend!
+
Srpm.find_each do |srpm|
srpm.size_integer = srpm.size.to_i
srpm.save(validate: false)
end
Package.find_each do |package|
package.size_integer = package.size.to_i
package.save(validate: false)
end
+
+ ThinkingSphinx::Deltas.resume!
end
end | 4 | 0.148148 | 4 | 0 |
64696250dfdb10e0fb24d2385e17586456f27d3c | model/src/main/java/pw/scho/battleship/model/Position.java | model/src/main/java/pw/scho/battleship/model/Position.java | package pw.scho.battleship.model;
public class Position {
private static String[] digits = "ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("");
private final int x;
private final int y;
public Position(int x, int y) {
this.x = x;
this.y = y;
}
public int getX() {
return x;
}
public int getY() {
return y;
}
public String toString() {
return digits[x] + String.valueOf(y + 1);
}
public double distanceTo(Position otherPosition) {
return Math.sqrt(Math.pow(Math.abs(x - otherPosition.x), 2) + Math.pow(Math.abs(y - otherPosition.y), 2));
}
}
| package pw.scho.battleship.model;
public class Position {
private static String[] digits = "ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("");
private final int x;
private final int y;
public Position(int x, int y) {
this.x = x;
this.y = y;
}
public int getX() {
return x;
}
public int getY() {
return y;
}
public String toString() {
return digits[x] + String.valueOf(y + 1);
}
public double distanceTo(Position otherPosition) {
return Math.sqrt(Math.pow(x - otherPosition.x, 2) + Math.pow(y - otherPosition.y, 2));
}
}
| Remove unnecessary Math.abs from distance calculation | Remove unnecessary Math.abs from distance calculation
| Java | mit | scho/battleship,scho/battleship | java | ## Code Before:
package pw.scho.battleship.model;
public class Position {
private static String[] digits = "ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("");
private final int x;
private final int y;
public Position(int x, int y) {
this.x = x;
this.y = y;
}
public int getX() {
return x;
}
public int getY() {
return y;
}
public String toString() {
return digits[x] + String.valueOf(y + 1);
}
public double distanceTo(Position otherPosition) {
return Math.sqrt(Math.pow(Math.abs(x - otherPosition.x), 2) + Math.pow(Math.abs(y - otherPosition.y), 2));
}
}
## Instruction:
Remove unnecessary Math.abs from distance calculation
## Code After:
package pw.scho.battleship.model;
public class Position {
private static String[] digits = "ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("");
private final int x;
private final int y;
public Position(int x, int y) {
this.x = x;
this.y = y;
}
public int getX() {
return x;
}
public int getY() {
return y;
}
public String toString() {
return digits[x] + String.valueOf(y + 1);
}
public double distanceTo(Position otherPosition) {
return Math.sqrt(Math.pow(x - otherPosition.x, 2) + Math.pow(y - otherPosition.y, 2));
}
}
| package pw.scho.battleship.model;
public class Position {
private static String[] digits = "ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("");
private final int x;
private final int y;
public Position(int x, int y) {
this.x = x;
this.y = y;
}
public int getX() {
return x;
}
public int getY() {
return y;
}
public String toString() {
return digits[x] + String.valueOf(y + 1);
}
public double distanceTo(Position otherPosition) {
- return Math.sqrt(Math.pow(Math.abs(x - otherPosition.x), 2) + Math.pow(Math.abs(y - otherPosition.y), 2));
? --------- - --------- -
+ return Math.sqrt(Math.pow(x - otherPosition.x, 2) + Math.pow(y - otherPosition.y, 2));
}
} | 2 | 0.068966 | 1 | 1 |
880c91bfe7277d161e937a7a4bd8ddcf71c38051 | scripts/create-capi-release.sh | scripts/create-capi-release.sh | pushd capi-release/releases
version=$(ls -v capi/capi-* | tail -1 | sed "s/capi\/capi\-\(.*\)\.yml/\1/")+dev.$(date +"%Y-%m-%d.%H-%M-%S").$(git rev-parse HEAD | cut -c1-7)
popd
echo $version > $VERSION_FILE
cd capi-release
bosh2 -n sync-blobs --parallel 10
bosh2 create-release --force \
--name capi \
--version $version \
--tarball=../releases/capi-$version.tgz
| pushd capi-release/releases
version=$(ls -v capi/capi-* | tail -1 | sed "s/capi\/capi\-\(.*\)\.yml/\1/")+dev.$(date +"%Y-%m-%d.%H-%M-%S").$(git rev-parse HEAD | cut -c1-7)
popd
echo $version > $VERSION_FILE
prerelease_version=$(\
gem search bits_service_client --all --pre --no-verbose \
| sed 's/bits_service_client (\([^,]*\).*/\1/' \
)
sed \
-i capi-release/src/cloud_controller_ng/Gemfile.lock \
-e "s/bits_service_client .*/bits_service_client ($prerelease_version)/"
cd capi-release
bosh2 -n sync-blobs --parallel 10
bosh2 create-release --force \
--name capi \
--version $version \
--tarball=../releases/capi-$version.tgz
| Patch CC to use latest (pre-)release of bits-service-client | Patch CC to use latest (pre-)release of bits-service-client
This was accidentally removed in commit 1cadbc8da2ba4cc2bc377d31b8e94eb3789cb36e
| Shell | apache-2.0 | cloudfoundry-incubator/bits-service-ci,cloudfoundry-incubator/bits-service-ci,cloudfoundry-incubator/bits-service-ci | shell | ## Code Before:
pushd capi-release/releases
version=$(ls -v capi/capi-* | tail -1 | sed "s/capi\/capi\-\(.*\)\.yml/\1/")+dev.$(date +"%Y-%m-%d.%H-%M-%S").$(git rev-parse HEAD | cut -c1-7)
popd
echo $version > $VERSION_FILE
cd capi-release
bosh2 -n sync-blobs --parallel 10
bosh2 create-release --force \
--name capi \
--version $version \
--tarball=../releases/capi-$version.tgz
## Instruction:
Patch CC to use latest (pre-)release of bits-service-client
This was accidentally removed in commit 1cadbc8da2ba4cc2bc377d31b8e94eb3789cb36e
## Code After:
pushd capi-release/releases
version=$(ls -v capi/capi-* | tail -1 | sed "s/capi\/capi\-\(.*\)\.yml/\1/")+dev.$(date +"%Y-%m-%d.%H-%M-%S").$(git rev-parse HEAD | cut -c1-7)
popd
echo $version > $VERSION_FILE
prerelease_version=$(\
gem search bits_service_client --all --pre --no-verbose \
| sed 's/bits_service_client (\([^,]*\).*/\1/' \
)
sed \
-i capi-release/src/cloud_controller_ng/Gemfile.lock \
-e "s/bits_service_client .*/bits_service_client ($prerelease_version)/"
cd capi-release
bosh2 -n sync-blobs --parallel 10
bosh2 create-release --force \
--name capi \
--version $version \
--tarball=../releases/capi-$version.tgz
| pushd capi-release/releases
version=$(ls -v capi/capi-* | tail -1 | sed "s/capi\/capi\-\(.*\)\.yml/\1/")+dev.$(date +"%Y-%m-%d.%H-%M-%S").$(git rev-parse HEAD | cut -c1-7)
popd
echo $version > $VERSION_FILE
+
+ prerelease_version=$(\
+ gem search bits_service_client --all --pre --no-verbose \
+ | sed 's/bits_service_client (\([^,]*\).*/\1/' \
+ )
+ sed \
+ -i capi-release/src/cloud_controller_ng/Gemfile.lock \
+ -e "s/bits_service_client .*/bits_service_client ($prerelease_version)/"
cd capi-release
bosh2 -n sync-blobs --parallel 10
bosh2 create-release --force \
--name capi \
--version $version \
--tarball=../releases/capi-$version.tgz | 8 | 0.666667 | 8 | 0 |
0a990d7d3ce89fae80eb058ece8fd00a99962c2c | config/locales/en/brexit_checker/breadcrumbs.yml | config/locales/en/brexit_checker/breadcrumbs.yml | en:
brexit_checker:
breadcrumbs:
home: Home
brexit-home: Brexit
brexit-check: How to get ready
questions: Questions
results: Results
| en:
brexit_checker:
breadcrumbs:
home: Home
brexit-home: Brexit
brexit-check: "Get ready for Brexit: Your results"
questions: Questions
results: Results
| Change breadcrumb title to post election copy | Change breadcrumb title to post election copy
| YAML | mit | alphagov/finder-frontend,alphagov/finder-frontend,alphagov/finder-frontend,alphagov/finder-frontend | yaml | ## Code Before:
en:
brexit_checker:
breadcrumbs:
home: Home
brexit-home: Brexit
brexit-check: How to get ready
questions: Questions
results: Results
## Instruction:
Change breadcrumb title to post election copy
## Code After:
en:
brexit_checker:
breadcrumbs:
home: Home
brexit-home: Brexit
brexit-check: "Get ready for Brexit: Your results"
questions: Questions
results: Results
| en:
brexit_checker:
breadcrumbs:
home: Home
brexit-home: Brexit
- brexit-check: How to get ready
+ brexit-check: "Get ready for Brexit: Your results"
questions: Questions
results: Results | 2 | 0.25 | 1 | 1 |
3b603daafe8cf18d2b8cbaaa5125d70ad8e11bd0 | src/solarized-css/partials/elements.styl | src/solarized-css/partials/elements.styl |
html
background-color: $hl
color: $fg
margin: 1em
body
background-color: $bg
margin: 0 auto
max-width: 23cm
border: 1pt solid $comment
padding: 1em
code
background-color: $hl
padding: 2px
a
color: $yellow
a:visited
color: $orange
a:hover
color: $orange
h1
color: $magenta
h2,h3,h4,h5,h6
color: $green
pre
background-color: $bg
color: $fg
border: 1pt solid $comment
padding: 1em
box-shadow: 5pt 5pt 8pt $hl
code
background-color: @background-color
h1
font-size: 2.8em
h2
font-size: 2.4em
h3
font-size: 1.8em
h4
font-size: 1.4em
h5
font-size: 1.3em
h6
font-size: 1.15em
table
border: hidden
border-color: $comment
margin-left:auto;
margin-right:auto;
colgroup
border: 1px solid $comment
tr:nth-child(even)
background-color: $hl
|
html
background-color: $hl
color: $fg
margin: 1em
body
background-color: $bg
margin: 0 auto
max-width: 23cm
border: 1pt solid $comment
padding: 1em
code
background-color: $hl
padding: 2px
a
color: $yellow
a:visited
color: $orange
a:hover
color: $orange
h1
color: $magenta
h2,h3,h4,h5,h6
color: $green
text-align: center
pre
background-color: $bg
color: $fg
border: 1pt solid $comment
padding: 1em
box-shadow: 5pt 5pt 8pt $hl
code
background-color: @background-color
h1
font-size: 2.8em
h2
font-size: 2.4em
h3
font-size: 1.8em
h4
font-size: 1.4em
h5
font-size: 1.3em
h6
font-size: 1.15em
table
border: hidden
border-color: $comment
margin-left:auto;
margin-right:auto;
colgroup
border: 1px solid $comment
tr:nth-child(even)
background-color: $hl
| Align all headings in the center | Align all headings in the center
| Stylus | mit | Paethon/solarized-css,Paethon/solarized-css,Paethon/solarized-css | stylus | ## Code Before:
html
background-color: $hl
color: $fg
margin: 1em
body
background-color: $bg
margin: 0 auto
max-width: 23cm
border: 1pt solid $comment
padding: 1em
code
background-color: $hl
padding: 2px
a
color: $yellow
a:visited
color: $orange
a:hover
color: $orange
h1
color: $magenta
h2,h3,h4,h5,h6
color: $green
pre
background-color: $bg
color: $fg
border: 1pt solid $comment
padding: 1em
box-shadow: 5pt 5pt 8pt $hl
code
background-color: @background-color
h1
font-size: 2.8em
h2
font-size: 2.4em
h3
font-size: 1.8em
h4
font-size: 1.4em
h5
font-size: 1.3em
h6
font-size: 1.15em
table
border: hidden
border-color: $comment
margin-left:auto;
margin-right:auto;
colgroup
border: 1px solid $comment
tr:nth-child(even)
background-color: $hl
## Instruction:
Align all headings in the center
## Code After:
html
background-color: $hl
color: $fg
margin: 1em
body
background-color: $bg
margin: 0 auto
max-width: 23cm
border: 1pt solid $comment
padding: 1em
code
background-color: $hl
padding: 2px
a
color: $yellow
a:visited
color: $orange
a:hover
color: $orange
h1
color: $magenta
h2,h3,h4,h5,h6
color: $green
text-align: center
pre
background-color: $bg
color: $fg
border: 1pt solid $comment
padding: 1em
box-shadow: 5pt 5pt 8pt $hl
code
background-color: @background-color
h1
font-size: 2.8em
h2
font-size: 2.4em
h3
font-size: 1.8em
h4
font-size: 1.4em
h5
font-size: 1.3em
h6
font-size: 1.15em
table
border: hidden
border-color: $comment
margin-left:auto;
margin-right:auto;
colgroup
border: 1px solid $comment
tr:nth-child(even)
background-color: $hl
|
html
background-color: $hl
color: $fg
margin: 1em
body
background-color: $bg
margin: 0 auto
max-width: 23cm
border: 1pt solid $comment
padding: 1em
code
background-color: $hl
padding: 2px
a
color: $yellow
a:visited
color: $orange
a:hover
color: $orange
h1
color: $magenta
h2,h3,h4,h5,h6
color: $green
+ text-align: center
pre
background-color: $bg
color: $fg
border: 1pt solid $comment
padding: 1em
box-shadow: 5pt 5pt 8pt $hl
code
background-color: @background-color
h1
font-size: 2.8em
h2
font-size: 2.4em
h3
font-size: 1.8em
h4
font-size: 1.4em
h5
font-size: 1.3em
h6
font-size: 1.15em
table
border: hidden
border-color: $comment
margin-left:auto;
margin-right:auto;
colgroup
border: 1px solid $comment
tr:nth-child(even)
background-color: $hl | 1 | 0.015152 | 1 | 0 |
81d00454906ce9a4be17474b35f0ccb341ece287 | mobile/src/main/java/com/chaos/databinding/activities/MainActivity.java | mobile/src/main/java/com/chaos/databinding/activities/MainActivity.java | package com.chaos.databinding.activities;
import android.databinding.DataBindingUtil;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import com.chaos.databinding.R;
import com.chaos.databinding.models.User;
import com.chaos.databinding.databinding.ActivityMainBinding;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
final ActivityMainBinding binding = DataBindingUtil.setContentView(this, R.layout.activity_main);
final User user = this.getUser();
binding.setUser(user);
}
private User getUser() {
return new User("Ash Davies", "Berlin");
}
}
| package com.chaos.databinding.activities;
import android.databinding.DataBindingUtil;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import com.chaos.databinding.R;
import com.chaos.databinding.models.User;
import com.chaos.databinding.databinding.ActivityMainBinding;
public class MainActivity extends AppCompatActivity {
private ActivityMainBinding binding;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.binding = DataBindingUtil.setContentView(this, R.layout.activity_main);
this.updateUser();
}
private void updateUser() {
binding.setUser(this.getUser());
}
private User getUser() {
return new User("Ash Davies", "Berlin");
}
}
| Store binding as local variable | Store binding as local variable
| Java | apache-2.0 | ashdavies/data-binding,jandrop/data-binding | java | ## Code Before:
package com.chaos.databinding.activities;
import android.databinding.DataBindingUtil;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import com.chaos.databinding.R;
import com.chaos.databinding.models.User;
import com.chaos.databinding.databinding.ActivityMainBinding;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
final ActivityMainBinding binding = DataBindingUtil.setContentView(this, R.layout.activity_main);
final User user = this.getUser();
binding.setUser(user);
}
private User getUser() {
return new User("Ash Davies", "Berlin");
}
}
## Instruction:
Store binding as local variable
## Code After:
package com.chaos.databinding.activities;
import android.databinding.DataBindingUtil;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import com.chaos.databinding.R;
import com.chaos.databinding.models.User;
import com.chaos.databinding.databinding.ActivityMainBinding;
public class MainActivity extends AppCompatActivity {
private ActivityMainBinding binding;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.binding = DataBindingUtil.setContentView(this, R.layout.activity_main);
this.updateUser();
}
private void updateUser() {
binding.setUser(this.getUser());
}
private User getUser() {
return new User("Ash Davies", "Berlin");
}
}
| package com.chaos.databinding.activities;
import android.databinding.DataBindingUtil;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import com.chaos.databinding.R;
import com.chaos.databinding.models.User;
import com.chaos.databinding.databinding.ActivityMainBinding;
public class MainActivity extends AppCompatActivity {
+ private ActivityMainBinding binding;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
- final ActivityMainBinding binding = DataBindingUtil.setContentView(this, R.layout.activity_main);
? ^ ^^^^^^^^^^^^^^^^^^^^^^^^
+ this.binding = DataBindingUtil.setContentView(this, R.layout.activity_main);
? ^^ ^^
- final User user = this.getUser();
+ this.updateUser();
+ }
+ private void updateUser() {
- binding.setUser(user);
? ^
+ binding.setUser(this.getUser());
? ^^^^^^^^^ ++
}
private User getUser() {
return new User("Ash Davies", "Berlin");
}
} | 9 | 0.346154 | 6 | 3 |
adb7925ea9e3a2a6805fb033e94310f3de6400b7 | android/entityextraction/gradle/wrapper/gradle-wrapper.properties | android/entityextraction/gradle/wrapper/gradle-wrapper.properties | distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
| distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
| Update entity extraction gradle version. | Update entity extraction gradle version.
Change-Id: I664e1e3525b22fddef4ba7302b5490d065e22e76
| INI | apache-2.0 | googlesamples/mlkit,googlesamples/mlkit,googlesamples/mlkit,googlesamples/mlkit | ini | ## Code Before:
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
## Instruction:
Update entity extraction gradle version.
Change-Id: I664e1e3525b22fddef4ba7302b5490d065e22e76
## Code After:
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
| distributionBase=GRADLE_USER_HOME
+ distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
distributionPath=wrapper/dists
+ zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
- zipStorePath=wrapper/dists
- distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip | 4 | 0.8 | 2 | 2 |
bb0e9661f95ddfe8630c76a96571bfa342233e27 | src/Music/Chord.elm | src/Music/Chord.elm | module Music.Chord exposing (..)
import Music.Note as Note exposing (Note, Interval)
-- TYPES
type Chord
= Chord Note Quality
type Quality
= Major
| Minor
| Sixth
| Seventh
| MinorSeventh
| HalfDiminished
qualities : List Quality
qualities =
[ Major, Minor, Sixth, Seventh, MinorSeventh, HalfDiminished ]
-- FUNCTIONS
transpose : Interval -> Chord -> Chord
transpose interval (Chord note quality) =
Chord (Note.transpose interval note) quality
toString : Chord -> String
toString (Chord note quality) =
let
qualityToString : Quality -> String
qualityToString quality =
case quality of
Major ->
""
Minor ->
"m"
Sixth ->
"6"
Seventh ->
"7"
MinorSeventh ->
"m7"
"m7b5"
HalfDiminished ->
in
Note.toString note ++ qualityToString quality
| module Music.Chord exposing (..)
import Music.Note as Note exposing (Note, Interval)
-- TYPES
type Chord
= Chord Note Quality
type Quality
= Major
| Minor
| Sixth
| Seventh
| MinorSeventh
| HalfDiminished
qualities : List Quality
qualities =
[ Major, Minor, Sixth, Seventh, MinorSeventh, HalfDiminished ]
-- FUNCTIONS
transpose : Interval -> Chord -> Chord
transpose interval (Chord note quality) =
Chord (Note.transpose interval note) quality
toString : Chord -> String
toString (Chord note quality) =
let
qualityToString : Quality -> String
qualityToString quality =
case quality of
Major ->
""
Minor ->
"m"
Sixth ->
"6"
Seventh ->
"7"
MinorSeventh ->
"m7"
HalfDiminished ->
"ø"
in
Note.toString note ++ qualityToString quality
| Change representation of half-diminished chords | Change representation of half-diminished chords
| Elm | agpl-3.0 | open-chords-charts/chart-editor,open-chords-charts/chart-editor | elm | ## Code Before:
module Music.Chord exposing (..)
import Music.Note as Note exposing (Note, Interval)
-- TYPES
type Chord
= Chord Note Quality
type Quality
= Major
| Minor
| Sixth
| Seventh
| MinorSeventh
| HalfDiminished
qualities : List Quality
qualities =
[ Major, Minor, Sixth, Seventh, MinorSeventh, HalfDiminished ]
-- FUNCTIONS
transpose : Interval -> Chord -> Chord
transpose interval (Chord note quality) =
Chord (Note.transpose interval note) quality
toString : Chord -> String
toString (Chord note quality) =
let
qualityToString : Quality -> String
qualityToString quality =
case quality of
Major ->
""
Minor ->
"m"
Sixth ->
"6"
Seventh ->
"7"
MinorSeventh ->
"m7"
"m7b5"
HalfDiminished ->
in
Note.toString note ++ qualityToString quality
## Instruction:
Change representation of half-diminished chords
## Code After:
module Music.Chord exposing (..)
import Music.Note as Note exposing (Note, Interval)
-- TYPES
type Chord
= Chord Note Quality
type Quality
= Major
| Minor
| Sixth
| Seventh
| MinorSeventh
| HalfDiminished
qualities : List Quality
qualities =
[ Major, Minor, Sixth, Seventh, MinorSeventh, HalfDiminished ]
-- FUNCTIONS
transpose : Interval -> Chord -> Chord
transpose interval (Chord note quality) =
Chord (Note.transpose interval note) quality
toString : Chord -> String
toString (Chord note quality) =
let
qualityToString : Quality -> String
qualityToString quality =
case quality of
Major ->
""
Minor ->
"m"
Sixth ->
"6"
Seventh ->
"7"
MinorSeventh ->
"m7"
HalfDiminished ->
"ø"
in
Note.toString note ++ qualityToString quality
| module Music.Chord exposing (..)
import Music.Note as Note exposing (Note, Interval)
-- TYPES
type Chord
= Chord Note Quality
type Quality
= Major
| Minor
| Sixth
| Seventh
| MinorSeventh
| HalfDiminished
qualities : List Quality
qualities =
[ Major, Minor, Sixth, Seventh, MinorSeventh, HalfDiminished ]
-- FUNCTIONS
transpose : Interval -> Chord -> Chord
transpose interval (Chord note quality) =
Chord (Note.transpose interval note) quality
toString : Chord -> String
toString (Chord note quality) =
let
qualityToString : Quality -> String
qualityToString quality =
case quality of
Major ->
""
Minor ->
"m"
Sixth ->
"6"
Seventh ->
"7"
MinorSeventh ->
"m7"
- "m7b5"
HalfDiminished ->
+ "ø"
in
Note.toString note ++ qualityToString quality | 2 | 0.033333 | 1 | 1 |
150171c5a99d2076a2d9d4608ea011025ad795cd | README.md | README.md |
[](https://travis-ci.org/jugglingnutcase/language-powershell)
[](https://ci.appveyor.com/project/jugglingnutcase/language-powershell/branch/master)
This package highlights PowerShell syntax in the [Atom editor](https://atom.io).
This was converted from [@davidpeckam]'s [PowerShell textmate bundle](https://github.com/davidpeckham/powershell.tmbundle). Thanks [@davidpeckam]!
[@davidpeckam]:https://github.com/davidpeckham
|
[](https://travis-ci.org/jugglingnutcase/language-powershell)
[](https://ci.appveyor.com/project/jugglingnutcase/language-powershell/branch/master)
This package highlights PowerShell syntax in the [Atom editor](https://atom.io).
## Language references
i just found this [helpful blog post](http://blogs.msdn.com/b/powershell/archive/2006/05/10/594535.aspx) on the
PowerShell grammar. i hope i *parse* :stuck_out_tongue_winking_eye: it well.
This was converted from [@davidpeckam]'s [PowerShell textmate bundle](https://github.com/davidpeckham/powershell.tmbundle). Thanks [@davidpeckam]!
[@davidpeckam]:https://github.com/davidpeckham
| Update readme with a link to PS grammer | Update readme with a link to PS grammer
| Markdown | mit | jugglingnutcase/language-powershell | markdown | ## Code Before:
[](https://travis-ci.org/jugglingnutcase/language-powershell)
[](https://ci.appveyor.com/project/jugglingnutcase/language-powershell/branch/master)
This package highlights PowerShell syntax in the [Atom editor](https://atom.io).
This was converted from [@davidpeckam]'s [PowerShell textmate bundle](https://github.com/davidpeckham/powershell.tmbundle). Thanks [@davidpeckam]!
[@davidpeckam]:https://github.com/davidpeckham
## Instruction:
Update readme with a link to PS grammer
## Code After:
[](https://travis-ci.org/jugglingnutcase/language-powershell)
[](https://ci.appveyor.com/project/jugglingnutcase/language-powershell/branch/master)
This package highlights PowerShell syntax in the [Atom editor](https://atom.io).
## Language references
i just found this [helpful blog post](http://blogs.msdn.com/b/powershell/archive/2006/05/10/594535.aspx) on the
PowerShell grammar. i hope i *parse* :stuck_out_tongue_winking_eye: it well.
This was converted from [@davidpeckam]'s [PowerShell textmate bundle](https://github.com/davidpeckham/powershell.tmbundle). Thanks [@davidpeckam]!
[@davidpeckam]:https://github.com/davidpeckham
|
[](https://travis-ci.org/jugglingnutcase/language-powershell)
[](https://ci.appveyor.com/project/jugglingnutcase/language-powershell/branch/master)
This package highlights PowerShell syntax in the [Atom editor](https://atom.io).
+ ## Language references
+
+ i just found this [helpful blog post](http://blogs.msdn.com/b/powershell/archive/2006/05/10/594535.aspx) on the
+ PowerShell grammar. i hope i *parse* :stuck_out_tongue_winking_eye: it well.
+
This was converted from [@davidpeckam]'s [PowerShell textmate bundle](https://github.com/davidpeckham/powershell.tmbundle). Thanks [@davidpeckam]!
[@davidpeckam]:https://github.com/davidpeckham | 5 | 0.555556 | 5 | 0 |
965afe0608ebd2da36edff41d0cd2332fec88f2c | src/Illuminate/Database/Console/Migrations/BaseCommand.php | src/Illuminate/Database/Console/Migrations/BaseCommand.php | <?php
namespace Illuminate\Database\Console\Migrations;
use Illuminate\Console\Command;
class BaseCommand extends Command
{
/**
* Get the path to the migration directory.
*
* @return string
*/
protected function getMigrationPath()
{
return $this->laravel->databasePath().DIRECTORY_SEPARATOR.'migrations';
}
/**
* Get all of the migration paths.
*
* @return array
*/
protected function getMigrationPaths()
{
// Here, we will check to see if a path option has been defined. If it has
// we will use the path relative to the root of this installation folder
// so that migrations may be run for any path within the applications.
if ($this->input->hasOption('path') && $this->option('path')) {
return [$this->laravel->basePath().'/'.$this->option('path')];
}
return array_merge(
[$this->getMigrationPath()], $this->migrator->paths()
);
}
}
| <?php
namespace Illuminate\Database\Console\Migrations;
use Illuminate\Console\Command;
class BaseCommand extends Command
{
/**
* Get all of the migration paths.
*
* @return array
*/
protected function getMigrationPaths()
{
// Here, we will check to see if a path option has been defined. If it has we will
// use the path relative to the root of the installation folder so our database
// migrations may be run for any customized path from within the application.
if ($this->input->hasOption('path') && $this->option('path')) {
return [$this->laravel->basePath().'/'.$this->option('path')];
}
return array_merge(
[$this->getMigrationPath()], $this->migrator->paths()
);
}
/**
* Get the path to the migration directory.
*
* @return string
*/
protected function getMigrationPath()
{
return $this->laravel->databasePath().DIRECTORY_SEPARATOR.'migrations';
}
}
| Work on base migration command. | Work on base migration command.
| PHP | mit | Hugome/framework,cybercog/framework,jchamberlain/framework,jchamberlain/framework,GreenLightt/laravel-framework,cviebrock/framework,jerguslejko/framework,laravel/framework,samlev/framework,vlakoff/framework,notebowl/laravel-framework,BePsvPT-Fork/framework,halaei/framework,jerguslejko/framework,stidges/framework,rodrigopedra/framework,ChristopheB/framework,ChristopheB/framework,ncaneldiee/laravel-framework,Evertt/framework,vlakoff/framework,JamesForks/framework,Garbee/framework,EspadaV8/framework,samlev/framework,ChristopheB/framework,irfanevrens/framework,ncaneldiee/laravel-framework,ncaneldiee/laravel-framework,lucasmichot/laravel--framework,alnutile/framework,bytestream/framework,filipeaclima/framework,alepeino/framework,Fenzland/laravel,jrean/framework,billmn/framework,filipeaclima/framework,BePsvPT-Fork/framework,Evertt/framework,PantherDD/laravel-framework,EspadaV8/framework,n7olkachev/framework,OzanKurt/framework,TheGIBSON/framework,Garbee/framework,cybercog/framework,behzadsh/framework,reinink/framework,cviebrock/framework,n7olkachev/framework,JosephSilber/framework,reinink/framework,Garbee/framework,jarnovanleeuwen/framework,behzadsh/framework,JamesForks/framework,Fenzland/laravel,ps92/framework,BePsvPT-Fork/framework,crynobone/framework,billmn/framework,cviebrock/framework,notebowl/laravel-framework,laravel/framework,vetruvet/framework,joecohens/framework,bdsoha/framework,morrislaptop/framework,mul14/laravel-framework,BePsvPT-Fork/framework,jerguslejko/framework,vetruvet/framework,dwightwatson/framework,dan-har/framework,gms8994/framework,alepeino/framework,martinssipenko/framework,srmkliveforks/framework,jarektkaczyk/framework,halaei/framework,TheGIBSON/framework,jtgrimes/framework,hafezdivandari/framework,OzanKurt/framework,markhemstead/framework,arturock/framework,jimrubenstein/laravel-framework,joecohens/framework,bdsoha/framework,arturock/framework,tomschlick/framework,barryvdh/framework,TheGIBSON/framework,jarektkaczyk/framework,Hugome/framework,dan-har/framework,halaei/framework,barryvdh/framework,joecohens/framework,EspadaV8/framework,martinssipenko/framework,cybercog/framework,miclf/framework,bdsoha/framework,tjbp/framework,vlakoff/framework,GreenLightt/laravel-framework,barryvdh/framework,hafezdivandari/framework,mlantz/framework,leo108/laravel_framework,guiwoda/framework,GreenLightt/laravel-framework,jchamberlain/framework,jarnovanleeuwen/framework,ps92/framework,jtgrimes/framework,jtgrimes/framework,jarektkaczyk/framework,rodrigopedra/framework,lucasmichot/laravel--framework,alnutile/framework,PantherDD/laravel-framework,irfanevrens/framework,mul14/laravel-framework,mul14/laravel-framework,crynobone/framework,gms8994/framework,srmkliveforks/framework,markhemstead/framework,PantherDD/laravel-framework,miclf/framework,rodrigopedra/framework,rodrigopedra/framework,Evertt/framework,ps92/framework,stidges/framework,stevebauman/framework,srmkliveforks/framework,guiwoda/framework,jerguslejko/framework,irfanevrens/framework,tjbp/framework,dan-har/framework,guiwoda/framework,Hugome/framework,mlantz/framework,stidges/framework,tomschlick/framework,arturock/framework,miclf/framework,lucasmichot/framework,billmn/framework,martinssipenko/framework,stidges/framework,JosephSilber/framework,driesvints/framework,morrislaptop/framework,filipeaclima/framework,cviebrock/framework,lucasmichot/laravel--framework,mlantz/framework,alepeino/framework,reinink/framework,gms8994/framework,srmkliveforks/framework,alnutile/framework,dwightwatson/framework,vetruvet/framework,mul14/laravel-framework,Fenzland/laravel,driesvints/framework,bytestream/framework,jrean/framework,tomschlick/framework,jarnovanleeuwen/framework,stevebauman/framework,jimrubenstein/laravel-framework,barryvdh/framework,tjbp/framework,jrean/framework,jimrubenstein/laravel-framework,lucasmichot/framework,OzanKurt/framework,gms8994/framework,behzadsh/framework,leo108/laravel_framework,n7olkachev/framework | php | ## Code Before:
<?php
namespace Illuminate\Database\Console\Migrations;
use Illuminate\Console\Command;
class BaseCommand extends Command
{
/**
* Get the path to the migration directory.
*
* @return string
*/
protected function getMigrationPath()
{
return $this->laravel->databasePath().DIRECTORY_SEPARATOR.'migrations';
}
/**
* Get all of the migration paths.
*
* @return array
*/
protected function getMigrationPaths()
{
// Here, we will check to see if a path option has been defined. If it has
// we will use the path relative to the root of this installation folder
// so that migrations may be run for any path within the applications.
if ($this->input->hasOption('path') && $this->option('path')) {
return [$this->laravel->basePath().'/'.$this->option('path')];
}
return array_merge(
[$this->getMigrationPath()], $this->migrator->paths()
);
}
}
## Instruction:
Work on base migration command.
## Code After:
<?php
namespace Illuminate\Database\Console\Migrations;
use Illuminate\Console\Command;
class BaseCommand extends Command
{
/**
* Get all of the migration paths.
*
* @return array
*/
protected function getMigrationPaths()
{
// Here, we will check to see if a path option has been defined. If it has we will
// use the path relative to the root of the installation folder so our database
// migrations may be run for any customized path from within the application.
if ($this->input->hasOption('path') && $this->option('path')) {
return [$this->laravel->basePath().'/'.$this->option('path')];
}
return array_merge(
[$this->getMigrationPath()], $this->migrator->paths()
);
}
/**
* Get the path to the migration directory.
*
* @return string
*/
protected function getMigrationPath()
{
return $this->laravel->databasePath().DIRECTORY_SEPARATOR.'migrations';
}
}
| <?php
namespace Illuminate\Database\Console\Migrations;
use Illuminate\Console\Command;
class BaseCommand extends Command
{
/**
+ * Get all of the migration paths.
+ *
+ * @return array
+ */
+ protected function getMigrationPaths()
+ {
+ // Here, we will check to see if a path option has been defined. If it has we will
+ // use the path relative to the root of the installation folder so our database
+ // migrations may be run for any customized path from within the application.
+ if ($this->input->hasOption('path') && $this->option('path')) {
+ return [$this->laravel->basePath().'/'.$this->option('path')];
+ }
+
+ return array_merge(
+ [$this->getMigrationPath()], $this->migrator->paths()
+ );
+ }
+
+ /**
* Get the path to the migration directory.
*
* @return string
*/
protected function getMigrationPath()
{
return $this->laravel->databasePath().DIRECTORY_SEPARATOR.'migrations';
}
-
- /**
- * Get all of the migration paths.
- *
- * @return array
- */
- protected function getMigrationPaths()
- {
- // Here, we will check to see if a path option has been defined. If it has
- // we will use the path relative to the root of this installation folder
- // so that migrations may be run for any path within the applications.
- if ($this->input->hasOption('path') && $this->option('path')) {
- return [$this->laravel->basePath().'/'.$this->option('path')];
- }
-
- return array_merge(
- [$this->getMigrationPath()], $this->migrator->paths()
- );
- }
} | 38 | 1.027027 | 19 | 19 |
6a7de409d7ecde22f81ab9fba0a9a7454457d2ea | acceptance/provider/synced_folder_spec.rb | acceptance/provider/synced_folder_spec.rb | shared_examples "provider/synced_folder" do |provider, options|
if !options[:box]
raise ArgumentError,
"box option must be specified for provider: #{provider}"
end
include_context "acceptance"
before do
environment.skeleton("synced_folders")
assert_execute("vagrant", "box", "add", "basic", options[:box])
assert_execute("vagrant", "up", "--provider=#{provider}")
end
after do
assert_execute("vagrant", "destroy", "--force")
end
# We put all of this in a single RSpec test so that we can test all
# the cases within a single VM rather than having to `vagrant up` many
# times.
it "properly configures synced folder types" do
status("Test: mounts the default /vagrant synced folder")
result = execute("vagrant", "ssh", "-c", "cat /vagrant/foo")
expect(result.exit_code).to eql(0)
expect(result.stdout).to match(/hello$/)
status("Test: doesn't mount a disabled folder")
result = execute("vagrant", "ssh", "-c", "test -d /foo")
expect(result.exit_code).to eql(1)
end
end
| shared_examples "provider/synced_folder" do |provider, options|
if !options[:box]
raise ArgumentError,
"box option must be specified for provider: #{provider}"
end
include_context "acceptance"
before do
environment.skeleton("synced_folders")
assert_execute("vagrant", "box", "add", "basic", options[:box])
assert_execute("vagrant", "up", "--provider=#{provider}")
end
after do
assert_execute("vagrant", "destroy", "--force")
end
# We put all of this in a single RSpec test so that we can test all
# the cases within a single VM rather than having to `vagrant up` many
# times.
it "properly configures synced folder types" do
status("Test: mounts the default /vagrant synced folder")
result = execute("vagrant", "ssh", "-c", "cat /vagrant/foo")
expect(result.exit_code).to eql(0)
expect(result.stdout).to match(/hello$/)
status("Test: doesn't mount a disabled folder")
result = execute("vagrant", "ssh", "-c", "test -d /foo")
expect(result.exit_code).to eql(1)
status("Test: persists a sync folder after a manual reboot")
result = execute("vagrant", "ssh", "-c", "sudo reboot")
expect(result).to exit_with(255)
result = execute("vagrant", "ssh", "-c", "cat /vagrant/foo")
expect(result.exit_code).to eql(0)
expect(result.stdout).to match(/hello$/)
end
end
| Test synced folder persists after guest reboot | Test synced folder persists after guest reboot
This test checks to see that a VirtualBox synced folder persists outside
of a `vagrant reload`, such as when a machine is manually rebooted or
restarted by the provider directly.
| Ruby | mpl-2.0 | mitchellh/vagrant-spec,mitchellh/vagrant-spec | ruby | ## Code Before:
shared_examples "provider/synced_folder" do |provider, options|
if !options[:box]
raise ArgumentError,
"box option must be specified for provider: #{provider}"
end
include_context "acceptance"
before do
environment.skeleton("synced_folders")
assert_execute("vagrant", "box", "add", "basic", options[:box])
assert_execute("vagrant", "up", "--provider=#{provider}")
end
after do
assert_execute("vagrant", "destroy", "--force")
end
# We put all of this in a single RSpec test so that we can test all
# the cases within a single VM rather than having to `vagrant up` many
# times.
it "properly configures synced folder types" do
status("Test: mounts the default /vagrant synced folder")
result = execute("vagrant", "ssh", "-c", "cat /vagrant/foo")
expect(result.exit_code).to eql(0)
expect(result.stdout).to match(/hello$/)
status("Test: doesn't mount a disabled folder")
result = execute("vagrant", "ssh", "-c", "test -d /foo")
expect(result.exit_code).to eql(1)
end
end
## Instruction:
Test synced folder persists after guest reboot
This test checks to see that a VirtualBox synced folder persists outside
of a `vagrant reload`, such as when a machine is manually rebooted or
restarted by the provider directly.
## Code After:
shared_examples "provider/synced_folder" do |provider, options|
if !options[:box]
raise ArgumentError,
"box option must be specified for provider: #{provider}"
end
include_context "acceptance"
before do
environment.skeleton("synced_folders")
assert_execute("vagrant", "box", "add", "basic", options[:box])
assert_execute("vagrant", "up", "--provider=#{provider}")
end
after do
assert_execute("vagrant", "destroy", "--force")
end
# We put all of this in a single RSpec test so that we can test all
# the cases within a single VM rather than having to `vagrant up` many
# times.
it "properly configures synced folder types" do
status("Test: mounts the default /vagrant synced folder")
result = execute("vagrant", "ssh", "-c", "cat /vagrant/foo")
expect(result.exit_code).to eql(0)
expect(result.stdout).to match(/hello$/)
status("Test: doesn't mount a disabled folder")
result = execute("vagrant", "ssh", "-c", "test -d /foo")
expect(result.exit_code).to eql(1)
status("Test: persists a sync folder after a manual reboot")
result = execute("vagrant", "ssh", "-c", "sudo reboot")
expect(result).to exit_with(255)
result = execute("vagrant", "ssh", "-c", "cat /vagrant/foo")
expect(result.exit_code).to eql(0)
expect(result.stdout).to match(/hello$/)
end
end
| shared_examples "provider/synced_folder" do |provider, options|
if !options[:box]
raise ArgumentError,
"box option must be specified for provider: #{provider}"
end
include_context "acceptance"
before do
environment.skeleton("synced_folders")
assert_execute("vagrant", "box", "add", "basic", options[:box])
assert_execute("vagrant", "up", "--provider=#{provider}")
end
after do
assert_execute("vagrant", "destroy", "--force")
end
# We put all of this in a single RSpec test so that we can test all
# the cases within a single VM rather than having to `vagrant up` many
# times.
it "properly configures synced folder types" do
status("Test: mounts the default /vagrant synced folder")
result = execute("vagrant", "ssh", "-c", "cat /vagrant/foo")
expect(result.exit_code).to eql(0)
expect(result.stdout).to match(/hello$/)
status("Test: doesn't mount a disabled folder")
result = execute("vagrant", "ssh", "-c", "test -d /foo")
expect(result.exit_code).to eql(1)
+
+ status("Test: persists a sync folder after a manual reboot")
+ result = execute("vagrant", "ssh", "-c", "sudo reboot")
+ expect(result).to exit_with(255)
+ result = execute("vagrant", "ssh", "-c", "cat /vagrant/foo")
+ expect(result.exit_code).to eql(0)
+ expect(result.stdout).to match(/hello$/)
end
end | 7 | 0.21875 | 7 | 0 |
a902c995b88008e364e79d34b72af2a05dea5ebc | lib/file_data/helpers/stream_view.rb | lib/file_data/helpers/stream_view.rb | require 'forwardable'
require_relative '../core_extensions/binary_extensions'
module Helpers
# Abstract view of a stream
class BaseStreamView
extend Forwardable
include BinaryExtensions
attr_reader :stream, :start_pos
def initialize(stream, start_pos)
@stream = stream
@start_pos = start_pos
end
def_delegators :@stream, :seek, :each_byte, :pos
end
# View of a stream that has a specified size in bytes
class SubStreamView < BaseStreamView
attr_reader :end_pos, :size
def initialize(stream, start_pos, size)
super(stream, start_pos)
@end_pos = @start_pos + size - 1
@size = size
end
def remaining_bytes
@end_pos - pos + 1
end
def eof?
pos > @end_pos
end
end
# View of a stream that ends when eof? is true
class StreamView < BaseStreamView
def initialize(stream)
super(stream, 0)
end
def eof?
@stream.eof?
end
end
end
| require 'forwardable'
require_relative '../core_extensions/binary_extensions'
module Helpers
# Abstract view of a stream
class BaseStreamView
extend Forwardable
include BinaryExtensions
attr_reader :stream, :start_pos
def initialize(stream, start_pos)
@stream = stream
@start_pos = start_pos
end
def_delegators :@stream, :seek, :each_byte, :pos
end
# View of a stream that has a specified size in bytes
class SubStreamView < BaseStreamView
attr_reader :end_pos, :size
def initialize(stream, start_pos, size)
super(stream, start_pos)
@end_pos = @start_pos + size - 1
@size = size
end
def remaining_bytes
@end_pos - pos + 1
end
def eof?
pos > @end_pos or @stream.eof?
end
end
# View of a stream that ends when eof? is true
class StreamView < BaseStreamView
def initialize(stream)
super(stream, 0)
end
def eof?
@stream.eof?
end
end
end
| Make sure that SubStreamView has eof? return true if the wrapped stream has eof? true | Make sure that SubStreamView has eof? return true if the wrapped stream has eof? true
| Ruby | mit | ScottHaney/file_data | ruby | ## Code Before:
require 'forwardable'
require_relative '../core_extensions/binary_extensions'
module Helpers
# Abstract view of a stream
class BaseStreamView
extend Forwardable
include BinaryExtensions
attr_reader :stream, :start_pos
def initialize(stream, start_pos)
@stream = stream
@start_pos = start_pos
end
def_delegators :@stream, :seek, :each_byte, :pos
end
# View of a stream that has a specified size in bytes
class SubStreamView < BaseStreamView
attr_reader :end_pos, :size
def initialize(stream, start_pos, size)
super(stream, start_pos)
@end_pos = @start_pos + size - 1
@size = size
end
def remaining_bytes
@end_pos - pos + 1
end
def eof?
pos > @end_pos
end
end
# View of a stream that ends when eof? is true
class StreamView < BaseStreamView
def initialize(stream)
super(stream, 0)
end
def eof?
@stream.eof?
end
end
end
## Instruction:
Make sure that SubStreamView has eof? return true if the wrapped stream has eof? true
## Code After:
require 'forwardable'
require_relative '../core_extensions/binary_extensions'
module Helpers
# Abstract view of a stream
class BaseStreamView
extend Forwardable
include BinaryExtensions
attr_reader :stream, :start_pos
def initialize(stream, start_pos)
@stream = stream
@start_pos = start_pos
end
def_delegators :@stream, :seek, :each_byte, :pos
end
# View of a stream that has a specified size in bytes
class SubStreamView < BaseStreamView
attr_reader :end_pos, :size
def initialize(stream, start_pos, size)
super(stream, start_pos)
@end_pos = @start_pos + size - 1
@size = size
end
def remaining_bytes
@end_pos - pos + 1
end
def eof?
pos > @end_pos or @stream.eof?
end
end
# View of a stream that ends when eof? is true
class StreamView < BaseStreamView
def initialize(stream)
super(stream, 0)
end
def eof?
@stream.eof?
end
end
end
| require 'forwardable'
require_relative '../core_extensions/binary_extensions'
module Helpers
# Abstract view of a stream
class BaseStreamView
extend Forwardable
include BinaryExtensions
attr_reader :stream, :start_pos
def initialize(stream, start_pos)
@stream = stream
@start_pos = start_pos
end
def_delegators :@stream, :seek, :each_byte, :pos
end
# View of a stream that has a specified size in bytes
class SubStreamView < BaseStreamView
attr_reader :end_pos, :size
def initialize(stream, start_pos, size)
super(stream, start_pos)
@end_pos = @start_pos + size - 1
@size = size
end
def remaining_bytes
@end_pos - pos + 1
end
def eof?
- pos > @end_pos
+ pos > @end_pos or @stream.eof?
end
end
# View of a stream that ends when eof? is true
class StreamView < BaseStreamView
def initialize(stream)
super(stream, 0)
end
def eof?
@stream.eof?
end
end
end | 2 | 0.040816 | 1 | 1 |
e27d3efb4f815829406a20856e5c7cb185a892a2 | spec/model_specs/skill_spec.rb | spec/model_specs/skill_spec.rb | require 'rails_helper'
describe Skill do
it "is valid with a title" do
skill = Skill.new(title: "juggling")
expect(skill.valid?).to be true
end
it "is invalid without a title" do
skill = Skill.new(title: nil)
expect(skill.errors[:title]).not_to include("can't be blank")
end
it "sets refreshed_at to the current epoch time upon record creation" do
skill = Skill.create(title: "hello there")
expect(skill.refreshed_at).to eq Time.now.to_i
end
end | require 'rails_helper'
describe Skill do
let(:valid_skill) { Skill.create(title: "valid skill") }
let(:invalid_skill) { Skill.create(title: "invalid skill") }
it "is valid with a title" do
expect(valid_skill.valid?).to be true
end
it "is invalid without a title" do
expect(invalid_skill.errors[:title]).not_to include("can't be blank")
end
#24 hours in seconds is 86400
it "sets expiration_time to 24 hours from the current epoch time" do
expect(valid_skill.expiration_time).to eq Time.now.to_i + 86400
end
it "is initialized with a current_streak of 1" do
expect(valid_skill.current_streak).to eq 1
end
it "can reset the current streak to 0" do
valid_skill.end_current_streak
expect(valid_skill.current_streak).to eq 0
end
it "can give the number of seconds remaining after creation" do
wait 5
expect(valid_skill.time_remaining).to eq false
end
end | Add additional tests for the Skill method | Add additional tests for the Skill method
| Ruby | mit | costolo/chain,costolo/chain,costolo/chain | ruby | ## Code Before:
require 'rails_helper'
describe Skill do
it "is valid with a title" do
skill = Skill.new(title: "juggling")
expect(skill.valid?).to be true
end
it "is invalid without a title" do
skill = Skill.new(title: nil)
expect(skill.errors[:title]).not_to include("can't be blank")
end
it "sets refreshed_at to the current epoch time upon record creation" do
skill = Skill.create(title: "hello there")
expect(skill.refreshed_at).to eq Time.now.to_i
end
end
## Instruction:
Add additional tests for the Skill method
## Code After:
require 'rails_helper'
describe Skill do
let(:valid_skill) { Skill.create(title: "valid skill") }
let(:invalid_skill) { Skill.create(title: "invalid skill") }
it "is valid with a title" do
expect(valid_skill.valid?).to be true
end
it "is invalid without a title" do
expect(invalid_skill.errors[:title]).not_to include("can't be blank")
end
#24 hours in seconds is 86400
it "sets expiration_time to 24 hours from the current epoch time" do
expect(valid_skill.expiration_time).to eq Time.now.to_i + 86400
end
it "is initialized with a current_streak of 1" do
expect(valid_skill.current_streak).to eq 1
end
it "can reset the current streak to 0" do
valid_skill.end_current_streak
expect(valid_skill.current_streak).to eq 0
end
it "can give the number of seconds remaining after creation" do
wait 5
expect(valid_skill.time_remaining).to eq false
end
end | require 'rails_helper'
describe Skill do
+ let(:valid_skill) { Skill.create(title: "valid skill") }
+ let(:invalid_skill) { Skill.create(title: "invalid skill") }
+
it "is valid with a title" do
- skill = Skill.new(title: "juggling")
- expect(skill.valid?).to be true
+ expect(valid_skill.valid?).to be true
? ++++++
end
it "is invalid without a title" do
- skill = Skill.new(title: nil)
- expect(skill.errors[:title]).not_to include("can't be blank")
+ expect(invalid_skill.errors[:title]).not_to include("can't be blank")
? ++++++++
end
- it "sets refreshed_at to the current epoch time upon record creation" do
- skill = Skill.create(title: "hello there")
- expect(skill.refreshed_at).to eq Time.now.to_i
+ #24 hours in seconds is 86400
+ it "sets expiration_time to 24 hours from the current epoch time" do
+ expect(valid_skill.expiration_time).to eq Time.now.to_i + 86400
+ end
+
+ it "is initialized with a current_streak of 1" do
+ expect(valid_skill.current_streak).to eq 1
+ end
+
+ it "can reset the current streak to 0" do
+ valid_skill.end_current_streak
+ expect(valid_skill.current_streak).to eq 0
+ end
+
+ it "can give the number of seconds remaining after creation" do
+ wait 5
+ expect(valid_skill.time_remaining).to eq false
end
end | 29 | 1.611111 | 22 | 7 |
946b6ab67e9dd34b4ed5524911ecf5f010f6b63c | byceps/blueprints/shop_order/templates/shop_order/order_form.html | byceps/blueprints/shop_order/templates/shop_order/order_form.html | {% extends 'layout/base.html' %}
{% from 'macros/forms.html' import form_buttons %}
{% set current_page = 'shop_order' %}
{% set title = 'Bestellen' %}
{% block body %}
<h1>{{ title }}</h1>
{%- if article_compilation %}
<form action="{{ url_for('.order') }}" method="post" class="disable-submit-button-on-submit">
{%- include 'shop_order/_order_form_orderer.html' %}
{%- include 'shop_order/_order_form_articles.html' %}
{{ form_buttons('Kostenpflichtig bestellen') }}
</form>
{%- else %}
<p>Es sind derzeit keine Artikel verfügbar.</p>
{%- endif %}
{%- endblock %}
| {% extends 'layout/base.html' %}
{% from 'macros/forms.html' import form_buttons %}
{% set current_page = 'shop_order' %}
{% set title = 'Bestellen' %}
{% block body %}
<h1>{{ title }}</h1>
{{ render_snippet('shop_order_intro', ignore_if_unknown=True)|safe }}
{%- if article_compilation %}
<form action="{{ url_for('.order') }}" method="post" class="disable-submit-button-on-submit">
{%- include 'shop_order/_order_form_orderer.html' %}
{%- include 'shop_order/_order_form_articles.html' %}
{{ form_buttons('Kostenpflichtig bestellen') }}
</form>
{%- else %}
<p>Es sind derzeit keine Artikel verfügbar.</p>
{%- endif %}
{%- endblock %}
| Allow optional snippet to be included above shop order form | Allow optional snippet to be included above shop order form
| HTML | bsd-3-clause | homeworkprod/byceps,m-ober/byceps,m-ober/byceps,homeworkprod/byceps,m-ober/byceps,homeworkprod/byceps | html | ## Code Before:
{% extends 'layout/base.html' %}
{% from 'macros/forms.html' import form_buttons %}
{% set current_page = 'shop_order' %}
{% set title = 'Bestellen' %}
{% block body %}
<h1>{{ title }}</h1>
{%- if article_compilation %}
<form action="{{ url_for('.order') }}" method="post" class="disable-submit-button-on-submit">
{%- include 'shop_order/_order_form_orderer.html' %}
{%- include 'shop_order/_order_form_articles.html' %}
{{ form_buttons('Kostenpflichtig bestellen') }}
</form>
{%- else %}
<p>Es sind derzeit keine Artikel verfügbar.</p>
{%- endif %}
{%- endblock %}
## Instruction:
Allow optional snippet to be included above shop order form
## Code After:
{% extends 'layout/base.html' %}
{% from 'macros/forms.html' import form_buttons %}
{% set current_page = 'shop_order' %}
{% set title = 'Bestellen' %}
{% block body %}
<h1>{{ title }}</h1>
{{ render_snippet('shop_order_intro', ignore_if_unknown=True)|safe }}
{%- if article_compilation %}
<form action="{{ url_for('.order') }}" method="post" class="disable-submit-button-on-submit">
{%- include 'shop_order/_order_form_orderer.html' %}
{%- include 'shop_order/_order_form_articles.html' %}
{{ form_buttons('Kostenpflichtig bestellen') }}
</form>
{%- else %}
<p>Es sind derzeit keine Artikel verfügbar.</p>
{%- endif %}
{%- endblock %}
| {% extends 'layout/base.html' %}
{% from 'macros/forms.html' import form_buttons %}
{% set current_page = 'shop_order' %}
{% set title = 'Bestellen' %}
{% block body %}
<h1>{{ title }}</h1>
+
+ {{ render_snippet('shop_order_intro', ignore_if_unknown=True)|safe }}
{%- if article_compilation %}
<form action="{{ url_for('.order') }}" method="post" class="disable-submit-button-on-submit">
{%- include 'shop_order/_order_form_orderer.html' %}
{%- include 'shop_order/_order_form_articles.html' %}
{{ form_buttons('Kostenpflichtig bestellen') }}
</form>
{%- else %}
<p>Es sind derzeit keine Artikel verfügbar.</p>
{%- endif %}
{%- endblock %} | 2 | 0.090909 | 2 | 0 |
af8e53a6a1f592c6d3e4ce1bf100ec7b927ef679 | CefSharp.Core/SchemeHandlerFactoryWrapper.h | CefSharp.Core/SchemeHandlerFactoryWrapper.h | // Copyright 2010-2015 The CefSharp Authors. All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
#pragma once
#include "Stdafx.h"
#include "include/cef_scheme.h"
#include "Internals/AutoLock.h"
using namespace System;
using namespace System::IO;
using namespace System::Collections::Specialized;
namespace CefSharp
{
private class SchemeHandlerFactoryWrapper : public CefSchemeHandlerFactory
{
gcroot<ISchemeHandlerFactory^> _factory;
public:
SchemeHandlerFactoryWrapper(ISchemeHandlerFactory^ factory)
: _factory(factory) {}
~SchemeHandlerFactoryWrapper()
{
_factory = nullptr;
}
virtual CefRefPtr<CefResourceHandler> SchemeHandlerFactoryWrapper::Create(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, const CefString& scheme_name, CefRefPtr<CefRequest> request) OVERRIDE
{
auto handler = _factory->Create();
CefRefPtr<ResourceHandlerWrapper> wrapper = new ResourceHandlerWrapper(handler);
return static_cast<CefRefPtr<CefResourceHandler>>(wrapper);
}
IMPLEMENT_REFCOUNTING(SchemeHandlerFactoryWrapper);
};
} | // Copyright 2010-2015 The CefSharp Authors. All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
#pragma once
#include "Stdafx.h"
#include "include/cef_scheme.h"
#include "Internals/AutoLock.h"
using namespace System;
using namespace System::IO;
using namespace System::Collections::Specialized;
namespace CefSharp
{
private class SchemeHandlerFactoryWrapper : public CefSchemeHandlerFactory
{
gcroot<ISchemeHandlerFactory^> _factory;
public:
SchemeHandlerFactoryWrapper(ISchemeHandlerFactory^ factory)
: _factory(factory) {}
~SchemeHandlerFactoryWrapper()
{
_factory = nullptr;
}
virtual CefRefPtr<CefResourceHandler> Create(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, const CefString& scheme_name, CefRefPtr<CefRequest> request) OVERRIDE
{
auto handler = _factory->Create();
CefRefPtr<ResourceHandlerWrapper> wrapper = new ResourceHandlerWrapper(handler);
return static_cast<CefRefPtr<CefResourceHandler>>(wrapper);
}
IMPLEMENT_REFCOUNTING(SchemeHandlerFactoryWrapper);
};
} | Remove redundant method prefix (cpp) | Remove redundant method prefix (cpp)
| C | bsd-3-clause | rlmcneary2/CefSharp,illfang/CefSharp,windygu/CefSharp,haozhouxu/CefSharp,battewr/CefSharp,joshvera/CefSharp,twxstar/CefSharp,ruisebastiao/CefSharp,ruisebastiao/CefSharp,battewr/CefSharp,jamespearce2006/CefSharp,Haraguroicha/CefSharp,VioletLife/CefSharp,dga711/CefSharp,zhangjingpu/CefSharp,AJDev77/CefSharp,illfang/CefSharp,windygu/CefSharp,windygu/CefSharp,illfang/CefSharp,twxstar/CefSharp,AJDev77/CefSharp,zhangjingpu/CefSharp,joshvera/CefSharp,VioletLife/CefSharp,ruisebastiao/CefSharp,Livit/CefSharp,AJDev77/CefSharp,ITGlobal/CefSharp,yoder/CefSharp,Livit/CefSharp,Livit/CefSharp,gregmartinhtc/CefSharp,dga711/CefSharp,NumbersInternational/CefSharp,joshvera/CefSharp,NumbersInternational/CefSharp,gregmartinhtc/CefSharp,twxstar/CefSharp,ITGlobal/CefSharp,rlmcneary2/CefSharp,rlmcneary2/CefSharp,Haraguroicha/CefSharp,gregmartinhtc/CefSharp,dga711/CefSharp,jamespearce2006/CefSharp,haozhouxu/CefSharp,battewr/CefSharp,dga711/CefSharp,jamespearce2006/CefSharp,Livit/CefSharp,joshvera/CefSharp,yoder/CefSharp,Haraguroicha/CefSharp,wangzheng888520/CefSharp,gregmartinhtc/CefSharp,haozhouxu/CefSharp,wangzheng888520/CefSharp,VioletLife/CefSharp,jamespearce2006/CefSharp,rlmcneary2/CefSharp,twxstar/CefSharp,battewr/CefSharp,illfang/CefSharp,haozhouxu/CefSharp,jamespearce2006/CefSharp,NumbersInternational/CefSharp,zhangjingpu/CefSharp,Haraguroicha/CefSharp,NumbersInternational/CefSharp,wangzheng888520/CefSharp,Haraguroicha/CefSharp,ITGlobal/CefSharp,yoder/CefSharp,zhangjingpu/CefSharp,yoder/CefSharp,ITGlobal/CefSharp,windygu/CefSharp,AJDev77/CefSharp,wangzheng888520/CefSharp,ruisebastiao/CefSharp,VioletLife/CefSharp | c | ## Code Before:
// Copyright 2010-2015 The CefSharp Authors. All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
#pragma once
#include "Stdafx.h"
#include "include/cef_scheme.h"
#include "Internals/AutoLock.h"
using namespace System;
using namespace System::IO;
using namespace System::Collections::Specialized;
namespace CefSharp
{
private class SchemeHandlerFactoryWrapper : public CefSchemeHandlerFactory
{
gcroot<ISchemeHandlerFactory^> _factory;
public:
SchemeHandlerFactoryWrapper(ISchemeHandlerFactory^ factory)
: _factory(factory) {}
~SchemeHandlerFactoryWrapper()
{
_factory = nullptr;
}
virtual CefRefPtr<CefResourceHandler> SchemeHandlerFactoryWrapper::Create(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, const CefString& scheme_name, CefRefPtr<CefRequest> request) OVERRIDE
{
auto handler = _factory->Create();
CefRefPtr<ResourceHandlerWrapper> wrapper = new ResourceHandlerWrapper(handler);
return static_cast<CefRefPtr<CefResourceHandler>>(wrapper);
}
IMPLEMENT_REFCOUNTING(SchemeHandlerFactoryWrapper);
};
}
## Instruction:
Remove redundant method prefix (cpp)
## Code After:
// Copyright 2010-2015 The CefSharp Authors. All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
#pragma once
#include "Stdafx.h"
#include "include/cef_scheme.h"
#include "Internals/AutoLock.h"
using namespace System;
using namespace System::IO;
using namespace System::Collections::Specialized;
namespace CefSharp
{
private class SchemeHandlerFactoryWrapper : public CefSchemeHandlerFactory
{
gcroot<ISchemeHandlerFactory^> _factory;
public:
SchemeHandlerFactoryWrapper(ISchemeHandlerFactory^ factory)
: _factory(factory) {}
~SchemeHandlerFactoryWrapper()
{
_factory = nullptr;
}
virtual CefRefPtr<CefResourceHandler> Create(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, const CefString& scheme_name, CefRefPtr<CefRequest> request) OVERRIDE
{
auto handler = _factory->Create();
CefRefPtr<ResourceHandlerWrapper> wrapper = new ResourceHandlerWrapper(handler);
return static_cast<CefRefPtr<CefResourceHandler>>(wrapper);
}
IMPLEMENT_REFCOUNTING(SchemeHandlerFactoryWrapper);
};
} | // Copyright 2010-2015 The CefSharp Authors. All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
#pragma once
#include "Stdafx.h"
#include "include/cef_scheme.h"
#include "Internals/AutoLock.h"
using namespace System;
using namespace System::IO;
using namespace System::Collections::Specialized;
namespace CefSharp
{
private class SchemeHandlerFactoryWrapper : public CefSchemeHandlerFactory
{
gcroot<ISchemeHandlerFactory^> _factory;
public:
SchemeHandlerFactoryWrapper(ISchemeHandlerFactory^ factory)
: _factory(factory) {}
~SchemeHandlerFactoryWrapper()
{
_factory = nullptr;
}
- virtual CefRefPtr<CefResourceHandler> SchemeHandlerFactoryWrapper::Create(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, const CefString& scheme_name, CefRefPtr<CefRequest> request) OVERRIDE
? -----------------------------
+ virtual CefRefPtr<CefResourceHandler> Create(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, const CefString& scheme_name, CefRefPtr<CefRequest> request) OVERRIDE
{
auto handler = _factory->Create();
CefRefPtr<ResourceHandlerWrapper> wrapper = new ResourceHandlerWrapper(handler);
return static_cast<CefRefPtr<CefResourceHandler>>(wrapper);
}
IMPLEMENT_REFCOUNTING(SchemeHandlerFactoryWrapper);
};
} | 2 | 0.051282 | 1 | 1 |
95704c380887cd4744f5fea6dcdb60d6c1b6e31f | TehPers.FishingOverhaul/i18n/ko.json | TehPers.FishingOverhaul/i18n/ko.json | {
"text.percent": "{0:P}",
"text.streak": "콤보 !: {0}",
"text.treasure": "보물 : {0}",
"text.trash": "쓰레기 : {0}",
"text.unaware": "물고기가 당신의 존재를 알아차리지 못했다. ({0} 훨씬 낚기 쉬워졌다)",
"text.lostStreak": "당신은 완벽한 연속 {0}연속 낚시 콤보의 유지에 실패했습니다.",
"text.warnStreak": "보물 및 물고기를 낚아 {0}연속 콤보를 유지하세요!",
"text.keptStreak": "당신은 당신의 완벽한 낚시 콤보를 유지하고 있습니다!"
}
| /* Courtesy of S2SKY */
{
"text.percent": "{0:P}",
"text.streak": "콤보 !: {0}",
"text.treasure": "보물 : {0}",
"text.trash": "쓰레기 : {0}",
"text.unaware": "물고기가 당신의 존재를 알아차리지 못했다. ({0} 훨씬 낚기 쉬워졌다)",
"text.lostStreak": "당신은 완벽한 연속 {0}연속 낚시 콤보의 유지에 실패했습니다.",
"text.warnStreak": "보물 및 물고기를 낚아 {0}연속 콤보를 유지하세요!",
"text.keptStreak": "당신은 당신의 완벽한 낚시 콤보를 유지하고 있습니다!"
}
| Add credits to Korean translation | Add credits to Korean translation
| JSON | mit | TehPers/StardewValleyMods | json | ## Code Before:
{
"text.percent": "{0:P}",
"text.streak": "콤보 !: {0}",
"text.treasure": "보물 : {0}",
"text.trash": "쓰레기 : {0}",
"text.unaware": "물고기가 당신의 존재를 알아차리지 못했다. ({0} 훨씬 낚기 쉬워졌다)",
"text.lostStreak": "당신은 완벽한 연속 {0}연속 낚시 콤보의 유지에 실패했습니다.",
"text.warnStreak": "보물 및 물고기를 낚아 {0}연속 콤보를 유지하세요!",
"text.keptStreak": "당신은 당신의 완벽한 낚시 콤보를 유지하고 있습니다!"
}
## Instruction:
Add credits to Korean translation
## Code After:
/* Courtesy of S2SKY */
{
"text.percent": "{0:P}",
"text.streak": "콤보 !: {0}",
"text.treasure": "보물 : {0}",
"text.trash": "쓰레기 : {0}",
"text.unaware": "물고기가 당신의 존재를 알아차리지 못했다. ({0} 훨씬 낚기 쉬워졌다)",
"text.lostStreak": "당신은 완벽한 연속 {0}연속 낚시 콤보의 유지에 실패했습니다.",
"text.warnStreak": "보물 및 물고기를 낚아 {0}연속 콤보를 유지하세요!",
"text.keptStreak": "당신은 당신의 완벽한 낚시 콤보를 유지하고 있습니다!"
}
| + /* Courtesy of S2SKY */
{
"text.percent": "{0:P}",
"text.streak": "콤보 !: {0}",
"text.treasure": "보물 : {0}",
"text.trash": "쓰레기 : {0}",
"text.unaware": "물고기가 당신의 존재를 알아차리지 못했다. ({0} 훨씬 낚기 쉬워졌다)",
"text.lostStreak": "당신은 완벽한 연속 {0}연속 낚시 콤보의 유지에 실패했습니다.",
"text.warnStreak": "보물 및 물고기를 낚아 {0}연속 콤보를 유지하세요!",
"text.keptStreak": "당신은 당신의 완벽한 낚시 콤보를 유지하고 있습니다!"
} | 1 | 0.1 | 1 | 0 |
ccbd8261c9d20cd12ba7f76adb8b075dea0dc5f0 | app/scheduled_workers/decidim_initiatives_notify_progress.rb | app/scheduled_workers/decidim_initiatives_notify_progress.rb |
class DecidimInitiativesNotifyProgress
include Sidekiq::Worker
def perform
system("bundle exec rake decidim_initiatives:notify_progress")
end
end
|
class DecidimInitiativesNotifyProgress
include Sidekiq::Worker
def perform
system("bundle exec rake decidim_initiatives:notify_progress") if Rails.env.production?
end
end
| Add production condition in notify task | Add production condition in notify task
| Ruby | agpl-3.0 | diputacioBCN/decidim-diba,diputacioBCN/decidim-diba,diputacioBCN/decidim-diba,diputacioBCN/decidim-diba | ruby | ## Code Before:
class DecidimInitiativesNotifyProgress
include Sidekiq::Worker
def perform
system("bundle exec rake decidim_initiatives:notify_progress")
end
end
## Instruction:
Add production condition in notify task
## Code After:
class DecidimInitiativesNotifyProgress
include Sidekiq::Worker
def perform
system("bundle exec rake decidim_initiatives:notify_progress") if Rails.env.production?
end
end
|
class DecidimInitiativesNotifyProgress
include Sidekiq::Worker
def perform
- system("bundle exec rake decidim_initiatives:notify_progress")
+ system("bundle exec rake decidim_initiatives:notify_progress") if Rails.env.production?
? +++++++++++++++++++++++++
end
end | 2 | 0.25 | 1 | 1 |
a9abf8361f8728dfb1ef18a27c5eaad84ca2f054 | accounting/apps/clients/forms.py | accounting/apps/clients/forms.py | from django.forms import ModelForm
from .models import Client
class ClientForm(ModelForm):
class Meta:
model = Client
fields = (
"name",
"address_line_1",
"address_line_2",
"city",
"postal_code",
"country",
)
| from django.forms import ModelForm
from .models import Client
class ClientForm(ModelForm):
class Meta:
model = Client
fields = (
"name",
"address_line_1",
"address_line_2",
"city",
"postal_code",
"country",
"organization",
)
| Add the relationship field to the Client form | Add the relationship field to the Client form
| Python | mit | kenjhim/django-accounting,dulaccc/django-accounting,kenjhim/django-accounting,kenjhim/django-accounting,dulaccc/django-accounting,dulaccc/django-accounting,kenjhim/django-accounting,dulaccc/django-accounting | python | ## Code Before:
from django.forms import ModelForm
from .models import Client
class ClientForm(ModelForm):
class Meta:
model = Client
fields = (
"name",
"address_line_1",
"address_line_2",
"city",
"postal_code",
"country",
)
## Instruction:
Add the relationship field to the Client form
## Code After:
from django.forms import ModelForm
from .models import Client
class ClientForm(ModelForm):
class Meta:
model = Client
fields = (
"name",
"address_line_1",
"address_line_2",
"city",
"postal_code",
"country",
"organization",
)
| from django.forms import ModelForm
from .models import Client
class ClientForm(ModelForm):
class Meta:
model = Client
fields = (
"name",
"address_line_1",
"address_line_2",
"city",
"postal_code",
"country",
+ "organization",
) | 1 | 0.0625 | 1 | 0 |
de4ea5c972e823400824ba00f2aa466589c18909 | database/migration/migrate.php | database/migration/migrate.php | <?php
function migrate( $sql_array = [] ) {
require_once '../../config/config-local.php';
require_once '../../models/database.php';
require_once '../../models/db.php';
global $config;
$config = getConfig()[ getEnv( 'ENVIRONMENT' ) ];
dbInit();
foreach ( $sql_array as $sql ) {
try {
$res = db( $sql );
}
catch ( DBException $e ) {
die( "Migration failed. SQL query died with the following error: " . mysql_error() . "\n" );
}
}
echo "Migration successful.\n";
}
?>
| <?php
function migrate( $sql_array = [] ) {
if ( file_exists( '../../config/config-local.php' ) ) {
require_once '../../config/config-local.php';
}
else {
require_once '../../config/config.php';
}
require_once '../../models/database.php';
require_once '../../models/db.php';
global $config;
$config = getConfig()[ getEnv( 'ENVIRONMENT' ) ];
dbInit();
foreach ( $sql_array as $sql ) {
try {
$res = db( $sql );
}
catch ( DBException $e ) {
die( "Migration failed. SQL query died with the following error: " . mysql_error() . "\n" );
}
}
echo "Migration successful.\n";
}
?>
| Make travis run all migrations before running tests | Make travis run all migrations before running tests
| PHP | mit | dionyziz/endofcodes,VitSalis/endofcodes,dionyziz/endofcodes,VitSalis/endofcodes,VitSalis/endofcodes,VitSalis/endofcodes,dionyziz/endofcodes | php | ## Code Before:
<?php
function migrate( $sql_array = [] ) {
require_once '../../config/config-local.php';
require_once '../../models/database.php';
require_once '../../models/db.php';
global $config;
$config = getConfig()[ getEnv( 'ENVIRONMENT' ) ];
dbInit();
foreach ( $sql_array as $sql ) {
try {
$res = db( $sql );
}
catch ( DBException $e ) {
die( "Migration failed. SQL query died with the following error: " . mysql_error() . "\n" );
}
}
echo "Migration successful.\n";
}
?>
## Instruction:
Make travis run all migrations before running tests
## Code After:
<?php
function migrate( $sql_array = [] ) {
if ( file_exists( '../../config/config-local.php' ) ) {
require_once '../../config/config-local.php';
}
else {
require_once '../../config/config.php';
}
require_once '../../models/database.php';
require_once '../../models/db.php';
global $config;
$config = getConfig()[ getEnv( 'ENVIRONMENT' ) ];
dbInit();
foreach ( $sql_array as $sql ) {
try {
$res = db( $sql );
}
catch ( DBException $e ) {
die( "Migration failed. SQL query died with the following error: " . mysql_error() . "\n" );
}
}
echo "Migration successful.\n";
}
?>
| <?php
function migrate( $sql_array = [] ) {
+ if ( file_exists( '../../config/config-local.php' ) ) {
- require_once '../../config/config-local.php';
+ require_once '../../config/config-local.php';
? ++++
+ }
+ else {
+ require_once '../../config/config.php';
+ }
require_once '../../models/database.php';
require_once '../../models/db.php';
global $config;
$config = getConfig()[ getEnv( 'ENVIRONMENT' ) ];
dbInit();
foreach ( $sql_array as $sql ) {
try {
$res = db( $sql );
}
catch ( DBException $e ) {
die( "Migration failed. SQL query died with the following error: " . mysql_error() . "\n" );
}
}
echo "Migration successful.\n";
}
?> | 7 | 0.318182 | 6 | 1 |
a7e83f81d4f3996020a9ac49e57cd66846ea6844 | .github/workflows/main.yml | .github/workflows/main.yml | name: Test & Build
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Setup Node.js for use with actions
uses: actions/setup-node@v1.1.0
- name: Install packages
run: npm ci
- name: Run lint
run: npm run lint
- name: Run tests
run: npm run test
- name: Run browser tests
run: npm run test:browser
- name: Build
run: npm run build
| name: Test & Build
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Setup Node.js for use with actions
uses: actions/setup-node@v1.1.0
- name: Start MongoDB As Docker
uses: wbari/start-mongoDB@v0.2
- name: Install packages
run: npm ci
- name: Run lint
run: npm run lint
- name: Run tests
run: npm run test
- name: Run browser tests
run: npm run test:browser
- name: Build
run: npm run build
| Add MongoDB to GitHub build and test action | Add MongoDB to GitHub build and test action | YAML | mit | Majavapaja/Mursushakki,Majavapaja/Mursushakki,Majavapaja/Mursushakki,Majavapaja/Mursushakki,Majavapaja/Mursushakki,Majavapaja/Mursushakki | yaml | ## Code Before:
name: Test & Build
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Setup Node.js for use with actions
uses: actions/setup-node@v1.1.0
- name: Install packages
run: npm ci
- name: Run lint
run: npm run lint
- name: Run tests
run: npm run test
- name: Run browser tests
run: npm run test:browser
- name: Build
run: npm run build
## Instruction:
Add MongoDB to GitHub build and test action
## Code After:
name: Test & Build
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Setup Node.js for use with actions
uses: actions/setup-node@v1.1.0
- name: Start MongoDB As Docker
uses: wbari/start-mongoDB@v0.2
- name: Install packages
run: npm ci
- name: Run lint
run: npm run lint
- name: Run tests
run: npm run test
- name: Run browser tests
run: npm run test:browser
- name: Build
run: npm run build
| name: Test & Build
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Setup Node.js for use with actions
uses: actions/setup-node@v1.1.0
+ - name: Start MongoDB As Docker
+ uses: wbari/start-mongoDB@v0.2
- name: Install packages
run: npm ci
- name: Run lint
run: npm run lint
- name: Run tests
run: npm run test
- name: Run browser tests
run: npm run test:browser
- name: Build
run: npm run build | 2 | 0.086957 | 2 | 0 |
18cc3147d735b4c0dfec8941c7f22dd6f5d107f6 | app/controllers/connect.coffee | app/controllers/connect.coffee | Q = require 'kew'
nodeRedis = require 'redis'
mysql = require 'mysql'
config = require '../config'
connect =
ready: Q.defer()
###
* - type (string) : 'production', 'development', 'testing'
###
init: () ->
# Connect to MySQL
@mysql = mysql.createConnection config.mysql
# Connect to Redis
@redis = nodeRedis.createClient config.redis.port, config.redis.host
@ready.resolve()
module.exports = connect
| Q = require 'kew'
url = require 'url'
redis = require 'redis'
mysql = require 'mysql'
config = require '../config'
connect =
ready: Q.defer()
###
* - type (string) : 'production', 'development', 'testing'
###
init: () ->
# Connect to MySQL
@mysql = mysql.createConnection config.mysql
# Connect to Redis
if process.env.REDISTOGO_URL
rtg = url.parse(process.env.REDISTOGO_URL);
console.log rtg
@redis = redis.createClient(rtg.port, rtg.hostname)
@redis.auth rtg.auth.split(':')[1]
else
@redis = redis.createClient config.redis.port, config.redis.host
@ready.resolve()
module.exports = connect
| Add support for Heroku Redis-To-Go | Add support for Heroku Redis-To-Go
| CoffeeScript | unknown | nitrotasks/nitro-server,nitrotasks/nitro-server,CaffeinatedCode/nitro-server | coffeescript | ## Code Before:
Q = require 'kew'
nodeRedis = require 'redis'
mysql = require 'mysql'
config = require '../config'
connect =
ready: Q.defer()
###
* - type (string) : 'production', 'development', 'testing'
###
init: () ->
# Connect to MySQL
@mysql = mysql.createConnection config.mysql
# Connect to Redis
@redis = nodeRedis.createClient config.redis.port, config.redis.host
@ready.resolve()
module.exports = connect
## Instruction:
Add support for Heroku Redis-To-Go
## Code After:
Q = require 'kew'
url = require 'url'
redis = require 'redis'
mysql = require 'mysql'
config = require '../config'
connect =
ready: Q.defer()
###
* - type (string) : 'production', 'development', 'testing'
###
init: () ->
# Connect to MySQL
@mysql = mysql.createConnection config.mysql
# Connect to Redis
if process.env.REDISTOGO_URL
rtg = url.parse(process.env.REDISTOGO_URL);
console.log rtg
@redis = redis.createClient(rtg.port, rtg.hostname)
@redis.auth rtg.auth.split(':')[1]
else
@redis = redis.createClient config.redis.port, config.redis.host
@ready.resolve()
module.exports = connect
| - Q = require 'kew'
? ---
+ Q = require 'kew'
+ url = require 'url'
- nodeRedis = require 'redis'
? ^^^^^
+ redis = require 'redis'
? ^ +
- mysql = require 'mysql'
? ---
+ mysql = require 'mysql'
- config = require '../config'
? ---
+ config = require '../config'
connect =
ready: Q.defer()
###
* - type (string) : 'production', 'development', 'testing'
###
init: () ->
# Connect to MySQL
@mysql = mysql.createConnection config.mysql
# Connect to Redis
+ if process.env.REDISTOGO_URL
+ rtg = url.parse(process.env.REDISTOGO_URL);
+ console.log rtg
+ @redis = redis.createClient(rtg.port, rtg.hostname)
+ @redis.auth rtg.auth.split(':')[1]
+ else
- @redis = nodeRedis.createClient config.redis.port, config.redis.host
? ^^^^^
+ @redis = redis.createClient config.redis.port, config.redis.host
? ++ ^
@ready.resolve()
module.exports = connect | 17 | 0.708333 | 12 | 5 |
b910f6540aa9f1e407332803cca0861855ac0615 | Positions/test_all.sh | Positions/test_all.sh | for file in `ls -1 solution*.txt`
do
python ../classes/chess_simple.py < $file > output_$file
nbLines=`cat output_$file | grep "Echec et mat !" | wc -l`
if [ $nbLines -ne 1 ]
then
echo 'Error with file '$file
fi
output_ref=`echo "output_$file" | sed 's/txt/ref/g'`
nbLines=`diff output_$file $output_ref | wc -l`
if [ $nbLines -ne 0 ]
then
diff output_$file $output_ref
echo 'Error with file '$file
else
rm output_$file
fi
done
| for file in `ls -1 solution*.txt`
do
python ../classes/chess_simple.py < $file > output_$file
nbLines=`cat output_$file | grep "Echec et mat !" | wc -l`
if [ $nbLines -ne 1 ]
then
echo 'Error with file '$file
fi
output_ref=`echo "output_$file" | sed 's/txt/ref/g'`
dos2unix output_$file
dos2unix $output_ref
nbLines=`diff output_$file $output_ref | wc -l`
if [ $nbLines -ne 0 ]
then
diff output_$file $output_ref
echo 'Error with file '$file
else
rm output_$file
fi
done
| Add the dos2unix for the tests | Add the dos2unix for the tests
| Shell | mit | Niceboy5275/PythonChess,Niceboy5275/PythonChess | shell | ## Code Before:
for file in `ls -1 solution*.txt`
do
python ../classes/chess_simple.py < $file > output_$file
nbLines=`cat output_$file | grep "Echec et mat !" | wc -l`
if [ $nbLines -ne 1 ]
then
echo 'Error with file '$file
fi
output_ref=`echo "output_$file" | sed 's/txt/ref/g'`
nbLines=`diff output_$file $output_ref | wc -l`
if [ $nbLines -ne 0 ]
then
diff output_$file $output_ref
echo 'Error with file '$file
else
rm output_$file
fi
done
## Instruction:
Add the dos2unix for the tests
## Code After:
for file in `ls -1 solution*.txt`
do
python ../classes/chess_simple.py < $file > output_$file
nbLines=`cat output_$file | grep "Echec et mat !" | wc -l`
if [ $nbLines -ne 1 ]
then
echo 'Error with file '$file
fi
output_ref=`echo "output_$file" | sed 's/txt/ref/g'`
dos2unix output_$file
dos2unix $output_ref
nbLines=`diff output_$file $output_ref | wc -l`
if [ $nbLines -ne 0 ]
then
diff output_$file $output_ref
echo 'Error with file '$file
else
rm output_$file
fi
done
| for file in `ls -1 solution*.txt`
do
python ../classes/chess_simple.py < $file > output_$file
nbLines=`cat output_$file | grep "Echec et mat !" | wc -l`
if [ $nbLines -ne 1 ]
then
echo 'Error with file '$file
fi
output_ref=`echo "output_$file" | sed 's/txt/ref/g'`
+ dos2unix output_$file
+ dos2unix $output_ref
nbLines=`diff output_$file $output_ref | wc -l`
if [ $nbLines -ne 0 ]
then
diff output_$file $output_ref
echo 'Error with file '$file
else
rm output_$file
fi
done | 2 | 0.111111 | 2 | 0 |
4b4e14830b0407f0bfceb563724ee77efe2b3f73 | Lib/re.py | Lib/re.py |
engine = "sre"
# engine = "pre"
if engine == "sre":
# New unicode-aware engine
from sre import *
else:
# Old 1.5.2 engine. This one supports 8-bit strings only,
# and will be removed in 2.0 final.
from pre import *
| engine = "pre"
if engine == "sre":
# New unicode-aware engine
from sre import *
else:
# Old 1.5.2 engine. This one supports 8-bit strings only,
# and will be removed in 2.0 final.
from pre import *
| Replace the jitterbug page with the SF Bug Tracker page. | Replace the jitterbug page with the SF Bug Tracker page.
| Python | mit | sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator | python | ## Code Before:
engine = "sre"
# engine = "pre"
if engine == "sre":
# New unicode-aware engine
from sre import *
else:
# Old 1.5.2 engine. This one supports 8-bit strings only,
# and will be removed in 2.0 final.
from pre import *
## Instruction:
Replace the jitterbug page with the SF Bug Tracker page.
## Code After:
engine = "pre"
if engine == "sre":
# New unicode-aware engine
from sre import *
else:
# Old 1.5.2 engine. This one supports 8-bit strings only,
# and will be removed in 2.0 final.
from pre import *
| -
- engine = "sre"
- # engine = "pre"
? --
+ engine = "pre"
if engine == "sre":
# New unicode-aware engine
from sre import *
else:
# Old 1.5.2 engine. This one supports 8-bit strings only,
# and will be removed in 2.0 final.
from pre import * | 4 | 0.363636 | 1 | 3 |
71761493e98ca2e6307828a45f6fba12442d0510 | config/cloud_crowd/development/database.yml | config/cloud_crowd/development/database.yml |
:adapter: sqlite3
:database: cloud_crowd.db |
<% secrets = YAML.load_file('secrets/secrets.yml')[ENV['RAILS_ENV']] %>
:adapter: postgresql
:encoding: unicode
:schema_search_path: public
:pool: 10
:dead_connection_timeout: 1
:reaping_frequency: 30
:allow_concurrency: true
:database: dcloud_crowd_development
| Switch away from using sqlite for development. | Switch away from using sqlite for development. | YAML | mit | Teino1978-Corp/Teino1978-Corp-documentcloud,moodpo/documentcloud,Teino1978-Corp/Teino1978-Corp-documentcloud,Teino1978-Corp/Teino1978-Corp-documentcloud,gunjanmodi/documentcloud,documentcloud/documentcloud,dannguyen/documentcloud,monofox/documentcloud,ivarvong/documentcloud,gunjanmodi/documentcloud,gunjanmodi/documentcloud,ivarvong/documentcloud,dannguyen/documentcloud,documentcloud/documentcloud,monofox/documentcloud,monofox/documentcloud,dannguyen/documentcloud,documentcloud/documentcloud,ivarvong/documentcloud,documentcloud/documentcloud,moodpo/documentcloud,gunjanmodi/documentcloud,ivarvong/documentcloud,dannguyen/documentcloud,Teino1978-Corp/Teino1978-Corp-documentcloud,moodpo/documentcloud,monofox/documentcloud,moodpo/documentcloud | yaml | ## Code Before:
:adapter: sqlite3
:database: cloud_crowd.db
## Instruction:
Switch away from using sqlite for development.
## Code After:
<% secrets = YAML.load_file('secrets/secrets.yml')[ENV['RAILS_ENV']] %>
:adapter: postgresql
:encoding: unicode
:schema_search_path: public
:pool: 10
:dead_connection_timeout: 1
:reaping_frequency: 30
:allow_concurrency: true
:database: dcloud_crowd_development
|
- :adapter: sqlite3
+ <% secrets = YAML.load_file('secrets/secrets.yml')[ENV['RAILS_ENV']] %>
+
+ :adapter: postgresql
+ :encoding: unicode
+ :schema_search_path: public
+ :pool: 10
+ :dead_connection_timeout: 1
+ :reaping_frequency: 30
+ :allow_concurrency: true
- :database: cloud_crowd.db
? ^ ^
+ :database: dcloud_crowd_development
? + ^ ^^^^^^^^^^
| 12 | 4 | 10 | 2 |
1dfa579beb8e0881e6972ccbab1c9196e2529d99 | t/Game2048.t | t/Game2048.t |
use strict;
use warnings;
use Test::More;
use DDG::Test::Goodie;
zci answer_type => 2048;
zci is_cached => 1;
ddg_goodie_test(
[qw( DDG::Goodie::Game2048 )],
'play 2048' => test_zci(
'',
structured_answer => {
data => '-ANY-',
id => "game2048",
name => 2048,
templates => {
group => "text",
item => 0,
options => {
content => "DDH.game2048.content"
},
}
}
),
'2048 online' => undef
);
done_testing;
|
use strict;
use warnings;
use Test::More;
use DDG::Test::Goodie;
zci answer_type => 2048;
zci is_cached => 1;
ddg_goodie_test(
[qw( DDG::Goodie::Game2048 )],
'play 2048' => test_zci(
'',
structured_answer => {
data => '-ANY-',
templates => {
group => "text",
item => 0,
options => {
content => "DDH.game2048.content"
},
}
}
),
'2048 online' => undef
);
done_testing;
| Fix tests after changing Perl module | Fix tests after changing Perl module
| Perl | apache-2.0 | pratts/zeroclickinfo-goodies,synbit/zeroclickinfo-goodies,pratts/zeroclickinfo-goodies,samskeller/zeroclickinfo-goodies,marianosimone/zeroclickinfo-goodies,seisfeld/zeroclickinfo-goodies,salmanfarisvp/zeroclickinfo-goodies,RomainLG/zeroclickinfo-goodies,samskeller/zeroclickinfo-goodies,urohit011/zeroclickinfo-goodies,tagawa/zeroclickinfo-goodies,jgkamat/zeroclickinfo-goodies,ankushg07/zeroclickinfo-goodies,charles-l/zeroclickinfo-goodies,tagawa/zeroclickinfo-goodies,MrChrisW/zeroclickinfo-goodies,jgkamat/zeroclickinfo-goodies,lights0123/zeroclickinfo-goodies,mr-karan/zeroclickinfo-goodies,samskeller/zeroclickinfo-goodies,lights0123/zeroclickinfo-goodies,tagawa/zeroclickinfo-goodies,ankushg07/zeroclickinfo-goodies,jgkamat/zeroclickinfo-goodies,Midhun-Jo-Antony/zeroclickinfo-goodies,mr-karan/zeroclickinfo-goodies,jgkamat/zeroclickinfo-goodies,synbit/zeroclickinfo-goodies,seisfeld/zeroclickinfo-goodies,shubhamrajput/zeroclickinfo-goodies,shubhamrajput/zeroclickinfo-goodies,charles-l/zeroclickinfo-goodies,synbit/zeroclickinfo-goodies,akanshgulati/zeroclickinfo-goodies,ankushg07/zeroclickinfo-goodies,Midhun-Jo-Antony/zeroclickinfo-goodies,RomainLG/zeroclickinfo-goodies,pratts/zeroclickinfo-goodies,urohit011/zeroclickinfo-goodies,seisfeld/zeroclickinfo-goodies,abinabrahamanchery/zeroclickinfo-goodies,tagawa/zeroclickinfo-goodies,MrChrisW/zeroclickinfo-goodies,shubhamrajput/zeroclickinfo-goodies,synbit/zeroclickinfo-goodies,pratts/zeroclickinfo-goodies,salmanfarisvp/zeroclickinfo-goodies,akanshgulati/zeroclickinfo-goodies,RomainLG/zeroclickinfo-goodies,shubhamrajput/zeroclickinfo-goodies,urohit011/zeroclickinfo-goodies,marianosimone/zeroclickinfo-goodies,jgkamat/zeroclickinfo-goodies,salmanfarisvp/zeroclickinfo-goodies,seisfeld/zeroclickinfo-goodies,akanshgulati/zeroclickinfo-goodies,urohit011/zeroclickinfo-goodies,akanshgulati/zeroclickinfo-goodies,salmanfarisvp/zeroclickinfo-goodies,seisfeld/zeroclickinfo-goodies,mr-karan/zeroclickinfo-goodies,RomainLG/zeroclickinfo-goodies,lights0123/zeroclickinfo-goodies,lights0123/zeroclickinfo-goodies,samskeller/zeroclickinfo-goodies,mr-karan/zeroclickinfo-goodies,samskeller/zeroclickinfo-goodies,gautamkrishnar/zeroclickinfo-goodies,abinabrahamanchery/zeroclickinfo-goodies,mr-karan/zeroclickinfo-goodies,tagawa/zeroclickinfo-goodies,ankushg07/zeroclickinfo-goodies,gautamkrishnar/zeroclickinfo-goodies,charles-l/zeroclickinfo-goodies,charles-l/zeroclickinfo-goodies,pratts/zeroclickinfo-goodies,lights0123/zeroclickinfo-goodies,MrChrisW/zeroclickinfo-goodies,gautamkrishnar/zeroclickinfo-goodies,gautamkrishnar/zeroclickinfo-goodies,abinabrahamanchery/zeroclickinfo-goodies,Midhun-Jo-Antony/zeroclickinfo-goodies,marianosimone/zeroclickinfo-goodies,urohit011/zeroclickinfo-goodies,salmanfarisvp/zeroclickinfo-goodies,lights0123/zeroclickinfo-goodies,ankushg07/zeroclickinfo-goodies,MrChrisW/zeroclickinfo-goodies,shubhamrajput/zeroclickinfo-goodies,charles-l/zeroclickinfo-goodies,abinabrahamanchery/zeroclickinfo-goodies,Midhun-Jo-Antony/zeroclickinfo-goodies,abinabrahamanchery/zeroclickinfo-goodies,RomainLG/zeroclickinfo-goodies,synbit/zeroclickinfo-goodies,Midhun-Jo-Antony/zeroclickinfo-goodies,gautamkrishnar/zeroclickinfo-goodies,Midhun-Jo-Antony/zeroclickinfo-goodies,akanshgulati/zeroclickinfo-goodies,marianosimone/zeroclickinfo-goodies,marianosimone/zeroclickinfo-goodies,MrChrisW/zeroclickinfo-goodies | perl | ## Code Before:
use strict;
use warnings;
use Test::More;
use DDG::Test::Goodie;
zci answer_type => 2048;
zci is_cached => 1;
ddg_goodie_test(
[qw( DDG::Goodie::Game2048 )],
'play 2048' => test_zci(
'',
structured_answer => {
data => '-ANY-',
id => "game2048",
name => 2048,
templates => {
group => "text",
item => 0,
options => {
content => "DDH.game2048.content"
},
}
}
),
'2048 online' => undef
);
done_testing;
## Instruction:
Fix tests after changing Perl module
## Code After:
use strict;
use warnings;
use Test::More;
use DDG::Test::Goodie;
zci answer_type => 2048;
zci is_cached => 1;
ddg_goodie_test(
[qw( DDG::Goodie::Game2048 )],
'play 2048' => test_zci(
'',
structured_answer => {
data => '-ANY-',
templates => {
group => "text",
item => 0,
options => {
content => "DDH.game2048.content"
},
}
}
),
'2048 online' => undef
);
done_testing;
|
use strict;
use warnings;
use Test::More;
use DDG::Test::Goodie;
zci answer_type => 2048;
zci is_cached => 1;
ddg_goodie_test(
[qw( DDG::Goodie::Game2048 )],
'play 2048' => test_zci(
'',
structured_answer => {
data => '-ANY-',
- id => "game2048",
- name => 2048,
templates => {
group => "text",
item => 0,
options => {
content => "DDH.game2048.content"
},
}
}
),
'2048 online' => undef
);
done_testing; | 2 | 0.0625 | 0 | 2 |
a36663c9608f5653301b52c23926f44a0e4aa562 | app/controllers/adhoq/current_tables_controller.rb | app/controllers/adhoq/current_tables_controller.rb | module Adhoq
class CurrentTablesController < Adhoq::ApplicationController
before_action :eager_load_models
def index
hidden_model_names = Array(Adhoq.config.hidden_model_names)
hidden_model_names << 'ActiveRecord::SchemaMigration'
hidden_model_names << 'ApplicationRecord'
@ar_classes = ActiveRecord::Base.descendants.
reject {|klass| klass.abstract_class? || hidden_model_names.include?(klass.name) }.
sort_by(&:name)
render layout: false
end
private
def eager_load_models
return unless Rails.env.development?
[Rails.application, Adhoq::Engine].each(&:eager_load!)
end
end
end
| module Adhoq
class CurrentTablesController < Adhoq::ApplicationController
before_action :eager_load_models
def index
hidden_model_names = Array(Adhoq.config.hidden_model_names)
hidden_model_names << 'ActiveRecord::SchemaMigration'
hidden_model_names << 'ApplicationRecord'
@ar_classes = ActiveRecord::Base.descendants.
reject {|klass| klass.abstract_class? || hidden_model_names.include?(klass.name) || klass.name.nil? }.
sort_by(&:name)
render layout: false
end
private
def eager_load_models
return unless Rails.env.development?
[Rails.application, Adhoq::Engine].each(&:eager_load!)
end
end
end
| Fix show table feature error(a case where there is an anonymous class inherited ActiveRecord::Base) | Fix show table feature error(a case where there is an anonymous class inherited ActiveRecord::Base)
If there is an anonymous class inherited ActiveRecord::Base(e.g. SwitchPoint), the show table feature fails.
Because the name is nil in anonymous classes, it fails sorting by table name.
So I excluded anonymous classes.
| Ruby | mit | esminc/adhoq,esminc/adhoq,esminc/adhoq | ruby | ## Code Before:
module Adhoq
class CurrentTablesController < Adhoq::ApplicationController
before_action :eager_load_models
def index
hidden_model_names = Array(Adhoq.config.hidden_model_names)
hidden_model_names << 'ActiveRecord::SchemaMigration'
hidden_model_names << 'ApplicationRecord'
@ar_classes = ActiveRecord::Base.descendants.
reject {|klass| klass.abstract_class? || hidden_model_names.include?(klass.name) }.
sort_by(&:name)
render layout: false
end
private
def eager_load_models
return unless Rails.env.development?
[Rails.application, Adhoq::Engine].each(&:eager_load!)
end
end
end
## Instruction:
Fix show table feature error(a case where there is an anonymous class inherited ActiveRecord::Base)
If there is an anonymous class inherited ActiveRecord::Base(e.g. SwitchPoint), the show table feature fails.
Because the name is nil in anonymous classes, it fails sorting by table name.
So I excluded anonymous classes.
## Code After:
module Adhoq
class CurrentTablesController < Adhoq::ApplicationController
before_action :eager_load_models
def index
hidden_model_names = Array(Adhoq.config.hidden_model_names)
hidden_model_names << 'ActiveRecord::SchemaMigration'
hidden_model_names << 'ApplicationRecord'
@ar_classes = ActiveRecord::Base.descendants.
reject {|klass| klass.abstract_class? || hidden_model_names.include?(klass.name) || klass.name.nil? }.
sort_by(&:name)
render layout: false
end
private
def eager_load_models
return unless Rails.env.development?
[Rails.application, Adhoq::Engine].each(&:eager_load!)
end
end
end
| module Adhoq
class CurrentTablesController < Adhoq::ApplicationController
before_action :eager_load_models
def index
hidden_model_names = Array(Adhoq.config.hidden_model_names)
hidden_model_names << 'ActiveRecord::SchemaMigration'
hidden_model_names << 'ApplicationRecord'
@ar_classes = ActiveRecord::Base.descendants.
- reject {|klass| klass.abstract_class? || hidden_model_names.include?(klass.name) }.
+ reject {|klass| klass.abstract_class? || hidden_model_names.include?(klass.name) || klass.name.nil? }.
? +++++++++++++++++++
sort_by(&:name)
render layout: false
end
private
def eager_load_models
return unless Rails.env.development?
[Rails.application, Adhoq::Engine].each(&:eager_load!)
end
end
end | 2 | 0.083333 | 1 | 1 |
46977b598f2137de172249ca35102d1270a7923d | README.md | README.md |
Preview [Viewdocs](http://viewdocs.io/) documentation before pushing changes
back to your repositories.
|
Preview [Viewdocs](http://viewdocs.io/) documentation before pushing changes
back to your repositories.
## Installation
```
mkdir -p $GOPATH/src/github.com/fgrehm
cd $GOPATH/src/github.com/fgrehm
git clone https://github.com/fgrehm/viewdocs-preview.git
cd viewdocs-preview
go get
go build
```
Then drop the generated `viewdocs-preview` executable on a directory available
on your `$PATH`.
| Add instructions on installation from sources | Add instructions on installation from sources
| Markdown | mit | fgrehm/previewdocs | markdown | ## Code Before:
Preview [Viewdocs](http://viewdocs.io/) documentation before pushing changes
back to your repositories.
## Instruction:
Add instructions on installation from sources
## Code After:
Preview [Viewdocs](http://viewdocs.io/) documentation before pushing changes
back to your repositories.
## Installation
```
mkdir -p $GOPATH/src/github.com/fgrehm
cd $GOPATH/src/github.com/fgrehm
git clone https://github.com/fgrehm/viewdocs-preview.git
cd viewdocs-preview
go get
go build
```
Then drop the generated `viewdocs-preview` executable on a directory available
on your `$PATH`.
|
Preview [Viewdocs](http://viewdocs.io/) documentation before pushing changes
back to your repositories.
+
+ ## Installation
+
+ ```
+ mkdir -p $GOPATH/src/github.com/fgrehm
+ cd $GOPATH/src/github.com/fgrehm
+ git clone https://github.com/fgrehm/viewdocs-preview.git
+ cd viewdocs-preview
+ go get
+ go build
+ ```
+
+ Then drop the generated `viewdocs-preview` executable on a directory available
+ on your `$PATH`. | 14 | 4.666667 | 14 | 0 |
c5583f4d79e128aa3869cd8d20184dd4776e62d2 | site/docs/tumblr.md | site/docs/tumblr.md | ---
layout: docs
title: Tumblr
prev_section: textpattern
link_source: tumblr
next_section: typo
permalink: /docs/tumblr/
---
To import your posts from [Tumblr](http://tumblr.com), run:
{% highlight bash %}
$ ruby -rubygems -e 'require "jekyll-import";
JekyllImport::Importers::Tumblr.run({
"url" => "http://myblog.tumblr.com",
"user" => "html", # or "md"
"password" => false, # whether to download images as well.
"add_highlights" => false, # whether to wrap code blocks (indented 4 spaces) in a Liquid "highlight" tag
"rewrite_urls" => false # whether to write pages that redirect from the old Tumblr paths to the new Jekyll paths
})'
{% endhighlight %}
The only required field is `url`. The other fields default to their above
values. | ---
layout: docs
title: Tumblr
prev_section: textpattern
link_source: tumblr
next_section: typo
permalink: /docs/tumblr/
---
To import your posts from [Tumblr](http://tumblr.com), run:
{% highlight bash %}
$ ruby -rubygems -e 'require "jekyll-import";
JekyllImport::Importers::Tumblr.run({
"url" => "http://myblog.tumblr.com",
"format" => "html", # or "md"
"grab_images" => false, # whether to download images as well.
"add_highlights" => false, # whether to wrap code blocks (indented 4 spaces) in a Liquid "highlight" tag
"rewrite_urls" => false # whether to write pages that redirect from the old Tumblr paths to the new Jekyll paths
})'
{% endhighlight %}
The only required field is `url`. The other fields default to their above
values.
| Fix example parameter names for Tumblr import. | Fix example parameter names for Tumblr import.
Merges #122.
| Markdown | mit | gynter/jekyll-import,jekyll/jekyll-import,supriyantomaftuh/jekyll-import,jekyll/jekyll-import,gynter/jekyll-import,geerlingguy/jekyll-import,stefanw/jekyll-import,cityoffortworth/jekyll-import,geerlingguy/jekyll-import,shybovycha/jekyll-import,danbernier/jekyll-import,danbernier/jekyll-import,Teino1978-Corp/jekyll-import,stefanw/jekyll-import,gynter/jekyll-import,geerlingguy/jekyll-import,danbernier/jekyll-import,stefanw/jekyll-import,Teino1978-Corp/jekyll-import,ligthyear/jekyll-import,Teino1978-Corp/jekyll-import,shybovycha/jekyll-import,ligthyear/jekyll-import,ligthyear/jekyll-import,cityoffortworth/jekyll-import,supriyantomaftuh/jekyll-import,supriyantomaftuh/jekyll-import,shybovycha/jekyll-import | markdown | ## Code Before:
---
layout: docs
title: Tumblr
prev_section: textpattern
link_source: tumblr
next_section: typo
permalink: /docs/tumblr/
---
To import your posts from [Tumblr](http://tumblr.com), run:
{% highlight bash %}
$ ruby -rubygems -e 'require "jekyll-import";
JekyllImport::Importers::Tumblr.run({
"url" => "http://myblog.tumblr.com",
"user" => "html", # or "md"
"password" => false, # whether to download images as well.
"add_highlights" => false, # whether to wrap code blocks (indented 4 spaces) in a Liquid "highlight" tag
"rewrite_urls" => false # whether to write pages that redirect from the old Tumblr paths to the new Jekyll paths
})'
{% endhighlight %}
The only required field is `url`. The other fields default to their above
values.
## Instruction:
Fix example parameter names for Tumblr import.
Merges #122.
## Code After:
---
layout: docs
title: Tumblr
prev_section: textpattern
link_source: tumblr
next_section: typo
permalink: /docs/tumblr/
---
To import your posts from [Tumblr](http://tumblr.com), run:
{% highlight bash %}
$ ruby -rubygems -e 'require "jekyll-import";
JekyllImport::Importers::Tumblr.run({
"url" => "http://myblog.tumblr.com",
"format" => "html", # or "md"
"grab_images" => false, # whether to download images as well.
"add_highlights" => false, # whether to wrap code blocks (indented 4 spaces) in a Liquid "highlight" tag
"rewrite_urls" => false # whether to write pages that redirect from the old Tumblr paths to the new Jekyll paths
})'
{% endhighlight %}
The only required field is `url`. The other fields default to their above
values.
| ---
layout: docs
title: Tumblr
prev_section: textpattern
link_source: tumblr
next_section: typo
permalink: /docs/tumblr/
---
To import your posts from [Tumblr](http://tumblr.com), run:
{% highlight bash %}
$ ruby -rubygems -e 'require "jekyll-import";
JekyllImport::Importers::Tumblr.run({
"url" => "http://myblog.tumblr.com",
- "user" => "html", # or "md"
? ^^^ --
+ "format" => "html", # or "md"
? ^^ +++
- "password" => false, # whether to download images as well.
? ^ ----- ---
+ "grab_images" => false, # whether to download images as well.
? ^^ +++++++
"add_highlights" => false, # whether to wrap code blocks (indented 4 spaces) in a Liquid "highlight" tag
"rewrite_urls" => false # whether to write pages that redirect from the old Tumblr paths to the new Jekyll paths
})'
{% endhighlight %}
The only required field is `url`. The other fields default to their above
values. | 4 | 0.166667 | 2 | 2 |
275d0482387a9e3bb4000ffd3e4d455dd6ae3520 | signin.html | signin.html | <html>
<body><h1><i>Sign in</i></h1>
Parent Name or email address<br/>
<input type="text" name="parentName"><br/>
Password<i>(forgot password)</i><br/>
<input type="text" name="password"><br/>
<INPUT Type="BUTTON" id="signinButton2" Value="Sign in" Onclick="window.location.href='file:///C:/Users/Eli/Desktop/fakeprofile.html'">
</body>
</html> | <html>
<body><h1><i>Sign in</i></h1>
Parent Name or email address<br/>
<input type="text" name="parentName"><br/>
Password<i>(forgot password)</i><br/>
<input type="text" name="password"><br/>
<INPUT Type="BUTTON" id="signinButton2" Value="Sign in" Onclick="window.location.href='fakeprofile.html'">
</body>
</html> | Update the changes for buttons | Update the changes for buttons
| HTML | mit | ElightR/prototype,ElightR/prototype | html | ## Code Before:
<html>
<body><h1><i>Sign in</i></h1>
Parent Name or email address<br/>
<input type="text" name="parentName"><br/>
Password<i>(forgot password)</i><br/>
<input type="text" name="password"><br/>
<INPUT Type="BUTTON" id="signinButton2" Value="Sign in" Onclick="window.location.href='file:///C:/Users/Eli/Desktop/fakeprofile.html'">
</body>
</html>
## Instruction:
Update the changes for buttons
## Code After:
<html>
<body><h1><i>Sign in</i></h1>
Parent Name or email address<br/>
<input type="text" name="parentName"><br/>
Password<i>(forgot password)</i><br/>
<input type="text" name="password"><br/>
<INPUT Type="BUTTON" id="signinButton2" Value="Sign in" Onclick="window.location.href='fakeprofile.html'">
</body>
</html> | <html>
<body><h1><i>Sign in</i></h1>
Parent Name or email address<br/>
<input type="text" name="parentName"><br/>
Password<i>(forgot password)</i><br/>
<input type="text" name="password"><br/>
- <INPUT Type="BUTTON" id="signinButton2" Value="Sign in" Onclick="window.location.href='file:///C:/Users/Eli/Desktop/fakeprofile.html'">
? -----------------------------
+ <INPUT Type="BUTTON" id="signinButton2" Value="Sign in" Onclick="window.location.href='fakeprofile.html'">
</body>
</html> | 2 | 0.2 | 1 | 1 |
0d114d7b17b6e5a6f354bfa99c8d5804a1a932a6 | app/services/badge_granter.rb | app/services/badge_granter.rb | class BadgeGranter
def initialize(badge, user, opts={})
@badge, @user, @opts = badge, user, opts
@granted_by = opts[:granted_by] || Discourse.system_user
end
def self.grant(badge, user, opts={})
BadgeGranter.new(badge, user, opts).grant
end
def grant
return if @granted_by and !Guardian.new(@granted_by).can_grant_badges?(@user)
user_badge = nil
UserBadge.transaction do
user_badge = UserBadge.create!(badge: @badge, user: @user,
granted_by: @granted_by, granted_at: Time.now)
Badge.increment_counter 'grant_count', @badge.id
if @granted_by != Discourse.system_user
StaffActionLogger.new(@granted_by).log_badge_grant(user_badge)
end
end
user_badge
end
def self.revoke(user_badge, options={})
UserBadge.transaction do
user_badge.destroy!
Badge.decrement_counter 'grant_count', user_badge.badge.id
if options[:revoked_by]
StaffActionLogger.new(options[:revoked_by]).log_badge_revoke(user_badge)
end
end
end
end
| class BadgeGranter
def initialize(badge, user, opts={})
@badge, @user, @opts = badge, user, opts
@granted_by = opts[:granted_by] || Discourse.system_user
end
def self.grant(badge, user, opts={})
BadgeGranter.new(badge, user, opts).grant
end
def grant
return if @granted_by and !Guardian.new(@granted_by).can_grant_badges?(@user)
user_badge = UserBadge.find_by(badge_id: @badge.id, user_id: @user.id)
unless user_badge
UserBadge.transaction do
user_badge = UserBadge.create!(badge: @badge, user: @user,
granted_by: @granted_by, granted_at: Time.now)
Badge.increment_counter 'grant_count', @badge.id
if @granted_by != Discourse.system_user
StaffActionLogger.new(@granted_by).log_badge_grant(user_badge)
end
end
end
user_badge
end
def self.revoke(user_badge, options={})
UserBadge.transaction do
user_badge.destroy!
Badge.decrement_counter 'grant_count', user_badge.badge.id
if options[:revoked_by]
StaffActionLogger.new(options[:revoked_by]).log_badge_revoke(user_badge)
end
end
end
end
| Tweak badge granter not to try to double grant | Tweak badge granter not to try to double grant
| Ruby | mit | natefinch/discourse,natefinch/discourse | ruby | ## Code Before:
class BadgeGranter
def initialize(badge, user, opts={})
@badge, @user, @opts = badge, user, opts
@granted_by = opts[:granted_by] || Discourse.system_user
end
def self.grant(badge, user, opts={})
BadgeGranter.new(badge, user, opts).grant
end
def grant
return if @granted_by and !Guardian.new(@granted_by).can_grant_badges?(@user)
user_badge = nil
UserBadge.transaction do
user_badge = UserBadge.create!(badge: @badge, user: @user,
granted_by: @granted_by, granted_at: Time.now)
Badge.increment_counter 'grant_count', @badge.id
if @granted_by != Discourse.system_user
StaffActionLogger.new(@granted_by).log_badge_grant(user_badge)
end
end
user_badge
end
def self.revoke(user_badge, options={})
UserBadge.transaction do
user_badge.destroy!
Badge.decrement_counter 'grant_count', user_badge.badge.id
if options[:revoked_by]
StaffActionLogger.new(options[:revoked_by]).log_badge_revoke(user_badge)
end
end
end
end
## Instruction:
Tweak badge granter not to try to double grant
## Code After:
class BadgeGranter
def initialize(badge, user, opts={})
@badge, @user, @opts = badge, user, opts
@granted_by = opts[:granted_by] || Discourse.system_user
end
def self.grant(badge, user, opts={})
BadgeGranter.new(badge, user, opts).grant
end
def grant
return if @granted_by and !Guardian.new(@granted_by).can_grant_badges?(@user)
user_badge = UserBadge.find_by(badge_id: @badge.id, user_id: @user.id)
unless user_badge
UserBadge.transaction do
user_badge = UserBadge.create!(badge: @badge, user: @user,
granted_by: @granted_by, granted_at: Time.now)
Badge.increment_counter 'grant_count', @badge.id
if @granted_by != Discourse.system_user
StaffActionLogger.new(@granted_by).log_badge_grant(user_badge)
end
end
end
user_badge
end
def self.revoke(user_badge, options={})
UserBadge.transaction do
user_badge.destroy!
Badge.decrement_counter 'grant_count', user_badge.badge.id
if options[:revoked_by]
StaffActionLogger.new(options[:revoked_by]).log_badge_revoke(user_badge)
end
end
end
end
| class BadgeGranter
def initialize(badge, user, opts={})
@badge, @user, @opts = badge, user, opts
@granted_by = opts[:granted_by] || Discourse.system_user
end
def self.grant(badge, user, opts={})
BadgeGranter.new(badge, user, opts).grant
end
def grant
return if @granted_by and !Guardian.new(@granted_by).can_grant_badges?(@user)
- user_badge = nil
+ user_badge = UserBadge.find_by(badge_id: @badge.id, user_id: @user.id)
+ unless user_badge
- UserBadge.transaction do
+ UserBadge.transaction do
? ++
- user_badge = UserBadge.create!(badge: @badge, user: @user,
+ user_badge = UserBadge.create!(badge: @badge, user: @user,
? ++
- granted_by: @granted_by, granted_at: Time.now)
+ granted_by: @granted_by, granted_at: Time.now)
? ++
- Badge.increment_counter 'grant_count', @badge.id
+ Badge.increment_counter 'grant_count', @badge.id
? ++
- if @granted_by != Discourse.system_user
+ if @granted_by != Discourse.system_user
? ++
- StaffActionLogger.new(@granted_by).log_badge_grant(user_badge)
+ StaffActionLogger.new(@granted_by).log_badge_grant(user_badge)
? ++
+ end
end
end
user_badge
end
def self.revoke(user_badge, options={})
UserBadge.transaction do
user_badge.destroy!
Badge.decrement_counter 'grant_count', user_badge.badge.id
if options[:revoked_by]
StaffActionLogger.new(options[:revoked_by]).log_badge_revoke(user_badge)
end
end
end
end | 16 | 0.4 | 9 | 7 |
45fb1e943dbfe08ed5424abbfa28f06a62a0dd1f | .travis.yml | .travis.yml | language: python
python: 2.7
sudo: false
env:
- TOXENV=py27
- TOXENV=precise
- TOXENV=py34
- TOXENV=pypy
matrix:
allow_failures:
- env: TOXENV=py34
python: 2.7
- env: TOXENV=pypy
python: 2.7
install:
- pip install -U tox codecov
script:
- tox
after_success:
- codecov
notifications:
irc:
channels:
- "irc.freenode.org#scrapy"
use_notice: true
skip_join: true
| language: python
python: 2.7
sudo: false
env:
- TOXENV=py27
- TOXENV=precise
- TOXENV=py34
- TOXENV=pypy
matrix:
allow_failures:
- env: TOXENV=py34
python: 2.7
- env: TOXENV=pypy
python: 2.7
install:
- |
if [ "$TOXENV" = "pypy" ]; then
export PYENV_ROOT="$HOME/.pyenv"
if [ -f "$PYENV_ROOT/bin/pyenv" ]; then
pushd "$PYENV_ROOT" && git pull && popd
else
rm -rf "$PYENV_ROOT" && git clone --depth 1 https://github.com/yyuu/pyenv.git "$PYENV_ROOT"
fi
# get latest PyPy from pyenv directly (thanks to natural version sort option -V)
export PYPY_VERSION=`"$PYENV_ROOT/bin/pyenv" install --list |grep -o -E 'pypy-[0-9][\.0-9]*$' |sort -V |tail -1`
"$PYENV_ROOT/bin/pyenv" install --skip-existing "$PYPY_VERSION"
virtualenv --python="$PYENV_ROOT/versions/$PYPY_VERSION/bin/python" "$HOME/virtualenvs/$PYPY_VERSION"
source "$HOME/virtualenvs/$PYPY_VERSION/bin/activate"
fi
- pip install -U tox codecov
script:
- tox
after_success:
- codecov
notifications:
irc:
channels:
- "irc.freenode.org#scrapy"
use_notice: true
skip_join: true
| Install newer pypy version on Travis | Install newer pypy version on Travis
| YAML | bsd-3-clause | wujuguang/scrapyd,wujuguang/scrapyd,scrapy/scrapyd | yaml | ## Code Before:
language: python
python: 2.7
sudo: false
env:
- TOXENV=py27
- TOXENV=precise
- TOXENV=py34
- TOXENV=pypy
matrix:
allow_failures:
- env: TOXENV=py34
python: 2.7
- env: TOXENV=pypy
python: 2.7
install:
- pip install -U tox codecov
script:
- tox
after_success:
- codecov
notifications:
irc:
channels:
- "irc.freenode.org#scrapy"
use_notice: true
skip_join: true
## Instruction:
Install newer pypy version on Travis
## Code After:
language: python
python: 2.7
sudo: false
env:
- TOXENV=py27
- TOXENV=precise
- TOXENV=py34
- TOXENV=pypy
matrix:
allow_failures:
- env: TOXENV=py34
python: 2.7
- env: TOXENV=pypy
python: 2.7
install:
- |
if [ "$TOXENV" = "pypy" ]; then
export PYENV_ROOT="$HOME/.pyenv"
if [ -f "$PYENV_ROOT/bin/pyenv" ]; then
pushd "$PYENV_ROOT" && git pull && popd
else
rm -rf "$PYENV_ROOT" && git clone --depth 1 https://github.com/yyuu/pyenv.git "$PYENV_ROOT"
fi
# get latest PyPy from pyenv directly (thanks to natural version sort option -V)
export PYPY_VERSION=`"$PYENV_ROOT/bin/pyenv" install --list |grep -o -E 'pypy-[0-9][\.0-9]*$' |sort -V |tail -1`
"$PYENV_ROOT/bin/pyenv" install --skip-existing "$PYPY_VERSION"
virtualenv --python="$PYENV_ROOT/versions/$PYPY_VERSION/bin/python" "$HOME/virtualenvs/$PYPY_VERSION"
source "$HOME/virtualenvs/$PYPY_VERSION/bin/activate"
fi
- pip install -U tox codecov
script:
- tox
after_success:
- codecov
notifications:
irc:
channels:
- "irc.freenode.org#scrapy"
use_notice: true
skip_join: true
| language: python
python: 2.7
sudo: false
env:
- TOXENV=py27
- TOXENV=precise
- TOXENV=py34
- TOXENV=pypy
matrix:
allow_failures:
- env: TOXENV=py34
python: 2.7
- env: TOXENV=pypy
python: 2.7
install:
+ - |
+ if [ "$TOXENV" = "pypy" ]; then
+ export PYENV_ROOT="$HOME/.pyenv"
+ if [ -f "$PYENV_ROOT/bin/pyenv" ]; then
+ pushd "$PYENV_ROOT" && git pull && popd
+ else
+ rm -rf "$PYENV_ROOT" && git clone --depth 1 https://github.com/yyuu/pyenv.git "$PYENV_ROOT"
+ fi
+ # get latest PyPy from pyenv directly (thanks to natural version sort option -V)
+ export PYPY_VERSION=`"$PYENV_ROOT/bin/pyenv" install --list |grep -o -E 'pypy-[0-9][\.0-9]*$' |sort -V |tail -1`
+ "$PYENV_ROOT/bin/pyenv" install --skip-existing "$PYPY_VERSION"
+ virtualenv --python="$PYENV_ROOT/versions/$PYPY_VERSION/bin/python" "$HOME/virtualenvs/$PYPY_VERSION"
+ source "$HOME/virtualenvs/$PYPY_VERSION/bin/activate"
+ fi
- pip install -U tox codecov
script:
- tox
after_success:
- codecov
notifications:
irc:
channels:
- "irc.freenode.org#scrapy"
use_notice: true
skip_join: true | 14 | 0.4 | 14 | 0 |
11c8e5f678d76e96ed5f6d7f4d4df01eb84cef51 | lava_scheduler_app/static/lava_scheduler_app/js/job-submit.js | lava_scheduler_app/static/lava_scheduler_app/js/job-submit.js | $(window).ready(
function () {
$("#json-input").linedtextarea();
$("#json-input").bind('paste', function() {
// Need a timeout since paste event does not give the content
// of the clipboard.
setTimeout(function(){
validate_job_data($("#json-input").val());
},100);
});
$("#json-input").blur(function() {
validate_job_data($("#json-input").val());
});
});
validate_job_data = function() {
} | $(window).ready(
function () {
$("#json-input").linedtextarea();
$("#json-input").bind('paste', function() {
// Need a timeout since paste event does not give the content
// of the clipboard.
setTimeout(function(){
validate_job_data($("#json-input").val());
},100);
});
$("#json-input").blur(function() {
validate_job_data($("#json-input").val());
});
});
validate_job_data = function() {
$.post(window.location.pathname,
{"json-input": json_input,
"csrfmiddlewaretoken": $("[name='csrfmiddlewaretoken']").val()},
function(data) {
});
}
| Add ajax post to the validate function. | Add ajax post to the validate function.
| JavaScript | agpl-3.0 | Linaro/lava-server,Linaro/lava-server,OSSystems/lava-server,Linaro/lava-server,Linaro/lava-server,OSSystems/lava-server,OSSystems/lava-server | javascript | ## Code Before:
$(window).ready(
function () {
$("#json-input").linedtextarea();
$("#json-input").bind('paste', function() {
// Need a timeout since paste event does not give the content
// of the clipboard.
setTimeout(function(){
validate_job_data($("#json-input").val());
},100);
});
$("#json-input").blur(function() {
validate_job_data($("#json-input").val());
});
});
validate_job_data = function() {
}
## Instruction:
Add ajax post to the validate function.
## Code After:
$(window).ready(
function () {
$("#json-input").linedtextarea();
$("#json-input").bind('paste', function() {
// Need a timeout since paste event does not give the content
// of the clipboard.
setTimeout(function(){
validate_job_data($("#json-input").val());
},100);
});
$("#json-input").blur(function() {
validate_job_data($("#json-input").val());
});
});
validate_job_data = function() {
$.post(window.location.pathname,
{"json-input": json_input,
"csrfmiddlewaretoken": $("[name='csrfmiddlewaretoken']").val()},
function(data) {
});
}
| $(window).ready(
function () {
$("#json-input").linedtextarea();
$("#json-input").bind('paste', function() {
// Need a timeout since paste event does not give the content
// of the clipboard.
setTimeout(function(){
validate_job_data($("#json-input").val());
},100);
});
$("#json-input").blur(function() {
validate_job_data($("#json-input").val());
});
});
validate_job_data = function() {
+ $.post(window.location.pathname,
+ {"json-input": json_input,
+ "csrfmiddlewaretoken": $("[name='csrfmiddlewaretoken']").val()},
+ function(data) {
+
+ });
} | 6 | 0.315789 | 6 | 0 |
727f221767c662e95585f54e06c0c8b4e4a77d88 | smartfile/exceptions.py | smartfile/exceptions.py | from requests.exceptions import ConnectionError
class SmartFileException(Exception):
pass
class SmartFileConnException(SmartFileException):
""" Exception for issues regarding a request. """
def __init__(self, exc, *args, **kwargs):
self.exc = exc
if isinstance(exc, ConnectionError):
self.detail = exc.message.strerror
else:
self.detail = '{0}: {1}'.format(exc.__class__, exc)
super(SmartFileConnException, self).__init__(*args, **kwargs)
def __str__(self):
return self.detail
class SmartFileResponseException(SmartFileException):
""" Exception for issues regarding a response. """
def __init__(self, response, *args, **kwargs):
self.response = response
self.status_code = response.status_code
self.detail = response.json.get('detail', 'Check response for errors')
super(SmartFileResponseException, self).__init__(*args, **kwargs)
def __str__(self):
return 'Response {0}: {1}'.format(self.status_code, self.detail)
| from requests.exceptions import ConnectionError
class SmartFileException(Exception):
pass
class SmartFileConnException(SmartFileException):
""" Exception for issues regarding a request. """
def __init__(self, exc, *args, **kwargs):
self.exc = exc
if isinstance(exc, ConnectionError):
self.detail = exc.message.strerror
else:
self.detail = u'{0}: {1}'.format(exc.__class__, exc)
super(SmartFileConnException, self).__init__(*args, **kwargs)
def __str__(self):
return self.detail
class SmartFileResponseException(SmartFileException):
""" Exception for issues regarding a response. """
def __init__(self, response, *args, **kwargs):
self.response = response
self.status_code = response.status_code
if not response.json or not 'detail' in response.json:
self.detail = u'Check response for errors'
else:
self.detail = response.json['detail']
super(SmartFileResponseException, self).__init__(*args, **kwargs)
def __str__(self):
return 'Response {0}: {1}'.format(self.status_code, self.detail)
| Handle responses without JSON or detail field | Handle responses without JSON or detail field
Check the response for JSON and a detail field before trying to access
them within SmartFileResponseException. This could occur if the server
returns a 500.
| Python | mit | smartfile/client-python | python | ## Code Before:
from requests.exceptions import ConnectionError
class SmartFileException(Exception):
pass
class SmartFileConnException(SmartFileException):
""" Exception for issues regarding a request. """
def __init__(self, exc, *args, **kwargs):
self.exc = exc
if isinstance(exc, ConnectionError):
self.detail = exc.message.strerror
else:
self.detail = '{0}: {1}'.format(exc.__class__, exc)
super(SmartFileConnException, self).__init__(*args, **kwargs)
def __str__(self):
return self.detail
class SmartFileResponseException(SmartFileException):
""" Exception for issues regarding a response. """
def __init__(self, response, *args, **kwargs):
self.response = response
self.status_code = response.status_code
self.detail = response.json.get('detail', 'Check response for errors')
super(SmartFileResponseException, self).__init__(*args, **kwargs)
def __str__(self):
return 'Response {0}: {1}'.format(self.status_code, self.detail)
## Instruction:
Handle responses without JSON or detail field
Check the response for JSON and a detail field before trying to access
them within SmartFileResponseException. This could occur if the server
returns a 500.
## Code After:
from requests.exceptions import ConnectionError
class SmartFileException(Exception):
pass
class SmartFileConnException(SmartFileException):
""" Exception for issues regarding a request. """
def __init__(self, exc, *args, **kwargs):
self.exc = exc
if isinstance(exc, ConnectionError):
self.detail = exc.message.strerror
else:
self.detail = u'{0}: {1}'.format(exc.__class__, exc)
super(SmartFileConnException, self).__init__(*args, **kwargs)
def __str__(self):
return self.detail
class SmartFileResponseException(SmartFileException):
""" Exception for issues regarding a response. """
def __init__(self, response, *args, **kwargs):
self.response = response
self.status_code = response.status_code
if not response.json or not 'detail' in response.json:
self.detail = u'Check response for errors'
else:
self.detail = response.json['detail']
super(SmartFileResponseException, self).__init__(*args, **kwargs)
def __str__(self):
return 'Response {0}: {1}'.format(self.status_code, self.detail)
| from requests.exceptions import ConnectionError
class SmartFileException(Exception):
pass
class SmartFileConnException(SmartFileException):
""" Exception for issues regarding a request. """
def __init__(self, exc, *args, **kwargs):
self.exc = exc
if isinstance(exc, ConnectionError):
self.detail = exc.message.strerror
else:
- self.detail = '{0}: {1}'.format(exc.__class__, exc)
+ self.detail = u'{0}: {1}'.format(exc.__class__, exc)
? +
super(SmartFileConnException, self).__init__(*args, **kwargs)
def __str__(self):
return self.detail
class SmartFileResponseException(SmartFileException):
""" Exception for issues regarding a response. """
def __init__(self, response, *args, **kwargs):
self.response = response
self.status_code = response.status_code
- self.detail = response.json.get('detail', 'Check response for errors')
+ if not response.json or not 'detail' in response.json:
+ self.detail = u'Check response for errors'
+ else:
+ self.detail = response.json['detail']
super(SmartFileResponseException, self).__init__(*args, **kwargs)
def __str__(self):
return 'Response {0}: {1}'.format(self.status_code, self.detail) | 7 | 0.225806 | 5 | 2 |
0183a92ad8488f80e884df7da231e4202b4e3bdb | shipyard2/rules/pods/operations/build.py | shipyard2/rules/pods/operations/build.py | from pathlib import Path
import shipyard2.rules.pods
OPS_DB_PATH = Path('/srv/operations/database/v1')
shipyard2.rules.pods.define_pod(
name='database',
apps=[
shipyard2.rules.pods.App(
name='database',
exec=[
'python3',
*('-m', 'g1.operations.databases.servers'),
*(
'--parameter',
'g1.operations.databases.servers:database.db_url',
'sqlite:///%s' % (OPS_DB_PATH / 'ops.db'),
),
],
),
],
images=[
'//operations:database',
],
mounts=[
shipyard2.rules.pods.Mount(
source=str(OPS_DB_PATH),
target=str(OPS_DB_PATH),
read_only=False,
),
],
systemd_unit_groups=[
shipyard2.rules.pods.SystemdUnitGroup(
units=[
shipyard2.rules.pods.SystemdUnitGroup.Unit(
name='database.service',
content=shipyard2.rules.pods.make_pod_service_content(
description='Operations Database Server',
),
),
],
),
],
)
| from pathlib import Path
import shipyard2.rules.pods
OPS_DB_PATH = Path('/srv/operations/database/v1')
shipyard2.rules.pods.define_pod(
name='database',
apps=[
shipyard2.rules.pods.App(
name='database',
exec=[
'python3',
*('-m', 'g1.operations.databases.servers'),
*(
'--parameter',
'g1.operations.databases.servers:database.db_url',
'sqlite:///%s' % (OPS_DB_PATH / 'ops.db'),
),
],
),
],
images=[
'//operations:database',
],
mounts=[
shipyard2.rules.pods.Mount(
source=str(OPS_DB_PATH),
target=str(OPS_DB_PATH),
read_only=False,
),
],
systemd_unit_groups=[
shipyard2.rules.pods.SystemdUnitGroup(
units=[
shipyard2.rules.pods.SystemdUnitGroup.Unit(
name='database.service',
content=shipyard2.rules.pods.make_pod_service_content(
description='Operations Database Server',
),
),
shipyard2.rules.pods.SystemdUnitGroup.Unit(
name='watcher.service',
content=shipyard2.rules.pods\
.make_pod_journal_watcher_content(
description='Operations Database Server Watcher',
),
auto_stop=False,
),
],
),
],
)
| Add journal watcher unit to pod rules | Add journal watcher unit to pod rules
| Python | mit | clchiou/garage,clchiou/garage,clchiou/garage,clchiou/garage | python | ## Code Before:
from pathlib import Path
import shipyard2.rules.pods
OPS_DB_PATH = Path('/srv/operations/database/v1')
shipyard2.rules.pods.define_pod(
name='database',
apps=[
shipyard2.rules.pods.App(
name='database',
exec=[
'python3',
*('-m', 'g1.operations.databases.servers'),
*(
'--parameter',
'g1.operations.databases.servers:database.db_url',
'sqlite:///%s' % (OPS_DB_PATH / 'ops.db'),
),
],
),
],
images=[
'//operations:database',
],
mounts=[
shipyard2.rules.pods.Mount(
source=str(OPS_DB_PATH),
target=str(OPS_DB_PATH),
read_only=False,
),
],
systemd_unit_groups=[
shipyard2.rules.pods.SystemdUnitGroup(
units=[
shipyard2.rules.pods.SystemdUnitGroup.Unit(
name='database.service',
content=shipyard2.rules.pods.make_pod_service_content(
description='Operations Database Server',
),
),
],
),
],
)
## Instruction:
Add journal watcher unit to pod rules
## Code After:
from pathlib import Path
import shipyard2.rules.pods
OPS_DB_PATH = Path('/srv/operations/database/v1')
shipyard2.rules.pods.define_pod(
name='database',
apps=[
shipyard2.rules.pods.App(
name='database',
exec=[
'python3',
*('-m', 'g1.operations.databases.servers'),
*(
'--parameter',
'g1.operations.databases.servers:database.db_url',
'sqlite:///%s' % (OPS_DB_PATH / 'ops.db'),
),
],
),
],
images=[
'//operations:database',
],
mounts=[
shipyard2.rules.pods.Mount(
source=str(OPS_DB_PATH),
target=str(OPS_DB_PATH),
read_only=False,
),
],
systemd_unit_groups=[
shipyard2.rules.pods.SystemdUnitGroup(
units=[
shipyard2.rules.pods.SystemdUnitGroup.Unit(
name='database.service',
content=shipyard2.rules.pods.make_pod_service_content(
description='Operations Database Server',
),
),
shipyard2.rules.pods.SystemdUnitGroup.Unit(
name='watcher.service',
content=shipyard2.rules.pods\
.make_pod_journal_watcher_content(
description='Operations Database Server Watcher',
),
auto_stop=False,
),
],
),
],
)
| from pathlib import Path
import shipyard2.rules.pods
OPS_DB_PATH = Path('/srv/operations/database/v1')
shipyard2.rules.pods.define_pod(
name='database',
apps=[
shipyard2.rules.pods.App(
name='database',
exec=[
'python3',
*('-m', 'g1.operations.databases.servers'),
*(
'--parameter',
'g1.operations.databases.servers:database.db_url',
'sqlite:///%s' % (OPS_DB_PATH / 'ops.db'),
),
],
),
],
images=[
'//operations:database',
],
mounts=[
shipyard2.rules.pods.Mount(
source=str(OPS_DB_PATH),
target=str(OPS_DB_PATH),
read_only=False,
),
],
systemd_unit_groups=[
shipyard2.rules.pods.SystemdUnitGroup(
units=[
shipyard2.rules.pods.SystemdUnitGroup.Unit(
name='database.service',
content=shipyard2.rules.pods.make_pod_service_content(
description='Operations Database Server',
),
),
+ shipyard2.rules.pods.SystemdUnitGroup.Unit(
+ name='watcher.service',
+ content=shipyard2.rules.pods\
+ .make_pod_journal_watcher_content(
+ description='Operations Database Server Watcher',
+ ),
+ auto_stop=False,
+ ),
],
),
],
) | 8 | 0.177778 | 8 | 0 |
bc160e00962c7ae793850d6c25ff0773f2e900f2 | StaticData/BuildInfo.txt | StaticData/BuildInfo.txt | {"BuildVersion": "Test Build",
"ProjectToken": "ag9zfm1hdHRlcmNvbnRyb2xyDgsSB1Byb2plY3QY6gcM",
"ReleaseVersion": "0.0.0",
"BuildToken": "no-key"} | {"BuildVersion": "Test Build",
"ProjectToken": "ahRzfm1hdHRlcmNvbnRyb2wtdGVzdHIUCxIHUHJvamVjdBiAgICA3s-NCgw",
"ReleaseVersion": "0.0.0",
"BuildToken": "no-key"} | Make sure profilePath exists before loading it. | Make sure profilePath exists before loading it.
Cleaning up Action names
Change to development build for user profiles
| Text | bsd-2-clause | unlimitedbacon/MatterControl,MatterHackers/MatterControl,tellingmachine/MatterControl,unlimitedbacon/MatterControl,mmoening/MatterControl,jlewin/MatterControl,larsbrubaker/MatterControl,larsbrubaker/MatterControl,unlimitedbacon/MatterControl,jlewin/MatterControl,mmoening/MatterControl,MatterHackers/MatterControl,rytz/MatterControl,jlewin/MatterControl,mmoening/MatterControl,rytz/MatterControl,rytz/MatterControl,larsbrubaker/MatterControl,tellingmachine/MatterControl,larsbrubaker/MatterControl,MatterHackers/MatterControl,unlimitedbacon/MatterControl,jlewin/MatterControl | text | ## Code Before:
{"BuildVersion": "Test Build",
"ProjectToken": "ag9zfm1hdHRlcmNvbnRyb2xyDgsSB1Byb2plY3QY6gcM",
"ReleaseVersion": "0.0.0",
"BuildToken": "no-key"}
## Instruction:
Make sure profilePath exists before loading it.
Cleaning up Action names
Change to development build for user profiles
## Code After:
{"BuildVersion": "Test Build",
"ProjectToken": "ahRzfm1hdHRlcmNvbnRyb2wtdGVzdHIUCxIHUHJvamVjdBiAgICA3s-NCgw",
"ReleaseVersion": "0.0.0",
"BuildToken": "no-key"} | {"BuildVersion": "Test Build",
- "ProjectToken": "ag9zfm1hdHRlcmNvbnRyb2xyDgsSB1Byb2plY3QY6gcM",
+ "ProjectToken": "ahRzfm1hdHRlcmNvbnRyb2wtdGVzdHIUCxIHUHJvamVjdBiAgICA3s-NCgw",
"ReleaseVersion": "0.0.0",
"BuildToken": "no-key"} | 2 | 0.5 | 1 | 1 |
d535a45a19055b4fb7e1fc647e0c06d4bfa76433 | metadata/info.plateaukao.einkbro.yml | metadata/info.plateaukao.einkbro.yml | Categories:
- Internet
License: GPL-3.0-or-later
AuthorName: Daniel Kao
AuthorEmail: daniel.kao@gmail.com
SourceCode: https://github.com/plateaukao/browser
IssueTracker: https://github.com/plateaukao/browser/issues
Changelog: https://github.com/plateaukao/browser/blob/main/CHANGELOG.md
AutoName: EinkBro
RepoType: git
Repo: https://github.com/plateaukao/browser
Builds:
- versionName: 8.6.3
versionCode: 863
commit: v8.6.3
subdir: app
gradle:
- yes
- versionName: 8.6.4
versionCode: 864
commit: v8.6.4
subdir: app
gradle:
- yes
- versionName: 8.6.5
versionCode: 865
commit: v8.6.5
subdir: app
gradle:
- yes
- versionName: 8.6.6
versionCode: 866
commit: v8.6.6
subdir: app
gradle:
- yes
- versionName: 8.6.7
versionCode: 867
commit: v8.6.7
subdir: app
gradle:
- yes
AutoUpdateMode: Version v%v
UpdateCheckMode: Tags
CurrentVersion: 8.6.7
CurrentVersionCode: 867
| Categories:
- Internet
License: GPL-3.0-or-later
AuthorName: Daniel Kao
AuthorEmail: daniel.kao@gmail.com
SourceCode: https://github.com/plateaukao/browser
IssueTracker: https://github.com/plateaukao/browser/issues
Changelog: https://github.com/plateaukao/browser/blob/main/CHANGELOG.md
AutoName: EinkBro
RepoType: git
Repo: https://github.com/plateaukao/browser
Builds:
- versionName: 8.6.3
versionCode: 863
commit: v8.6.3
subdir: app
gradle:
- yes
- versionName: 8.6.4
versionCode: 864
commit: v8.6.4
subdir: app
gradle:
- yes
- versionName: 8.6.5
versionCode: 865
commit: v8.6.5
subdir: app
gradle:
- yes
- versionName: 8.6.6
versionCode: 866
commit: v8.6.6
subdir: app
gradle:
- yes
- versionName: 8.6.7
versionCode: 867
commit: v8.6.7
subdir: app
gradle:
- yes
- versionName: 8.7.1
versionCode: 871
commit: v8.7.1
subdir: app
gradle:
- yes
AutoUpdateMode: Version v%v
UpdateCheckMode: Tags
CurrentVersion: 8.7.1
CurrentVersionCode: 871
| Update EinkBro to 8.7.1 (871) | Update EinkBro to 8.7.1 (871)
| YAML | agpl-3.0 | f-droid/fdroiddata,f-droid/fdroiddata | yaml | ## Code Before:
Categories:
- Internet
License: GPL-3.0-or-later
AuthorName: Daniel Kao
AuthorEmail: daniel.kao@gmail.com
SourceCode: https://github.com/plateaukao/browser
IssueTracker: https://github.com/plateaukao/browser/issues
Changelog: https://github.com/plateaukao/browser/blob/main/CHANGELOG.md
AutoName: EinkBro
RepoType: git
Repo: https://github.com/plateaukao/browser
Builds:
- versionName: 8.6.3
versionCode: 863
commit: v8.6.3
subdir: app
gradle:
- yes
- versionName: 8.6.4
versionCode: 864
commit: v8.6.4
subdir: app
gradle:
- yes
- versionName: 8.6.5
versionCode: 865
commit: v8.6.5
subdir: app
gradle:
- yes
- versionName: 8.6.6
versionCode: 866
commit: v8.6.6
subdir: app
gradle:
- yes
- versionName: 8.6.7
versionCode: 867
commit: v8.6.7
subdir: app
gradle:
- yes
AutoUpdateMode: Version v%v
UpdateCheckMode: Tags
CurrentVersion: 8.6.7
CurrentVersionCode: 867
## Instruction:
Update EinkBro to 8.7.1 (871)
## Code After:
Categories:
- Internet
License: GPL-3.0-or-later
AuthorName: Daniel Kao
AuthorEmail: daniel.kao@gmail.com
SourceCode: https://github.com/plateaukao/browser
IssueTracker: https://github.com/plateaukao/browser/issues
Changelog: https://github.com/plateaukao/browser/blob/main/CHANGELOG.md
AutoName: EinkBro
RepoType: git
Repo: https://github.com/plateaukao/browser
Builds:
- versionName: 8.6.3
versionCode: 863
commit: v8.6.3
subdir: app
gradle:
- yes
- versionName: 8.6.4
versionCode: 864
commit: v8.6.4
subdir: app
gradle:
- yes
- versionName: 8.6.5
versionCode: 865
commit: v8.6.5
subdir: app
gradle:
- yes
- versionName: 8.6.6
versionCode: 866
commit: v8.6.6
subdir: app
gradle:
- yes
- versionName: 8.6.7
versionCode: 867
commit: v8.6.7
subdir: app
gradle:
- yes
- versionName: 8.7.1
versionCode: 871
commit: v8.7.1
subdir: app
gradle:
- yes
AutoUpdateMode: Version v%v
UpdateCheckMode: Tags
CurrentVersion: 8.7.1
CurrentVersionCode: 871
| Categories:
- Internet
License: GPL-3.0-or-later
AuthorName: Daniel Kao
AuthorEmail: daniel.kao@gmail.com
SourceCode: https://github.com/plateaukao/browser
IssueTracker: https://github.com/plateaukao/browser/issues
Changelog: https://github.com/plateaukao/browser/blob/main/CHANGELOG.md
AutoName: EinkBro
RepoType: git
Repo: https://github.com/plateaukao/browser
Builds:
- versionName: 8.6.3
versionCode: 863
commit: v8.6.3
subdir: app
gradle:
- yes
- versionName: 8.6.4
versionCode: 864
commit: v8.6.4
subdir: app
gradle:
- yes
- versionName: 8.6.5
versionCode: 865
commit: v8.6.5
subdir: app
gradle:
- yes
- versionName: 8.6.6
versionCode: 866
commit: v8.6.6
subdir: app
gradle:
- yes
- versionName: 8.6.7
versionCode: 867
commit: v8.6.7
subdir: app
gradle:
- yes
+ - versionName: 8.7.1
+ versionCode: 871
+ commit: v8.7.1
+ subdir: app
+ gradle:
+ - yes
+
AutoUpdateMode: Version v%v
UpdateCheckMode: Tags
- CurrentVersion: 8.6.7
? ^ ^
+ CurrentVersion: 8.7.1
? ^ ^
- CurrentVersionCode: 867
? -
+ CurrentVersionCode: 871
? +
| 11 | 0.203704 | 9 | 2 |
e79a93cb82f1965e4a34bd537da795ec8db78035 | app/views/admin/sites/index.html.slim | app/views/admin/sites/index.html.slim | = admin_page_header t('.sites'), t('.manage_sites_on_system')
.content
.row
.col-md-12
= admin_box do
= admin_box_header t('.sites'), class: 'with-border'
= admin_box_body class: 'no-padding' do
table.table.table-striped
thead
tr
th.table__id-column #
th = t('.name')
th = t('.domain')
th = t('.actions')
tbody
= render @sites
| = admin_page_header t('.sites'), t('.manage_sites_on_system')
.content
.row
.col-md-12
= admin_box do
= admin_box_body class: 'no-padding' do
table.table.table-striped
thead
tr
th.table__id-column #
th = t('.name')
th = t('.domain')
th = t('.actions')
tbody
= render @sites
| Remove unused site list view header | Remove unused site list view header
| Slim | apache-2.0 | TGDF/official-site,TGDF/official-site,TGDF/official-site,TGDF/official-site | slim | ## Code Before:
= admin_page_header t('.sites'), t('.manage_sites_on_system')
.content
.row
.col-md-12
= admin_box do
= admin_box_header t('.sites'), class: 'with-border'
= admin_box_body class: 'no-padding' do
table.table.table-striped
thead
tr
th.table__id-column #
th = t('.name')
th = t('.domain')
th = t('.actions')
tbody
= render @sites
## Instruction:
Remove unused site list view header
## Code After:
= admin_page_header t('.sites'), t('.manage_sites_on_system')
.content
.row
.col-md-12
= admin_box do
= admin_box_body class: 'no-padding' do
table.table.table-striped
thead
tr
th.table__id-column #
th = t('.name')
th = t('.domain')
th = t('.actions')
tbody
= render @sites
| = admin_page_header t('.sites'), t('.manage_sites_on_system')
.content
.row
.col-md-12
= admin_box do
- = admin_box_header t('.sites'), class: 'with-border'
= admin_box_body class: 'no-padding' do
table.table.table-striped
thead
tr
th.table__id-column #
th = t('.name')
th = t('.domain')
th = t('.actions')
tbody
= render @sites
| 1 | 0.058824 | 0 | 1 |
fcddf1e8b4ddebb57413b91748da710f23e4c29c | aggregate.proto | aggregate.proto | syntax = "proto3";
// AggregateBool is a container that counts individual instances of true/false
// It should be used for aggregating streams of bool values to appropriately
// account for their distribution.
message AggregateBool {
uint64 true = 1;
uint64 false = 2;
}
// AggregateBoolOption is an example container that can switch from single
// bool via a bool type and multi bools via an AggregateBool type.
// It may be desirable to copy this code and use it directly
message AggregateBoolOption {
oneof bool_or_aggregate_bool {
bool single = 1;
AggregateBool multi = 2;
}
}
| syntax = "proto3";
// AggregateBool is a container that counts individual instances of true/false
// It should be used for aggregating streams of bool values to appropriately
// account for their distribution.
message AggregateBool {
uint64 true = 1;
uint64 false = 2;
}
// AggregateBoolTag is a tagged union that can switch from single
// one via a bool type and many via an AggregateBool type.
// It may be desirable to copy this code and use it directly
message AggregateBoolTag {
oneof one_or_many {
bool one = 1;
AggregateBool many = 2;
}
}
// BigInt is a string representation of a big integer
// It's not the most efficient transmission, but it's easier than
// repeated enum, bytes or repeated uint64 for consuming JSON.
message BigInt {
string value = 1;
}
// AggregateLong is a container that holds information about a set of longs
// It should be used for aggregating streams of long values to appropriately
// account for their distribution
message AggregateLong {
BigInt sum = 1;
uint64 source_count = 2;
uint64 min = 3;
uint64 max = 4;
double mean = 5;
uint64 median = 6;
double standard_deviation = 7;
}
// AggregateLongTag is a tagged union that can switch from single
// one via a long type and multi bools via an AggregateLong type.
// It may be desirable to copy this code and use it directly
message AggregateLongTag {
oneof one_or_many {
uint64 one = 1;
AggregateCount many = 2;
}
}
// AggregateDouble is a container that holds information about a set of doubles
// It should be used for aggregating streams of double values to appropriately
// account for their distribution.
message AggregateDouble {
double mean = 1;
uint64 source_count = 2;
double min = 3;
double max = 4;
double median = 5;
double standard_deviation = 6;
}
// AggregateDoubleTag is a tagged union that can switch from single
// one via a double type and many via an AggregateDouble type.
// It may be desirable to copy this code and use it directly
message AggregateDoubleTag {
oneof one_or_many {
double one = 1;
AggregateDouble many = 2;
}
}
| Add AggregateDouble and AggregateLong message types | Add AggregateDouble and AggregateLong message types | Protocol Buffer | mit | hatchery/cbdb,hatchery/cbdb | protocol-buffer | ## Code Before:
syntax = "proto3";
// AggregateBool is a container that counts individual instances of true/false
// It should be used for aggregating streams of bool values to appropriately
// account for their distribution.
message AggregateBool {
uint64 true = 1;
uint64 false = 2;
}
// AggregateBoolOption is an example container that can switch from single
// bool via a bool type and multi bools via an AggregateBool type.
// It may be desirable to copy this code and use it directly
message AggregateBoolOption {
oneof bool_or_aggregate_bool {
bool single = 1;
AggregateBool multi = 2;
}
}
## Instruction:
Add AggregateDouble and AggregateLong message types
## Code After:
syntax = "proto3";
// AggregateBool is a container that counts individual instances of true/false
// It should be used for aggregating streams of bool values to appropriately
// account for their distribution.
message AggregateBool {
uint64 true = 1;
uint64 false = 2;
}
// AggregateBoolTag is a tagged union that can switch from single
// one via a bool type and many via an AggregateBool type.
// It may be desirable to copy this code and use it directly
message AggregateBoolTag {
oneof one_or_many {
bool one = 1;
AggregateBool many = 2;
}
}
// BigInt is a string representation of a big integer
// It's not the most efficient transmission, but it's easier than
// repeated enum, bytes or repeated uint64 for consuming JSON.
message BigInt {
string value = 1;
}
// AggregateLong is a container that holds information about a set of longs
// It should be used for aggregating streams of long values to appropriately
// account for their distribution
message AggregateLong {
BigInt sum = 1;
uint64 source_count = 2;
uint64 min = 3;
uint64 max = 4;
double mean = 5;
uint64 median = 6;
double standard_deviation = 7;
}
// AggregateLongTag is a tagged union that can switch from single
// one via a long type and multi bools via an AggregateLong type.
// It may be desirable to copy this code and use it directly
message AggregateLongTag {
oneof one_or_many {
uint64 one = 1;
AggregateCount many = 2;
}
}
// AggregateDouble is a container that holds information about a set of doubles
// It should be used for aggregating streams of double values to appropriately
// account for their distribution.
message AggregateDouble {
double mean = 1;
uint64 source_count = 2;
double min = 3;
double max = 4;
double median = 5;
double standard_deviation = 6;
}
// AggregateDoubleTag is a tagged union that can switch from single
// one via a double type and many via an AggregateDouble type.
// It may be desirable to copy this code and use it directly
message AggregateDoubleTag {
oneof one_or_many {
double one = 1;
AggregateDouble many = 2;
}
}
| syntax = "proto3";
// AggregateBool is a container that counts individual instances of true/false
// It should be used for aggregating streams of bool values to appropriately
// account for their distribution.
message AggregateBool {
uint64 true = 1;
uint64 false = 2;
}
- // AggregateBoolOption is an example container that can switch from single
+ // AggregateBoolTag is a tagged union that can switch from single
- // bool via a bool type and multi bools via an AggregateBool type.
? - ^^ ^^^^^^^^^^
+ // one via a bool type and many via an AggregateBool type.
? ^^ ^^^
// It may be desirable to copy this code and use it directly
- message AggregateBoolOption {
? ^^^^^^
+ message AggregateBoolTag {
? ^^^
- oneof bool_or_aggregate_bool {
+ oneof one_or_many {
- bool single = 1;
? ^^ --
+ bool one = 1;
? ^
- AggregateBool multi = 2;
? ^^^^
+ AggregateBool many = 2;
? ^^^
}
}
-
+
+ // BigInt is a string representation of a big integer
+ // It's not the most efficient transmission, but it's easier than
+ // repeated enum, bytes or repeated uint64 for consuming JSON.
+ message BigInt {
+ string value = 1;
+ }
+
+ // AggregateLong is a container that holds information about a set of longs
+ // It should be used for aggregating streams of long values to appropriately
+ // account for their distribution
+ message AggregateLong {
+ BigInt sum = 1;
+ uint64 source_count = 2;
+ uint64 min = 3;
+ uint64 max = 4;
+ double mean = 5;
+ uint64 median = 6;
+ double standard_deviation = 7;
+ }
+
+ // AggregateLongTag is a tagged union that can switch from single
+ // one via a long type and multi bools via an AggregateLong type.
+ // It may be desirable to copy this code and use it directly
+ message AggregateLongTag {
+ oneof one_or_many {
+ uint64 one = 1;
+ AggregateCount many = 2;
+ }
+ }
+
+ // AggregateDouble is a container that holds information about a set of doubles
+ // It should be used for aggregating streams of double values to appropriately
+ // account for their distribution.
+ message AggregateDouble {
+ double mean = 1;
+ uint64 source_count = 2;
+ double min = 3;
+ double max = 4;
+ double median = 5;
+ double standard_deviation = 6;
+ }
+
+ // AggregateDoubleTag is a tagged union that can switch from single
+ // one via a double type and many via an AggregateDouble type.
+ // It may be desirable to copy this code and use it directly
+ message AggregateDoubleTag {
+ oneof one_or_many {
+ double one = 1;
+ AggregateDouble many = 2;
+ }
+ } | 65 | 3.095238 | 58 | 7 |
d7b34ec6995618184df5d6a5eec40bd13603a4aa | configuration/checkstyle-suppressions.xml | configuration/checkstyle-suppressions.xml | <?xml version="1.0"?>
<!DOCTYPE suppressions PUBLIC
"-//Puppy Crawl//DTD Suppressions 1.1//EN"
"http://www.puppycrawl.com/dtds/suppressions_1_1.dtd">
<suppressions>
<!-- JUnit Tests -->
<suppress files="[/\\]src[/\\]test[/\\].*Test\.java" checks="(AvoidStaticImport|JavadocPackage|MissingCtor|VisibilityModifier)"/>
</suppressions>
| <?xml version="1.0"?>
<!DOCTYPE suppressions PUBLIC
"-//Puppy Crawl//DTD Suppressions 1.1//EN"
"http://www.puppycrawl.com/dtds/suppressions_1_1.dtd">
<suppressions>
<!-- JUnit Tests -->
<suppress files="[/\\]src[/\\]test[/\\].*Test\.java" checks="(AvoidStaticImport|JavadocPackage|MissingCtor|MultipleStringLiterals|VisibilityModifier)"/>
</suppressions>
| Allow multiple string literals with the same content for JUnit tests | Allow multiple string literals with the same content for JUnit tests
| XML | apache-2.0 | pmwmedia/tinylog,pmwmedia/tinylog | xml | ## Code Before:
<?xml version="1.0"?>
<!DOCTYPE suppressions PUBLIC
"-//Puppy Crawl//DTD Suppressions 1.1//EN"
"http://www.puppycrawl.com/dtds/suppressions_1_1.dtd">
<suppressions>
<!-- JUnit Tests -->
<suppress files="[/\\]src[/\\]test[/\\].*Test\.java" checks="(AvoidStaticImport|JavadocPackage|MissingCtor|VisibilityModifier)"/>
</suppressions>
## Instruction:
Allow multiple string literals with the same content for JUnit tests
## Code After:
<?xml version="1.0"?>
<!DOCTYPE suppressions PUBLIC
"-//Puppy Crawl//DTD Suppressions 1.1//EN"
"http://www.puppycrawl.com/dtds/suppressions_1_1.dtd">
<suppressions>
<!-- JUnit Tests -->
<suppress files="[/\\]src[/\\]test[/\\].*Test\.java" checks="(AvoidStaticImport|JavadocPackage|MissingCtor|MultipleStringLiterals|VisibilityModifier)"/>
</suppressions>
| <?xml version="1.0"?>
<!DOCTYPE suppressions PUBLIC
"-//Puppy Crawl//DTD Suppressions 1.1//EN"
"http://www.puppycrawl.com/dtds/suppressions_1_1.dtd">
<suppressions>
<!-- JUnit Tests -->
- <suppress files="[/\\]src[/\\]test[/\\].*Test\.java" checks="(AvoidStaticImport|JavadocPackage|MissingCtor|VisibilityModifier)"/>
+ <suppress files="[/\\]src[/\\]test[/\\].*Test\.java" checks="(AvoidStaticImport|JavadocPackage|MissingCtor|MultipleStringLiterals|VisibilityModifier)"/>
? +++++++++++++++++++++++
</suppressions> | 2 | 0.25 | 1 | 1 |
483ea426eb612977bec104a0496b0fc6defd7989 | src/Symfony/Component/Notifier/Bridge/Slack/Tests/SlackTransportFactoryTest.php | src/Symfony/Component/Notifier/Bridge/Slack/Tests/SlackTransportFactoryTest.php | <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Notifier\Bridge\Slack\Tests;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Notifier\Bridge\Slack\SlackTransportFactory;
use Symfony\Component\Notifier\Exception\UnsupportedSchemeException;
use Symfony\Component\Notifier\Transport\Dsn;
final class SlackTransportFactoryTest extends TestCase
{
public function testCreateWithDsn(): void
{
$factory = new SlackTransportFactory();
$host = 'testHost';
$path = 'testPath';
$transport = $factory->create(Dsn::fromString(sprintf('slack://%s/%s', $host, $path)));
$this->assertSame(sprintf('slack://%s/%s', $host, $path), (string) $transport);
}
public function testSupportsSlackScheme(): void
{
$factory = new SlackTransportFactory();
$this->assertTrue($factory->supports(Dsn::fromString('slack://host/path')));
$this->assertFalse($factory->supports(Dsn::fromString('somethingElse://host/path')));
}
public function testNonSlackSchemeThrows(): void
{
$factory = new SlackTransportFactory();
$this->expectException(UnsupportedSchemeException::class);
$factory->create(Dsn::fromString('somethingElse://host/path'));
}
}
| <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Notifier\Bridge\Slack\Tests;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Notifier\Bridge\Slack\SlackTransportFactory;
use Symfony\Component\Notifier\Exception\UnsupportedSchemeException;
use Symfony\Component\Notifier\Transport\Dsn;
final class SlackTransportFactoryTest extends TestCase
{
public function testCreateWithDsn()
{
$factory = new SlackTransportFactory();
$host = 'testHost';
$path = 'testPath';
$transport = $factory->create(Dsn::fromString(sprintf('slack://%s/%s', $host, $path)));
$this->assertSame(sprintf('slack://%s/%s', $host, $path), (string) $transport);
}
public function testSupportsSlackScheme()
{
$factory = new SlackTransportFactory();
$this->assertTrue($factory->supports(Dsn::fromString('slack://host/path')));
$this->assertFalse($factory->supports(Dsn::fromString('somethingElse://host/path')));
}
public function testNonSlackSchemeThrows()
{
$factory = new SlackTransportFactory();
$this->expectException(UnsupportedSchemeException::class);
$factory->create(Dsn::fromString('somethingElse://host/path'));
}
}
| Remove :void from test methods | [Notifier][Slack] Remove :void from test methods
| PHP | mit | nicolas-grekas/symfony,HeahDude/symfony,sgehrig/symfony,Nyholm/symfony,d-ph/symfony,derrabus/symfony,ogizanagi/symfony,HeahDude/symfony,d-ph/symfony,oleg-andreyev/symfony,tucksaun/symfony,paradajozsef/symfony,ogizanagi/symfony,ogizanagi/symfony,derrabus/symfony,OskarStark/symfony,tucksaun/symfony,curry684/symfony,Slamdunk/symfony,sgehrig/symfony,damienalexandre/symfony,stof/symfony,mpdude/symfony,hhamon/symfony,Slamdunk/symfony,MatTheCat/symfony,curry684/symfony,paradajozsef/symfony,damienalexandre/symfony,phramz/symfony,mpdude/symfony,mpdude/symfony,OskarStark/symfony,xabbuh/symfony,Tobion/symfony,Tobion/symfony,stof/symfony,xabbuh/symfony,ro0NL/symfony,stof/symfony,nicolas-grekas/symfony,tucksaun/symfony,d-ph/symfony,derrabus/symfony,oleg-andreyev/symfony,ro0NL/symfony,OskarStark/symfony,paradajozsef/symfony,MatTheCat/symfony,MatTheCat/symfony,hhamon/symfony,curry684/symfony,derrabus/symfony,damienalexandre/symfony,Nyholm/symfony,MatTheCat/symfony,ro0NL/symfony,curry684/symfony,Slamdunk/symfony,phramz/symfony,Nyholm/symfony,hhamon/symfony,paradajozsef/symfony,OskarStark/symfony,HeahDude/symfony,ro0NL/symfony,sgehrig/symfony,Slamdunk/symfony,d-ph/symfony,Tobion/symfony,symfony/symfony,phramz/symfony,symfony/symfony,tucksaun/symfony,Tobion/symfony,ogizanagi/symfony,symfony/symfony,HeahDude/symfony,xabbuh/symfony,oleg-andreyev/symfony,xabbuh/symfony,sgehrig/symfony,Nyholm/symfony,stof/symfony,symfony/symfony,phramz/symfony,nicolas-grekas/symfony,oleg-andreyev/symfony,damienalexandre/symfony,hhamon/symfony,mpdude/symfony,nicolas-grekas/symfony | php | ## Code Before:
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Notifier\Bridge\Slack\Tests;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Notifier\Bridge\Slack\SlackTransportFactory;
use Symfony\Component\Notifier\Exception\UnsupportedSchemeException;
use Symfony\Component\Notifier\Transport\Dsn;
final class SlackTransportFactoryTest extends TestCase
{
public function testCreateWithDsn(): void
{
$factory = new SlackTransportFactory();
$host = 'testHost';
$path = 'testPath';
$transport = $factory->create(Dsn::fromString(sprintf('slack://%s/%s', $host, $path)));
$this->assertSame(sprintf('slack://%s/%s', $host, $path), (string) $transport);
}
public function testSupportsSlackScheme(): void
{
$factory = new SlackTransportFactory();
$this->assertTrue($factory->supports(Dsn::fromString('slack://host/path')));
$this->assertFalse($factory->supports(Dsn::fromString('somethingElse://host/path')));
}
public function testNonSlackSchemeThrows(): void
{
$factory = new SlackTransportFactory();
$this->expectException(UnsupportedSchemeException::class);
$factory->create(Dsn::fromString('somethingElse://host/path'));
}
}
## Instruction:
[Notifier][Slack] Remove :void from test methods
## Code After:
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Notifier\Bridge\Slack\Tests;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Notifier\Bridge\Slack\SlackTransportFactory;
use Symfony\Component\Notifier\Exception\UnsupportedSchemeException;
use Symfony\Component\Notifier\Transport\Dsn;
final class SlackTransportFactoryTest extends TestCase
{
public function testCreateWithDsn()
{
$factory = new SlackTransportFactory();
$host = 'testHost';
$path = 'testPath';
$transport = $factory->create(Dsn::fromString(sprintf('slack://%s/%s', $host, $path)));
$this->assertSame(sprintf('slack://%s/%s', $host, $path), (string) $transport);
}
public function testSupportsSlackScheme()
{
$factory = new SlackTransportFactory();
$this->assertTrue($factory->supports(Dsn::fromString('slack://host/path')));
$this->assertFalse($factory->supports(Dsn::fromString('somethingElse://host/path')));
}
public function testNonSlackSchemeThrows()
{
$factory = new SlackTransportFactory();
$this->expectException(UnsupportedSchemeException::class);
$factory->create(Dsn::fromString('somethingElse://host/path'));
}
}
| <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Notifier\Bridge\Slack\Tests;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Notifier\Bridge\Slack\SlackTransportFactory;
use Symfony\Component\Notifier\Exception\UnsupportedSchemeException;
use Symfony\Component\Notifier\Transport\Dsn;
final class SlackTransportFactoryTest extends TestCase
{
- public function testCreateWithDsn(): void
? ------
+ public function testCreateWithDsn()
{
$factory = new SlackTransportFactory();
$host = 'testHost';
$path = 'testPath';
$transport = $factory->create(Dsn::fromString(sprintf('slack://%s/%s', $host, $path)));
$this->assertSame(sprintf('slack://%s/%s', $host, $path), (string) $transport);
}
- public function testSupportsSlackScheme(): void
? ------
+ public function testSupportsSlackScheme()
{
$factory = new SlackTransportFactory();
$this->assertTrue($factory->supports(Dsn::fromString('slack://host/path')));
$this->assertFalse($factory->supports(Dsn::fromString('somethingElse://host/path')));
}
- public function testNonSlackSchemeThrows(): void
? ------
+ public function testNonSlackSchemeThrows()
{
$factory = new SlackTransportFactory();
$this->expectException(UnsupportedSchemeException::class);
$factory->create(Dsn::fromString('somethingElse://host/path'));
}
} | 6 | 0.125 | 3 | 3 |
829dc038f9bcbf6af6f47fe8674f2c697bafd392 | package.json | package.json | {
"//": [
"This isn't the official package.json for Dart Sass. It's just used to ",
"install dependencies used for testing the Node API."
],
"devDependencies": {
"node-sass": "4.8.3",
"fibers": ">=1.0.0 <3.0.0"
}
}
| {
"//": [
"This isn't the official package.json for Dart Sass. It's just used to ",
"install dependencies used for testing the Node API."
],
"devDependencies": {
"fibers": ">=1.0.0 <3.0.0"
}
}
| Remove an unnecessary dependency on Node Sass | Remove an unnecessary dependency on Node Sass
This wasn't supposed to be committed.
| JSON | mit | sass/dart-sass,sass/dart-sass | json | ## Code Before:
{
"//": [
"This isn't the official package.json for Dart Sass. It's just used to ",
"install dependencies used for testing the Node API."
],
"devDependencies": {
"node-sass": "4.8.3",
"fibers": ">=1.0.0 <3.0.0"
}
}
## Instruction:
Remove an unnecessary dependency on Node Sass
This wasn't supposed to be committed.
## Code After:
{
"//": [
"This isn't the official package.json for Dart Sass. It's just used to ",
"install dependencies used for testing the Node API."
],
"devDependencies": {
"fibers": ">=1.0.0 <3.0.0"
}
}
| {
"//": [
"This isn't the official package.json for Dart Sass. It's just used to ",
"install dependencies used for testing the Node API."
],
"devDependencies": {
- "node-sass": "4.8.3",
"fibers": ">=1.0.0 <3.0.0"
}
} | 1 | 0.1 | 0 | 1 |
a08aeed02d797abdbbacc83f674340e1766ad183 | rb/lib/selenium/webdriver/common/zipper.rb | rb/lib/selenium/webdriver/common/zipper.rb | require 'zip/zip'
require 'tempfile'
require 'find'
module Selenium
module WebDriver
module Zipper
EXTENSIONS = %w[.zip .xpi]
def self.unzip(path)
destination = Dir.mktmpdir("unzip")
FileReaper << destination
Zip::ZipFile.open(path) do |zip|
zip.each do |entry|
to = File.join(destination, entry.name)
dirname = File.dirname(to)
FileUtils.mkdir_p dirname unless File.exist? dirname
zip.extract(entry, to)
end
end
destination
end
def self.zip(path)
tmp_zip = Tempfile.new("webdriver-zip")
begin
zos = Zip::ZipOutputStream.new(tmp_zip.path)
::Find.find(path) do |file|
next if File.directory?(file)
entry = file.sub("#{path}/", '')
zos.put_next_entry(entry)
zos << File.read(file, "rb")
end
zos.close
tmp_zip.rewind
[tmp_zip.read].pack("m")
ensure
tmp_zip.close
end
end
end # Zipper
end # WebDriver
end # Selenium
| require 'zip/zip'
require 'tempfile'
require 'find'
module Selenium
module WebDriver
module Zipper
EXTENSIONS = %w[.zip .xpi]
def self.unzip(path)
destination = Dir.mktmpdir("unzip")
FileReaper << destination
Zip::ZipFile.open(path) do |zip|
zip.each do |entry|
to = File.join(destination, entry.name)
dirname = File.dirname(to)
FileUtils.mkdir_p dirname unless File.exist? dirname
zip.extract(entry, to)
end
end
destination
end
def self.zip(path)
tmp_zip = Tempfile.new("webdriver-zip")
begin
zos = Zip::ZipOutputStream.new(tmp_zip.path)
::Find.find(path) do |file|
next if File.directory?(file)
entry = file.sub("#{path}/", '')
zos.put_next_entry(entry)
File.open(file, "rb") do |io|
zos << io.read
end
end
zos.close
tmp_zip.rewind
[tmp_zip.read].pack("m")
ensure
tmp_zip.close
end
end
end # Zipper
end # WebDriver
end # Selenium
| Fix last commit (at least for OS X/Ubuntu) | JariBakken: Fix last commit (at least for OS X/Ubuntu)
git-svn-id: 4179480af2c2519a5eb5e1e9b541cbdf5cf27696@11359 07704840-8298-11de-bf8c-fd130f914ac9
| Ruby | apache-2.0 | virajs/selenium-1,virajs/selenium-1,virajs/selenium-1,virajs/selenium-1,virajs/selenium-1,akiellor/selenium,winhamwr/selenium,winhamwr/selenium,winhamwr/selenium,winhamwr/selenium,winhamwr/selenium,akiellor/selenium,virajs/selenium-1,winhamwr/selenium,virajs/selenium-1,virajs/selenium-1,winhamwr/selenium,akiellor/selenium,akiellor/selenium,winhamwr/selenium,akiellor/selenium,akiellor/selenium,virajs/selenium-1,akiellor/selenium,akiellor/selenium | ruby | ## Code Before:
require 'zip/zip'
require 'tempfile'
require 'find'
module Selenium
module WebDriver
module Zipper
EXTENSIONS = %w[.zip .xpi]
def self.unzip(path)
destination = Dir.mktmpdir("unzip")
FileReaper << destination
Zip::ZipFile.open(path) do |zip|
zip.each do |entry|
to = File.join(destination, entry.name)
dirname = File.dirname(to)
FileUtils.mkdir_p dirname unless File.exist? dirname
zip.extract(entry, to)
end
end
destination
end
def self.zip(path)
tmp_zip = Tempfile.new("webdriver-zip")
begin
zos = Zip::ZipOutputStream.new(tmp_zip.path)
::Find.find(path) do |file|
next if File.directory?(file)
entry = file.sub("#{path}/", '')
zos.put_next_entry(entry)
zos << File.read(file, "rb")
end
zos.close
tmp_zip.rewind
[tmp_zip.read].pack("m")
ensure
tmp_zip.close
end
end
end # Zipper
end # WebDriver
end # Selenium
## Instruction:
JariBakken: Fix last commit (at least for OS X/Ubuntu)
git-svn-id: 4179480af2c2519a5eb5e1e9b541cbdf5cf27696@11359 07704840-8298-11de-bf8c-fd130f914ac9
## Code After:
require 'zip/zip'
require 'tempfile'
require 'find'
module Selenium
module WebDriver
module Zipper
EXTENSIONS = %w[.zip .xpi]
def self.unzip(path)
destination = Dir.mktmpdir("unzip")
FileReaper << destination
Zip::ZipFile.open(path) do |zip|
zip.each do |entry|
to = File.join(destination, entry.name)
dirname = File.dirname(to)
FileUtils.mkdir_p dirname unless File.exist? dirname
zip.extract(entry, to)
end
end
destination
end
def self.zip(path)
tmp_zip = Tempfile.new("webdriver-zip")
begin
zos = Zip::ZipOutputStream.new(tmp_zip.path)
::Find.find(path) do |file|
next if File.directory?(file)
entry = file.sub("#{path}/", '')
zos.put_next_entry(entry)
File.open(file, "rb") do |io|
zos << io.read
end
end
zos.close
tmp_zip.rewind
[tmp_zip.read].pack("m")
ensure
tmp_zip.close
end
end
end # Zipper
end # WebDriver
end # Selenium
| require 'zip/zip'
require 'tempfile'
require 'find'
module Selenium
module WebDriver
module Zipper
EXTENSIONS = %w[.zip .xpi]
def self.unzip(path)
destination = Dir.mktmpdir("unzip")
FileReaper << destination
Zip::ZipFile.open(path) do |zip|
zip.each do |entry|
to = File.join(destination, entry.name)
dirname = File.dirname(to)
FileUtils.mkdir_p dirname unless File.exist? dirname
zip.extract(entry, to)
end
end
destination
end
def self.zip(path)
tmp_zip = Tempfile.new("webdriver-zip")
begin
zos = Zip::ZipOutputStream.new(tmp_zip.path)
::Find.find(path) do |file|
next if File.directory?(file)
entry = file.sub("#{path}/", '')
zos.put_next_entry(entry)
- zos << File.read(file, "rb")
+ File.open(file, "rb") do |io|
+ zos << io.read
+ end
+
end
zos.close
tmp_zip.rewind
[tmp_zip.read].pack("m")
ensure
tmp_zip.close
end
end
end # Zipper
end # WebDriver
end # Selenium | 5 | 0.09434 | 4 | 1 |
766e459d91ae7b3a3abce78049f6148c88218534 | modules/distribution/resources/api_templates/default_ws_api_template.xml | modules/distribution/resources/api_templates/default_ws_api_template.xml | <api xmlns="http://ws.apache.org/ns/synapse" name="$!apiName" context="$!apiContext">
<resource url-mapping="$defaultVersionUrlMapping" faultSequence="fault">
<inSequence>
<log level="custom">
<property name="STATUS" value="Faulty invoking through default API. Dropping message."/>
</log>
<drop/>
</inSequence>
</resource>
</api>
| <api xmlns="http://ws.apache.org/ns/synapse" name="$!apiName" context="$!apiContext" binds-to="WebSocketInboundEndpoint">
<resource url-mapping="$defaultVersionUrlMapping" faultSequence="fault">
<inSequence>
<log level="custom">
<property name="STATUS" value="Faulty invoking through default API. Dropping message."/>
</log>
<drop/>
</inSequence>
</resource>
</api>
| Add binds-to for WS API default template | Add binds-to for WS API default template
| XML | apache-2.0 | chamilaadhi/product-apim,tharikaGitHub/product-apim,wso2/product-apim,wso2/product-apim,wso2/product-apim,wso2/product-apim,tharikaGitHub/product-apim,chamilaadhi/product-apim,tharikaGitHub/product-apim,chamilaadhi/product-apim,wso2/product-apim,tharikaGitHub/product-apim,chamilaadhi/product-apim,chamilaadhi/product-apim,tharikaGitHub/product-apim | xml | ## Code Before:
<api xmlns="http://ws.apache.org/ns/synapse" name="$!apiName" context="$!apiContext">
<resource url-mapping="$defaultVersionUrlMapping" faultSequence="fault">
<inSequence>
<log level="custom">
<property name="STATUS" value="Faulty invoking through default API. Dropping message."/>
</log>
<drop/>
</inSequence>
</resource>
</api>
## Instruction:
Add binds-to for WS API default template
## Code After:
<api xmlns="http://ws.apache.org/ns/synapse" name="$!apiName" context="$!apiContext" binds-to="WebSocketInboundEndpoint">
<resource url-mapping="$defaultVersionUrlMapping" faultSequence="fault">
<inSequence>
<log level="custom">
<property name="STATUS" value="Faulty invoking through default API. Dropping message."/>
</log>
<drop/>
</inSequence>
</resource>
</api>
| - <api xmlns="http://ws.apache.org/ns/synapse" name="$!apiName" context="$!apiContext">
+ <api xmlns="http://ws.apache.org/ns/synapse" name="$!apiName" context="$!apiContext" binds-to="WebSocketInboundEndpoint">
? ++++++++++++++++++++++++++++++++++++
<resource url-mapping="$defaultVersionUrlMapping" faultSequence="fault">
<inSequence>
<log level="custom">
<property name="STATUS" value="Faulty invoking through default API. Dropping message."/>
</log>
<drop/>
</inSequence>
</resource>
</api> | 2 | 0.2 | 1 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.