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
b084a1f358a8c4d30e5182730fdb8f722aa43ad2
app/views/service-patterns/concessionary-travel/example-service/need-photo.html
app/views/service-patterns/concessionary-travel/example-service/need-photo.html
{% extends "layout_picker.html" %} {% set serviceName = "Apply for an older person's bus pass" %} {% set pageTitle = "Do you have a bus pass photo?" %} {% block content %} <div class="column-two-thirds"> <p>We need a photo of you for your bus pass.</p> {% include 'common-content/example-photo.html' %} <form> <div class="form-group"> <fieldset class="inline"> <legend class="visually-hidden"> Do you have a bus pass photo? </legend> <label class="block-label selection-button-radio" data-target="upload-file" for="upload-file"> <input id="upload-file" type="radio" name="radio-group" value="have-photo"> Yes </label> <label class="block-label selection-button-radio" data-target="webcam" for="webcam"> <input id="webcam" type="radio" name="radio-group" value="dont-have-photo" class="in-progress"> No </label> </fieldset> </div> <div class="form-group"> <button class="button">Continue</button> </div> </form> </div> {% endblock %}
{% extends "layout_picker.html" %} {% set serviceName = "Apply for an older person's bus pass" %} {% set pageTitle = "Your bus pass photo" %} {% block content %} <div class="column-two-thirds"> <p>We need a photo of you for your bus pass.</p> {% include 'common-content/example-photo.html' %} <h2 class="heading-medium">Do you have a photo like this?</h2> <form> <div class="form-group"> <fieldset class="inline"> <legend class="visually-hidden"> Do you have a photo like this? </legend> <label class="block-label selection-button-radio" data-target="upload-file" for="upload-file"> <input id="upload-file" type="radio" name="radio-group" value="have-photo"> Yes </label> <label class="block-label selection-button-radio" data-target="webcam" for="webcam"> <input id="webcam" type="radio" name="radio-group" value="dont-have-photo" class="in-progress"> No </label> </fieldset> </div> <div class="form-group"> <button class="button">Continue</button> </div> </div> </form> </div> {% endblock %}
Revert "remove h2 and change h1 to question"
Revert "remove h2 and change h1 to question" This reverts commit 583d430123e6bf6dd2e7752e97b6acd3708b70e7.
HTML
mit
kenmaddison-scc/verify-local-patterns,kenmaddison-scc/verify-local-patterns,kenmaddison-scc/verify-local-patterns
html
## Code Before: {% extends "layout_picker.html" %} {% set serviceName = "Apply for an older person's bus pass" %} {% set pageTitle = "Do you have a bus pass photo?" %} {% block content %} <div class="column-two-thirds"> <p>We need a photo of you for your bus pass.</p> {% include 'common-content/example-photo.html' %} <form> <div class="form-group"> <fieldset class="inline"> <legend class="visually-hidden"> Do you have a bus pass photo? </legend> <label class="block-label selection-button-radio" data-target="upload-file" for="upload-file"> <input id="upload-file" type="radio" name="radio-group" value="have-photo"> Yes </label> <label class="block-label selection-button-radio" data-target="webcam" for="webcam"> <input id="webcam" type="radio" name="radio-group" value="dont-have-photo" class="in-progress"> No </label> </fieldset> </div> <div class="form-group"> <button class="button">Continue</button> </div> </form> </div> {% endblock %} ## Instruction: Revert "remove h2 and change h1 to question" This reverts commit 583d430123e6bf6dd2e7752e97b6acd3708b70e7. ## Code After: {% extends "layout_picker.html" %} {% set serviceName = "Apply for an older person's bus pass" %} {% set pageTitle = "Your bus pass photo" %} {% block content %} <div class="column-two-thirds"> <p>We need a photo of you for your bus pass.</p> {% include 'common-content/example-photo.html' %} <h2 class="heading-medium">Do you have a photo like this?</h2> <form> <div class="form-group"> <fieldset class="inline"> <legend class="visually-hidden"> Do you have a photo like this? </legend> <label class="block-label selection-button-radio" data-target="upload-file" for="upload-file"> <input id="upload-file" type="radio" name="radio-group" value="have-photo"> Yes </label> <label class="block-label selection-button-radio" data-target="webcam" for="webcam"> <input id="webcam" type="radio" name="radio-group" value="dont-have-photo" class="in-progress"> No </label> </fieldset> </div> <div class="form-group"> <button class="button">Continue</button> </div> </div> </form> </div> {% endblock %}
{% extends "layout_picker.html" %} {% set serviceName = "Apply for an older person's bus pass" %} - {% set pageTitle = "Do you have a bus pass photo?" %} ? ^^^^ ^^^^^^^ - + {% set pageTitle = "Your bus pass photo" %} ? ^ ^ {% block content %} <div class="column-two-thirds"> <p>We need a photo of you for your bus pass.</p> {% include 'common-content/example-photo.html' %} + + + <h2 class="heading-medium">Do you have a photo like this?</h2> + <form> <div class="form-group"> <fieldset class="inline"> <legend class="visually-hidden"> - Do you have a bus pass photo? ? --------- + Do you have a photo like this? ? ++++++++++ </legend> <label class="block-label selection-button-radio" data-target="upload-file" for="upload-file"> <input id="upload-file" type="radio" name="radio-group" value="have-photo"> Yes </label> <label class="block-label selection-button-radio" data-target="webcam" for="webcam"> <input id="webcam" type="radio" name="radio-group" value="dont-have-photo" class="in-progress"> No </label> </fieldset> </div> <div class="form-group"> <button class="button">Continue</button> </div> + </div> </form> </div> {% endblock %}
9
0.219512
7
2
b860372a9e874e8bc06efc9711f7b58591300e81
tohu/__init__.py
tohu/__init__.py
from distutils.version import StrictVersion from platform import python_version min_supported_python_version = '3.6' if StrictVersion(python_version()) < StrictVersion(min_supported_python_version): error_msg = ( "Tohu requires Python {min_supported_python_version} or greater to run " "(currently running under Python {python_version()})" ) raise RuntimeError(error_msg) from . import v6 from .v6.base import * from .v6.primitive_generators import * from .v6.derived_generators import * from .v6.generator_dispatch import * from .v6.custom_generator import CustomGenerator from .v6.logging import logger from .v6.utils import print_generated_sequence, print_tohu_version from .v6 import base from .v6 import primitive_generators from .v6 import derived_generators from .v6 import generator_dispatch from .v6 import custom_generator from .v6 import set_special_methods __all__ = base.__all__ \ + primitive_generators.__all__ \ + derived_generators.__all__ \ + generator_dispatch.__all__ \ + custom_generator.__all__ \ + ['tohu_logger', 'print_generated_sequence', 'print_tohu_version'] from ._version import get_versions __version__ = get_versions()['version'] del get_versions tohu_logger = logger # alias
from distutils.version import LooseVersion from platform import python_version min_supported_python_version = '3.6' if LooseVersion(python_version()) < LooseVersion(min_supported_python_version): error_msg = ( "Tohu requires Python {min_supported_python_version} or greater to run " "(currently running under Python {python_version()})" ) raise RuntimeError(error_msg) from . import v6 from .v6.base import * from .v6.primitive_generators import * from .v6.derived_generators import * from .v6.generator_dispatch import * from .v6.custom_generator import CustomGenerator from .v6.logging import logger from .v6.utils import print_generated_sequence, print_tohu_version from .v6 import base from .v6 import primitive_generators from .v6 import derived_generators from .v6 import generator_dispatch from .v6 import custom_generator from .v6 import set_special_methods __all__ = base.__all__ \ + primitive_generators.__all__ \ + derived_generators.__all__ \ + generator_dispatch.__all__ \ + custom_generator.__all__ \ + ['tohu_logger', 'print_generated_sequence', 'print_tohu_version'] from ._version import get_versions __version__ = get_versions()['version'] del get_versions tohu_logger = logger # alias
Use LooseVersion in version check (to avoid errors for e.g. '3.7.2+')
Use LooseVersion in version check (to avoid errors for e.g. '3.7.2+')
Python
mit
maxalbert/tohu
python
## Code Before: from distutils.version import StrictVersion from platform import python_version min_supported_python_version = '3.6' if StrictVersion(python_version()) < StrictVersion(min_supported_python_version): error_msg = ( "Tohu requires Python {min_supported_python_version} or greater to run " "(currently running under Python {python_version()})" ) raise RuntimeError(error_msg) from . import v6 from .v6.base import * from .v6.primitive_generators import * from .v6.derived_generators import * from .v6.generator_dispatch import * from .v6.custom_generator import CustomGenerator from .v6.logging import logger from .v6.utils import print_generated_sequence, print_tohu_version from .v6 import base from .v6 import primitive_generators from .v6 import derived_generators from .v6 import generator_dispatch from .v6 import custom_generator from .v6 import set_special_methods __all__ = base.__all__ \ + primitive_generators.__all__ \ + derived_generators.__all__ \ + generator_dispatch.__all__ \ + custom_generator.__all__ \ + ['tohu_logger', 'print_generated_sequence', 'print_tohu_version'] from ._version import get_versions __version__ = get_versions()['version'] del get_versions tohu_logger = logger # alias ## Instruction: Use LooseVersion in version check (to avoid errors for e.g. '3.7.2+') ## Code After: from distutils.version import LooseVersion from platform import python_version min_supported_python_version = '3.6' if LooseVersion(python_version()) < LooseVersion(min_supported_python_version): error_msg = ( "Tohu requires Python {min_supported_python_version} or greater to run " "(currently running under Python {python_version()})" ) raise RuntimeError(error_msg) from . import v6 from .v6.base import * from .v6.primitive_generators import * from .v6.derived_generators import * from .v6.generator_dispatch import * from .v6.custom_generator import CustomGenerator from .v6.logging import logger from .v6.utils import print_generated_sequence, print_tohu_version from .v6 import base from .v6 import primitive_generators from .v6 import derived_generators from .v6 import generator_dispatch from .v6 import custom_generator from .v6 import set_special_methods __all__ = base.__all__ \ + primitive_generators.__all__ \ + derived_generators.__all__ \ + generator_dispatch.__all__ \ + custom_generator.__all__ \ + ['tohu_logger', 'print_generated_sequence', 'print_tohu_version'] from ._version import get_versions __version__ = get_versions()['version'] del get_versions tohu_logger = logger # alias
- from distutils.version import StrictVersion ? ^^^^^^ + from distutils.version import LooseVersion ? ^^^^^ from platform import python_version min_supported_python_version = '3.6' - if StrictVersion(python_version()) < StrictVersion(min_supported_python_version): ? ^^^^^^ ^^^^^^ + if LooseVersion(python_version()) < LooseVersion(min_supported_python_version): ? ^^^^^ ^^^^^ error_msg = ( "Tohu requires Python {min_supported_python_version} or greater to run " "(currently running under Python {python_version()})" ) raise RuntimeError(error_msg) from . import v6 from .v6.base import * from .v6.primitive_generators import * from .v6.derived_generators import * from .v6.generator_dispatch import * from .v6.custom_generator import CustomGenerator from .v6.logging import logger from .v6.utils import print_generated_sequence, print_tohu_version from .v6 import base from .v6 import primitive_generators from .v6 import derived_generators from .v6 import generator_dispatch from .v6 import custom_generator from .v6 import set_special_methods __all__ = base.__all__ \ + primitive_generators.__all__ \ + derived_generators.__all__ \ + generator_dispatch.__all__ \ + custom_generator.__all__ \ + ['tohu_logger', 'print_generated_sequence', 'print_tohu_version'] from ._version import get_versions __version__ = get_versions()['version'] del get_versions tohu_logger = logger # alias
4
0.097561
2
2
a692c65ed369e9ad92b164c9beb900abda442933
src/main/java/org/cyclops/integrateddynamics/core/evaluate/variable/ValueTypeListProxyEntityArmorInventory.java
src/main/java/org/cyclops/integrateddynamics/core/evaluate/variable/ValueTypeListProxyEntityArmorInventory.java
package org.cyclops.integrateddynamics.core.evaluate.variable; import net.minecraft.entity.Entity; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.World; import org.cyclops.cyclopscore.persist.nbt.INBTProvider; /** * A list proxy for the inventory of an entity. */ public class ValueTypeListProxyEntityArmorInventory extends ValueTypeListProxyEntityBase<ValueObjectTypeItemStack, ValueObjectTypeItemStack.ValueItemStack> implements INBTProvider { public ValueTypeListProxyEntityArmorInventory() { this(null, null); } public ValueTypeListProxyEntityArmorInventory(World world, Entity entity) { super(ValueTypeListProxyFactories.ENTITY_ARMORINVENTORY.getName(), ValueTypes.OBJECT_ITEMSTACK, world, entity); } protected ItemStack[] getInventory() { Entity e = getEntity(); if(e != null) { return e.getInventory(); } return new ItemStack[0]; } @Override public int getLength() { return getInventory().length; } @Override public ValueObjectTypeItemStack.ValueItemStack get(int index) { return ValueObjectTypeItemStack.ValueItemStack.of(getInventory()[index]); } @Override public void writeGeneratedFieldsToNBT(NBTTagCompound tag) { } @Override public void readGeneratedFieldsFromNBT(NBTTagCompound tag) { } }
package org.cyclops.integrateddynamics.core.evaluate.variable; import net.minecraft.entity.Entity; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.World; import org.cyclops.cyclopscore.persist.nbt.INBTProvider; /** * A list proxy for the inventory of an entity. */ public class ValueTypeListProxyEntityArmorInventory extends ValueTypeListProxyEntityBase<ValueObjectTypeItemStack, ValueObjectTypeItemStack.ValueItemStack> implements INBTProvider { public ValueTypeListProxyEntityArmorInventory() { this(null, null); } public ValueTypeListProxyEntityArmorInventory(World world, Entity entity) { super(ValueTypeListProxyFactories.ENTITY_ARMORINVENTORY.getName(), ValueTypes.OBJECT_ITEMSTACK, world, entity); } protected ItemStack[] getInventory() { Entity e = getEntity(); if(e != null) { ItemStack[] inventory = e.getInventory(); if(inventory != null) { return inventory; } } return new ItemStack[0]; } @Override public int getLength() { return getInventory().length; } @Override public ValueObjectTypeItemStack.ValueItemStack get(int index) { return ValueObjectTypeItemStack.ValueItemStack.of(getInventory()[index]); } @Override public void writeGeneratedFieldsToNBT(NBTTagCompound tag) { } @Override public void readGeneratedFieldsFromNBT(NBTTagCompound tag) { } }
Fix NPE when reading mob armor inventories in peaceful mode
Fix NPE when reading mob armor inventories in peaceful mode
Java
mit
CyclopsMC/IntegratedDynamics
java
## Code Before: package org.cyclops.integrateddynamics.core.evaluate.variable; import net.minecraft.entity.Entity; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.World; import org.cyclops.cyclopscore.persist.nbt.INBTProvider; /** * A list proxy for the inventory of an entity. */ public class ValueTypeListProxyEntityArmorInventory extends ValueTypeListProxyEntityBase<ValueObjectTypeItemStack, ValueObjectTypeItemStack.ValueItemStack> implements INBTProvider { public ValueTypeListProxyEntityArmorInventory() { this(null, null); } public ValueTypeListProxyEntityArmorInventory(World world, Entity entity) { super(ValueTypeListProxyFactories.ENTITY_ARMORINVENTORY.getName(), ValueTypes.OBJECT_ITEMSTACK, world, entity); } protected ItemStack[] getInventory() { Entity e = getEntity(); if(e != null) { return e.getInventory(); } return new ItemStack[0]; } @Override public int getLength() { return getInventory().length; } @Override public ValueObjectTypeItemStack.ValueItemStack get(int index) { return ValueObjectTypeItemStack.ValueItemStack.of(getInventory()[index]); } @Override public void writeGeneratedFieldsToNBT(NBTTagCompound tag) { } @Override public void readGeneratedFieldsFromNBT(NBTTagCompound tag) { } } ## Instruction: Fix NPE when reading mob armor inventories in peaceful mode ## Code After: package org.cyclops.integrateddynamics.core.evaluate.variable; import net.minecraft.entity.Entity; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.World; import org.cyclops.cyclopscore.persist.nbt.INBTProvider; /** * A list proxy for the inventory of an entity. */ public class ValueTypeListProxyEntityArmorInventory extends ValueTypeListProxyEntityBase<ValueObjectTypeItemStack, ValueObjectTypeItemStack.ValueItemStack> implements INBTProvider { public ValueTypeListProxyEntityArmorInventory() { this(null, null); } public ValueTypeListProxyEntityArmorInventory(World world, Entity entity) { super(ValueTypeListProxyFactories.ENTITY_ARMORINVENTORY.getName(), ValueTypes.OBJECT_ITEMSTACK, world, entity); } protected ItemStack[] getInventory() { Entity e = getEntity(); if(e != null) { ItemStack[] inventory = e.getInventory(); if(inventory != null) { return inventory; } } return new ItemStack[0]; } @Override public int getLength() { return getInventory().length; } @Override public ValueObjectTypeItemStack.ValueItemStack get(int index) { return ValueObjectTypeItemStack.ValueItemStack.of(getInventory()[index]); } @Override public void writeGeneratedFieldsToNBT(NBTTagCompound tag) { } @Override public void readGeneratedFieldsFromNBT(NBTTagCompound tag) { } }
package org.cyclops.integrateddynamics.core.evaluate.variable; import net.minecraft.entity.Entity; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.World; import org.cyclops.cyclopscore.persist.nbt.INBTProvider; /** * A list proxy for the inventory of an entity. */ public class ValueTypeListProxyEntityArmorInventory extends ValueTypeListProxyEntityBase<ValueObjectTypeItemStack, ValueObjectTypeItemStack.ValueItemStack> implements INBTProvider { public ValueTypeListProxyEntityArmorInventory() { this(null, null); } public ValueTypeListProxyEntityArmorInventory(World world, Entity entity) { super(ValueTypeListProxyFactories.ENTITY_ARMORINVENTORY.getName(), ValueTypes.OBJECT_ITEMSTACK, world, entity); } protected ItemStack[] getInventory() { Entity e = getEntity(); if(e != null) { + ItemStack[] inventory = e.getInventory(); + if(inventory != null) { - return e.getInventory(); ? ^^^^^^ -- + return inventory; ? ++++ ^ + } } return new ItemStack[0]; } @Override public int getLength() { return getInventory().length; } @Override public ValueObjectTypeItemStack.ValueItemStack get(int index) { return ValueObjectTypeItemStack.ValueItemStack.of(getInventory()[index]); } @Override public void writeGeneratedFieldsToNBT(NBTTagCompound tag) { } @Override public void readGeneratedFieldsFromNBT(NBTTagCompound tag) { } }
5
0.102041
4
1
a3bb8baaa90c65cfd695c34118e33590725e170b
src/containers/Timeline.jsx
src/containers/Timeline.jsx
import React, { Component } from 'react' import { connect } from 'react-redux' import { fetchPhotos } from '../actions/photos' import PhotosList from '../components/PhotosList' import Topbar from '../components/Topbar' import Viewer from '../components/Viewer' export class Timeline extends Component { constructor (props) { super(props) this.state = { isFirstFetch: true } } componentWillReceiveProps (nextProps) { /* istanbul ignore else */ if (!nextProps.isIndexing && this.state.isFirstFetch) { this.props.onFirstFetch(nextProps.mangoIndexByDate) this.setState({ isFirstFetch: false }) } } render (props, state) { return ( <div> <Topbar viewName='photos' /> <PhotosList {...props} {...state} /> {props && props.params && props.params.photoId && <Viewer photoId={props.params.photoId} /> } </div> ) } } const mapStateToProps = (state, ownProps) => ({ isFetching: state.ui.isFetching, isIndexing: state.ui.isIndexing, isWorking: state.ui.isWorking, photos: state.photos, mangoIndexByDate: state.mangoIndexByDate }) export const mapDispatchToProps = (dispatch, ownProps) => ({ onFirstFetch: (mangoIndexByDate) => { dispatch(fetchPhotos(mangoIndexByDate)) } }) export default connect( mapStateToProps, mapDispatchToProps )(Timeline)
import React, { Component } from 'react' import { connect } from 'react-redux' import { fetchPhotos } from '../actions/photos' import PhotosList from '../components/PhotosList' import Topbar from '../components/Topbar' import Viewer from '../components/Viewer' export class Timeline extends Component { constructor (props) { super(props) this.state = { isFirstFetch: true } } componentWillReceiveProps (nextProps) { /* istanbul ignore else */ if (!nextProps.isIndexing && this.state.isFirstFetch) { this.props.onFirstFetch(nextProps.mangoIndexByDate) this.setState({ isFirstFetch: false }) } } render () { return ( <div> <Topbar viewName='photos' /> <PhotosList {...this.props} {...this.state} /> {this.props && this.props.params && this.props.params.photoId && <Viewer photoId={this.props.params.photoId} /> } </div> ) } } const mapStateToProps = (state, ownProps) => ({ isFetching: state.ui.isFetching, isIndexing: state.ui.isIndexing, isWorking: state.ui.isWorking, photos: state.photos, mangoIndexByDate: state.mangoIndexByDate }) export const mapDispatchToProps = (dispatch, ownProps) => ({ onFirstFetch: (mangoIndexByDate) => { dispatch(fetchPhotos(mangoIndexByDate)) } }) export default connect( mapStateToProps, mapDispatchToProps )(Timeline)
Use `this` for props and state in the timeline render function
[fix] Use `this` for props and state in the timeline render function
JSX
agpl-3.0
nono/cozy-photos-v3,enguerran/cozy-drive,cozy/cozy-files-v3,enguerran/cozy-drive,y-lohse/cozy-drive,goldoraf/cozy-photos-v3,cozy/cozy-photos-v3,cozy/cozy-files-v3,goldoraf/cozy-drive,y-lohse/cozy-drive,enguerran/cozy-files-v3,nono/cozy-files-v3,enguerran/cozy-drive,cozy/cozy-files-v3,enguerran/cozy-files-v3,y-lohse/cozy-drive,nono/cozy-files-v3,y-lohse/cozy-files-v3,y-lohse/cozy-files-v3,nono/cozy-files-v3,nono/cozy-photos-v3,cozy/cozy-files-v3,y-lohse/cozy-photos-v3,nono/cozy-files-v3,goldoraf/cozy-drive,cozy/cozy-photos-v3,y-lohse/cozy-drive,goldoraf/cozy-drive,goldoraf/cozy-drive,enguerran/cozy-files-v3,goldoraf/cozy-photos-v3,y-lohse/cozy-photos-v3,y-lohse/cozy-files-v3,enguerran/cozy-drive,enguerran/cozy-files-v3
jsx
## Code Before: import React, { Component } from 'react' import { connect } from 'react-redux' import { fetchPhotos } from '../actions/photos' import PhotosList from '../components/PhotosList' import Topbar from '../components/Topbar' import Viewer from '../components/Viewer' export class Timeline extends Component { constructor (props) { super(props) this.state = { isFirstFetch: true } } componentWillReceiveProps (nextProps) { /* istanbul ignore else */ if (!nextProps.isIndexing && this.state.isFirstFetch) { this.props.onFirstFetch(nextProps.mangoIndexByDate) this.setState({ isFirstFetch: false }) } } render (props, state) { return ( <div> <Topbar viewName='photos' /> <PhotosList {...props} {...state} /> {props && props.params && props.params.photoId && <Viewer photoId={props.params.photoId} /> } </div> ) } } const mapStateToProps = (state, ownProps) => ({ isFetching: state.ui.isFetching, isIndexing: state.ui.isIndexing, isWorking: state.ui.isWorking, photos: state.photos, mangoIndexByDate: state.mangoIndexByDate }) export const mapDispatchToProps = (dispatch, ownProps) => ({ onFirstFetch: (mangoIndexByDate) => { dispatch(fetchPhotos(mangoIndexByDate)) } }) export default connect( mapStateToProps, mapDispatchToProps )(Timeline) ## Instruction: [fix] Use `this` for props and state in the timeline render function ## Code After: import React, { Component } from 'react' import { connect } from 'react-redux' import { fetchPhotos } from '../actions/photos' import PhotosList from '../components/PhotosList' import Topbar from '../components/Topbar' import Viewer from '../components/Viewer' export class Timeline extends Component { constructor (props) { super(props) this.state = { isFirstFetch: true } } componentWillReceiveProps (nextProps) { /* istanbul ignore else */ if (!nextProps.isIndexing && this.state.isFirstFetch) { this.props.onFirstFetch(nextProps.mangoIndexByDate) this.setState({ isFirstFetch: false }) } } render () { return ( <div> <Topbar viewName='photos' /> <PhotosList {...this.props} {...this.state} /> {this.props && this.props.params && this.props.params.photoId && <Viewer photoId={this.props.params.photoId} /> } </div> ) } } const mapStateToProps = (state, ownProps) => ({ isFetching: state.ui.isFetching, isIndexing: state.ui.isIndexing, isWorking: state.ui.isWorking, photos: state.photos, mangoIndexByDate: state.mangoIndexByDate }) export const mapDispatchToProps = (dispatch, ownProps) => ({ onFirstFetch: (mangoIndexByDate) => { dispatch(fetchPhotos(mangoIndexByDate)) } }) export default connect( mapStateToProps, mapDispatchToProps )(Timeline)
import React, { Component } from 'react' import { connect } from 'react-redux' import { fetchPhotos } from '../actions/photos' import PhotosList from '../components/PhotosList' import Topbar from '../components/Topbar' import Viewer from '../components/Viewer' export class Timeline extends Component { constructor (props) { super(props) this.state = { isFirstFetch: true } } componentWillReceiveProps (nextProps) { /* istanbul ignore else */ if (!nextProps.isIndexing && this.state.isFirstFetch) { this.props.onFirstFetch(nextProps.mangoIndexByDate) this.setState({ isFirstFetch: false }) } } - render (props, state) { + render () { return ( <div> <Topbar viewName='photos' /> - <PhotosList {...props} {...state} /> + <PhotosList {...this.props} {...this.state} /> ? +++++ +++++ - {props && props.params && props.params.photoId && + {this.props && this.props.params && this.props.params.photoId && ? +++++ +++++ +++++ - <Viewer photoId={props.params.photoId} /> + <Viewer photoId={this.props.params.photoId} /> ? +++++ } </div> ) } } const mapStateToProps = (state, ownProps) => ({ isFetching: state.ui.isFetching, isIndexing: state.ui.isIndexing, isWorking: state.ui.isWorking, photos: state.photos, mangoIndexByDate: state.mangoIndexByDate }) export const mapDispatchToProps = (dispatch, ownProps) => ({ onFirstFetch: (mangoIndexByDate) => { dispatch(fetchPhotos(mangoIndexByDate)) } }) export default connect( mapStateToProps, mapDispatchToProps )(Timeline)
8
0.148148
4
4
ee68ed703786afadface47a3f276cefae17c583d
test/unit/conftest.py
test/unit/conftest.py
import pytest import logging from .mockcore import MockCore @pytest.fixture(scope='function') def mockcore(): return MockCore() # Ignore semihosting test that currently crashes on Travis collect_ignore = ["test_semihosting.py"]
import pytest import logging from .mockcore import MockCore @pytest.fixture(scope='function') def mockcore(): return MockCore() # Ignore semihosting test that currently crashes on Travis collect_ignore = [ "test_semihosting.py", "test_pack.py" ]
Disable test_pack.py unit test until it works on Travis-CI and for Python 2.7.
Disable test_pack.py unit test until it works on Travis-CI and for Python 2.7.
Python
apache-2.0
pyocd/pyOCD,mbedmicro/pyOCD,mesheven/pyOCD,mbedmicro/pyOCD,flit/pyOCD,mesheven/pyOCD,flit/pyOCD,pyocd/pyOCD,mbedmicro/pyOCD,mesheven/pyOCD
python
## Code Before: import pytest import logging from .mockcore import MockCore @pytest.fixture(scope='function') def mockcore(): return MockCore() # Ignore semihosting test that currently crashes on Travis collect_ignore = ["test_semihosting.py"] ## Instruction: Disable test_pack.py unit test until it works on Travis-CI and for Python 2.7. ## Code After: import pytest import logging from .mockcore import MockCore @pytest.fixture(scope='function') def mockcore(): return MockCore() # Ignore semihosting test that currently crashes on Travis collect_ignore = [ "test_semihosting.py", "test_pack.py" ]
import pytest import logging from .mockcore import MockCore @pytest.fixture(scope='function') def mockcore(): return MockCore() # Ignore semihosting test that currently crashes on Travis - collect_ignore = ["test_semihosting.py"] + collect_ignore = [ + "test_semihosting.py", + "test_pack.py" + ]
5
0.454545
4
1
fbd1bb355cc203275e22e44f5623d4072c7f3c65
PHP/tag_img.php
PHP/tag_img.php
<?php /* * PixLab PHP Client which is just a single class PHP file without any dependency that you can get from Github * https://github.com/symisc/pixlab-php */ require_once "pixlab.php"; # Tag an image based on detected visual content which mean running a CNN on top of it. # https://pixlab.io/#/cmd?id=tagimg for more info. # Target Image: Change to any link or switch to POST if you want to upload your image directly, refer to the sample set for more info. $img = 'https://s-media-cache-ak0.pinimg.com/originals/35/d0/f6/35d0f6ee0e40306c41cfd714c625f78e.jpg'; # Your PixLab key $key = 'My_Pixlab_Key'; /* Process */ $pix = new Pixlab($key); if( !$pix->get('tagimg',array( 'img' => $img, 'key' => $key )) ){ echo $pix->get_error_message(); die; } /* Grab the total number of tags */ $tags = $pix->json->tags; echo "Total number of tags: ".count($tags)."\n"; foreach($tags as $tag){ echo "Tag = ".$tag->name.", Confidence: ".$tag->confidence."\n"; }
<?php /* * PixLab PHP Client which is just a single class PHP file without any dependency that you can get from Github * https://github.com/symisc/pixlab-php */ require_once "pixlab.php"; # Tag an image based on detected visual content which mean running a CNN on top of it. # https://pixlab.io/#/cmd?id=tagimg for more info. # Target Image: Change to any link or switch to POST if you want to upload your image directly, refer to the sample set for more info. $img = 'https://s-media-cache-ak0.pinimg.com/originals/35/d0/f6/35d0f6ee0e40306c41cfd714c625f78e.jpg'; # Your PixLab key $key = 'My_Pixlab_Key'; /* Process */ $pix = new Pixlab($key); if( !$pix->get('tagimg',array( 'img' => $img )) ){ echo $pix->get_error_message(); die; } /* Grab the total number of tags */ $tags = $pix->json->tags; echo "Total number of tags: ".count($tags)."\n"; foreach($tags as $tag){ echo "Tag = ".$tag->name.", Confidence: ".$tag->confidence."\n"; }
Tag an image based on detected visual content which mean running a CNN on top of it.
Tag an image based on detected visual content which mean running a CNN on top of it.
PHP
bsd-2-clause
symisc/pixlab,symisc/pixlab,symisc/pixlab
php
## Code Before: <?php /* * PixLab PHP Client which is just a single class PHP file without any dependency that you can get from Github * https://github.com/symisc/pixlab-php */ require_once "pixlab.php"; # Tag an image based on detected visual content which mean running a CNN on top of it. # https://pixlab.io/#/cmd?id=tagimg for more info. # Target Image: Change to any link or switch to POST if you want to upload your image directly, refer to the sample set for more info. $img = 'https://s-media-cache-ak0.pinimg.com/originals/35/d0/f6/35d0f6ee0e40306c41cfd714c625f78e.jpg'; # Your PixLab key $key = 'My_Pixlab_Key'; /* Process */ $pix = new Pixlab($key); if( !$pix->get('tagimg',array( 'img' => $img, 'key' => $key )) ){ echo $pix->get_error_message(); die; } /* Grab the total number of tags */ $tags = $pix->json->tags; echo "Total number of tags: ".count($tags)."\n"; foreach($tags as $tag){ echo "Tag = ".$tag->name.", Confidence: ".$tag->confidence."\n"; } ## Instruction: Tag an image based on detected visual content which mean running a CNN on top of it. ## Code After: <?php /* * PixLab PHP Client which is just a single class PHP file without any dependency that you can get from Github * https://github.com/symisc/pixlab-php */ require_once "pixlab.php"; # Tag an image based on detected visual content which mean running a CNN on top of it. # https://pixlab.io/#/cmd?id=tagimg for more info. # Target Image: Change to any link or switch to POST if you want to upload your image directly, refer to the sample set for more info. $img = 'https://s-media-cache-ak0.pinimg.com/originals/35/d0/f6/35d0f6ee0e40306c41cfd714c625f78e.jpg'; # Your PixLab key $key = 'My_Pixlab_Key'; /* Process */ $pix = new Pixlab($key); if( !$pix->get('tagimg',array( 'img' => $img )) ){ echo $pix->get_error_message(); die; } /* Grab the total number of tags */ $tags = $pix->json->tags; echo "Total number of tags: ".count($tags)."\n"; foreach($tags as $tag){ echo "Tag = ".$tag->name.", Confidence: ".$tag->confidence."\n"; }
<?php /* * PixLab PHP Client which is just a single class PHP file without any dependency that you can get from Github * https://github.com/symisc/pixlab-php */ require_once "pixlab.php"; # Tag an image based on detected visual content which mean running a CNN on top of it. # https://pixlab.io/#/cmd?id=tagimg for more info. # Target Image: Change to any link or switch to POST if you want to upload your image directly, refer to the sample set for more info. $img = 'https://s-media-cache-ak0.pinimg.com/originals/35/d0/f6/35d0f6ee0e40306c41cfd714c625f78e.jpg'; # Your PixLab key $key = 'My_Pixlab_Key'; /* Process */ $pix = new Pixlab($key); if( !$pix->get('tagimg',array( - 'img' => $img, ? - + 'img' => $img - 'key' => $key )) ){ echo $pix->get_error_message(); die; } /* Grab the total number of tags */ $tags = $pix->json->tags; echo "Total number of tags: ".count($tags)."\n"; foreach($tags as $tag){ echo "Tag = ".$tag->name.", Confidence: ".$tag->confidence."\n"; }
3
0.103448
1
2
f09345b96d89c6af828c8e61c37980703919035b
_zsh/90-aliases.zsh
_zsh/90-aliases.zsh
alias zhelp='run-help' alias ..='cd ../' alias ...='cd ../../' alias ....='cd ../../../' alias cd..='cd ..' alias d='dirs -v | head -10' alias po=popd alias pu=pushd if [[ -n "${IS_LINUX}" ]]; then alias ls='ls --color=auto' elif [[ -n "${IS_BSD}" ]] || [[ -n "${IS_MAC}" ]]; then alias ls='ls -G' fi alias l='ls -lah' alias la='ls -lAh' alias ll='ls -lh' alias lsa='ls -lah' # Do not use `GREP_OPTIONS` alias grep='grep --color=auto' # Git alias gita='git add' alias gitc='git commit' alias gitd='git diff' alias gitl='git log' alias gits='git status' alias gitsl='git shortlog' exists "safe-rm" && alias rm=safe-rm # vim: set ts=8 sw=4 tw=0 fenc=utf-8 ft=zsh: #
alias zhelp='run-help' alias ..='cd ../' alias ...='cd ../../' alias ....='cd ../../../' alias cd..='cd ..' alias d='dirs -v | head -10' alias po=popd alias pu=pushd if [[ -n "${IS_LINUX}" ]]; then alias ls='ls --color=auto' elif [[ -n "${IS_BSD}" ]] || [[ -n "${IS_MAC}" ]]; then alias ls='ls -G' fi alias l='ls -lah' alias la='ls -lAh' alias ll='ls -lh' alias lsa='ls -lah' # Do not use `GREP_OPTIONS` alias grep='grep --color=auto' exists "vi" || alias vi=vim exists "safe-rm" && alias rm=safe-rm # vim: set ts=8 sw=4 tw=0 fenc=utf-8 ft=zsh: #
Add vi alias and remove git aliases
zsh: Add vi alias and remove git aliases
Shell
mit
liweitianux/dotfiles,liweitianux/dotfiles,liweitianux/dotfiles,liweitianux/dotfiles
shell
## Code Before: alias zhelp='run-help' alias ..='cd ../' alias ...='cd ../../' alias ....='cd ../../../' alias cd..='cd ..' alias d='dirs -v | head -10' alias po=popd alias pu=pushd if [[ -n "${IS_LINUX}" ]]; then alias ls='ls --color=auto' elif [[ -n "${IS_BSD}" ]] || [[ -n "${IS_MAC}" ]]; then alias ls='ls -G' fi alias l='ls -lah' alias la='ls -lAh' alias ll='ls -lh' alias lsa='ls -lah' # Do not use `GREP_OPTIONS` alias grep='grep --color=auto' # Git alias gita='git add' alias gitc='git commit' alias gitd='git diff' alias gitl='git log' alias gits='git status' alias gitsl='git shortlog' exists "safe-rm" && alias rm=safe-rm # vim: set ts=8 sw=4 tw=0 fenc=utf-8 ft=zsh: # ## Instruction: zsh: Add vi alias and remove git aliases ## Code After: alias zhelp='run-help' alias ..='cd ../' alias ...='cd ../../' alias ....='cd ../../../' alias cd..='cd ..' alias d='dirs -v | head -10' alias po=popd alias pu=pushd if [[ -n "${IS_LINUX}" ]]; then alias ls='ls --color=auto' elif [[ -n "${IS_BSD}" ]] || [[ -n "${IS_MAC}" ]]; then alias ls='ls -G' fi alias l='ls -lah' alias la='ls -lAh' alias ll='ls -lh' alias lsa='ls -lah' # Do not use `GREP_OPTIONS` alias grep='grep --color=auto' exists "vi" || alias vi=vim exists "safe-rm" && alias rm=safe-rm # vim: set ts=8 sw=4 tw=0 fenc=utf-8 ft=zsh: #
alias zhelp='run-help' alias ..='cd ../' alias ...='cd ../../' alias ....='cd ../../../' alias cd..='cd ..' alias d='dirs -v | head -10' alias po=popd alias pu=pushd if [[ -n "${IS_LINUX}" ]]; then alias ls='ls --color=auto' elif [[ -n "${IS_BSD}" ]] || [[ -n "${IS_MAC}" ]]; then alias ls='ls -G' fi alias l='ls -lah' alias la='ls -lAh' alias ll='ls -lh' alias lsa='ls -lah' # Do not use `GREP_OPTIONS` alias grep='grep --color=auto' + exists "vi" || alias vi=vim - # Git - alias gita='git add' - alias gitc='git commit' - alias gitd='git diff' - alias gitl='git log' - alias gits='git status' - alias gitsl='git shortlog' - exists "safe-rm" && alias rm=safe-rm # vim: set ts=8 sw=4 tw=0 fenc=utf-8 ft=zsh: #
9
0.257143
1
8
4b872b579fd3a3e1cd8fbcbc39c028d030bc8a17
.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md
.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md
--- name: 🚀 Feature Request about: Suggest an idea to help make Strapi even better! --- <!-- Hello 👋 Thank you for submitting a feature request. We are using ProductBoard to manage our roadmap and feature requests. Can you please submit your feature request here: https://portal.productboard.com/strapi -->
--- name: 🚀 Feature Request about: Suggest an idea to help make Strapi even better! --- <!-- Hello 👋 Thank you for submitting a feature request. We are using ProductBoard to manage our roadmap and feature requests. Can you please submit your feature request here: https://portal.productboard.com/strapi --> - [ ] **I have created my request on the Product Board before I submitted this issue** - [ ] **I have looked at all the other requests on the Product Board before I submitted this issue** **Please describe your feature request:**
Revert and fix the feature request template
Revert and fix the feature request template
Markdown
mit
wistityhq/strapi,wistityhq/strapi
markdown
## Code Before: --- name: 🚀 Feature Request about: Suggest an idea to help make Strapi even better! --- <!-- Hello 👋 Thank you for submitting a feature request. We are using ProductBoard to manage our roadmap and feature requests. Can you please submit your feature request here: https://portal.productboard.com/strapi --> ## Instruction: Revert and fix the feature request template ## Code After: --- name: 🚀 Feature Request about: Suggest an idea to help make Strapi even better! --- <!-- Hello 👋 Thank you for submitting a feature request. We are using ProductBoard to manage our roadmap and feature requests. Can you please submit your feature request here: https://portal.productboard.com/strapi --> - [ ] **I have created my request on the Product Board before I submitted this issue** - [ ] **I have looked at all the other requests on the Product Board before I submitted this issue** **Please describe your feature request:**
--- name: 🚀 Feature Request about: Suggest an idea to help make Strapi even better! --- <!-- Hello 👋 Thank you for submitting a feature request. We are using ProductBoard to manage our roadmap and feature requests. Can you please submit your feature request here: https://portal.productboard.com/strapi --> + - [ ] **I have created my request on the Product Board before I submitted this issue** + - [ ] **I have looked at all the other requests on the Product Board before I submitted this issue** - + **Please describe your feature request:**
4
0.266667
3
1
e45098981e8a291725d4df356f5118ce70511eae
lib/mobility/backend/null.rb
lib/mobility/backend/null.rb
module Mobility module Backend class Null include Base def read(locale, **options); end def write(locale, value, **options); end def self.configure!(options); end end end end
module Mobility module Backend class Null include Base def read(*); end def write(*); end def self.configure!(*); end end end end
Simplify method arguments in Null backend
Simplify method arguments in Null backend
Ruby
mit
shioyama/mobility,shioyama/mobility
ruby
## Code Before: module Mobility module Backend class Null include Base def read(locale, **options); end def write(locale, value, **options); end def self.configure!(options); end end end end ## Instruction: Simplify method arguments in Null backend ## Code After: module Mobility module Backend class Null include Base def read(*); end def write(*); end def self.configure!(*); end end end end
module Mobility module Backend class Null include Base - def read(locale, **options); end - def write(locale, value, **options); end + def read(*); end + def write(*); end - def self.configure!(options); end ? ^^^^^^^ + def self.configure!(*); end ? ^ end end end
6
0.545455
3
3
6027d6d4b99748bb12504842c5d19c865be9feb5
packages/pageflow/spec/support/jest-jst-transform.js
packages/pageflow/spec/support/jest-jst-transform.js
const jstPlugin = require('rollup-plugin-jst'); const jst = jstPlugin(); module.exports = { process(data, id) { return jst.transform(data, id).replace('export default', 'module.exports ='); } };
const jstPlugin = require('rollup-plugin-jst'); const jst = jstPlugin(); module.exports = { process(data, id) { return jst.transform(data, id).replace('export default', 'var I18n = require("i18n-js").default; module.exports ='); } };
Allow accessing I18n in jst files during test
Allow accessing I18n in jst files during test
JavaScript
mit
codevise/pageflow,tf/pageflow,codevise/pageflow,codevise/pageflow,tf/pageflow,codevise/pageflow,tf/pageflow,tf/pageflow
javascript
## Code Before: const jstPlugin = require('rollup-plugin-jst'); const jst = jstPlugin(); module.exports = { process(data, id) { return jst.transform(data, id).replace('export default', 'module.exports ='); } }; ## Instruction: Allow accessing I18n in jst files during test ## Code After: const jstPlugin = require('rollup-plugin-jst'); const jst = jstPlugin(); module.exports = { process(data, id) { return jst.transform(data, id).replace('export default', 'var I18n = require("i18n-js").default; module.exports ='); } };
const jstPlugin = require('rollup-plugin-jst'); const jst = jstPlugin(); module.exports = { process(data, id) { - return jst.transform(data, id).replace('export default', 'module.exports ='); + return jst.transform(data, id).replace('export default', 'var I18n = require("i18n-js").default; module.exports ='); ? +++++++++++++++++++++++++++++++++++++++ } };
2
0.25
1
1
d16ff93fb61941de458d41ba018381c78bfc71a4
src/web/routes/web.js
src/web/routes/web.js
'use strict'; const router = require('express').Router(); module.exports = router; router.get('/', (req, res) => { res.sendFile('index.html'); });
'use strict'; const router = require('express').Router(); const report = require('../../stalker/report.js'); module.exports = router; router.route('/') .get((req, res) => { res.sendFile('index.html'); }) .post((req, res) => { const action = req.body['action']; const user_id = req.body['user-id']; if (action === 'report') { report('music', user_id) .then(data => { res.json(data); }); } else { res.send(`Requested to ${action} on ${user_id}`); } });
Handle request for report on user, by sending JSON data generated by reportMusic().
Handle request for report on user, by sending JSON data generated by reportMusic().
JavaScript
mit
lesh1k/vkstalk-js,lesh1k/vkstalk-js
javascript
## Code Before: 'use strict'; const router = require('express').Router(); module.exports = router; router.get('/', (req, res) => { res.sendFile('index.html'); }); ## Instruction: Handle request for report on user, by sending JSON data generated by reportMusic(). ## Code After: 'use strict'; const router = require('express').Router(); const report = require('../../stalker/report.js'); module.exports = router; router.route('/') .get((req, res) => { res.sendFile('index.html'); }) .post((req, res) => { const action = req.body['action']; const user_id = req.body['user-id']; if (action === 'report') { report('music', user_id) .then(data => { res.json(data); }); } else { res.send(`Requested to ${action} on ${user_id}`); } });
'use strict'; const router = require('express').Router(); + const report = require('../../stalker/report.js'); + module.exports = router; - router.get('/', (req, res) => { + router.route('/') + .get((req, res) => { - res.sendFile('index.html'); + res.sendFile('index.html'); ? ++++ - }); + }) + .post((req, res) => { + const action = req.body['action']; + const user_id = req.body['user-id']; + + if (action === 'report') { + report('music', user_id) + .then(data => { + res.json(data); + }); + } else { + res.send(`Requested to ${action} on ${user_id}`); + } + });
22
2.2
19
3
032dea00078f6725ad653adc5f694b55b2b5dc50
webdriver-tests/wdio.conf.js
webdriver-tests/wdio.conf.js
exports.config = { user: process.env.BROWSERSTACK_USER, key: process.env.BROWSERSTACK_KEY, specs: [ './webdriver-tests/*Spec.js' ], capabilities: [ { browserName: 'chrome', 'browserstack.local': true } ], waitforTimeout: 100000, framework: 'jasmine', reporter: 'dot', jasmineNodeOpts: { defaultTimeoutInterval: 300000 } };
exports.config = { user: process.env.BROWSERSTACK_USER, key: process.env.BROWSERSTACK_KEY, specs: [ './webdriver-tests/*Spec.js' ], capabilities: [ { platform: 'WIN8', browserName: 'chrome', 'browserstack.local': true } ], waitforTimeout: 100000, framework: 'jasmine', reporter: 'dot', jasmineNodeOpts: { defaultTimeoutInterval: 300000 } };
Fix intermittent build errors caused by Windows XP
Fix intermittent build errors caused by Windows XP XP doesn't support the new TLS protocol used on https://d3fc.io
JavaScript
mit
alisd23/d3fc-d3v4,alisd23/d3fc-d3v4,djmiley/d3fc,djmiley/d3fc,alisd23/d3fc-d3v4,djmiley/d3fc
javascript
## Code Before: exports.config = { user: process.env.BROWSERSTACK_USER, key: process.env.BROWSERSTACK_KEY, specs: [ './webdriver-tests/*Spec.js' ], capabilities: [ { browserName: 'chrome', 'browserstack.local': true } ], waitforTimeout: 100000, framework: 'jasmine', reporter: 'dot', jasmineNodeOpts: { defaultTimeoutInterval: 300000 } }; ## Instruction: Fix intermittent build errors caused by Windows XP XP doesn't support the new TLS protocol used on https://d3fc.io ## Code After: exports.config = { user: process.env.BROWSERSTACK_USER, key: process.env.BROWSERSTACK_KEY, specs: [ './webdriver-tests/*Spec.js' ], capabilities: [ { platform: 'WIN8', browserName: 'chrome', 'browserstack.local': true } ], waitforTimeout: 100000, framework: 'jasmine', reporter: 'dot', jasmineNodeOpts: { defaultTimeoutInterval: 300000 } };
exports.config = { user: process.env.BROWSERSTACK_USER, key: process.env.BROWSERSTACK_KEY, specs: [ './webdriver-tests/*Spec.js' ], capabilities: [ { + platform: 'WIN8', browserName: 'chrome', 'browserstack.local': true } ], waitforTimeout: 100000, framework: 'jasmine', reporter: 'dot', jasmineNodeOpts: { defaultTimeoutInterval: 300000 } };
1
0.052632
1
0
c90eca05640a456c374a5c7f087be2efe18ea514
src/main/java/me/rkfg/xmpp/bot/Main.java
src/main/java/me/rkfg/xmpp/bot/Main.java
package me.rkfg.xmpp.bot; import me.rkfg.xmpp.bot.irc.IRCBot; import ru.ppsrk.gwt.client.LogicException; public class Main { public static final IBot INSTANCE = new IRCBot(); public static void main(String[] args) throws LogicException { INSTANCE.run(); } }
package me.rkfg.xmpp.bot; import java.io.IOException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import me.rkfg.xmpp.bot.irc.IRCBot; import me.rkfg.xmpp.bot.matrix.MatrixBot; import me.rkfg.xmpp.bot.xmpp.XMPPBot; import ru.ppsrk.gwt.client.LogicException; import ru.ppsrk.gwt.server.SettingsManager; public class Main { public static final IBot INSTANCE; private static Logger log = LoggerFactory.getLogger(Main.class); static { SettingsManager sm = SettingsManager.getInstance(); sm.setFilename("settings.ini"); try { sm.loadSettings(); } catch (IOException e) { log.warn("{}", e); } String type = sm.getStringSetting("type"); if (type == null) { INSTANCE = null; } else { switch (type) { case "xmpp": INSTANCE = new XMPPBot(); break; case "matrix": INSTANCE = new MatrixBot(); break; case "irc": INSTANCE = new IRCBot(); break; default: INSTANCE = null; break; } } } public static void main(String[] args) throws LogicException { if (INSTANCE == null) { log.error("Set 'type' parameter in settings.ini to the bot type (xmpp, matrix or irc)."); return; } INSTANCE.run(); } }
Select bot type via config
Select bot type via config
Java
agpl-3.0
rkfg/jbot,rkfg/jbot
java
## Code Before: package me.rkfg.xmpp.bot; import me.rkfg.xmpp.bot.irc.IRCBot; import ru.ppsrk.gwt.client.LogicException; public class Main { public static final IBot INSTANCE = new IRCBot(); public static void main(String[] args) throws LogicException { INSTANCE.run(); } } ## Instruction: Select bot type via config ## Code After: package me.rkfg.xmpp.bot; import java.io.IOException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import me.rkfg.xmpp.bot.irc.IRCBot; import me.rkfg.xmpp.bot.matrix.MatrixBot; import me.rkfg.xmpp.bot.xmpp.XMPPBot; import ru.ppsrk.gwt.client.LogicException; import ru.ppsrk.gwt.server.SettingsManager; public class Main { public static final IBot INSTANCE; private static Logger log = LoggerFactory.getLogger(Main.class); static { SettingsManager sm = SettingsManager.getInstance(); sm.setFilename("settings.ini"); try { sm.loadSettings(); } catch (IOException e) { log.warn("{}", e); } String type = sm.getStringSetting("type"); if (type == null) { INSTANCE = null; } else { switch (type) { case "xmpp": INSTANCE = new XMPPBot(); break; case "matrix": INSTANCE = new MatrixBot(); break; case "irc": INSTANCE = new IRCBot(); break; default: INSTANCE = null; break; } } } public static void main(String[] args) throws LogicException { if (INSTANCE == null) { log.error("Set 'type' parameter in settings.ini to the bot type (xmpp, matrix or irc)."); return; } INSTANCE.run(); } }
package me.rkfg.xmpp.bot; + import java.io.IOException; + + import org.slf4j.Logger; + import org.slf4j.LoggerFactory; + import me.rkfg.xmpp.bot.irc.IRCBot; + import me.rkfg.xmpp.bot.matrix.MatrixBot; + import me.rkfg.xmpp.bot.xmpp.XMPPBot; import ru.ppsrk.gwt.client.LogicException; + import ru.ppsrk.gwt.server.SettingsManager; public class Main { - public static final IBot INSTANCE = new IRCBot(); ? --------------- + public static final IBot INSTANCE; + private static Logger log = LoggerFactory.getLogger(Main.class); + + static { + SettingsManager sm = SettingsManager.getInstance(); + sm.setFilename("settings.ini"); + try { + sm.loadSettings(); + } catch (IOException e) { + log.warn("{}", e); + } + String type = sm.getStringSetting("type"); + if (type == null) { + INSTANCE = null; + } else { + switch (type) { + case "xmpp": + INSTANCE = new XMPPBot(); + break; + case "matrix": + INSTANCE = new MatrixBot(); + break; + case "irc": + INSTANCE = new IRCBot(); + break; + default: + INSTANCE = null; + break; + } + } + } public static void main(String[] args) throws LogicException { + if (INSTANCE == null) { + log.error("Set 'type' parameter in settings.ini to the bot type (xmpp, matrix or irc)."); + return; + } INSTANCE.run(); } }
44
3.142857
43
1
745a11305c1551f890fa5b120597268a50e11980
Repository/LanguageRepository.php
Repository/LanguageRepository.php
<?php namespace Purethink\CMSBundle\Repository; use Doctrine\ORM\EntityRepository; class LanguageRepository extends EntityRepository { public function getPublicLanguages() { $qb = $this->createQueryBuilder('a') ->addSelect('m') ->leftJoin('a.media', 'm') ->where('a.enabled = true') ->orderBy('a.position'); return $qb->getQuery()->getResult(); } }
<?php namespace Purethink\CMSBundle\Repository; use Doctrine\ORM\EntityRepository; class LanguageRepository extends EntityRepository { public function getLastPosition() { return (int)$this->createQueryBuilder('a') ->select('MAX(a.position)') ->getQuery() ->getSingleScalarResult(); } public function getPublicLanguages() { $qb = $this->createQueryBuilder('a') ->addSelect('m') ->leftJoin('a.media', 'm') ->where('a.enabled = true') ->orderBy('a.position'); return $qb->getQuery()->getResult(); } }
Fix query for get max position
Fix query for get max position
PHP
mit
mkurc1/PurethinkCMSBundle,mkurc1/PurethinkCMSBundle
php
## Code Before: <?php namespace Purethink\CMSBundle\Repository; use Doctrine\ORM\EntityRepository; class LanguageRepository extends EntityRepository { public function getPublicLanguages() { $qb = $this->createQueryBuilder('a') ->addSelect('m') ->leftJoin('a.media', 'm') ->where('a.enabled = true') ->orderBy('a.position'); return $qb->getQuery()->getResult(); } } ## Instruction: Fix query for get max position ## Code After: <?php namespace Purethink\CMSBundle\Repository; use Doctrine\ORM\EntityRepository; class LanguageRepository extends EntityRepository { public function getLastPosition() { return (int)$this->createQueryBuilder('a') ->select('MAX(a.position)') ->getQuery() ->getSingleScalarResult(); } public function getPublicLanguages() { $qb = $this->createQueryBuilder('a') ->addSelect('m') ->leftJoin('a.media', 'm') ->where('a.enabled = true') ->orderBy('a.position'); return $qb->getQuery()->getResult(); } }
<?php namespace Purethink\CMSBundle\Repository; use Doctrine\ORM\EntityRepository; class LanguageRepository extends EntityRepository { + public function getLastPosition() + { + return (int)$this->createQueryBuilder('a') + ->select('MAX(a.position)') + ->getQuery() + ->getSingleScalarResult(); + } + public function getPublicLanguages() { $qb = $this->createQueryBuilder('a') ->addSelect('m') ->leftJoin('a.media', 'm') ->where('a.enabled = true') ->orderBy('a.position'); return $qb->getQuery()->getResult(); } }
8
0.421053
8
0
ac222e0bd3186b590bcc0a82553ee7c33d18b3ec
vision/api/VisionTest/runTests.ps1
vision/api/VisionTest/runTests.ps1
dotnet restore dotnet test --test-adapter-path:. --logger:junit
Import-Module ..\..\..\BuildTools.psm1 Set-TestTimeout 600 dotnet restore dotnet test --test-adapter-path:. --logger:junit
Extend Vision Test timeout, because it has been timing out lately.
Extend Vision Test timeout, because it has been timing out lately. Change-Id: I449f7eb9420d52a6c68e5730eb63df3bfbb44e67
PowerShell
apache-2.0
GoogleCloudPlatform/dotnet-docs-samples,GoogleCloudPlatform/dotnet-docs-samples,GoogleCloudPlatform/dotnet-docs-samples,GoogleCloudPlatform/dotnet-docs-samples
powershell
## Code Before: dotnet restore dotnet test --test-adapter-path:. --logger:junit ## Instruction: Extend Vision Test timeout, because it has been timing out lately. Change-Id: I449f7eb9420d52a6c68e5730eb63df3bfbb44e67 ## Code After: Import-Module ..\..\..\BuildTools.psm1 Set-TestTimeout 600 dotnet restore dotnet test --test-adapter-path:. --logger:junit
+ Import-Module ..\..\..\BuildTools.psm1 + + Set-TestTimeout 600 dotnet restore dotnet test --test-adapter-path:. --logger:junit
3
1
3
0
132fff52902711b697aab0d9f5c350162f708630
spec/spec_helper.rb
spec/spec_helper.rb
require 'backports' require 'backports/basic_object' unless defined?(BasicObject) require 'rubygems' if ENV['COVERAGE'] require 'simplecov' SimpleCov.start do add_filter "/spec/" add_group "Finalizer", "lib/data_mapper/finalizer" add_group "Mapper", "lib/data_mapper/mapper" add_group "Relation", "lib/data_mapper/relation" add_group "Relationship", "lib/data_mapper/relationship" add_group "Engine", "lib/data_mapper/engine" end end if RUBY_VERSION < '1.9' class OpenStruct def id @table.fetch(:id) { super } end end end require 'pp' require 'ostruct' require 'virtus' require 'rspec' require 'dm-mapper' require 'data_mapper/support/veritas/adapter/in_memory' require 'shared_helper' include DataMapper RSpec.configure do |config| config.filter_run :focus => true config.run_all_when_everything_filtered = true config.after(:each) do if example.metadata[:example_group][:file_path] =~ /unit|shared/ DM_ENV.reset end end config.include(SpecHelper) end DM_ENV = TestEnv.coerce(:test => 'in_memory://test')
require 'backports' require 'backports/basic_object' unless defined?(BasicObject) require 'rubygems' if ENV['COVERAGE'] require 'simplecov' SimpleCov.start do add_filter "/spec/" add_group "Finalizer", "lib/data_mapper/finalizer" add_group "Mapper", "lib/data_mapper/mapper" add_group "Relation", "lib/data_mapper/relation" add_group "Relationship", "lib/data_mapper/relationship" add_group "Engine", "lib/data_mapper/engine" end end require 'pp' require 'ostruct' require 'virtus' require 'rspec' require 'dm-mapper' require 'data_mapper/support/veritas/adapter/in_memory' require 'shared_helper' include DataMapper RSpec.configure do |config| config.filter_run :focus => true config.run_all_when_everything_filtered = true config.after(:each) do if example.metadata[:example_group][:file_path] =~ /unit|shared/ DM_ENV.reset end end config.include(SpecHelper) end DM_ENV = TestEnv.coerce(:test => 'in_memory://test')
Remove duplicate OpenStruct monkey patch for specs
Remove duplicate OpenStruct monkey patch for specs
Ruby
mit
rom-rb/rom,cored/rom,rom-rb/rom,pvcarrera/rom,dcarral/rom,pdswan/rom,vrish88/rom,Snuff/rom,pxlpnk/rom,denyago/rom,dekz/rom,kwando/rom,rom-rb/rom,endash/rom,jeremyf/rom
ruby
## Code Before: require 'backports' require 'backports/basic_object' unless defined?(BasicObject) require 'rubygems' if ENV['COVERAGE'] require 'simplecov' SimpleCov.start do add_filter "/spec/" add_group "Finalizer", "lib/data_mapper/finalizer" add_group "Mapper", "lib/data_mapper/mapper" add_group "Relation", "lib/data_mapper/relation" add_group "Relationship", "lib/data_mapper/relationship" add_group "Engine", "lib/data_mapper/engine" end end if RUBY_VERSION < '1.9' class OpenStruct def id @table.fetch(:id) { super } end end end require 'pp' require 'ostruct' require 'virtus' require 'rspec' require 'dm-mapper' require 'data_mapper/support/veritas/adapter/in_memory' require 'shared_helper' include DataMapper RSpec.configure do |config| config.filter_run :focus => true config.run_all_when_everything_filtered = true config.after(:each) do if example.metadata[:example_group][:file_path] =~ /unit|shared/ DM_ENV.reset end end config.include(SpecHelper) end DM_ENV = TestEnv.coerce(:test => 'in_memory://test') ## Instruction: Remove duplicate OpenStruct monkey patch for specs ## Code After: require 'backports' require 'backports/basic_object' unless defined?(BasicObject) require 'rubygems' if ENV['COVERAGE'] require 'simplecov' SimpleCov.start do add_filter "/spec/" add_group "Finalizer", "lib/data_mapper/finalizer" add_group "Mapper", "lib/data_mapper/mapper" add_group "Relation", "lib/data_mapper/relation" add_group "Relationship", "lib/data_mapper/relationship" add_group "Engine", "lib/data_mapper/engine" end end require 'pp' require 'ostruct' require 'virtus' require 'rspec' require 'dm-mapper' require 'data_mapper/support/veritas/adapter/in_memory' require 'shared_helper' include DataMapper RSpec.configure do |config| config.filter_run :focus => true config.run_all_when_everything_filtered = true config.after(:each) do if example.metadata[:example_group][:file_path] =~ /unit|shared/ DM_ENV.reset end end config.include(SpecHelper) end DM_ENV = TestEnv.coerce(:test => 'in_memory://test')
require 'backports' require 'backports/basic_object' unless defined?(BasicObject) require 'rubygems' if ENV['COVERAGE'] require 'simplecov' SimpleCov.start do add_filter "/spec/" add_group "Finalizer", "lib/data_mapper/finalizer" add_group "Mapper", "lib/data_mapper/mapper" add_group "Relation", "lib/data_mapper/relation" add_group "Relationship", "lib/data_mapper/relationship" add_group "Engine", "lib/data_mapper/engine" - end - end - - if RUBY_VERSION < '1.9' - class OpenStruct - def id - @table.fetch(:id) { super } - end end end require 'pp' require 'ostruct' require 'virtus' require 'rspec' require 'dm-mapper' require 'data_mapper/support/veritas/adapter/in_memory' require 'shared_helper' include DataMapper RSpec.configure do |config| config.filter_run :focus => true config.run_all_when_everything_filtered = true config.after(:each) do if example.metadata[:example_group][:file_path] =~ /unit|shared/ DM_ENV.reset end end config.include(SpecHelper) end DM_ENV = TestEnv.coerce(:test => 'in_memory://test')
8
0.156863
0
8
1dfa820ef76842e138268b616b8b333c747395a6
.travis.yml
.travis.yml
sudo: false language: python python: - "3.5" - "3.5-dev" - "nightly" env: - TEST_TYPE= - TEST_TYPE='-t property' - TEST_TYPE='-t unit' before_install: - cp instance/configuration_example.py instance/configuration.py install: - pip install -r requirements.txt - pip install codecov script: - python orchard.py test $TEST_TYPE - python orchard.py lint after_success: - codecov
sudo: false language: python python: - "3.5" - "3.5-dev" - "nightly" env: - TEST_TYPE= - TEST_TYPE='-t property' - TEST_TYPE='-t unit' before_install: - cp instance/configuration_example.py instance/configuration.py install: - pip install -r requirements.txt - pip install codecov script: - python manage.py test $TEST_TYPE - python manage.py lint after_success: - codecov
Fix Travis CI configuration file to account for new manager script name.
Fix Travis CI configuration file to account for new manager script name.
YAML
mit
BMeu/Orchard,BMeu/Orchard
yaml
## Code Before: sudo: false language: python python: - "3.5" - "3.5-dev" - "nightly" env: - TEST_TYPE= - TEST_TYPE='-t property' - TEST_TYPE='-t unit' before_install: - cp instance/configuration_example.py instance/configuration.py install: - pip install -r requirements.txt - pip install codecov script: - python orchard.py test $TEST_TYPE - python orchard.py lint after_success: - codecov ## Instruction: Fix Travis CI configuration file to account for new manager script name. ## Code After: sudo: false language: python python: - "3.5" - "3.5-dev" - "nightly" env: - TEST_TYPE= - TEST_TYPE='-t property' - TEST_TYPE='-t unit' before_install: - cp instance/configuration_example.py instance/configuration.py install: - pip install -r requirements.txt - pip install codecov script: - python manage.py test $TEST_TYPE - python manage.py lint after_success: - codecov
sudo: false language: python python: - "3.5" - "3.5-dev" - "nightly" env: - TEST_TYPE= - TEST_TYPE='-t property' - TEST_TYPE='-t unit' before_install: - cp instance/configuration_example.py instance/configuration.py install: - pip install -r requirements.txt - pip install codecov script: - - python orchard.py test $TEST_TYPE ? ^^^^ ^^ + - python manage.py test $TEST_TYPE ? ^ ^^^^ - - python orchard.py lint ? ^^^^ ^^ + - python manage.py lint ? ^ ^^^^ after_success: - codecov
4
0.148148
2
2
d60ba258a5831482f926d216c4852fa9b2f0aa7f
lib/circuitdata.rb
lib/circuitdata.rb
module Circuitdata # SHOULD ONLY HOUSE COMMON FUNCTIONS ONLY require "active_support/all" require "json-schema" require_relative "./circuitdata/version" require_relative "./circuitdata/dereferencer" require_relative "./circuitdata/profile" require_relative "./circuitdata/schema" require_relative "./circuitdata/product" require_relative "./circuitdata/validator" SCHEMA_BASE_PATH = File.join(__dir__, "circuitdata/schema_files/v1") SCHEMA_FULL_PATH = File.join(SCHEMA_BASE_PATH, "ottp_circuitdata_schema.json") DEFINITIONS_FULL_PATH = File.join( SCHEMA_BASE_PATH, "ottp_circuitdata_schema_definitions.json" ) def self.dereferenced_schema(schema_file_path: SCHEMA_FULL_PATH) schema_cache[schema_file_path] ||= Dereferencer.dereference( schema(schema_file_path: schema_file_path), File.dirname(schema_file_path) ) end private def self.schema(schema_file_path: SCHEMA_FULL_PATH) JSON.parse( File.read(schema_file_path), symbolize_names: true, ) end def self.schema_cache @schema_cache ||= {} end end
module Circuitdata # SHOULD ONLY HOUSE COMMON FUNCTIONS ONLY require "active_support/all" require "json-schema" require_relative "./circuitdata/version" require_relative "./circuitdata/dereferencer" require_relative "./circuitdata/profile" require_relative "./circuitdata/schema" require_relative "./circuitdata/product" require_relative "./circuitdata/validator" SCHEMA_BASE_PATH = File.join(__dir__, "circuitdata/schema_files/v1") SCHEMA_FULL_PATH = File.join(SCHEMA_BASE_PATH, "..", "schema_v1_dereferenced.json") DEFINITIONS_FULL_PATH = File.join( SCHEMA_BASE_PATH, "ottp_circuitdata_schema_definitions.json" ) def self.dereferenced_schema(schema_file_path: SCHEMA_FULL_PATH) schema_cache[schema_file_path] ||= Dereferencer.dereference( schema(schema_file_path: schema_file_path), File.dirname(schema_file_path) ) end private def self.schema(schema_file_path: SCHEMA_FULL_PATH) JSON.parse( File.read(schema_file_path), symbolize_names: true, ) end def self.schema_cache @schema_cache ||= {} end end
Use dereferenced schema by default
Use dereferenced schema by default Why: So that building the schema does not take as long and works offline.
Ruby
mit
elmatica/circuit-data-gem
ruby
## Code Before: module Circuitdata # SHOULD ONLY HOUSE COMMON FUNCTIONS ONLY require "active_support/all" require "json-schema" require_relative "./circuitdata/version" require_relative "./circuitdata/dereferencer" require_relative "./circuitdata/profile" require_relative "./circuitdata/schema" require_relative "./circuitdata/product" require_relative "./circuitdata/validator" SCHEMA_BASE_PATH = File.join(__dir__, "circuitdata/schema_files/v1") SCHEMA_FULL_PATH = File.join(SCHEMA_BASE_PATH, "ottp_circuitdata_schema.json") DEFINITIONS_FULL_PATH = File.join( SCHEMA_BASE_PATH, "ottp_circuitdata_schema_definitions.json" ) def self.dereferenced_schema(schema_file_path: SCHEMA_FULL_PATH) schema_cache[schema_file_path] ||= Dereferencer.dereference( schema(schema_file_path: schema_file_path), File.dirname(schema_file_path) ) end private def self.schema(schema_file_path: SCHEMA_FULL_PATH) JSON.parse( File.read(schema_file_path), symbolize_names: true, ) end def self.schema_cache @schema_cache ||= {} end end ## Instruction: Use dereferenced schema by default Why: So that building the schema does not take as long and works offline. ## Code After: module Circuitdata # SHOULD ONLY HOUSE COMMON FUNCTIONS ONLY require "active_support/all" require "json-schema" require_relative "./circuitdata/version" require_relative "./circuitdata/dereferencer" require_relative "./circuitdata/profile" require_relative "./circuitdata/schema" require_relative "./circuitdata/product" require_relative "./circuitdata/validator" SCHEMA_BASE_PATH = File.join(__dir__, "circuitdata/schema_files/v1") SCHEMA_FULL_PATH = File.join(SCHEMA_BASE_PATH, "..", "schema_v1_dereferenced.json") DEFINITIONS_FULL_PATH = File.join( SCHEMA_BASE_PATH, "ottp_circuitdata_schema_definitions.json" ) def self.dereferenced_schema(schema_file_path: SCHEMA_FULL_PATH) schema_cache[schema_file_path] ||= Dereferencer.dereference( schema(schema_file_path: schema_file_path), File.dirname(schema_file_path) ) end private def self.schema(schema_file_path: SCHEMA_FULL_PATH) JSON.parse( File.read(schema_file_path), symbolize_names: true, ) end def self.schema_cache @schema_cache ||= {} end end
module Circuitdata # SHOULD ONLY HOUSE COMMON FUNCTIONS ONLY require "active_support/all" require "json-schema" require_relative "./circuitdata/version" require_relative "./circuitdata/dereferencer" require_relative "./circuitdata/profile" require_relative "./circuitdata/schema" require_relative "./circuitdata/product" require_relative "./circuitdata/validator" SCHEMA_BASE_PATH = File.join(__dir__, "circuitdata/schema_files/v1") - SCHEMA_FULL_PATH = File.join(SCHEMA_BASE_PATH, "ottp_circuitdata_schema.json") ? ^^^^^^^^^^^^^^^^^ + SCHEMA_FULL_PATH = File.join(SCHEMA_BASE_PATH, "..", "schema_v1_dereferenced.json") ? ^^^^^^ ++++++++++++++++ DEFINITIONS_FULL_PATH = File.join( SCHEMA_BASE_PATH, "ottp_circuitdata_schema_definitions.json" ) def self.dereferenced_schema(schema_file_path: SCHEMA_FULL_PATH) schema_cache[schema_file_path] ||= Dereferencer.dereference( schema(schema_file_path: schema_file_path), File.dirname(schema_file_path) ) end private def self.schema(schema_file_path: SCHEMA_FULL_PATH) JSON.parse( File.read(schema_file_path), symbolize_names: true, ) end def self.schema_cache @schema_cache ||= {} end end
2
0.054054
1
1
e8d4dfcd20b32ba63473b1acb00ceb72529c00e4
README.md
README.md
This is the private development repository for galaxy tools developed in the Drosophila Genetics and Epigenetics Laboratory. This repository is automatically tested by jenkins (https://lbcd41.snv.jussieu.fr/jenkins) See http://drosophile.org/ for our homepage. Contact gedserver@gmail.com if you have questions. CI | Test | Status ------- |-------------------------------- | ------- Jenkins | Planemo lint tests (error only) | [![Lint Status](https://lbcd41.snv.jussieu.fr/jenkins/buildStatus/icon?job=galaxy_tool_lint)](https://lbcd41.snv.jussieu.fr/jenkins/job/galaxy_tool_lint/) Jenkins | Planemo lint tests (strict) | [![Lint Status](https://lbcd41.snv.jussieu.fr/jenkins/buildStatus/icon?job=galaxy_tool_lint_strict)](https://lbcd41.snv.jussieu.fr/jenkins/job/galaxy_tool_lint_strict/)
This is the private development repository for galaxy tools developed in the Drosophila Genetics and Epigenetics Laboratory. This repository is automatically tested by jenkins (https://lbcd41.snv.jussieu.fr/jenkins) See http://drosophile.org/ for our homepage. Contact gedserver@gmail.com if you have questions. CI | Test | Status ------- |-------------------------------- | ------- Jenkins | Planemo lint tests (error only) | [![Lint Status](https://lbcd41.snv.jussieu.fr/jenkins/buildStatus/icon?job=galaxy_tool_lint)](https://lbcd41.snv.jussieu.fr/jenkins/job/galaxy_tool_lint/) Jenkins | Planemo lint tests (strict) | [![Lint Status](https://lbcd41.snv.jussieu.fr/jenkins/buildStatus/icon?job=galaxy_tool_lint_strict)](https://lbcd41.snv.jussieu.fr/jenkins/job/galaxy_tool_lint_strict/) Jenkins | Planemo shed_test (testtoolshed) | [![Lint Status](https://lbcd41.snv.jussieu.fr/jenkins/buildStatus/icon?job=galaxy_shedtest)](https://lbcd41.snv.jussieu.fr/jenkins/job/galaxy_shedtest/)
Add indicator for shed_test results.
Add indicator for shed_test results.
Markdown
mit
JuPeg/tools-artbio,chamaelj/tools-artbio,mvdbeek/tools-artbio,drosofff/tools-artbio,ARTbio/tools-artbio,ARTbio/tools-artbio,drosofff/tools-artbio,chamaelj/tools-artbio,ARTbio/tools-artbio,chamaelj/tools-artbio,drosofff/tools-artbio,drosofff/tools-artbio,ARTbio/tools-artbio,JuPeg/tools-artbio,mvdbeek/tools-artbio
markdown
## Code Before: This is the private development repository for galaxy tools developed in the Drosophila Genetics and Epigenetics Laboratory. This repository is automatically tested by jenkins (https://lbcd41.snv.jussieu.fr/jenkins) See http://drosophile.org/ for our homepage. Contact gedserver@gmail.com if you have questions. CI | Test | Status ------- |-------------------------------- | ------- Jenkins | Planemo lint tests (error only) | [![Lint Status](https://lbcd41.snv.jussieu.fr/jenkins/buildStatus/icon?job=galaxy_tool_lint)](https://lbcd41.snv.jussieu.fr/jenkins/job/galaxy_tool_lint/) Jenkins | Planemo lint tests (strict) | [![Lint Status](https://lbcd41.snv.jussieu.fr/jenkins/buildStatus/icon?job=galaxy_tool_lint_strict)](https://lbcd41.snv.jussieu.fr/jenkins/job/galaxy_tool_lint_strict/) ## Instruction: Add indicator for shed_test results. ## Code After: This is the private development repository for galaxy tools developed in the Drosophila Genetics and Epigenetics Laboratory. This repository is automatically tested by jenkins (https://lbcd41.snv.jussieu.fr/jenkins) See http://drosophile.org/ for our homepage. Contact gedserver@gmail.com if you have questions. CI | Test | Status ------- |-------------------------------- | ------- Jenkins | Planemo lint tests (error only) | [![Lint Status](https://lbcd41.snv.jussieu.fr/jenkins/buildStatus/icon?job=galaxy_tool_lint)](https://lbcd41.snv.jussieu.fr/jenkins/job/galaxy_tool_lint/) Jenkins | Planemo lint tests (strict) | [![Lint Status](https://lbcd41.snv.jussieu.fr/jenkins/buildStatus/icon?job=galaxy_tool_lint_strict)](https://lbcd41.snv.jussieu.fr/jenkins/job/galaxy_tool_lint_strict/) Jenkins | Planemo shed_test (testtoolshed) | [![Lint Status](https://lbcd41.snv.jussieu.fr/jenkins/buildStatus/icon?job=galaxy_shedtest)](https://lbcd41.snv.jussieu.fr/jenkins/job/galaxy_shedtest/)
This is the private development repository for galaxy tools developed in the Drosophila Genetics and Epigenetics Laboratory. This repository is automatically tested by jenkins (https://lbcd41.snv.jussieu.fr/jenkins) See http://drosophile.org/ for our homepage. Contact gedserver@gmail.com if you have questions. CI | Test | Status ------- |-------------------------------- | ------- Jenkins | Planemo lint tests (error only) | [![Lint Status](https://lbcd41.snv.jussieu.fr/jenkins/buildStatus/icon?job=galaxy_tool_lint)](https://lbcd41.snv.jussieu.fr/jenkins/job/galaxy_tool_lint/) Jenkins | Planemo lint tests (strict) | [![Lint Status](https://lbcd41.snv.jussieu.fr/jenkins/buildStatus/icon?job=galaxy_tool_lint_strict)](https://lbcd41.snv.jussieu.fr/jenkins/job/galaxy_tool_lint_strict/) + Jenkins | Planemo shed_test (testtoolshed) | [![Lint Status](https://lbcd41.snv.jussieu.fr/jenkins/buildStatus/icon?job=galaxy_shedtest)](https://lbcd41.snv.jussieu.fr/jenkins/job/galaxy_shedtest/)
1
0.111111
1
0
683e7a9fae42f1e83ee89f6ec2beefabc204cf9a
_config.yml
_config.yml
title: David P. Larson #Comment out url when working locally to resolve base urls correctly #url: http://ieng6.ucsd.edu/~dplarson # Owner/author information owner: name: David P. Larson avatar: David_Larson.jpg email: dplarson@ucsd.edu github: "dplarson" linkedin: "http://www.linkedin.com/pub/david-larson/65/334/934" # Analytics and webmaster tools stuff goes here google_analytics: UA-36350691-1 timezone: America/Los_Angeles future: true pygments: true markdown: kramdown # https://github.com/mojombo/jekyll/wiki/Permalinks permalink: /:categories/:title kramdown: auto_ids: true footnote_nr: 1 entity_output: as_char toc_levels: 1..6 use_coderay: false coderay: coderay_line_numbers: coderay_line_numbers_start: 1 coderay_tab_width: 4 coderay_bold_every: 10 coderay_css: class include: [".htaccess"] exclude: ["lib", "config.rb", "Capfile", "config", "log", "Rakefile", "Rakefile.rb", "tmp", "less", "minimal-mistakes.sublime-project", "minimal-mistakes.sublime-workspace"]
title: David P. Larson #Comment out url when working locally to resolve base urls correctly url: http://ieng6.ucsd.edu/~dplarson # Owner/author information owner: name: David P. Larson avatar: David_Larson.jpg email: dplarson@ucsd.edu github: "dplarson" linkedin: "http://www.linkedin.com/pub/david-larson/65/334/934" # Analytics and webmaster tools stuff goes here google_analytics: UA-36350691-1 timezone: America/Los_Angeles future: true pygments: true markdown: kramdown # https://github.com/mojombo/jekyll/wiki/Permalinks permalink: /:categories/:title kramdown: auto_ids: true footnote_nr: 1 entity_output: as_char toc_levels: 1..6 use_coderay: false coderay: coderay_line_numbers: coderay_line_numbers_start: 1 coderay_tab_width: 4 coderay_bold_every: 10 coderay_css: class include: [".htaccess"] exclude: ["lib", "config.rb", "Capfile", "config", "log", "Rakefile", "Rakefile.rb", "tmp", "less", "Gemfile", "Gemfile.lock", "LICENSE"]
Update config for deploy to ieng6.ucsd.edu
Update config for deploy to ieng6.ucsd.edu
YAML
mit
dplarson/dplarson.github.io,dplarson/dplarson.github.io
yaml
## Code Before: title: David P. Larson #Comment out url when working locally to resolve base urls correctly #url: http://ieng6.ucsd.edu/~dplarson # Owner/author information owner: name: David P. Larson avatar: David_Larson.jpg email: dplarson@ucsd.edu github: "dplarson" linkedin: "http://www.linkedin.com/pub/david-larson/65/334/934" # Analytics and webmaster tools stuff goes here google_analytics: UA-36350691-1 timezone: America/Los_Angeles future: true pygments: true markdown: kramdown # https://github.com/mojombo/jekyll/wiki/Permalinks permalink: /:categories/:title kramdown: auto_ids: true footnote_nr: 1 entity_output: as_char toc_levels: 1..6 use_coderay: false coderay: coderay_line_numbers: coderay_line_numbers_start: 1 coderay_tab_width: 4 coderay_bold_every: 10 coderay_css: class include: [".htaccess"] exclude: ["lib", "config.rb", "Capfile", "config", "log", "Rakefile", "Rakefile.rb", "tmp", "less", "minimal-mistakes.sublime-project", "minimal-mistakes.sublime-workspace"] ## Instruction: Update config for deploy to ieng6.ucsd.edu ## Code After: title: David P. Larson #Comment out url when working locally to resolve base urls correctly url: http://ieng6.ucsd.edu/~dplarson # Owner/author information owner: name: David P. Larson avatar: David_Larson.jpg email: dplarson@ucsd.edu github: "dplarson" linkedin: "http://www.linkedin.com/pub/david-larson/65/334/934" # Analytics and webmaster tools stuff goes here google_analytics: UA-36350691-1 timezone: America/Los_Angeles future: true pygments: true markdown: kramdown # https://github.com/mojombo/jekyll/wiki/Permalinks permalink: /:categories/:title kramdown: auto_ids: true footnote_nr: 1 entity_output: as_char toc_levels: 1..6 use_coderay: false coderay: coderay_line_numbers: coderay_line_numbers_start: 1 coderay_tab_width: 4 coderay_bold_every: 10 coderay_css: class include: [".htaccess"] exclude: ["lib", "config.rb", "Capfile", "config", "log", "Rakefile", "Rakefile.rb", "tmp", "less", "Gemfile", "Gemfile.lock", "LICENSE"]
title: David P. Larson #Comment out url when working locally to resolve base urls correctly - #url: http://ieng6.ucsd.edu/~dplarson ? - + url: http://ieng6.ucsd.edu/~dplarson # Owner/author information owner: name: David P. Larson avatar: David_Larson.jpg email: dplarson@ucsd.edu github: "dplarson" linkedin: "http://www.linkedin.com/pub/david-larson/65/334/934" # Analytics and webmaster tools stuff goes here google_analytics: UA-36350691-1 timezone: America/Los_Angeles future: true pygments: true markdown: kramdown # https://github.com/mojombo/jekyll/wiki/Permalinks permalink: /:categories/:title kramdown: auto_ids: true footnote_nr: 1 entity_output: as_char toc_levels: 1..6 use_coderay: false coderay: coderay_line_numbers: coderay_line_numbers_start: 1 coderay_tab_width: 4 coderay_bold_every: 10 coderay_css: class include: [".htaccess"] - exclude: ["lib", "config.rb", "Capfile", "config", "log", "Rakefile", "Rakefile.rb", "tmp", "less", "minimal-mistakes.sublime-project", "minimal-mistakes.sublime-workspace"] + exclude: ["lib", "config.rb", "Capfile", "config", "log", "Rakefile", "Rakefile.rb", "tmp", "less", "Gemfile", "Gemfile.lock", "LICENSE"]
4
0.102564
2
2
3653dcab3a9749420b6a6474f35f1c7f791ec930
src/Cornford/Bootstrapper/BootstrapServiceProvider.php
src/Cornford/Bootstrapper/BootstrapServiceProvider.php
<?php namespace Cornford\Bootstrapper; use Illuminate\Support\ServiceProvider; class BootstrapServiceProvider extends ServiceProvider { /** * Indicates if loading of the provider is deferred. * * @var bool */ protected $defer = true; /** * Bootstrap the application events. * * @return void */ public function boot() { $assetPath = __DIR__.'/../../../public'; $this->publishes([$assetPath => public_path('packages/cornford/bootstrapper')], 'bootstrapper'); } /** * Register the service provider. * * @return void */ public function register() { $this->app->singleton('bootstrap', function($app) { return new Bootstrap( $this->app->make('Illuminate\Html\FormBuilder', ['csrfToken' => $app['session.store']->getToken()]), $this->app->make('Illuminate\Html\HtmlBuilder'), $this->app->make('Illuminate\Http\Request') ); }); } /** * Get the services provided by the provider. * * @return string[] */ public function provides() { return array('bootstrap'); } }
<?php namespace Cornford\Bootstrapper; use Illuminate\Support\ServiceProvider; class BootstrapServiceProvider extends ServiceProvider { /** * Indicates if loading of the provider is deferred. * * @var bool */ protected $defer = true; /** * Bootstrap the application events. * * @return void */ public function boot() { $assetPath = __DIR__.'/../../../public'; $this->publishes([$assetPath => public_path('packages/cornford/bootstrapper')], 'bootstrapper'); } /** * Register the service provider. * * @return void */ public function register() { $this->app['bootstrap'] = $this->app->share(function($app) { return new Bootstrap( $this->app->make('Illuminate\Html\FormBuilder', ['csrfToken' => $app['session.store']->getToken()]), $this->app->make('Illuminate\Html\HtmlBuilder'), $this->app->make('Illuminate\Http\Request') ); }); } /** * Get the services provided by the provider. * * @return string[] */ public function provides() { return array('bootstrap'); } }
Revert "$this->app->share deprecated in 5.4"
Revert "$this->app->share deprecated in 5.4" This reverts commit 3297ab6d4c36bbe8e15701bae370177e9bb91e81.
PHP
mit
PunchRockgroin/Bootstrapper
php
## Code Before: <?php namespace Cornford\Bootstrapper; use Illuminate\Support\ServiceProvider; class BootstrapServiceProvider extends ServiceProvider { /** * Indicates if loading of the provider is deferred. * * @var bool */ protected $defer = true; /** * Bootstrap the application events. * * @return void */ public function boot() { $assetPath = __DIR__.'/../../../public'; $this->publishes([$assetPath => public_path('packages/cornford/bootstrapper')], 'bootstrapper'); } /** * Register the service provider. * * @return void */ public function register() { $this->app->singleton('bootstrap', function($app) { return new Bootstrap( $this->app->make('Illuminate\Html\FormBuilder', ['csrfToken' => $app['session.store']->getToken()]), $this->app->make('Illuminate\Html\HtmlBuilder'), $this->app->make('Illuminate\Http\Request') ); }); } /** * Get the services provided by the provider. * * @return string[] */ public function provides() { return array('bootstrap'); } } ## Instruction: Revert "$this->app->share deprecated in 5.4" This reverts commit 3297ab6d4c36bbe8e15701bae370177e9bb91e81. ## Code After: <?php namespace Cornford\Bootstrapper; use Illuminate\Support\ServiceProvider; class BootstrapServiceProvider extends ServiceProvider { /** * Indicates if loading of the provider is deferred. * * @var bool */ protected $defer = true; /** * Bootstrap the application events. * * @return void */ public function boot() { $assetPath = __DIR__.'/../../../public'; $this->publishes([$assetPath => public_path('packages/cornford/bootstrapper')], 'bootstrapper'); } /** * Register the service provider. * * @return void */ public function register() { $this->app['bootstrap'] = $this->app->share(function($app) { return new Bootstrap( $this->app->make('Illuminate\Html\FormBuilder', ['csrfToken' => $app['session.store']->getToken()]), $this->app->make('Illuminate\Html\HtmlBuilder'), $this->app->make('Illuminate\Http\Request') ); }); } /** * Get the services provided by the provider. * * @return string[] */ public function provides() { return array('bootstrap'); } }
<?php namespace Cornford\Bootstrapper; use Illuminate\Support\ServiceProvider; class BootstrapServiceProvider extends ServiceProvider { /** * Indicates if loading of the provider is deferred. * * @var bool */ protected $defer = true; /** * Bootstrap the application events. * * @return void */ public function boot() { $assetPath = __DIR__.'/../../../public'; $this->publishes([$assetPath => public_path('packages/cornford/bootstrapper')], 'bootstrapper'); } /** * Register the service provider. * * @return void */ public function register() { - $this->app->singleton('bootstrap', function($app) + $this->app['bootstrap'] = $this->app->share(function($app) { return new Bootstrap( $this->app->make('Illuminate\Html\FormBuilder', ['csrfToken' => $app['session.store']->getToken()]), $this->app->make('Illuminate\Html\HtmlBuilder'), $this->app->make('Illuminate\Http\Request') ); }); } /** * Get the services provided by the provider. * * @return string[] */ public function provides() { return array('bootstrap'); } }
2
0.038462
1
1
34da72fc26fb9125b91c7d4da44b65738203010b
circle.yml
circle.yml
test: - sphinx-build -b html -d docs/_build/doctrees docs docs/_build/html deployment: production: branch: content commands: - "bash deployment.sh"
test: - sphinx-build -W -b html -d content/_build/doctrees content content/_build/html deployment: production: branch: content commands: - "bash deployment.sh"
Fix test command in circlci config file
Fix test command in circlci config file
YAML
cc0-1.0
MasterFacilityList/masterfacilitylist.github.io
yaml
## Code Before: test: - sphinx-build -b html -d docs/_build/doctrees docs docs/_build/html deployment: production: branch: content commands: - "bash deployment.sh" ## Instruction: Fix test command in circlci config file ## Code After: test: - sphinx-build -W -b html -d content/_build/doctrees content content/_build/html deployment: production: branch: content commands: - "bash deployment.sh"
test: - - sphinx-build -b html -d docs/_build/doctrees docs docs/_build/html ? ^ ^^ ^ --- ^^ + - sphinx-build -W -b html -d content/_build/doctrees content content/_build/html ? +++ ^ ^^^^^ ^ ++++++ ^^^^^ deployment: production: branch: content commands: - "bash deployment.sh"
2
0.2
1
1
29bfe75fe5239173f7757ae287aee5741bbc8e89
spec/spec_helper.rb
spec/spec_helper.rb
if ENV["CI"] require 'coveralls' Coveralls.wear! end $: << File.expand_path(File.join(*%w{.. .. lib}), __FILE__) require 'chatwork' require 'rspec/its' require "webmock/rspec" require "pry" begin require "backport_dig" rescue LoadError end Dir["#{__dir__}/support/**/*.rb"].each { |f| require f } def spec_dir Pathname(__dir__) end def schema_file spec_dir.join("../api/RAML/api-ja.raml") end
if ENV["CI"] require 'coveralls' Coveralls.wear! end $: << File.expand_path(File.join(*%w{.. .. lib}), __FILE__) require 'chatwork' require 'rspec/its' require "webmock/rspec" require "pry" begin require "backport_dig" rescue LoadError end Dir["#{__dir__}/support/**/*.rb"].each { |f| require f } def spec_dir Pathname(__dir__) end def schema_file spec_dir.join("../api/RAML/api-ja.raml") end RSpec.configure do |config| config.before(:suite) do raise "Not found '#{schema_file}'. Please run `git submodule update --init` at first" unless schema_file.exist? end end
Check whether submodule is initialized
Check whether submodule is initialized
Ruby
mit
asonas/chatwork-ruby,asonas/chatwork-ruby
ruby
## Code Before: if ENV["CI"] require 'coveralls' Coveralls.wear! end $: << File.expand_path(File.join(*%w{.. .. lib}), __FILE__) require 'chatwork' require 'rspec/its' require "webmock/rspec" require "pry" begin require "backport_dig" rescue LoadError end Dir["#{__dir__}/support/**/*.rb"].each { |f| require f } def spec_dir Pathname(__dir__) end def schema_file spec_dir.join("../api/RAML/api-ja.raml") end ## Instruction: Check whether submodule is initialized ## Code After: if ENV["CI"] require 'coveralls' Coveralls.wear! end $: << File.expand_path(File.join(*%w{.. .. lib}), __FILE__) require 'chatwork' require 'rspec/its' require "webmock/rspec" require "pry" begin require "backport_dig" rescue LoadError end Dir["#{__dir__}/support/**/*.rb"].each { |f| require f } def spec_dir Pathname(__dir__) end def schema_file spec_dir.join("../api/RAML/api-ja.raml") end RSpec.configure do |config| config.before(:suite) do raise "Not found '#{schema_file}'. Please run `git submodule update --init` at first" unless schema_file.exist? end end
if ENV["CI"] require 'coveralls' Coveralls.wear! end $: << File.expand_path(File.join(*%w{.. .. lib}), __FILE__) require 'chatwork' require 'rspec/its' require "webmock/rspec" require "pry" begin require "backport_dig" rescue LoadError end Dir["#{__dir__}/support/**/*.rb"].each { |f| require f } def spec_dir Pathname(__dir__) end def schema_file spec_dir.join("../api/RAML/api-ja.raml") end + + RSpec.configure do |config| + config.before(:suite) do + raise "Not found '#{schema_file}'. Please run `git submodule update --init` at first" unless schema_file.exist? + end + end
6
0.214286
6
0
90c82f0936addeb4469db2c42c1cd48713e7f3cf
progress_logger.py
progress_logger.py
import copy import wash # from http://stackoverflow.com/questions/8924173/how-do-i-print-bold-text-in-python class color: PURPLE = '\033[95m' CYAN = '\033[96m' DARKCYAN = '\033[36m' BLUE = '\033[94m' GREEN = '\033[92m' YELLOW = '\033[93m' RED = '\033[91m' BOLD = '\033[1m' UNDERLINE = '\033[4m' END = '\033[0m' class TermLogger(object): def print_progress(self, lots, text, bold_lots): lots = copy.copy(lots) # so I can re-sort non-destructively print text lots.sort(cmp=wash.cmp_by_buy_date) bold_ids = [id(lot) for lot in bold_lots] for lot in lots: header = '' footer = '' if id(lot) in bold_ids: header = color.BOLD footer = color.END print header + str(lot) + footer raw_input('hit enter>') class NullLogger(object): def print_progress(self, lots, text, bold_lots): pass
import copy import wash # from http://stackoverflow.com/questions/8924173/how-do-i-print-bold-text-in-python class color: PURPLE = '\033[95m' CYAN = '\033[96m' DARKCYAN = '\033[36m' BLUE = '\033[94m' GREEN = '\033[92m' YELLOW = '\033[93m' RED = '\033[91m' BOLD = '\033[1m' UNDERLINE = '\033[4m' END = '\033[0m' class TermLogger(object): def print_progress(self, lots, text, red_lots): lots = copy.copy(lots) # so I can re-sort non-destructively print text lots.sort(cmp=wash.cmp_by_buy_date) red_ids = [id(lot) for lot in red_lots] for lot in lots: header = '' footer = '' if id(lot) in red_ids: header = color.RED footer = color.END print header + str(lot) + footer raw_input('hit enter>') class NullLogger(object): def print_progress(self, lots, text, red_lots): pass
Switch from bold to red highlighting.
Switch from bold to red highlighting. With many terminal fonts bold is subtle. The red is much more clear.
Python
bsd-2-clause
adlr/wash-sale-calculator
python
## Code Before: import copy import wash # from http://stackoverflow.com/questions/8924173/how-do-i-print-bold-text-in-python class color: PURPLE = '\033[95m' CYAN = '\033[96m' DARKCYAN = '\033[36m' BLUE = '\033[94m' GREEN = '\033[92m' YELLOW = '\033[93m' RED = '\033[91m' BOLD = '\033[1m' UNDERLINE = '\033[4m' END = '\033[0m' class TermLogger(object): def print_progress(self, lots, text, bold_lots): lots = copy.copy(lots) # so I can re-sort non-destructively print text lots.sort(cmp=wash.cmp_by_buy_date) bold_ids = [id(lot) for lot in bold_lots] for lot in lots: header = '' footer = '' if id(lot) in bold_ids: header = color.BOLD footer = color.END print header + str(lot) + footer raw_input('hit enter>') class NullLogger(object): def print_progress(self, lots, text, bold_lots): pass ## Instruction: Switch from bold to red highlighting. With many terminal fonts bold is subtle. The red is much more clear. ## Code After: import copy import wash # from http://stackoverflow.com/questions/8924173/how-do-i-print-bold-text-in-python class color: PURPLE = '\033[95m' CYAN = '\033[96m' DARKCYAN = '\033[36m' BLUE = '\033[94m' GREEN = '\033[92m' YELLOW = '\033[93m' RED = '\033[91m' BOLD = '\033[1m' UNDERLINE = '\033[4m' END = '\033[0m' class TermLogger(object): def print_progress(self, lots, text, red_lots): lots = copy.copy(lots) # so I can re-sort non-destructively print text lots.sort(cmp=wash.cmp_by_buy_date) red_ids = [id(lot) for lot in red_lots] for lot in lots: header = '' footer = '' if id(lot) in red_ids: header = color.RED footer = color.END print header + str(lot) + footer raw_input('hit enter>') class NullLogger(object): def print_progress(self, lots, text, red_lots): pass
import copy import wash # from http://stackoverflow.com/questions/8924173/how-do-i-print-bold-text-in-python class color: PURPLE = '\033[95m' CYAN = '\033[96m' DARKCYAN = '\033[36m' BLUE = '\033[94m' GREEN = '\033[92m' YELLOW = '\033[93m' RED = '\033[91m' BOLD = '\033[1m' UNDERLINE = '\033[4m' END = '\033[0m' class TermLogger(object): - def print_progress(self, lots, text, bold_lots): ? ^^^ + def print_progress(self, lots, text, red_lots): ? ^^ lots = copy.copy(lots) # so I can re-sort non-destructively print text lots.sort(cmp=wash.cmp_by_buy_date) - bold_ids = [id(lot) for lot in bold_lots] ? ^^^ ^^^ + red_ids = [id(lot) for lot in red_lots] ? ^^ ^^ for lot in lots: header = '' footer = '' - if id(lot) in bold_ids: ? ^^^ + if id(lot) in red_ids: ? ^^ - header = color.BOLD ? ^^^ + header = color.RED ? ^^ footer = color.END print header + str(lot) + footer raw_input('hit enter>') class NullLogger(object): - def print_progress(self, lots, text, bold_lots): ? ^^^ + def print_progress(self, lots, text, red_lots): ? ^^ pass
10
0.285714
5
5
92cdf5b373c98d3c18c2f27da2a93e571f3ac6b3
README.md
README.md
A JavaScript library to construct URLs and make HTTP requests using the fetch API.
A JavaScript library to construct URLs and make HTTP requests using the fetch API. To use the Uri inteface, construct a new Uri and manipulate the resulting object: ``` const uri = new Uri('http://www.example.com'); uri.addSegments('foo', 'bar'); uri.setQueryParam('abc', 123); uri.addQueryParam('multi', 'one'); uri.addQueryParam('multi', 'two'); const newUri = uri.toString(); // newUri is "http://www.example.com/foo/bar?abc=123&multi=one&multi=two" ``` To use the Plug interface, construct a new Plug and use it to build up the request URI and perform HTTP requests: ``` const plug = new Plug('http://www.example.com'); plug.at('users').withParam('filter', 'abc').get().then((response) => { // response is a fetch API Response object return response.json(); }).then((usersList) => { // usersList is the parsed respose from the HTTP body }); ```
Add a little more to the readme
Add a little more to the readme
Markdown
apache-2.0
MindTouch/mindtouch-http.js,MindTouch/mindtouch-http.js
markdown
## Code Before: A JavaScript library to construct URLs and make HTTP requests using the fetch API. ## Instruction: Add a little more to the readme ## Code After: A JavaScript library to construct URLs and make HTTP requests using the fetch API. To use the Uri inteface, construct a new Uri and manipulate the resulting object: ``` const uri = new Uri('http://www.example.com'); uri.addSegments('foo', 'bar'); uri.setQueryParam('abc', 123); uri.addQueryParam('multi', 'one'); uri.addQueryParam('multi', 'two'); const newUri = uri.toString(); // newUri is "http://www.example.com/foo/bar?abc=123&multi=one&multi=two" ``` To use the Plug interface, construct a new Plug and use it to build up the request URI and perform HTTP requests: ``` const plug = new Plug('http://www.example.com'); plug.at('users').withParam('filter', 'abc').get().then((response) => { // response is a fetch API Response object return response.json(); }).then((usersList) => { // usersList is the parsed respose from the HTTP body }); ```
A JavaScript library to construct URLs and make HTTP requests using the fetch API. + + To use the Uri inteface, construct a new Uri and manipulate the resulting object: + + ``` + const uri = new Uri('http://www.example.com'); + uri.addSegments('foo', 'bar'); + uri.setQueryParam('abc', 123); + uri.addQueryParam('multi', 'one'); + uri.addQueryParam('multi', 'two'); + + const newUri = uri.toString(); + // newUri is "http://www.example.com/foo/bar?abc=123&multi=one&multi=two" + ``` + + To use the Plug interface, construct a new + Plug and use it to build up the request URI and perform HTTP requests: + + ``` + const plug = new Plug('http://www.example.com'); + plug.at('users').withParam('filter', 'abc').get().then((response) => { + // response is a fetch API Response object + return response.json(); + }).then((usersList) => { + // usersList is the parsed respose from the HTTP body + }); + ```
26
13
26
0
f9632e0f9b97aefebf78d468b4b4a33e5f26f27b
angular/nginclude-n-js/README.md
angular/nginclude-n-js/README.md
This example demonstrate the use of ngInclude to include template which will themselves load javascript (with controllers inside). It necessitate a third party library called ocLazyLoad which does the heavy lifting of loading and attaching the controller is proper order for angular to link it with the ng-controller directive.
This example demonstrate the use of ngInclude to include template which will themselves load javascript (with controllers inside). It necessitate a third party library called (ocLazyLoad)[https://oclazyload.readme.io] which does the heavy lifting of loading and attaching the controller is proper order for angular to link it with the ng-controller directive.
Add reference to ocLazyLoad website
Add reference to ocLazyLoad website
Markdown
apache-2.0
jdmichaud/snippets,jdmichaud/snippets,jdmichaud/snippets,jdmichaud/snippets,jdmichaud/snippets,jdmichaud/snippets,jdmichaud/snippets
markdown
## Code Before: This example demonstrate the use of ngInclude to include template which will themselves load javascript (with controllers inside). It necessitate a third party library called ocLazyLoad which does the heavy lifting of loading and attaching the controller is proper order for angular to link it with the ng-controller directive. ## Instruction: Add reference to ocLazyLoad website ## Code After: This example demonstrate the use of ngInclude to include template which will themselves load javascript (with controllers inside). It necessitate a third party library called (ocLazyLoad)[https://oclazyload.readme.io] which does the heavy lifting of loading and attaching the controller is proper order for angular to link it with the ng-controller directive.
This example demonstrate the use of ngInclude to include template which will themselves load javascript (with controllers inside). - It necessitate a third party library called ocLazyLoad which does the heavy - lifting of loading and attaching the controller is proper order for angular + It necessitate a third party library called (ocLazyLoad)[https://oclazyload.readme.io] + which does the heavy lifting of loading and attaching the controller is proper - to link it with the ng-controller directive. + order for angular to link it with the ng-controller directive. ? ++++++++++++++++++
6
0.75
3
3
52c31133acc16e5b6954c5ee50c6dfe5d22e1603
Package.swift
Package.swift
// swift-tools-version:5.1 import PackageDescription let package = Package( name: "OneTimePassword", platforms: [ .iOS(.v9), .watchOS(.v2) ], products: [ .library( name: "OneTimePassword", targets: ["OneTimePassword"]) ], dependencies: [ .package(url: "https://github.com/bas-d/Base32", .branch("spm")) ], targets: [ .target(name: "OneTimePassword", dependencies: ["Base32"], path: "Sources"), .testTarget(name: "OneTimePasswordTests", dependencies: ["OneTimePassword"], path: "Tests") ] )
// swift-tools-version:5.1 import PackageDescription let package = Package( name: "OneTimePassword", platforms: [ .iOS(.v9), .watchOS(.v2), ], products: [ .library( name: "OneTimePassword", targets: ["OneTimePassword"]), ], dependencies: [ .package(url: "https://github.com/mattrubin/Base32.git", .branch("1.1.2+spm")), ], targets: [ .target( name: "OneTimePassword", dependencies: ["Base32"], path: "Sources"), .testTarget( name: "OneTimePasswordTests", dependencies: ["OneTimePassword"], path: "Tests", exclude:["App"]), ] )
Update Swift package to use released Base32 and fix test compilation
Update Swift package to use released Base32 and fix test compilation
Swift
mit
mattrubin/onetimepassword,mattrubin/onetimepassword
swift
## Code Before: // swift-tools-version:5.1 import PackageDescription let package = Package( name: "OneTimePassword", platforms: [ .iOS(.v9), .watchOS(.v2) ], products: [ .library( name: "OneTimePassword", targets: ["OneTimePassword"]) ], dependencies: [ .package(url: "https://github.com/bas-d/Base32", .branch("spm")) ], targets: [ .target(name: "OneTimePassword", dependencies: ["Base32"], path: "Sources"), .testTarget(name: "OneTimePasswordTests", dependencies: ["OneTimePassword"], path: "Tests") ] ) ## Instruction: Update Swift package to use released Base32 and fix test compilation ## Code After: // swift-tools-version:5.1 import PackageDescription let package = Package( name: "OneTimePassword", platforms: [ .iOS(.v9), .watchOS(.v2), ], products: [ .library( name: "OneTimePassword", targets: ["OneTimePassword"]), ], dependencies: [ .package(url: "https://github.com/mattrubin/Base32.git", .branch("1.1.2+spm")), ], targets: [ .target( name: "OneTimePassword", dependencies: ["Base32"], path: "Sources"), .testTarget( name: "OneTimePasswordTests", dependencies: ["OneTimePassword"], path: "Tests", exclude:["App"]), ] )
// swift-tools-version:5.1 import PackageDescription let package = Package( name: "OneTimePassword", platforms: [ .iOS(.v9), - .watchOS(.v2) + .watchOS(.v2), ? + ], products: [ .library( name: "OneTimePassword", - targets: ["OneTimePassword"]) + targets: ["OneTimePassword"]), ? + ], dependencies: [ - .package(url: "https://github.com/bas-d/Base32", .branch("spm")) ? ^^^^ + .package(url: "https://github.com/mattrubin/Base32.git", .branch("1.1.2+spm")), ? ++++++ ^^ ++++ ++++++ + ], targets: [ - .target(name: "OneTimePassword", dependencies: ["Base32"], path: "Sources"), - .testTarget(name: "OneTimePasswordTests", dependencies: ["OneTimePassword"], path: "Tests") + .target( + name: "OneTimePassword", + dependencies: ["Base32"], + path: "Sources"), + .testTarget( + name: "OneTimePasswordTests", + dependencies: ["OneTimePassword"], + path: "Tests", + exclude:["App"]), ] )
17
0.772727
12
5
8872642375298cb97b75b445131555f88341f834
editor/src/main/kotlin/rs/emulate/editor/workspace/EditorWorkspaceView.kt
editor/src/main/kotlin/rs/emulate/editor/workspace/EditorWorkspaceView.kt
package rs.emulate.editor.workspace import javafx.geometry.Side import rs.emulate.editor.workspace.components.EditorPropertySheet import rs.emulate.editor.workspace.components.EditorStatusBar import rs.emulate.editor.workspace.components.menu.EditorMenu import rs.emulate.editor.workspace.components.widgets.tree.ResourceIndexTree import tornadofx.View import tornadofx.borderpane import tornadofx.drawer import tornadofx.get import tornadofx.hbox import tornadofx.vbox class EditorWorkspaceView : View() { override val root = borderpane { top<EditorMenu>() left = hbox { drawer(Side.LEFT) { item(ResourceIndexTree::class, showHeader = true) } } right = hbox { drawer(Side.RIGHT) { add(EditorPropertySheet::class) } } bottom = vbox { drawer(Side.BOTTOM) { } add<EditorStatusBar>() } } init { title = messages["title"] } }
package rs.emulate.editor.workspace import javafx.geometry.Side import rs.emulate.editor.workspace.components.EditorPropertySheet import rs.emulate.editor.workspace.components.EditorStatusBar import rs.emulate.editor.workspace.components.menu.EditorMenu import rs.emulate.editor.workspace.components.widgets.tree.ResourceIndexTree import tornadofx.View import tornadofx.borderpane import tornadofx.drawer import tornadofx.get import tornadofx.hbox import tornadofx.vbox class EditorWorkspaceView : View() { override val root = borderpane { top<EditorMenu>() left = hbox { drawer(Side.LEFT) { item(ResourceIndexTree::class, showHeader = true) } } right = hbox { drawer(Side.RIGHT) { item(EditorPropertySheet::class, showHeader = true) } } bottom = vbox { drawer(Side.BOTTOM) { } add<EditorStatusBar>() } } init { title = messages["title"] } }
Fix adding property sheet to workspace drawer
Fix adding property sheet to workspace drawer
Kotlin
isc
Major-/Vicis
kotlin
## Code Before: package rs.emulate.editor.workspace import javafx.geometry.Side import rs.emulate.editor.workspace.components.EditorPropertySheet import rs.emulate.editor.workspace.components.EditorStatusBar import rs.emulate.editor.workspace.components.menu.EditorMenu import rs.emulate.editor.workspace.components.widgets.tree.ResourceIndexTree import tornadofx.View import tornadofx.borderpane import tornadofx.drawer import tornadofx.get import tornadofx.hbox import tornadofx.vbox class EditorWorkspaceView : View() { override val root = borderpane { top<EditorMenu>() left = hbox { drawer(Side.LEFT) { item(ResourceIndexTree::class, showHeader = true) } } right = hbox { drawer(Side.RIGHT) { add(EditorPropertySheet::class) } } bottom = vbox { drawer(Side.BOTTOM) { } add<EditorStatusBar>() } } init { title = messages["title"] } } ## Instruction: Fix adding property sheet to workspace drawer ## Code After: package rs.emulate.editor.workspace import javafx.geometry.Side import rs.emulate.editor.workspace.components.EditorPropertySheet import rs.emulate.editor.workspace.components.EditorStatusBar import rs.emulate.editor.workspace.components.menu.EditorMenu import rs.emulate.editor.workspace.components.widgets.tree.ResourceIndexTree import tornadofx.View import tornadofx.borderpane import tornadofx.drawer import tornadofx.get import tornadofx.hbox import tornadofx.vbox class EditorWorkspaceView : View() { override val root = borderpane { top<EditorMenu>() left = hbox { drawer(Side.LEFT) { item(ResourceIndexTree::class, showHeader = true) } } right = hbox { drawer(Side.RIGHT) { item(EditorPropertySheet::class, showHeader = true) } } bottom = vbox { drawer(Side.BOTTOM) { } add<EditorStatusBar>() } } init { title = messages["title"] } }
package rs.emulate.editor.workspace import javafx.geometry.Side import rs.emulate.editor.workspace.components.EditorPropertySheet import rs.emulate.editor.workspace.components.EditorStatusBar import rs.emulate.editor.workspace.components.menu.EditorMenu import rs.emulate.editor.workspace.components.widgets.tree.ResourceIndexTree import tornadofx.View import tornadofx.borderpane import tornadofx.drawer import tornadofx.get import tornadofx.hbox import tornadofx.vbox class EditorWorkspaceView : View() { override val root = borderpane { top<EditorMenu>() left = hbox { drawer(Side.LEFT) { item(ResourceIndexTree::class, showHeader = true) } } right = hbox { drawer(Side.RIGHT) { - add(EditorPropertySheet::class) ? ^^^ + item(EditorPropertySheet::class, showHeader = true) ? ^^^^ +++++++++++++++++++ } } bottom = vbox { drawer(Side.BOTTOM) { } add<EditorStatusBar>() } } init { title = messages["title"] } }
2
0.046512
1
1
b8b74fea3a053c57fcf4dd32636f6dfd3df21f4e
src/main.js
src/main.js
SetupPrototypes(); SetupRooms(); SpawnCreeps(); HandleCreeps(); EndTick(); function SetupPrototypes() { Room.prototype.getLOIs = function() { var lois = []; this.memory.sources.forEach(function(sourceId) { lois.push(sourceId); }); if(this.controller) { lois.push(this.controller.id); } return lois; }; } function SetupRooms() { Object.keys(Game.rooms).forEach(function (roomName) { var room = Game.rooms[roomName]; if (!room.memory.calcComplete || Memory.recalcRooms) { // Do one time room calculations here if(!room.memory.sources) { room.memory.sources = room.find(FIND_SOURCES).map(function (sourceObject) { return sourceObject.id; }); } room.memory.calcComplete = true; } }); } function SpawnCreeps() { if(Object.keys(Game.creeps).length < 4) { // Spawn a new creep } } function HandleCreeps() { Object.keys(Game.creeps).forEach(function (creepName) { var creep = Game.creeps[creepName]; if(creep.carry.energy < creep.carryCapacity) { // Move to source or harvest } else { // Move to spawn or transfer } }); } function EndTick() { Memory.recalcRooms = false; console.log(Game.getUsedCpu()); }
SetupPrototypes(); SetupRooms(); SpawnCreeps(); HandleCreeps(); EndTick(); function SetupPrototypes() { Room.prototype.getLOIs = function() { var lois = []; this.memory.sources.forEach(function(sourceId) { lois.push(sourceId); }); if(this.controller) { lois.push(this.controller.id); } return lois; }; } function SetupRooms() { Object.keys(Game.rooms).forEach(function (roomName) { var room = Game.rooms[roomName]; if (!room.memory.calcComplete || Memory.recalcRooms) { // Do one time room calculations here if(!room.memory.sources || Memory.recalcRooms) { room.memory.sources = room.find(FIND_SOURCES).map(function (sourceObject) { return sourceObject.id; }); } room.memory.calcComplete = true; } }); } function SpawnCreeps() { if(Object.keys(Game.creeps).length < 4) { // Spawn a new creep } } function HandleCreeps() { Object.keys(Game.creeps).forEach(function (creepName) { var creep = Game.creeps[creepName]; if(creep.carry.energy < creep.carryCapacity) { // Move to source or harvest } else { // Move to spawn or transfer } }); } function EndTick() { Memory.recalcRooms = false; console.log(Game.getUsedCpu()); }
Fix room not recalculating sources
Fix room not recalculating sources
JavaScript
mit
pmaidens/screeps,pmaidens/screeps
javascript
## Code Before: SetupPrototypes(); SetupRooms(); SpawnCreeps(); HandleCreeps(); EndTick(); function SetupPrototypes() { Room.prototype.getLOIs = function() { var lois = []; this.memory.sources.forEach(function(sourceId) { lois.push(sourceId); }); if(this.controller) { lois.push(this.controller.id); } return lois; }; } function SetupRooms() { Object.keys(Game.rooms).forEach(function (roomName) { var room = Game.rooms[roomName]; if (!room.memory.calcComplete || Memory.recalcRooms) { // Do one time room calculations here if(!room.memory.sources) { room.memory.sources = room.find(FIND_SOURCES).map(function (sourceObject) { return sourceObject.id; }); } room.memory.calcComplete = true; } }); } function SpawnCreeps() { if(Object.keys(Game.creeps).length < 4) { // Spawn a new creep } } function HandleCreeps() { Object.keys(Game.creeps).forEach(function (creepName) { var creep = Game.creeps[creepName]; if(creep.carry.energy < creep.carryCapacity) { // Move to source or harvest } else { // Move to spawn or transfer } }); } function EndTick() { Memory.recalcRooms = false; console.log(Game.getUsedCpu()); } ## Instruction: Fix room not recalculating sources ## Code After: SetupPrototypes(); SetupRooms(); SpawnCreeps(); HandleCreeps(); EndTick(); function SetupPrototypes() { Room.prototype.getLOIs = function() { var lois = []; this.memory.sources.forEach(function(sourceId) { lois.push(sourceId); }); if(this.controller) { lois.push(this.controller.id); } return lois; }; } function SetupRooms() { Object.keys(Game.rooms).forEach(function (roomName) { var room = Game.rooms[roomName]; if (!room.memory.calcComplete || Memory.recalcRooms) { // Do one time room calculations here if(!room.memory.sources || Memory.recalcRooms) { room.memory.sources = room.find(FIND_SOURCES).map(function (sourceObject) { return sourceObject.id; }); } room.memory.calcComplete = true; } }); } function SpawnCreeps() { if(Object.keys(Game.creeps).length < 4) { // Spawn a new creep } } function HandleCreeps() { Object.keys(Game.creeps).forEach(function (creepName) { var creep = Game.creeps[creepName]; if(creep.carry.energy < creep.carryCapacity) { // Move to source or harvest } else { // Move to spawn or transfer } }); } function EndTick() { Memory.recalcRooms = false; console.log(Game.getUsedCpu()); }
SetupPrototypes(); SetupRooms(); SpawnCreeps(); HandleCreeps(); EndTick(); function SetupPrototypes() { Room.prototype.getLOIs = function() { var lois = []; this.memory.sources.forEach(function(sourceId) { lois.push(sourceId); }); if(this.controller) { lois.push(this.controller.id); } return lois; }; } function SetupRooms() { Object.keys(Game.rooms).forEach(function (roomName) { var room = Game.rooms[roomName]; if (!room.memory.calcComplete || Memory.recalcRooms) { // Do one time room calculations here - if(!room.memory.sources) { + if(!room.memory.sources || Memory.recalcRooms) { ? ++++++++++++++++++++++ room.memory.sources = room.find(FIND_SOURCES).map(function (sourceObject) { return sourceObject.id; }); } room.memory.calcComplete = true; } }); } function SpawnCreeps() { if(Object.keys(Game.creeps).length < 4) { // Spawn a new creep } } function HandleCreeps() { Object.keys(Game.creeps).forEach(function (creepName) { var creep = Game.creeps[creepName]; if(creep.carry.energy < creep.carryCapacity) { // Move to source or harvest } else { // Move to spawn or transfer } }); } function EndTick() { Memory.recalcRooms = false; console.log(Game.getUsedCpu()); }
2
0.03125
1
1
08e0f4f582c743ebaf77388b53dec73e21eb6359
appveyor.yml
appveyor.yml
version: 1.0.{build} build_script: - cmd: .\build.bat test_script: - cmd: .\test.bat image: Visual Studio 2017 #skip_tags: true #artifacts: # - path: .\build\Release\main\net461 # name: synctool-full #deploy: # release: autorelease-v$(appveyor_build_version) # description: 'Automatic Release by AppVeyor' # provider: GitHub # auth_token: # secure: Ezm9yOuGI+UAT4+HvumnvKyIh15SWeNS4PvrzbXnQWIjSCJUMwcl2/zaXS69MrqZ # artifact: synctool-full # prerelease: true # on: # branch: master
version: 1.0.{build} build_script: - cmd: .\build.bat test_script: - cmd: .\test.bat image: Visual Studio 2017 artifacts: - path: .\build\Release\Setup\RELEASES - path: .\build\Release\Setup\Setup.exe - path: .\build\Release\Setup\*.nupkg #skip_tags: true #deploy: # release: autorelease-v$(appveyor_build_version) # description: 'Automatic Release by AppVeyor' # provider: GitHub # auth_token: # secure: Ezm9yOuGI+UAT4+HvumnvKyIh15SWeNS4PvrzbXnQWIjSCJUMwcl2/zaXS69MrqZ # artifact: synctool-full # prerelease: true # on: # branch: master
Add Squirrel setup files as AppVeyor artifacts
Add Squirrel setup files as AppVeyor artifacts
YAML
mit
ap0llo/SyncTool
yaml
## Code Before: version: 1.0.{build} build_script: - cmd: .\build.bat test_script: - cmd: .\test.bat image: Visual Studio 2017 #skip_tags: true #artifacts: # - path: .\build\Release\main\net461 # name: synctool-full #deploy: # release: autorelease-v$(appveyor_build_version) # description: 'Automatic Release by AppVeyor' # provider: GitHub # auth_token: # secure: Ezm9yOuGI+UAT4+HvumnvKyIh15SWeNS4PvrzbXnQWIjSCJUMwcl2/zaXS69MrqZ # artifact: synctool-full # prerelease: true # on: # branch: master ## Instruction: Add Squirrel setup files as AppVeyor artifacts ## Code After: version: 1.0.{build} build_script: - cmd: .\build.bat test_script: - cmd: .\test.bat image: Visual Studio 2017 artifacts: - path: .\build\Release\Setup\RELEASES - path: .\build\Release\Setup\Setup.exe - path: .\build\Release\Setup\*.nupkg #skip_tags: true #deploy: # release: autorelease-v$(appveyor_build_version) # description: 'Automatic Release by AppVeyor' # provider: GitHub # auth_token: # secure: Ezm9yOuGI+UAT4+HvumnvKyIh15SWeNS4PvrzbXnQWIjSCJUMwcl2/zaXS69MrqZ # artifact: synctool-full # prerelease: true # on: # branch: master
version: 1.0.{build} build_script: - cmd: .\build.bat test_script: - cmd: .\test.bat image: Visual Studio 2017 + artifacts: + - path: .\build\Release\Setup\RELEASES + - path: .\build\Release\Setup\Setup.exe + - path: .\build\Release\Setup\*.nupkg + #skip_tags: true - - #artifacts: - # - path: .\build\Release\main\net461 - # name: synctool-full - #deploy: # release: autorelease-v$(appveyor_build_version) # description: 'Automatic Release by AppVeyor' # provider: GitHub # auth_token: # secure: Ezm9yOuGI+UAT4+HvumnvKyIh15SWeNS4PvrzbXnQWIjSCJUMwcl2/zaXS69MrqZ # artifact: synctool-full # prerelease: true # on: # branch: master
10
0.4
5
5
807bee6d2e6e2f08f74d4898e738041bf5da2120
Cargo.toml
Cargo.toml
[package] name = "indicatif" description = "A progress bar and cli reporting library for Rust" version = "0.15.0" keywords = ["cli", "progress", "pb", "colors", "progressbar"] authors = ["Armin Ronacher <armin.ronacher@active-4.com>"] license = "MIT" repository = "https://github.com/mitsuhiko/indicatif" documentation = "https://docs.rs/indicatif" readme = "README.md" edition = "2018" exclude = ["screenshots/*"] [dependencies] regex = { version = "1.3.1", default-features = false, features = ["std"] } lazy_static = "1.0" number_prefix = "0.4" console = ">=0.9.1, <1.0.0" unicode-segmentation = { version = "1.6.0", optional = true } unicode-width = { version = "0.1.7", optional = true } rayon = { version = "1.0", optional = true } [dev-dependencies] rand = "0.8" tokio = { version = "1.0", features = ["time", "rt"] } [features] default = [] improved_unicode = ["unicode-segmentation", "unicode-width", "console/unicode-width"] # Legacy alias for `rayon` with_rayon = ["rayon"]
[package] name = "indicatif" description = "A progress bar and cli reporting library for Rust" version = "0.15.0" keywords = ["cli", "progress", "pb", "colors", "progressbar"] authors = ["Armin Ronacher <armin.ronacher@active-4.com>", "Dirkjan Ochtman <dirkjan@ochtman.nl>"] license = "MIT" repository = "https://github.com/mitsuhiko/indicatif" documentation = "https://docs.rs/indicatif" readme = "README.md" edition = "2018" exclude = ["screenshots/*"] [dependencies] regex = { version = "1.3.1", default-features = false, features = ["std"] } lazy_static = "1.0" number_prefix = "0.4" console = ">=0.9.1, <1.0.0" unicode-segmentation = { version = "1.6.0", optional = true } unicode-width = { version = "0.1.7", optional = true } rayon = { version = "1.0", optional = true } [dev-dependencies] rand = "0.8" tokio = { version = "1.0", features = ["time", "rt"] } [features] default = [] improved_unicode = ["unicode-segmentation", "unicode-width", "console/unicode-width"] # Legacy alias for `rayon` with_rayon = ["rayon"]
Add myself as an author
Add myself as an author
TOML
mit
mitsuhiko/indicatif
toml
## Code Before: [package] name = "indicatif" description = "A progress bar and cli reporting library for Rust" version = "0.15.0" keywords = ["cli", "progress", "pb", "colors", "progressbar"] authors = ["Armin Ronacher <armin.ronacher@active-4.com>"] license = "MIT" repository = "https://github.com/mitsuhiko/indicatif" documentation = "https://docs.rs/indicatif" readme = "README.md" edition = "2018" exclude = ["screenshots/*"] [dependencies] regex = { version = "1.3.1", default-features = false, features = ["std"] } lazy_static = "1.0" number_prefix = "0.4" console = ">=0.9.1, <1.0.0" unicode-segmentation = { version = "1.6.0", optional = true } unicode-width = { version = "0.1.7", optional = true } rayon = { version = "1.0", optional = true } [dev-dependencies] rand = "0.8" tokio = { version = "1.0", features = ["time", "rt"] } [features] default = [] improved_unicode = ["unicode-segmentation", "unicode-width", "console/unicode-width"] # Legacy alias for `rayon` with_rayon = ["rayon"] ## Instruction: Add myself as an author ## Code After: [package] name = "indicatif" description = "A progress bar and cli reporting library for Rust" version = "0.15.0" keywords = ["cli", "progress", "pb", "colors", "progressbar"] authors = ["Armin Ronacher <armin.ronacher@active-4.com>", "Dirkjan Ochtman <dirkjan@ochtman.nl>"] license = "MIT" repository = "https://github.com/mitsuhiko/indicatif" documentation = "https://docs.rs/indicatif" readme = "README.md" edition = "2018" exclude = ["screenshots/*"] [dependencies] regex = { version = "1.3.1", default-features = false, features = ["std"] } lazy_static = "1.0" number_prefix = "0.4" console = ">=0.9.1, <1.0.0" unicode-segmentation = { version = "1.6.0", optional = true } unicode-width = { version = "0.1.7", optional = true } rayon = { version = "1.0", optional = true } [dev-dependencies] rand = "0.8" tokio = { version = "1.0", features = ["time", "rt"] } [features] default = [] improved_unicode = ["unicode-segmentation", "unicode-width", "console/unicode-width"] # Legacy alias for `rayon` with_rayon = ["rayon"]
[package] name = "indicatif" description = "A progress bar and cli reporting library for Rust" version = "0.15.0" keywords = ["cli", "progress", "pb", "colors", "progressbar"] - authors = ["Armin Ronacher <armin.ronacher@active-4.com>"] + authors = ["Armin Ronacher <armin.ronacher@active-4.com>", "Dirkjan Ochtman <dirkjan@ochtman.nl>"] license = "MIT" repository = "https://github.com/mitsuhiko/indicatif" documentation = "https://docs.rs/indicatif" readme = "README.md" edition = "2018" exclude = ["screenshots/*"] [dependencies] regex = { version = "1.3.1", default-features = false, features = ["std"] } lazy_static = "1.0" number_prefix = "0.4" console = ">=0.9.1, <1.0.0" unicode-segmentation = { version = "1.6.0", optional = true } unicode-width = { version = "0.1.7", optional = true } rayon = { version = "1.0", optional = true } [dev-dependencies] rand = "0.8" tokio = { version = "1.0", features = ["time", "rt"] } [features] default = [] improved_unicode = ["unicode-segmentation", "unicode-width", "console/unicode-width"] # Legacy alias for `rayon` with_rayon = ["rayon"]
2
0.0625
1
1
ae412343755864abd8f4af03e79aed44adbe99b1
day-06/src/solver/core.clj
day-06/src/solver/core.clj
(ns solver.core (:gen-class)) (defn -main "I don't do a whole lot ... yet." [& args] (println "Hello, World!"))
(ns solver.core (:gen-class)) (defn create-grid ([] (create-grid 1000)) ([w] (create-grid w w)) ([w h] (let [row (vec (map (fn [x] false) (range w))) grid (vec (map (fn [x] row) (range h)))] grid))) (defn -main "I don't do a whole lot ... yet." [& args] (println "Hello, World!"))
Create a grid of lights
Create a grid of lights
Clojure
mit
dvberkel/advent-of-code
clojure
## Code Before: (ns solver.core (:gen-class)) (defn -main "I don't do a whole lot ... yet." [& args] (println "Hello, World!")) ## Instruction: Create a grid of lights ## Code After: (ns solver.core (:gen-class)) (defn create-grid ([] (create-grid 1000)) ([w] (create-grid w w)) ([w h] (let [row (vec (map (fn [x] false) (range w))) grid (vec (map (fn [x] row) (range h)))] grid))) (defn -main "I don't do a whole lot ... yet." [& args] (println "Hello, World!"))
(ns solver.core (:gen-class)) + + (defn create-grid + ([] (create-grid 1000)) + ([w] (create-grid w w)) + ([w h] (let [row (vec (map (fn [x] false) (range w))) + grid (vec (map (fn [x] row) (range h)))] + grid))) + (defn -main "I don't do a whole lot ... yet." [& args] (println "Hello, World!"))
8
1.142857
8
0
c749bc07d7c6a898658c8c1aacb5476672315e7d
spec/controllers/lottery_spec.rb
spec/controllers/lottery_spec.rb
require 'rails_helper' include AssignmentHelper describe LotteryController do describe "#run_intelligent_bid" do it "the assignment is intelligent" do assignment = double("Assignment") allow(assignment).to receive(:is_intelligent) { 1 } expect(assignment.is_intelligent).to eq(1) end end end
require 'rails_helper' include AssignmentHelper describe LotteryController do describe "#run_intelligent_assignmnent" do it "webservice call should be successful" do dat=double("data") rest=double("RestClient") result = RestClient.get 'http://www.google.com', :content_type => :json, :accept => :json expect(result.code).to eq(200) end end end
Test for succesful webservice call added
Test for succesful webservice call added
Ruby
mit
expertiza/expertiza,michaelamoran/expertiza,KunmiaoYang/expertiza,michaelamoran/expertiza,mhhassan/expertiza,michaelamoran/expertiza,urmilparikh95/expertiza,kira0992/expertiza,urmilparikh95/expertiza,arpitashekhar/expertiza,redsock88/expertiza,urmilparikh95/expertiza,redsock88/expertiza,expertiza/expertiza,mhhassan/expertiza,kira0992/expertiza,sid5788/expertiza,expertiza/expertiza,mhhassan/expertiza,joshio1/expertiza,expertiza/expertiza,rmmaily/expertiza,joshio1/expertiza,joshio1/expertiza,michaelamoran/expertiza,sid5788/expertiza,ApertureScienceInnovators/expertiza,rmmaily/expertiza,sid5788/expertiza,joshio1/expertiza,rmmaily/expertiza,ApertureScienceInnovators/expertiza,ApertureScienceInnovators/expertiza,ApertureScienceInnovators/expertiza,arpitashekhar/expertiza,arpitashekhar/expertiza,kira0992/expertiza,KunmiaoYang/expertiza,redsock88/expertiza,akshayjain114/expertiza,akshayjain114/expertiza,mhhassan/expertiza,KunmiaoYang/expertiza,sid5788/expertiza,kira0992/expertiza,akshayjain114/expertiza,KunmiaoYang/expertiza,urmilparikh95/expertiza,redsock88/expertiza,rmmaily/expertiza,akshayjain114/expertiza,arpitashekhar/expertiza
ruby
## Code Before: require 'rails_helper' include AssignmentHelper describe LotteryController do describe "#run_intelligent_bid" do it "the assignment is intelligent" do assignment = double("Assignment") allow(assignment).to receive(:is_intelligent) { 1 } expect(assignment.is_intelligent).to eq(1) end end end ## Instruction: Test for succesful webservice call added ## Code After: require 'rails_helper' include AssignmentHelper describe LotteryController do describe "#run_intelligent_assignmnent" do it "webservice call should be successful" do dat=double("data") rest=double("RestClient") result = RestClient.get 'http://www.google.com', :content_type => :json, :accept => :json expect(result.code).to eq(200) end end end
require 'rails_helper' include AssignmentHelper - describe LotteryController do + describe LotteryController do ? ++ - describe "#run_intelligent_bid" do ? ^ ^ + describe "#run_intelligent_assignmnent" do ? ^^^ ^^^^^^^ - it "the assignment is intelligent" do - assignment = double("Assignment") - allow(assignment).to receive(:is_intelligent) { 1 } - expect(assignment.is_intelligent).to eq(1) - end + it "webservice call should be successful" do + dat=double("data") + rest=double("RestClient") + result = RestClient.get 'http://www.google.com', :content_type => :json, :accept => :json + expect(result.code).to eq(200) + + end end end
16
1.333333
9
7
63060a48c53587ffedcd9aaba2638c2bdf9a77ff
lib/travis/build/appliances/wait_for_network.rb
lib/travis/build/appliances/wait_for_network.rb
require 'travis/build/appliances/base' module Travis module Build module Appliances class WaitForNetwork < Base def apply sh.raw <<~BASHSNIP travis_wait_for_network() { local job_id="${1}" local repo="${2}" local count=1 local url="http://#{app_host}/empty.txt?job_id=${job_id}&repo=${repo}" while [[ "${count}" -lt 10 ]]; do if travis_download "${url}?count=${count}" /dev/null; then echo -e "${ANSI_GREEN}Network availability confirmed.${ANSI_RESET}" return fi count=$((count + 1)) sleep 1 done echo -e "${ANSI_RED}Timeout waiting for network availability.${ANSI_RESET}" } BASHSNIP sh.cmd "travis_wait_for_network '#{data.job[:id]}' '#{data.slug}'", echo: false end end end end end
require 'travis/build/appliances/base' module Travis module Build module Appliances class WaitForNetwork < Base def apply sh.raw <<~BASHSNIP travis_wait_for_network() { local job_id="${1}" local repo="${2}" local count=1 local url="http://#{app_host}/empty.txt?job_id=${job_id}&repo=${repo}" set -o xtrace while [[ "${count}" -lt 20 ]]; do if travis_download "${url}?count=${count}" /dev/null; then echo -e "${ANSI_GREEN}Network availability confirmed.${ANSI_RESET}" set +o xtrace return fi count=$((count + 1)) sleep 1 done set +o xtrace echo -e "${ANSI_RED}Timeout waiting for network availability.${ANSI_RESET}" } BASHSNIP sh.cmd "travis_wait_for_network '#{data.job[:id]}' '#{data.slug}'", echo: false end end end end end
Add some tracing around travis_download because huh??
Add some tracing around travis_download because huh??
Ruby
mit
craigcitro/travis-build,craigcitro/travis-build,andyli/travis-build,andyli/travis-build
ruby
## Code Before: require 'travis/build/appliances/base' module Travis module Build module Appliances class WaitForNetwork < Base def apply sh.raw <<~BASHSNIP travis_wait_for_network() { local job_id="${1}" local repo="${2}" local count=1 local url="http://#{app_host}/empty.txt?job_id=${job_id}&repo=${repo}" while [[ "${count}" -lt 10 ]]; do if travis_download "${url}?count=${count}" /dev/null; then echo -e "${ANSI_GREEN}Network availability confirmed.${ANSI_RESET}" return fi count=$((count + 1)) sleep 1 done echo -e "${ANSI_RED}Timeout waiting for network availability.${ANSI_RESET}" } BASHSNIP sh.cmd "travis_wait_for_network '#{data.job[:id]}' '#{data.slug}'", echo: false end end end end end ## Instruction: Add some tracing around travis_download because huh?? ## Code After: require 'travis/build/appliances/base' module Travis module Build module Appliances class WaitForNetwork < Base def apply sh.raw <<~BASHSNIP travis_wait_for_network() { local job_id="${1}" local repo="${2}" local count=1 local url="http://#{app_host}/empty.txt?job_id=${job_id}&repo=${repo}" set -o xtrace while [[ "${count}" -lt 20 ]]; do if travis_download "${url}?count=${count}" /dev/null; then echo -e "${ANSI_GREEN}Network availability confirmed.${ANSI_RESET}" set +o xtrace return fi count=$((count + 1)) sleep 1 done set +o xtrace echo -e "${ANSI_RED}Timeout waiting for network availability.${ANSI_RESET}" } BASHSNIP sh.cmd "travis_wait_for_network '#{data.job[:id]}' '#{data.slug}'", echo: false end end end end end
require 'travis/build/appliances/base' module Travis module Build module Appliances class WaitForNetwork < Base def apply sh.raw <<~BASHSNIP travis_wait_for_network() { local job_id="${1}" local repo="${2}" local count=1 local url="http://#{app_host}/empty.txt?job_id=${job_id}&repo=${repo}" + set -o xtrace - while [[ "${count}" -lt 10 ]]; do ? ^ + while [[ "${count}" -lt 20 ]]; do ? ^ if travis_download "${url}?count=${count}" /dev/null; then echo -e "${ANSI_GREEN}Network availability confirmed.${ANSI_RESET}" + set +o xtrace return fi count=$((count + 1)) sleep 1 done + set +o xtrace echo -e "${ANSI_RED}Timeout waiting for network availability.${ANSI_RESET}" } BASHSNIP sh.cmd "travis_wait_for_network '#{data.job[:id]}' '#{data.slug}'", echo: false end end end end end
5
0.142857
4
1
619222b5366b34ebc22844e4b61620d3219cefe5
stats.go
stats.go
package main import () type statistics struct { inDummy int inMail int inEnc int inRemFoo int outDummy int outMail int outEnc int outLoop int outRandhop int outPlain int } func (s *statistics) reset() { s.inDummy = 0 s.inMail = 0 s.inEnc = 0 s.inRemFoo = 0 s.outDummy = 0 s.outMail = 0 s.outEnc = 0 s.outLoop = 0 s.outRandhop = 0 s.outPlain = 0 } func (s *statistics) report() { Info.Printf( "MailIn=%d, RemFoo=%d, YamnIn=%d, DummyIn=%d", s.inMail, s.inRemFoo, s.inEnc, s.inDummy, ) Info.Printf( "MailOut=%d, YamnOut=%d, YamnLoop=%d, Randhop=%d,", "FinalOut=%d, DummyOut=%d", s.outMail, s.outEnc, s.outLoop, s.outRandhop, s.outPlain, s.outDummy, ) } var stats = new(statistics)
package main import ( "fmt" ) type statistics struct { inDummy int inMail int inEnc int inRemFoo int outDummy int outMail int outEnc int outLoop int outRandhop int outPlain int } func (s *statistics) reset() { s.inDummy = 0 s.inMail = 0 s.inEnc = 0 s.inRemFoo = 0 s.outDummy = 0 s.outMail = 0 s.outEnc = 0 s.outLoop = 0 s.outRandhop = 0 s.outPlain = 0 } func (s *statistics) report() { Info.Printf( "MailIn=%d, RemFoo=%d, YamnIn=%d, DummyIn=%d", s.inMail, s.inRemFoo, s.inEnc, s.inDummy, ) line1 := fmt.Sprintf( "MailOut=%d, YamnOut=%d, YamnLoop=%d, Randhop=%d, ", s.outMail, s.outEnc, s.outLoop, s.outRandhop, ) line2 := fmt.Sprintf( "FinalOut=%d, DummyOut=%d", s.outPlain, s.outDummy, ) Info.Printf(line1 + line2) } var stats = new(statistics)
Correct a string formatting bug
Correct a string formatting bug
Go
mit
crooks/yamn,crooks/yamn
go
## Code Before: package main import () type statistics struct { inDummy int inMail int inEnc int inRemFoo int outDummy int outMail int outEnc int outLoop int outRandhop int outPlain int } func (s *statistics) reset() { s.inDummy = 0 s.inMail = 0 s.inEnc = 0 s.inRemFoo = 0 s.outDummy = 0 s.outMail = 0 s.outEnc = 0 s.outLoop = 0 s.outRandhop = 0 s.outPlain = 0 } func (s *statistics) report() { Info.Printf( "MailIn=%d, RemFoo=%d, YamnIn=%d, DummyIn=%d", s.inMail, s.inRemFoo, s.inEnc, s.inDummy, ) Info.Printf( "MailOut=%d, YamnOut=%d, YamnLoop=%d, Randhop=%d,", "FinalOut=%d, DummyOut=%d", s.outMail, s.outEnc, s.outLoop, s.outRandhop, s.outPlain, s.outDummy, ) } var stats = new(statistics) ## Instruction: Correct a string formatting bug ## Code After: package main import ( "fmt" ) type statistics struct { inDummy int inMail int inEnc int inRemFoo int outDummy int outMail int outEnc int outLoop int outRandhop int outPlain int } func (s *statistics) reset() { s.inDummy = 0 s.inMail = 0 s.inEnc = 0 s.inRemFoo = 0 s.outDummy = 0 s.outMail = 0 s.outEnc = 0 s.outLoop = 0 s.outRandhop = 0 s.outPlain = 0 } func (s *statistics) report() { Info.Printf( "MailIn=%d, RemFoo=%d, YamnIn=%d, DummyIn=%d", s.inMail, s.inRemFoo, s.inEnc, s.inDummy, ) line1 := fmt.Sprintf( "MailOut=%d, YamnOut=%d, YamnLoop=%d, Randhop=%d, ", s.outMail, s.outEnc, s.outLoop, s.outRandhop, ) line2 := fmt.Sprintf( "FinalOut=%d, DummyOut=%d", s.outPlain, s.outDummy, ) Info.Printf(line1 + line2) } var stats = new(statistics)
package main - import () ? - + import ( + "fmt" + ) type statistics struct { inDummy int inMail int inEnc int inRemFoo int outDummy int outMail int outEnc int outLoop int outRandhop int outPlain int } func (s *statistics) reset() { s.inDummy = 0 s.inMail = 0 s.inEnc = 0 s.inRemFoo = 0 s.outDummy = 0 s.outMail = 0 s.outEnc = 0 s.outLoop = 0 s.outRandhop = 0 s.outPlain = 0 } func (s *statistics) report() { Info.Printf( "MailIn=%d, RemFoo=%d, YamnIn=%d, DummyIn=%d", s.inMail, s.inRemFoo, s.inEnc, s.inDummy, ) - Info.Printf( + line1 := fmt.Sprintf( - "MailOut=%d, YamnOut=%d, YamnLoop=%d, Randhop=%d,", + "MailOut=%d, YamnOut=%d, YamnLoop=%d, Randhop=%d, ", ? + - "FinalOut=%d, DummyOut=%d", s.outMail, s.outEnc, s.outLoop, s.outRandhop, + ) + line2 := fmt.Sprintf( + "FinalOut=%d, DummyOut=%d", s.outPlain, s.outDummy, ) + Info.Printf(line1 + line2) } var stats = new(statistics)
13
0.254902
9
4
cb512cb85a8035dbc35ae069016f63be67a93bc6
app/helpers/compare_helper.rb
app/helpers/compare_helper.rb
module CompareHelper def compare_to_mr_button? params[:from].present? && params[:to].present? && @repository.branch_names.include?(params[:from]) && @repository.branch_names.include?(params[:to]) && params[:from] != params[:to] && !@refs_are_same end def compare_mr_path new_project_merge_request_path(@project, merge_request: {source_branch: params[:to], target_branch: params[:from]}) end end
module CompareHelper def compare_to_mr_button? @project.merge_requests_enabled && params[:from].present? && params[:to].present? && @repository.branch_names.include?(params[:from]) && @repository.branch_names.include?(params[:to]) && params[:from] != params[:to] && !@refs_are_same end def compare_mr_path new_project_merge_request_path(@project, merge_request: {source_branch: params[:to], target_branch: params[:from]}) end end
Fix bug with showing create merge request button while merge request are disabled in project settings
Fix bug with showing create merge request button while merge request are disabled in project settings
Ruby
mit
8thcolor/rubyconfau2015-sadr,8thcolor/eurucamp2014-htdsadr,8thcolor/rubyconfau2015-sadr,8thcolor/rubyconfau2015-sadr,8thcolor/eurucamp2014-htdsadr,8thcolor/eurucamp2014-htdsadr
ruby
## Code Before: module CompareHelper def compare_to_mr_button? params[:from].present? && params[:to].present? && @repository.branch_names.include?(params[:from]) && @repository.branch_names.include?(params[:to]) && params[:from] != params[:to] && !@refs_are_same end def compare_mr_path new_project_merge_request_path(@project, merge_request: {source_branch: params[:to], target_branch: params[:from]}) end end ## Instruction: Fix bug with showing create merge request button while merge request are disabled in project settings ## Code After: module CompareHelper def compare_to_mr_button? @project.merge_requests_enabled && params[:from].present? && params[:to].present? && @repository.branch_names.include?(params[:from]) && @repository.branch_names.include?(params[:to]) && params[:from] != params[:to] && !@refs_are_same end def compare_mr_path new_project_merge_request_path(@project, merge_request: {source_branch: params[:to], target_branch: params[:from]}) end end
module CompareHelper def compare_to_mr_button? - params[:from].present? && params[:to].present? && + @project.merge_requests_enabled && + params[:from].present? && + params[:to].present? && @repository.branch_names.include?(params[:from]) && @repository.branch_names.include?(params[:to]) && params[:from] != params[:to] && !@refs_are_same end def compare_mr_path new_project_merge_request_path(@project, merge_request: {source_branch: params[:to], target_branch: params[:from]}) end end
4
0.307692
3
1
6e57be88e282857330c8ab82de9da9df55e43450
packages/relay-runtime/util/RelayFeatureFlags.js
packages/relay-runtime/util/RelayFeatureFlags.js
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @flow strict * @format */ 'use strict'; type FeatureFlags = {| ENABLE_VARIABLE_CONNECTION_KEY: boolean, ENABLE_CONNECTION_RESOLVERS: boolean, USE_RECORD_SOURCE_MAP_IMPL: boolean, |}; const RelayFeatureFlags: FeatureFlags = { // T45504512: new connection model ENABLE_VARIABLE_CONNECTION_KEY: false, ENABLE_CONNECTION_RESOLVERS: false, USE_RECORD_SOURCE_MAP_IMPL: false, }; module.exports = RelayFeatureFlags;
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @flow strict * @format */ 'use strict'; type FeatureFlags = {| ENABLE_VARIABLE_CONNECTION_KEY: boolean, ENABLE_CONNECTION_RESOLVERS: boolean, ENABLE_PARTIAL_RENDERING_DEFAULT: boolean, USE_RECORD_SOURCE_MAP_IMPL: boolean, |}; const RelayFeatureFlags: FeatureFlags = { // T45504512: new connection model ENABLE_VARIABLE_CONNECTION_KEY: false, ENABLE_CONNECTION_RESOLVERS: false, ENABLE_PARTIAL_RENDERING_DEFAULT: false, USE_RECORD_SOURCE_MAP_IMPL: false, }; module.exports = RelayFeatureFlags;
Add feature flag for enabling partial rendering in Relay Hooks by default
Add feature flag for enabling partial rendering in Relay Hooks by default Reviewed By: josephsavona Differential Revision: D16768104 fbshipit-source-id: 878b99fb4a29a1e8283432f579ed4d0c18813617
JavaScript
mit
voideanvalue/relay,yungsters/relay,xuorig/relay,iamchenxin/relay,facebook/relay,facebook/relay,xuorig/relay,atxwebs/relay,voideanvalue/relay,iamchenxin/relay,wincent/relay,xuorig/relay,atxwebs/relay,josephsavona/relay,facebook/relay,voideanvalue/relay,facebook/relay,wincent/relay,voideanvalue/relay,kassens/relay,josephsavona/relay,xuorig/relay,yungsters/relay,cpojer/relay,voideanvalue/relay,xuorig/relay,kassens/relay,atxwebs/relay,cpojer/relay,kassens/relay,iamchenxin/relay,yungsters/relay,wincent/relay,facebook/relay,cpojer/relay,wincent/relay,wincent/relay,atxwebs/relay,xuorig/relay,josephsavona/relay,cpojer/relay,facebook/relay,kassens/relay,kassens/relay,iamchenxin/relay,wincent/relay,voideanvalue/relay,kassens/relay
javascript
## Code Before: /** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @flow strict * @format */ 'use strict'; type FeatureFlags = {| ENABLE_VARIABLE_CONNECTION_KEY: boolean, ENABLE_CONNECTION_RESOLVERS: boolean, USE_RECORD_SOURCE_MAP_IMPL: boolean, |}; const RelayFeatureFlags: FeatureFlags = { // T45504512: new connection model ENABLE_VARIABLE_CONNECTION_KEY: false, ENABLE_CONNECTION_RESOLVERS: false, USE_RECORD_SOURCE_MAP_IMPL: false, }; module.exports = RelayFeatureFlags; ## Instruction: Add feature flag for enabling partial rendering in Relay Hooks by default Reviewed By: josephsavona Differential Revision: D16768104 fbshipit-source-id: 878b99fb4a29a1e8283432f579ed4d0c18813617 ## Code After: /** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @flow strict * @format */ 'use strict'; type FeatureFlags = {| ENABLE_VARIABLE_CONNECTION_KEY: boolean, ENABLE_CONNECTION_RESOLVERS: boolean, ENABLE_PARTIAL_RENDERING_DEFAULT: boolean, USE_RECORD_SOURCE_MAP_IMPL: boolean, |}; const RelayFeatureFlags: FeatureFlags = { // T45504512: new connection model ENABLE_VARIABLE_CONNECTION_KEY: false, ENABLE_CONNECTION_RESOLVERS: false, ENABLE_PARTIAL_RENDERING_DEFAULT: false, USE_RECORD_SOURCE_MAP_IMPL: false, }; module.exports = RelayFeatureFlags;
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @flow strict * @format */ 'use strict'; type FeatureFlags = {| ENABLE_VARIABLE_CONNECTION_KEY: boolean, ENABLE_CONNECTION_RESOLVERS: boolean, + ENABLE_PARTIAL_RENDERING_DEFAULT: boolean, USE_RECORD_SOURCE_MAP_IMPL: boolean, |}; const RelayFeatureFlags: FeatureFlags = { // T45504512: new connection model ENABLE_VARIABLE_CONNECTION_KEY: false, ENABLE_CONNECTION_RESOLVERS: false, + ENABLE_PARTIAL_RENDERING_DEFAULT: false, USE_RECORD_SOURCE_MAP_IMPL: false, }; module.exports = RelayFeatureFlags;
2
0.076923
2
0
c48a2affc3c62fe60cb60cdc0e0c5a67bf08214a
pages/vomnibar.html
pages/vomnibar.html
<html> <head> <title>Vomnibar</title> <script type="text/javascript" src="../lib/utils.js"></script> <script type="text/javascript" src="../lib/keyboard_utils.js"></script> <script type="text/javascript" src="../lib/dom_utils.js"></script> <script type="text/javascript" src="../lib/handler_stack.js"></script> <script type="text/javascript" src="../lib/clipboard.js"></script> <script type="text/javascript" src="ui_component_server.js"></script> <script type="text/javascript" src="vomnibar.js"></script> <link rel="stylesheet" type="text/css" href="../content_scripts/vimium.css" /> <link rel="stylesheet" type="text/css" href="vomnibar.css" /> </head> <body> <div id="vomnibar" class="vimiumReset"> <div class="vimiumReset vomnibarSearchArea"> <input id="vomnibarInput" type="text" class="vimiumReset"> </div> <ul class="vimiumReset"></ul> </div> </body> </html>
<html> <head> <title>Vomnibar</title> <script type="text/javascript" src="../lib/utils.js"></script> <script type="text/javascript" src="../lib/settings.js"></script> <script type="text/javascript" src="../lib/keyboard_utils.js"></script> <script type="text/javascript" src="../lib/dom_utils.js"></script> <script type="text/javascript" src="../lib/handler_stack.js"></script> <script type="text/javascript" src="../lib/clipboard.js"></script> <script type="text/javascript" src="ui_component_server.js"></script> <script type="text/javascript" src="vomnibar.js"></script> <link rel="stylesheet" type="text/css" href="../content_scripts/vimium.css" /> <link rel="stylesheet" type="text/css" href="vomnibar.css" /> </head> <body> <div id="vomnibar" class="vimiumReset"> <div class="vimiumReset vomnibarSearchArea"> <input id="vomnibarInput" type="text" class="vimiumReset"> </div> <ul class="vimiumReset"></ul> </div> </body> </html>
Include Settings in Vomnibar page.
Include Settings in Vomnibar page.
HTML
mit
gdh1995/vimium,philc/vimium,mrmr1993/vimium,smblott-github/vimium,smblott-github/vimium,gdh1995/vimium,smblott-github/vimium,philc/vimium,gdh1995/vimium,philc/vimium,poacher2k/vimium,decaffeinate-examples/vimium,poacher2k/vimium,decaffeinate-examples/vimium,mrmr1993/vimium,poacher2k/vimium,decaffeinate-examples/vimium,mrmr1993/vimium
html
## Code Before: <html> <head> <title>Vomnibar</title> <script type="text/javascript" src="../lib/utils.js"></script> <script type="text/javascript" src="../lib/keyboard_utils.js"></script> <script type="text/javascript" src="../lib/dom_utils.js"></script> <script type="text/javascript" src="../lib/handler_stack.js"></script> <script type="text/javascript" src="../lib/clipboard.js"></script> <script type="text/javascript" src="ui_component_server.js"></script> <script type="text/javascript" src="vomnibar.js"></script> <link rel="stylesheet" type="text/css" href="../content_scripts/vimium.css" /> <link rel="stylesheet" type="text/css" href="vomnibar.css" /> </head> <body> <div id="vomnibar" class="vimiumReset"> <div class="vimiumReset vomnibarSearchArea"> <input id="vomnibarInput" type="text" class="vimiumReset"> </div> <ul class="vimiumReset"></ul> </div> </body> </html> ## Instruction: Include Settings in Vomnibar page. ## Code After: <html> <head> <title>Vomnibar</title> <script type="text/javascript" src="../lib/utils.js"></script> <script type="text/javascript" src="../lib/settings.js"></script> <script type="text/javascript" src="../lib/keyboard_utils.js"></script> <script type="text/javascript" src="../lib/dom_utils.js"></script> <script type="text/javascript" src="../lib/handler_stack.js"></script> <script type="text/javascript" src="../lib/clipboard.js"></script> <script type="text/javascript" src="ui_component_server.js"></script> <script type="text/javascript" src="vomnibar.js"></script> <link rel="stylesheet" type="text/css" href="../content_scripts/vimium.css" /> <link rel="stylesheet" type="text/css" href="vomnibar.css" /> </head> <body> <div id="vomnibar" class="vimiumReset"> <div class="vimiumReset vomnibarSearchArea"> <input id="vomnibarInput" type="text" class="vimiumReset"> </div> <ul class="vimiumReset"></ul> </div> </body> </html>
<html> <head> <title>Vomnibar</title> <script type="text/javascript" src="../lib/utils.js"></script> + <script type="text/javascript" src="../lib/settings.js"></script> <script type="text/javascript" src="../lib/keyboard_utils.js"></script> <script type="text/javascript" src="../lib/dom_utils.js"></script> <script type="text/javascript" src="../lib/handler_stack.js"></script> <script type="text/javascript" src="../lib/clipboard.js"></script> <script type="text/javascript" src="ui_component_server.js"></script> <script type="text/javascript" src="vomnibar.js"></script> <link rel="stylesheet" type="text/css" href="../content_scripts/vimium.css" /> <link rel="stylesheet" type="text/css" href="vomnibar.css" /> </head> <body> <div id="vomnibar" class="vimiumReset"> <div class="vimiumReset vomnibarSearchArea"> <input id="vomnibarInput" type="text" class="vimiumReset"> </div> <ul class="vimiumReset"></ul> </div> </body> </html>
1
0.045455
1
0
559f4041f76f4e76d3efa5f2366df24b4a3d17f0
.travis.yml
.travis.yml
language: java jdk: - oraclejdk8 before_install: - chmod +x gradlew after_success: - ./gradlew jacocoTestReport
language: java jdk: - oraclejdk8 before_install: - chmod +x gradlew after_success: - ./gradlew jacocoTestReport after_failure: - cat build/test-results/*.xml
Print out test-results if tests fail
Print out test-results if tests fail
YAML
bsd-2-clause
centic9/poi-mail-merge,centic9/poi-mail-merge
yaml
## Code Before: language: java jdk: - oraclejdk8 before_install: - chmod +x gradlew after_success: - ./gradlew jacocoTestReport ## Instruction: Print out test-results if tests fail ## Code After: language: java jdk: - oraclejdk8 before_install: - chmod +x gradlew after_success: - ./gradlew jacocoTestReport after_failure: - cat build/test-results/*.xml
language: java jdk: - oraclejdk8 before_install: - chmod +x gradlew after_success: - ./gradlew jacocoTestReport + + after_failure: + - cat build/test-results/*.xml
3
0.333333
3
0
b33be185ba08eef310536b73278aec60a1a3c3db
test/mock-xhr.js
test/mock-xhr.js
function MockXHR() { this.method = null this.url = null this.data = null this.headers = {} this.readyState = 0 this.status = 0 this.responseText = null } MockXHR.responses = {} MockXHR.prototype.open = function(method, url) { this.method = method this.url = url } MockXHR.prototype.setRequestHeader = function (name, value) { this.headers[name] = value } var origin = (function() { var link = document.createElement('a') link.href = '/' return link.href })() MockXHR.prototype.send = function(data) { this.data = data var xhr = this setTimeout(function() { var path = xhr.url.replace(origin, '/') var handle = MockXHR.responses[path] if (handle) { handle(xhr) } else { console.warn('missing mocked response', path) } }, 100); } MockXHR.prototype.respond = function(status, body) { this.readyState = 4 this.status = status this.responseText = body var event = {} this.onload(event) } MockXHR.prototype.abort = function() { // Do nothing. } MockXHR.prototype.slow = function() { var event = {} this.ontimeout(event) } MockXHR.prototype.error = function() { var event = {} this.onerror(event) }
function MockXHR() { this.method = null this.url = null this.data = null this.headers = {} this.readyState = 0 this.status = 0 this.responseText = null } MockXHR.responses = {} MockXHR.prototype.open = function(method, url) { this.method = method this.url = url } MockXHR.prototype.setRequestHeader = function (name, value) { this.headers[name] = value } var origin = (function() { var link = document.createElement('a') link.href = '/' return link.href })() MockXHR.prototype.send = function(data) { this.data = data var xhr = this setTimeout(function() { var path = xhr.url.replace(origin, '/') var handle = MockXHR.responses[path] if (handle) { handle(xhr) } else { throw 'missing mocked response: ' + path } }, 100); } MockXHR.prototype.respond = function(status, body) { this.readyState = 4 this.status = status this.responseText = body var event = {} this.onload(event) } MockXHR.prototype.abort = function() { // Do nothing. } MockXHR.prototype.slow = function() { var event = {} this.ontimeout(event) } MockXHR.prototype.error = function() { var event = {} this.onerror(event) }
Throw instead of console for linter
Throw instead of console for linter
JavaScript
mit
github/include-fragment-element,github/include-fragment-element
javascript
## Code Before: function MockXHR() { this.method = null this.url = null this.data = null this.headers = {} this.readyState = 0 this.status = 0 this.responseText = null } MockXHR.responses = {} MockXHR.prototype.open = function(method, url) { this.method = method this.url = url } MockXHR.prototype.setRequestHeader = function (name, value) { this.headers[name] = value } var origin = (function() { var link = document.createElement('a') link.href = '/' return link.href })() MockXHR.prototype.send = function(data) { this.data = data var xhr = this setTimeout(function() { var path = xhr.url.replace(origin, '/') var handle = MockXHR.responses[path] if (handle) { handle(xhr) } else { console.warn('missing mocked response', path) } }, 100); } MockXHR.prototype.respond = function(status, body) { this.readyState = 4 this.status = status this.responseText = body var event = {} this.onload(event) } MockXHR.prototype.abort = function() { // Do nothing. } MockXHR.prototype.slow = function() { var event = {} this.ontimeout(event) } MockXHR.prototype.error = function() { var event = {} this.onerror(event) } ## Instruction: Throw instead of console for linter ## Code After: function MockXHR() { this.method = null this.url = null this.data = null this.headers = {} this.readyState = 0 this.status = 0 this.responseText = null } MockXHR.responses = {} MockXHR.prototype.open = function(method, url) { this.method = method this.url = url } MockXHR.prototype.setRequestHeader = function (name, value) { this.headers[name] = value } var origin = (function() { var link = document.createElement('a') link.href = '/' return link.href })() MockXHR.prototype.send = function(data) { this.data = data var xhr = this setTimeout(function() { var path = xhr.url.replace(origin, '/') var handle = MockXHR.responses[path] if (handle) { handle(xhr) } else { throw 'missing mocked response: ' + path } }, 100); } MockXHR.prototype.respond = function(status, body) { this.readyState = 4 this.status = status this.responseText = body var event = {} this.onload(event) } MockXHR.prototype.abort = function() { // Do nothing. } MockXHR.prototype.slow = function() { var event = {} this.ontimeout(event) } MockXHR.prototype.error = function() { var event = {} this.onerror(event) }
function MockXHR() { this.method = null this.url = null this.data = null this.headers = {} this.readyState = 0 this.status = 0 this.responseText = null } MockXHR.responses = {} MockXHR.prototype.open = function(method, url) { this.method = method this.url = url } MockXHR.prototype.setRequestHeader = function (name, value) { this.headers[name] = value } var origin = (function() { var link = document.createElement('a') link.href = '/' return link.href })() MockXHR.prototype.send = function(data) { this.data = data var xhr = this setTimeout(function() { var path = xhr.url.replace(origin, '/') var handle = MockXHR.responses[path] if (handle) { handle(xhr) } else { - console.warn('missing mocked response', path) ? ^ ------ ^^^^ ^ - + throw 'missing mocked response: ' + path ? ^^^ ^ ++ ^^ } }, 100); } MockXHR.prototype.respond = function(status, body) { this.readyState = 4 this.status = status this.responseText = body var event = {} this.onload(event) } MockXHR.prototype.abort = function() { // Do nothing. } MockXHR.prototype.slow = function() { var event = {} this.ontimeout(event) } MockXHR.prototype.error = function() { var event = {} this.onerror(event) }
2
0.031746
1
1
fadf668c558772223e66df956ee1e166be4e1559
.styleci.yml
.styleci.yml
preset: recommended enabled: - concat_with_spaces - strict disabled: - concat_without_spaces - phpdoc_summary
preset: recommended enabled: - concat_with_spaces - strict disabled: - concat_without_spaces - phpdoc_summary finder: not-name: - "SmartPunctExtension.php"
Make StyleCI ignore semi-colon placement
Make StyleCI ignore semi-colon placement
YAML
bsd-3-clause
thephpleague/commonmark,colinodell/commonmark,thephpleague/commonmark
yaml
## Code Before: preset: recommended enabled: - concat_with_spaces - strict disabled: - concat_without_spaces - phpdoc_summary ## Instruction: Make StyleCI ignore semi-colon placement ## Code After: preset: recommended enabled: - concat_with_spaces - strict disabled: - concat_without_spaces - phpdoc_summary finder: not-name: - "SmartPunctExtension.php"
preset: recommended enabled: - concat_with_spaces - strict disabled: - concat_without_spaces - phpdoc_summary + + finder: + not-name: + - "SmartPunctExtension.php"
4
0.444444
4
0
2acfe1ae32b4f1ba45e5f4f71c9f87b0267b7702
.rubocop.yml
.rubocop.yml
LineLength: Description: 'Limit lines to 120 characters.' Max: 120 BracesAroundHashParameters: Enabled: false DotPosition: EnforcedStyle: leading AlignParameters: EnforcedStyle: with_fixed_indentation IndentHash: EnforcedStyle: consistent
LineLength: Description: 'Limit lines to 120 characters.' Max: 120 BracesAroundHashParameters: Enabled: false DotPosition: EnforcedStyle: leading AlignParameters: EnforcedStyle: with_fixed_indentation IndentHash: EnforcedStyle: consistent StringLiterals: EnforcedStyle: single_quotes
Enforce single quotes - damn you hound
Enforce single quotes - damn you hound
YAML
mit
nature/macmillan-utils,springernature/macmillan-utils
yaml
## Code Before: LineLength: Description: 'Limit lines to 120 characters.' Max: 120 BracesAroundHashParameters: Enabled: false DotPosition: EnforcedStyle: leading AlignParameters: EnforcedStyle: with_fixed_indentation IndentHash: EnforcedStyle: consistent ## Instruction: Enforce single quotes - damn you hound ## Code After: LineLength: Description: 'Limit lines to 120 characters.' Max: 120 BracesAroundHashParameters: Enabled: false DotPosition: EnforcedStyle: leading AlignParameters: EnforcedStyle: with_fixed_indentation IndentHash: EnforcedStyle: consistent StringLiterals: EnforcedStyle: single_quotes
LineLength: Description: 'Limit lines to 120 characters.' Max: 120 BracesAroundHashParameters: Enabled: false DotPosition: EnforcedStyle: leading AlignParameters: EnforcedStyle: with_fixed_indentation IndentHash: EnforcedStyle: consistent + + StringLiterals: + EnforcedStyle: single_quotes
3
0.2
3
0
962d026d6b813bf571cbcc49780c118bb6ff2d57
app/adapters/application.js
app/adapters/application.js
import OsfAdapter from './osf-adapter'; export default DS.JSONAPIAdapter.extend({ host: 'http://localhost:8000', buildURL(modelName, id, snapshot, requestType) { // Fix issue where CORS request failed on 301s: Ember does not seem to append trailing // slash to URLs for single documents, but DRF redirects to force a trailing slash var url = this._super(...arguments); if (requestType === 'deleteRecord' || requestType === 'updateRecord' || requestType === 'findRecord') { if (snapshot.record.get('links.self')) { url = snapshot.record.get('links.self'); } } if (url.lastIndexOf('/') !== url.length - 1) { url += '/'; } return url; }, });
import DS from 'ember-data'; export default DS.JSONAPIAdapter.extend({ host: 'http://localhost:8000', buildURL(modelName, id, snapshot, requestType) { // Fix issue where CORS request failed on 301s: Ember does not seem to append trailing // slash to URLs for single documents, but DRF redirects to force a trailing slash var url = this._super(...arguments); if (requestType === 'deleteRecord' || requestType === 'updateRecord' || requestType === 'findRecord') { if (snapshot.record.get('links.self')) { url = snapshot.record.get('links.self'); } } if (url.lastIndexOf('/') !== url.length - 1) { url += '/'; } return url; }, ajax: function(url, method, hash) { hash.crossDomain = true; hash.xhrFields = {withCredentials: true}; return this._super(url, method, hash); }, headers: Ember.computed(function() { return { "X-CSRFToken": Ember.get(document.cookie.match(/csrftoken\=([^;]*)/), "1") }; }).volatile() });
Switch to JSONAPIAdapter with cross domain and csrf headers
Switch to JSONAPIAdapter with cross domain and csrf headers
JavaScript
apache-2.0
leodomingo/osf-meetings,leodomingo/osf-meetings,jnayak1/osf-meetings,leodomingo/osf-meetings,jnayak1/osf-meetings,leodomingo/osf-meetings,jnayak1/osf-meetings,jnayak1/osf-meetings
javascript
## Code Before: import OsfAdapter from './osf-adapter'; export default DS.JSONAPIAdapter.extend({ host: 'http://localhost:8000', buildURL(modelName, id, snapshot, requestType) { // Fix issue where CORS request failed on 301s: Ember does not seem to append trailing // slash to URLs for single documents, but DRF redirects to force a trailing slash var url = this._super(...arguments); if (requestType === 'deleteRecord' || requestType === 'updateRecord' || requestType === 'findRecord') { if (snapshot.record.get('links.self')) { url = snapshot.record.get('links.self'); } } if (url.lastIndexOf('/') !== url.length - 1) { url += '/'; } return url; }, }); ## Instruction: Switch to JSONAPIAdapter with cross domain and csrf headers ## Code After: import DS from 'ember-data'; export default DS.JSONAPIAdapter.extend({ host: 'http://localhost:8000', buildURL(modelName, id, snapshot, requestType) { // Fix issue where CORS request failed on 301s: Ember does not seem to append trailing // slash to URLs for single documents, but DRF redirects to force a trailing slash var url = this._super(...arguments); if (requestType === 'deleteRecord' || requestType === 'updateRecord' || requestType === 'findRecord') { if (snapshot.record.get('links.self')) { url = snapshot.record.get('links.self'); } } if (url.lastIndexOf('/') !== url.length - 1) { url += '/'; } return url; }, ajax: function(url, method, hash) { hash.crossDomain = true; hash.xhrFields = {withCredentials: true}; return this._super(url, method, hash); }, headers: Ember.computed(function() { return { "X-CSRFToken": Ember.get(document.cookie.match(/csrftoken\=([^;]*)/), "1") }; }).volatile() });
+ import DS from 'ember-data'; - import OsfAdapter from './osf-adapter'; - export default DS.JSONAPIAdapter.extend({ host: 'http://localhost:8000', buildURL(modelName, id, snapshot, requestType) { // Fix issue where CORS request failed on 301s: Ember does not seem to append trailing // slash to URLs for single documents, but DRF redirects to force a trailing slash var url = this._super(...arguments); if (requestType === 'deleteRecord' || requestType === 'updateRecord' || requestType === 'findRecord') { if (snapshot.record.get('links.self')) { url = snapshot.record.get('links.self'); } } if (url.lastIndexOf('/') !== url.length - 1) { url += '/'; } return url; }, + ajax: function(url, method, hash) { + hash.crossDomain = true; + hash.xhrFields = {withCredentials: true}; + return this._super(url, method, hash); + }, + headers: Ember.computed(function() { + return { + "X-CSRFToken": Ember.get(document.cookie.match(/csrftoken\=([^;]*)/), "1") + }; + }).volatile() + });
14
0.736842
12
2
3bd4517838783e2c3e8758d94ab4ad64ee9c6c35
app/src/main/java/com/marverenic/music/ui/settings/SettingsActivity.java
app/src/main/java/com/marverenic/music/ui/settings/SettingsActivity.java
package com.marverenic.music.ui.settings; import android.content.Context; import android.content.Intent; import android.os.Build; import android.os.Bundle; import android.view.MenuItem; import com.marverenic.music.R; import com.marverenic.music.ui.BaseActivity; public class SettingsActivity extends BaseActivity { public static Intent newIntent(Context context) { return new Intent(context, SettingsActivity.class); } @Override public void onCreate(final Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_settings); if (getSupportActionBar() != null && Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { getSupportActionBar() .setElevation(getResources().getDimension(R.dimen.header_elevation)); } if (savedInstanceState == null) { getSupportFragmentManager().beginTransaction() .replace(R.id.pref_fragment_container, new PreferenceFragment()) .commit(); } } @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case android.R.id.home: if (!getSupportFragmentManager().popBackStackImmediate()) { super.onOptionsItemSelected(item); } return true; default: return super.onOptionsItemSelected(item); } } @Override public void onBackPressed() { if (!getSupportFragmentManager().popBackStackImmediate()) { super.onBackPressed(); } } }
package com.marverenic.music.ui.settings; import android.content.Context; import android.content.Intent; import android.os.Build; import android.os.Bundle; import android.support.v7.app.ActionBar; import com.marverenic.music.R; import com.marverenic.music.ui.BaseActivity; public class SettingsActivity extends BaseActivity { public static Intent newIntent(Context context) { return new Intent(context, SettingsActivity.class); } @Override public void onCreate(final Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_settings); setSupportActionBar(findViewById(R.id.toolbar)); ActionBar toolbar = getSupportActionBar(); toolbar.setDisplayShowHomeEnabled(true); toolbar.setDisplayHomeAsUpEnabled(true); toolbar.setHomeButtonEnabled(true); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { toolbar.setElevation(getResources().getDimension(R.dimen.header_elevation)); } if (savedInstanceState == null) { getSupportFragmentManager().beginTransaction() .replace(R.id.pref_fragment_container, new PreferenceFragment()) .commit(); } } @Override public boolean onSupportNavigateUp() { if (!getSupportFragmentManager().popBackStackImmediate()) { finish(); } return true; } @Override public void onBackPressed() { if (!getSupportFragmentManager().popBackStackImmediate()) { super.onBackPressed(); } } }
Fix missing up button on settings page
Fix missing up button on settings page
Java
apache-2.0
marverenic/Jockey,marverenic/Jockey
java
## Code Before: package com.marverenic.music.ui.settings; import android.content.Context; import android.content.Intent; import android.os.Build; import android.os.Bundle; import android.view.MenuItem; import com.marverenic.music.R; import com.marverenic.music.ui.BaseActivity; public class SettingsActivity extends BaseActivity { public static Intent newIntent(Context context) { return new Intent(context, SettingsActivity.class); } @Override public void onCreate(final Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_settings); if (getSupportActionBar() != null && Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { getSupportActionBar() .setElevation(getResources().getDimension(R.dimen.header_elevation)); } if (savedInstanceState == null) { getSupportFragmentManager().beginTransaction() .replace(R.id.pref_fragment_container, new PreferenceFragment()) .commit(); } } @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case android.R.id.home: if (!getSupportFragmentManager().popBackStackImmediate()) { super.onOptionsItemSelected(item); } return true; default: return super.onOptionsItemSelected(item); } } @Override public void onBackPressed() { if (!getSupportFragmentManager().popBackStackImmediate()) { super.onBackPressed(); } } } ## Instruction: Fix missing up button on settings page ## Code After: package com.marverenic.music.ui.settings; import android.content.Context; import android.content.Intent; import android.os.Build; import android.os.Bundle; import android.support.v7.app.ActionBar; import com.marverenic.music.R; import com.marverenic.music.ui.BaseActivity; public class SettingsActivity extends BaseActivity { public static Intent newIntent(Context context) { return new Intent(context, SettingsActivity.class); } @Override public void onCreate(final Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_settings); setSupportActionBar(findViewById(R.id.toolbar)); ActionBar toolbar = getSupportActionBar(); toolbar.setDisplayShowHomeEnabled(true); toolbar.setDisplayHomeAsUpEnabled(true); toolbar.setHomeButtonEnabled(true); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { toolbar.setElevation(getResources().getDimension(R.dimen.header_elevation)); } if (savedInstanceState == null) { getSupportFragmentManager().beginTransaction() .replace(R.id.pref_fragment_container, new PreferenceFragment()) .commit(); } } @Override public boolean onSupportNavigateUp() { if (!getSupportFragmentManager().popBackStackImmediate()) { finish(); } return true; } @Override public void onBackPressed() { if (!getSupportFragmentManager().popBackStackImmediate()) { super.onBackPressed(); } } }
package com.marverenic.music.ui.settings; import android.content.Context; import android.content.Intent; import android.os.Build; import android.os.Bundle; - import android.view.MenuItem; + import android.support.v7.app.ActionBar; import com.marverenic.music.R; import com.marverenic.music.ui.BaseActivity; public class SettingsActivity extends BaseActivity { public static Intent newIntent(Context context) { return new Intent(context, SettingsActivity.class); } @Override public void onCreate(final Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_settings); - if (getSupportActionBar() != null + setSupportActionBar(findViewById(R.id.toolbar)); + ActionBar toolbar = getSupportActionBar(); + toolbar.setDisplayShowHomeEnabled(true); + toolbar.setDisplayHomeAsUpEnabled(true); + toolbar.setHomeButtonEnabled(true); + - && Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { ? ^^^^^^^^^^ + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { ? ++ ^ - getSupportActionBar() - .setElevation(getResources().getDimension(R.dimen.header_elevation)); ? ^^^^^^^^ + toolbar.setElevation(getResources().getDimension(R.dimen.header_elevation)); ? ^^^^^^^ } if (savedInstanceState == null) { getSupportFragmentManager().beginTransaction() .replace(R.id.pref_fragment_container, new PreferenceFragment()) .commit(); } } @Override + public boolean onSupportNavigateUp() { - public boolean onOptionsItemSelected(MenuItem item) { - switch (item.getItemId()) { - case android.R.id.home: - if (!getSupportFragmentManager().popBackStackImmediate()) { ? -------- + if (!getSupportFragmentManager().popBackStackImmediate()) { + finish(); - super.onOptionsItemSelected(item); - } - return true; - default: - return super.onOptionsItemSelected(item); } + return true; } @Override public void onBackPressed() { if (!getSupportFragmentManager().popBackStackImmediate()) { super.onBackPressed(); } } }
27
0.490909
13
14
39353786dfa49b589a4cc7f9dc8130a7802b5361
ci/scripts/publish_docker.sh
ci/scripts/publish_docker.sh
set -euo pipefail make docker docker login --username "${DOCKER_USERNAME}" --password "${DOCKER_PASSWORD}" for image in baseos peer orderer ccenv tools; do for release in ${RELEASE} ${TWO_DIGIT_RELEASE}; do docker tag "hyperledger/fabric-${image}" "hyperledger/fabric-${image}:amd64-${release}" docker push "hyperledger/fabric-${image}:amd64-${release}" done done
set -euo pipefail make docker docker login --username "${DOCKER_USERNAME}" --password "${DOCKER_PASSWORD}" for image in baseos peer orderer ccenv tools; do for release in ${RELEASE} ${TWO_DIGIT_RELEASE}; do docker tag "hyperledger/fabric-${image}" "hyperledger/fabric-${image}:amd64-${release}" docker tag "hyperledger/fabric-${image}" "hyperledger/fabric-${image}:${release}" docker push "hyperledger/fabric-${image}:amd64-${release}" docker push "hyperledger/fabric-${image}:${release}" done done
Add two and three digit publishing
Add two and three digit publishing The two and three digit images were accidentally removed from publishing in a prior commit Signed-off-by: Brett Logan <27f2994114a86935bdf785c1c695cc77f5f5dd0b@ibm.com>
Shell
apache-2.0
hyperledger/fabric,stemlending/fabric,manish-sethi/fabric-sidedb,jimthematrix/fabric,manish-sethi/fabric-sidedb,stemlending/fabric,manish-sethi/fabric-sidedb,manish-sethi/fabric-sidedb,manish-sethi/fabric-sidedb,stemlending/fabric,manish-sethi/fabric,stemlending/fabric,jimthematrix/fabric,manish-sethi/fabric-sidedb,manish-sethi/fabric-sidedb,manish-sethi/fabric,hyperledger/fabric
shell
## Code Before: set -euo pipefail make docker docker login --username "${DOCKER_USERNAME}" --password "${DOCKER_PASSWORD}" for image in baseos peer orderer ccenv tools; do for release in ${RELEASE} ${TWO_DIGIT_RELEASE}; do docker tag "hyperledger/fabric-${image}" "hyperledger/fabric-${image}:amd64-${release}" docker push "hyperledger/fabric-${image}:amd64-${release}" done done ## Instruction: Add two and three digit publishing The two and three digit images were accidentally removed from publishing in a prior commit Signed-off-by: Brett Logan <27f2994114a86935bdf785c1c695cc77f5f5dd0b@ibm.com> ## Code After: set -euo pipefail make docker docker login --username "${DOCKER_USERNAME}" --password "${DOCKER_PASSWORD}" for image in baseos peer orderer ccenv tools; do for release in ${RELEASE} ${TWO_DIGIT_RELEASE}; do docker tag "hyperledger/fabric-${image}" "hyperledger/fabric-${image}:amd64-${release}" docker tag "hyperledger/fabric-${image}" "hyperledger/fabric-${image}:${release}" docker push "hyperledger/fabric-${image}:amd64-${release}" docker push "hyperledger/fabric-${image}:${release}" done done
set -euo pipefail make docker docker login --username "${DOCKER_USERNAME}" --password "${DOCKER_PASSWORD}" for image in baseos peer orderer ccenv tools; do for release in ${RELEASE} ${TWO_DIGIT_RELEASE}; do docker tag "hyperledger/fabric-${image}" "hyperledger/fabric-${image}:amd64-${release}" + docker tag "hyperledger/fabric-${image}" "hyperledger/fabric-${image}:${release}" docker push "hyperledger/fabric-${image}:amd64-${release}" + docker push "hyperledger/fabric-${image}:${release}" done done
2
0.181818
2
0
fb9313d8be844c94e3fa96ce40bcbb040c2fb652
dev/golang/type/README.md
dev/golang/type/README.md
* [Impossible type switch case](https://stackoverflow.com/questions/24593505/impossible-type-switch-case)
* [Impossible type switch case](https://stackoverflow.com/questions/24593505/impossible-type-switch-case) * [Convert an integer to a byte array](https://stackoverflow.com/questions/16888357/convert-an-integer-to-a-byte-array)
Add Convert an integer to a byte array
Add Convert an integer to a byte array
Markdown
mit
northbright/bookmarks,northbright/bookmarks,northbright/bookmarks
markdown
## Code Before: * [Impossible type switch case](https://stackoverflow.com/questions/24593505/impossible-type-switch-case) ## Instruction: Add Convert an integer to a byte array ## Code After: * [Impossible type switch case](https://stackoverflow.com/questions/24593505/impossible-type-switch-case) * [Convert an integer to a byte array](https://stackoverflow.com/questions/16888357/convert-an-integer-to-a-byte-array)
* [Impossible type switch case](https://stackoverflow.com/questions/24593505/impossible-type-switch-case) + * [Convert an integer to a byte array](https://stackoverflow.com/questions/16888357/convert-an-integer-to-a-byte-array)
1
0.5
1
0
dd8ae06a1854aadd1364131b05337a0ce370db54
psalm.xml
psalm.xml
<?xml version="1.0"?> <psalm errorLevel="1" resolveFromConfigFile="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="https://getpsalm.org/schema/config" xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd" > <projectFiles> <directory name="src" /> <ignoreFiles> <directory name="vendor" /> </ignoreFiles> </projectFiles> <issueHandlers> <RedundantConditionGivenDocblockType errorLevel="suppress" /> <RedundantConditionGivenDocblockType errorLevel="suppress" /> </issueHandlers> </psalm>
<?xml version="1.0"?> <psalm errorLevel="1" resolveFromConfigFile="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="https://getpsalm.org/schema/config" xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd" > <projectFiles> <directory name="src" /> <ignoreFiles> <directory name="vendor" /> </ignoreFiles> </projectFiles> </psalm>
Remove obsolete Psalm Issue Handler
Remove obsolete Psalm Issue Handler
XML
mit
Apfelfrisch/Edifact
xml
## Code Before: <?xml version="1.0"?> <psalm errorLevel="1" resolveFromConfigFile="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="https://getpsalm.org/schema/config" xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd" > <projectFiles> <directory name="src" /> <ignoreFiles> <directory name="vendor" /> </ignoreFiles> </projectFiles> <issueHandlers> <RedundantConditionGivenDocblockType errorLevel="suppress" /> <RedundantConditionGivenDocblockType errorLevel="suppress" /> </issueHandlers> </psalm> ## Instruction: Remove obsolete Psalm Issue Handler ## Code After: <?xml version="1.0"?> <psalm errorLevel="1" resolveFromConfigFile="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="https://getpsalm.org/schema/config" xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd" > <projectFiles> <directory name="src" /> <ignoreFiles> <directory name="vendor" /> </ignoreFiles> </projectFiles> </psalm>
<?xml version="1.0"?> <psalm errorLevel="1" resolveFromConfigFile="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="https://getpsalm.org/schema/config" xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd" > <projectFiles> <directory name="src" /> <ignoreFiles> <directory name="vendor" /> </ignoreFiles> </projectFiles> - <issueHandlers> - <RedundantConditionGivenDocblockType errorLevel="suppress" /> - <RedundantConditionGivenDocblockType errorLevel="suppress" /> - </issueHandlers> </psalm>
4
0.210526
0
4
dea4ed78fef278c2cb87b052c98a67940339835a
tagalog/_compat.py
tagalog/_compat.py
try: from urlparse import urlparse except ImportError: # Python3 from urllib import parse as urlparse try: _xrange = xrange except NameError: _xrange = range
try: from urlparse import urlparse except ImportError: # Python3 from urllib.parse import urlparse try: _xrange = xrange except NameError: _xrange = range
Fix compat module for Python 3
Fix compat module for Python 3
Python
mit
nickstenning/tagalog,alphagov/tagalog,alphagov/tagalog,nickstenning/tagalog
python
## Code Before: try: from urlparse import urlparse except ImportError: # Python3 from urllib import parse as urlparse try: _xrange = xrange except NameError: _xrange = range ## Instruction: Fix compat module for Python 3 ## Code After: try: from urlparse import urlparse except ImportError: # Python3 from urllib.parse import urlparse try: _xrange = xrange except NameError: _xrange = range
try: from urlparse import urlparse except ImportError: # Python3 - from urllib import parse as urlparse ? --------- + from urllib.parse import urlparse ? ++++++ try: _xrange = xrange except NameError: _xrange = range
2
0.222222
1
1
8f55363e1eb82b6dab385cc06231855ad9734fb6
guides/source/release_notes_1_0_0.textile
guides/source/release_notes_1_0_0.textile
h2. Spree 1.0 Release Notes endprologue. h3. Summary This is the official 1.0 Release of Spree h3. Preferences We have refactored Spree Preferences to improve performance and simplify code for applicaitons and extensions. The previous interfaces have been maintained so no code changes should be required. The underlying classes have been completely rewritten. Please see the "Spree blog":http://spreecommerce.com/blog/2011/12/04/spree-preferences-refactor for notes on this release h3. Deprecated functions h4. Product +master_price+, +master_price=+, +variants?+, +variant+ are now officially retired. Please use +Product.price+, +Product.price=+, +Product.has_variants?+ and +Product.master+ respectively instead. h4. Spree::Config[:stylesheets] +Spree::Config[:stylesheets]+ and +stylesheet_tags+ are removed in favor for the Rails 3.1 Asset Pipeline. See the "Asset Customization":asset_customization.html for more information. Extensions looking to add stylesheets to the application should do so through the Asset Pipeline by making the extension an engine. h3. Testing h4. The demise of Cucumber testing Cucumber is a great testing tool however it doesn't bring more values for tesing but overhead. It is decide to opt for a light-weight practice of RSpec + Capybara.
h2. Spree 1.0 Release Notes endprologue. h3. Summary This is the official 1.0 Release of Spree. This is a *major* release for Spree, and so backwards compatibility with extensions and applications is not maintained. The changes to Spree in the 1.0 Release are outlined in this document. h3. Preferences We have refactored Spree Preferences to improve performance and simplify code for applicaitons and extensions. The previous interfaces have been maintained so no code changes should be required. The underlying classes have been completely rewritten. Please see the "Spree blog":http://spreecommerce.com/blog/2011/12/04/spree-preferences-refactor for notes on this release h3. Deprecated functions h4. Product +master_price+, +master_price=+, +variants?+, +variant+ are now officially retired. Please use +Product.price+, +Product.price=+, +Product.has_variants?+ and +Product.master+ respectively instead. h4. Spree::Config[:stylesheets] +Spree::Config[:stylesheets]+ and +stylesheet_tags+ are removed in favor for the Rails 3.1 Asset Pipeline. See the "Asset Customization":asset_customization.html for more information. Extensions looking to add stylesheets to the application should do so through the Asset Pipeline by making the extension an engine. h3. Testing h4. The demise of Cucumber testing Cucumber is a great testing tool however it doesn't bring more values for tesing but overhead. It is decide to opt for a light-weight practice of RSpec + Capybara.
Improve documentation in summary of 1.0 release notes
Improve documentation in summary of 1.0 release notes
Textile
bsd-3-clause
tesserakt/clean_spree,cutefrank/spree,beni55/spree,adaddeo/spree,NerdsvilleCEO/spree,fahidnasir/spree,gautamsawhney/spree,abhishekjain16/spree,DarkoP/spree,jspizziri/spree,keatonrow/spree,sunny2601/spree,jasonfb/spree,wolfieorama/spree,pervino/solidus,ramkumar-kr/spree,brchristian/spree,grzlus/solidus,patdec/spree,cutefrank/spree,useiichi/spree,berkes/spree,njerrywerry/spree,AgilTec/spree,CiscoCloud/spree,mleglise/spree,jaspreet21anand/spree,JDutil/spree,jaspreet21anand/spree,maybii/spree,devilcoders/solidus,shekibobo/spree,rajeevriitm/spree,hoanghiep90/spree,DynamoMTL/spree,KMikhaylovCTG/spree,net2b/spree,welitonfreitas/spree,mindvolt/spree,softr8/spree,JDutil/spree,assembledbrands/spree,Ropeney/spree,beni55/spree,jimblesm/spree,jordan-brough/solidus,progsri/spree,Engeltj/spree,caiqinghua/spree,gautamsawhney/spree,project-eutopia/spree,APohio/spree,jparr/spree,derekluo/spree,grzlus/spree,jparr/spree,Ropeney/spree,tesserakt/clean_spree,omarsar/spree,wolfieorama/spree,derekluo/spree,priyank-gupta/spree,dandanwei/spree,Boomkat/spree,alvinjean/spree,jimblesm/spree,JDutil/spree,vinayvinsol/spree,Machpowersystems/spree_mach,Boomkat/spree,volpejoaquin/spree,volpejoaquin/spree,keatonrow/spree,trigrass2/spree,karlitxo/spree,DarkoP/spree,maybii/spree,thogg4/spree,tancnle/spree,trigrass2/spree,xuewenfei/solidus,sunny2601/spree,vinsol/spree,FadliKun/spree,gregoryrikson/spree-sample,CiscoCloud/spree,NerdsvilleCEO/spree,Migweld/spree,Hawaiideveloper/shoppingcart,forkata/solidus,jspizziri/spree,rajeevriitm/spree,hifly/spree,mleglise/spree,scottcrawford03/solidus,alvinjean/spree,odk211/spree,Lostmyname/spree,quentinuys/spree,Hawaiideveloper/shoppingcart,Kagetsuki/spree,JDutil/spree,edgward/spree,locomotivapro/spree,grzlus/spree,yiqing95/spree,raow/spree,degica/spree,lsirivong/spree,PhoenixTeam/spree_phoenix,azranel/spree,madetech/spree,zaeznet/spree,useiichi/spree,APohio/spree,robodisco/spree,assembledbrands/spree,lyzxsc/spree,bricesanchez/spree,bonobos/solidus,vulk/spree,ujai/spree,hifly/spree,sideci-sample/sideci-sample-spree,sideci-sample/sideci-sample-spree,rbngzlv/spree,AgilTec/spree,njerrywerry/spree,jspizziri/spree,jeffboulet/spree,TrialGuides/spree,scottcrawford03/solidus,vinsol/spree,bonobos/solidus,ahmetabdi/spree,gregoryrikson/spree-sample,vulk/spree,robodisco/spree,nooysters/spree,rakibulislam/spree,sliaquat/spree,progsri/spree,degica/spree,Ropeney/spree,carlesjove/spree,CJMrozek/spree,ayb/spree,mindvolt/spree,quentinuys/spree,thogg4/spree,TimurTarasenko/spree,welitonfreitas/spree,softr8/spree,odk211/spree,caiqinghua/spree,FadliKun/spree,dafontaine/spree,tancnle/spree,bonobos/solidus,lyzxsc/spree,keatonrow/spree,Engeltj/spree,KMikhaylovCTG/spree,alejandromangione/spree,PhoenixTeam/spree_phoenix,welitonfreitas/spree,alvinjean/spree,joanblake/spree,pervino/spree,sunny2601/spree,edgward/spree,beni55/spree,lsirivong/solidus,alejandromangione/spree,tomash/spree,yushine/spree,berkes/spree,APohio/spree,ramkumar-kr/spree,groundctrl/spree,tesserakt/clean_spree,Arpsara/solidus,brchristian/spree,zamiang/spree,lsirivong/spree,volpejoaquin/spree,lyzxsc/spree,vmatekole/spree,firman/spree,sliaquat/spree,xuewenfei/solidus,njerrywerry/spree,dandanwei/spree,piousbox/spree,pervino/solidus,trigrass2/spree,edgward/spree,madetech/spree,CiscoCloud/spree,agient/agientstorefront,omarsar/spree,delphsoft/spree-store-ballchair,zamiang/spree,azranel/spree,reidblomquist/spree,rakibulislam/spree,agient/agientstorefront,hoanghiep90/spree,priyank-gupta/spree,dandanwei/spree,Senjai/solidus,pervino/solidus,TimurTarasenko/spree,Hawaiideveloper/shoppingcart,pervino/spree,reinaris/spree,keatonrow/spree,tomash/spree,sliaquat/spree,progsri/spree,KMikhaylovCTG/spree,net2b/spree,jordan-brough/solidus,JuandGirald/spree,AgilTec/spree,delphsoft/spree-store-ballchair,miyazawatomoka/spree,camelmasa/spree,reinaris/spree,firman/spree,odk211/spree,APohio/spree,JuandGirald/spree,xuewenfei/solidus,builtbybuffalo/spree,SadTreeFriends/spree,jimblesm/spree,brchristian/spree,camelmasa/spree,orenf/spree,useiichi/spree,abhishekjain16/spree,joanblake/spree,jasonfb/spree,CJMrozek/spree,adaddeo/spree,trigrass2/spree,Machpowersystems/spree_mach,fahidnasir/spree,gautamsawhney/spree,ujai/spree,moneyspyder/spree,imella/spree,bricesanchez/spree,yiqing95/spree,omarsar/spree,lsirivong/solidus,SadTreeFriends/spree,delphsoft/spree-store-ballchair,nooysters/spree,sfcgeorge/spree,caiqinghua/spree,grzlus/solidus,surfdome/spree,jspizziri/spree,CJMrozek/spree,calvinl/spree,welitonfreitas/spree,archSeer/spree,JuandGirald/spree,carlesjove/spree,ramkumar-kr/spree,FadliKun/spree,sunny2601/spree,Arpsara/solidus,agient/agientstorefront,maybii/spree,DarkoP/spree,scottcrawford03/solidus,Kagetsuki/spree,project-eutopia/spree,rajeevriitm/spree,vmatekole/spree,TrialGuides/spree,athal7/solidus,TrialGuides/spree,SadTreeFriends/spree,JuandGirald/spree,thogg4/spree,hifly/spree,PhoenixTeam/spree_phoenix,thogg4/spree,dafontaine/spree,ramkumar-kr/spree,derekluo/spree,richardnuno/solidus,miyazawatomoka/spree,jordan-brough/solidus,pervino/spree,locomotivapro/spree,NerdsvilleCEO/spree,derekluo/spree,ckk-scratch/solidus,beni55/spree,rbngzlv/spree,CiscoCloud/spree,ayb/spree,madetech/spree,jaspreet21anand/spree,Kagetsuki/spree,fahidnasir/spree,ckk-scratch/solidus,lyzxsc/spree,pervino/spree,nooysters/spree,rakibulislam/spree,sfcgeorge/spree,hifly/spree,athal7/solidus,abhishekjain16/spree,Lostmyname/spree,vcavallo/spree,quentinuys/spree,archSeer/spree,raow/spree,vinayvinsol/spree,robodisco/spree,jsurdilla/solidus,reidblomquist/spree,pulkit21/spree,tesserakt/clean_spree,camelmasa/spree,adaddeo/spree,athal7/solidus,camelmasa/spree,calvinl/spree,groundctrl/spree,shaywood2/spree,joanblake/spree,firman/spree,karlitxo/spree,Engeltj/spree,vcavallo/spree,radarseesradar/spree,Arpsara/solidus,surfdome/spree,assembledbrands/spree,ckk-scratch/solidus,Hawaiideveloper/shoppingcart,Engeltj/spree,Lostmyname/spree,grzlus/solidus,imella/spree,wolfieorama/spree,softr8/spree,jeffboulet/spree,DynamoMTL/spree,raow/spree,azclick/spree,jordan-brough/solidus,project-eutopia/spree,adaddeo/spree,radarseesradar/spree,kewaunited/spree,brchristian/spree,tancnle/spree,caiqinghua/spree,moneyspyder/spree,PhoenixTeam/spree_phoenix,dandanwei/spree,richardnuno/solidus,azranel/spree,radarseesradar/spree,shaywood2/spree,groundctrl/spree,shaywood2/spree,builtbybuffalo/spree,jimblesm/spree,vinayvinsol/spree,mleglise/spree,piousbox/spree,omarsar/spree,forkata/solidus,jaspreet21anand/spree,delphsoft/spree-store-ballchair,berkes/spree,tomash/spree,kewaunited/spree,useiichi/spree,tancnle/spree,ahmetabdi/spree,DynamoMTL/spree,karlitxo/spree,xuewenfei/solidus,ahmetabdi/spree,gregoryrikson/spree-sample,piousbox/spree,azclick/spree,vinsol/spree,yushine/spree,shekibobo/spree,madetech/spree,wolfieorama/spree,yushine/spree,sideci-sample/sideci-sample-spree,gautamsawhney/spree,carlesjove/spree,agient/agientstorefront,grzlus/spree,DarkoP/spree,Migweld/spree,vulk/spree,devilcoders/solidus,orenf/spree,siddharth28/spree,patdec/spree,surfdome/spree,richardnuno/solidus,vcavallo/spree,alejandromangione/spree,orenf/spree,moneyspyder/spree,zamiang/spree,lsirivong/spree,Boomkat/spree,gregoryrikson/spree-sample,maybii/spree,ujai/spree,CJMrozek/spree,locomotivapro/spree,jsurdilla/solidus,pulkit21/spree,mindvolt/spree,miyazawatomoka/spree,jparr/spree,dafontaine/spree,joanblake/spree,forkata/solidus,vulk/spree,Kagetsuki/spree,vcavallo/spree,priyank-gupta/spree,mleglise/spree,Ropeney/spree,Senjai/solidus,ayb/spree,DynamoMTL/spree,TrialGuides/spree,priyank-gupta/spree,project-eutopia/spree,volpejoaquin/spree,karlitxo/spree,scottcrawford03/solidus,grzlus/spree,devilcoders/solidus,Machpowersystems/spree_mach,Migweld/spree,alvinjean/spree,archSeer/spree,shekibobo/spree,builtbybuffalo/spree,hoanghiep90/spree,lsirivong/solidus,patdec/spree,zaeznet/spree,reidblomquist/spree,athal7/solidus,siddharth28/spree,forkata/solidus,calvinl/spree,sliaquat/spree,cutefrank/spree,zaeznet/spree,pulkit21/spree,yushine/spree,groundctrl/spree,hoanghiep90/spree,lsirivong/solidus,fahidnasir/spree,calvinl/spree,Arpsara/solidus,locomotivapro/spree,vmatekole/spree,moneyspyder/spree,devilcoders/solidus,TimurTarasenko/spree,vmatekole/spree,jsurdilla/solidus,TimurTarasenko/spree,softr8/spree,carlesjove/spree,kewaunited/spree,richardnuno/solidus,vinayvinsol/spree,NerdsvilleCEO/spree,jasonfb/spree,tomash/spree,kewaunited/spree,KMikhaylovCTG/spree,lsirivong/spree,shekibobo/spree,zamiang/spree,berkes/spree,odk211/spree,yiqing95/spree,builtbybuffalo/spree,siddharth28/spree,reinaris/spree,Senjai/solidus,patdec/spree,AgilTec/spree,zaeznet/spree,edgward/spree,Migweld/spree,pulkit21/spree,degica/spree,rbngzlv/spree,jparr/spree,quentinuys/spree,pervino/solidus,yiqing95/spree,siddharth28/spree,Boomkat/spree,grzlus/solidus,nooysters/spree,ckk-scratch/solidus,sfcgeorge/spree,jeffboulet/spree,sfcgeorge/spree,piousbox/spree,progsri/spree,raow/spree,vinsol/spree,imella/spree,njerrywerry/spree,Lostmyname/spree,miyazawatomoka/spree,orenf/spree,reidblomquist/spree,abhishekjain16/spree,ayb/spree,mindvolt/spree,FadliKun/spree,jeffboulet/spree,reinaris/spree,cutefrank/spree,azranel/spree,rbngzlv/spree,rakibulislam/spree,bonobos/solidus,rajeevriitm/spree,alejandromangione/spree,bricesanchez/spree,dafontaine/spree,shaywood2/spree,firman/spree,net2b/spree,jasonfb/spree,azclick/spree,archSeer/spree,surfdome/spree,jsurdilla/solidus,robodisco/spree,Senjai/solidus,azclick/spree,SadTreeFriends/spree,ahmetabdi/spree,net2b/spree,radarseesradar/spree
textile
## Code Before: h2. Spree 1.0 Release Notes endprologue. h3. Summary This is the official 1.0 Release of Spree h3. Preferences We have refactored Spree Preferences to improve performance and simplify code for applicaitons and extensions. The previous interfaces have been maintained so no code changes should be required. The underlying classes have been completely rewritten. Please see the "Spree blog":http://spreecommerce.com/blog/2011/12/04/spree-preferences-refactor for notes on this release h3. Deprecated functions h4. Product +master_price+, +master_price=+, +variants?+, +variant+ are now officially retired. Please use +Product.price+, +Product.price=+, +Product.has_variants?+ and +Product.master+ respectively instead. h4. Spree::Config[:stylesheets] +Spree::Config[:stylesheets]+ and +stylesheet_tags+ are removed in favor for the Rails 3.1 Asset Pipeline. See the "Asset Customization":asset_customization.html for more information. Extensions looking to add stylesheets to the application should do so through the Asset Pipeline by making the extension an engine. h3. Testing h4. The demise of Cucumber testing Cucumber is a great testing tool however it doesn't bring more values for tesing but overhead. It is decide to opt for a light-weight practice of RSpec + Capybara. ## Instruction: Improve documentation in summary of 1.0 release notes ## Code After: h2. Spree 1.0 Release Notes endprologue. h3. Summary This is the official 1.0 Release of Spree. This is a *major* release for Spree, and so backwards compatibility with extensions and applications is not maintained. The changes to Spree in the 1.0 Release are outlined in this document. h3. Preferences We have refactored Spree Preferences to improve performance and simplify code for applicaitons and extensions. The previous interfaces have been maintained so no code changes should be required. The underlying classes have been completely rewritten. Please see the "Spree blog":http://spreecommerce.com/blog/2011/12/04/spree-preferences-refactor for notes on this release h3. Deprecated functions h4. Product +master_price+, +master_price=+, +variants?+, +variant+ are now officially retired. Please use +Product.price+, +Product.price=+, +Product.has_variants?+ and +Product.master+ respectively instead. h4. Spree::Config[:stylesheets] +Spree::Config[:stylesheets]+ and +stylesheet_tags+ are removed in favor for the Rails 3.1 Asset Pipeline. See the "Asset Customization":asset_customization.html for more information. Extensions looking to add stylesheets to the application should do so through the Asset Pipeline by making the extension an engine. h3. Testing h4. The demise of Cucumber testing Cucumber is a great testing tool however it doesn't bring more values for tesing but overhead. It is decide to opt for a light-weight practice of RSpec + Capybara.
h2. Spree 1.0 Release Notes endprologue. h3. Summary - This is the official 1.0 Release of Spree + This is the official 1.0 Release of Spree. This is a *major* release for Spree, and so backwards compatibility with extensions and applications is not maintained. + + The changes to Spree in the 1.0 Release are outlined in this document. h3. Preferences We have refactored Spree Preferences to improve performance and simplify code for applicaitons and extensions. The previous interfaces have been maintained so no code changes should be required. The underlying classes have been completely rewritten. Please see the "Spree blog":http://spreecommerce.com/blog/2011/12/04/spree-preferences-refactor for notes on this release h3. Deprecated functions h4. Product +master_price+, +master_price=+, +variants?+, +variant+ are now officially retired. Please use +Product.price+, +Product.price=+, +Product.has_variants?+ and +Product.master+ respectively instead. h4. Spree::Config[:stylesheets] +Spree::Config[:stylesheets]+ and +stylesheet_tags+ are removed in favor for the Rails 3.1 Asset Pipeline. See the "Asset Customization":asset_customization.html for more information. Extensions looking to add stylesheets to the application should do so through the Asset Pipeline by making the extension an engine. h3. Testing h4. The demise of Cucumber testing Cucumber is a great testing tool however it doesn't bring more values for tesing but overhead. It is decide to opt for a light-weight practice of RSpec + Capybara.
4
0.114286
3
1
65e5c731504f16ba5aec427e768cb48b4a09f014
src/shell/config/fish/config.fish
src/shell/config/fish/config.fish
alias cat="bat" alias flushdns="sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder" alias ll="ls -lAh" alias ls="gls --color" alias v="nvim" # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Configure MariaDB set PATH /usr/local/opt/mariadb/bin $PATH # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Set up dircolors eval (gdircolors -c $HOME/.dircolors) # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Source prompt starship init fish | source # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Source local config source $HOME/.fishconfig.local
alias cat="bat" alias flushdns="sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder" alias ll="ls -lAh" alias ls="gls --color" alias v="nvim" # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Configure MariaDB set PATH /usr/local/opt/mariadb/bin $PATH # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Include Homebrew’s executables path set -g fish_user_paths "/usr/local/sbin" $fish_user_paths # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Set up dircolors eval (gdircolors -c $HOME/.dircolors) # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Source prompt starship init fish | source # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Source local config source $HOME/.fishconfig.local
Include Homebrew’s executables path in $PATH
Include Homebrew’s executables path in $PATH
fish
mit
michelegera/dotfiles
fish
## Code Before: alias cat="bat" alias flushdns="sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder" alias ll="ls -lAh" alias ls="gls --color" alias v="nvim" # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Configure MariaDB set PATH /usr/local/opt/mariadb/bin $PATH # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Set up dircolors eval (gdircolors -c $HOME/.dircolors) # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Source prompt starship init fish | source # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Source local config source $HOME/.fishconfig.local ## Instruction: Include Homebrew’s executables path in $PATH ## Code After: alias cat="bat" alias flushdns="sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder" alias ll="ls -lAh" alias ls="gls --color" alias v="nvim" # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Configure MariaDB set PATH /usr/local/opt/mariadb/bin $PATH # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Include Homebrew’s executables path set -g fish_user_paths "/usr/local/sbin" $fish_user_paths # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Set up dircolors eval (gdircolors -c $HOME/.dircolors) # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Source prompt starship init fish | source # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Source local config source $HOME/.fishconfig.local
alias cat="bat" alias flushdns="sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder" alias ll="ls -lAh" alias ls="gls --color" alias v="nvim" # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Configure MariaDB set PATH /usr/local/opt/mariadb/bin $PATH + + # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + # Include Homebrew’s executables path + + set -g fish_user_paths "/usr/local/sbin" $fish_user_paths # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Set up dircolors eval (gdircolors -c $HOME/.dircolors) # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Source prompt starship init fish | source # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Source local config source $HOME/.fishconfig.local
6
0.2
6
0
c2c0633b3733a65d5fb40781b022f46ed0cb817f
client/ksEdit.js
client/ksEdit.js
Template.ksEdit.helpers({ ks: function () { var ks = this; ks.books = Books.find(); return ks; } }); Template.ksEdit.events({ 'submit form': function (elt) { var _id = $('input.id').val(), ks = _id ? KSessions.findOne(_id) : {}; elt.preventDefault(); ks.i = +$("input.i").val(); ks.klubMaster = $("input.klubMaster").val(); ks.date = $("input.date").val(); ks.voteer = $("input.vote").val(); ks.meetup = $("input.meetup").val(); ks.book_id = $("select[name=selBook]").val(); // Update an existent record or create it if (_id) { KSessions.update(_id, ks); } else { KSessions.insert(ks); } }, 'click .delete': function (elt) { var _id = $('input.id').val(); elt.preventDefault(); KSessions.remove(this._id); Router.go('admin'); } }); Template.ksEdit.rendered = function () { /* Add this method because it works on refresh but won't by clicking on previous list page. */ this.$("select[name='selBook']").val(this.$('input.book-id').val()); };
Template.ksEdit.helpers({ ks: function () { var ks = this; ks.books = Books.find(); return ks; } }); Template.ksEdit.events({ 'submit form': function (elt) { var _id = $('input.id').val(), ks = _id ? KSessions.findOne(_id) : {}; elt.preventDefault(); ks.i = +$("input.i").val(); ks.klubMaster = $("input.klubMaster").val() || "anonymous"; ks.date = $("input.date").val(); ks.voteer = $("input.vote").val(); ks.meetup = $("input.meetup").val(); ks.book_id = $("select[name=selBook]").val(); // Update an existent record or create it if (_id) { KSessions.update(_id, ks); } else { KSessions.insert(ks); } }, 'click .delete': function (elt) { var _id = $('input.id').val(); elt.preventDefault(); KSessions.remove(this._id); Router.go('admin'); } }); Template.ksEdit.rendered = function () { /* Add this method because it works on refresh but won't by clicking on previous list page. */ this.$("select[name='selBook']").val(this.$('input.book-id').val()); };
Insert or update anonymous when no klubmaster are specify
Insert or update anonymous when no klubmaster are specify
JavaScript
mit
claudeaubry/klub,claudeaubry/klub,claudeaubry/klub
javascript
## Code Before: Template.ksEdit.helpers({ ks: function () { var ks = this; ks.books = Books.find(); return ks; } }); Template.ksEdit.events({ 'submit form': function (elt) { var _id = $('input.id').val(), ks = _id ? KSessions.findOne(_id) : {}; elt.preventDefault(); ks.i = +$("input.i").val(); ks.klubMaster = $("input.klubMaster").val(); ks.date = $("input.date").val(); ks.voteer = $("input.vote").val(); ks.meetup = $("input.meetup").val(); ks.book_id = $("select[name=selBook]").val(); // Update an existent record or create it if (_id) { KSessions.update(_id, ks); } else { KSessions.insert(ks); } }, 'click .delete': function (elt) { var _id = $('input.id').val(); elt.preventDefault(); KSessions.remove(this._id); Router.go('admin'); } }); Template.ksEdit.rendered = function () { /* Add this method because it works on refresh but won't by clicking on previous list page. */ this.$("select[name='selBook']").val(this.$('input.book-id').val()); }; ## Instruction: Insert or update anonymous when no klubmaster are specify ## Code After: Template.ksEdit.helpers({ ks: function () { var ks = this; ks.books = Books.find(); return ks; } }); Template.ksEdit.events({ 'submit form': function (elt) { var _id = $('input.id').val(), ks = _id ? KSessions.findOne(_id) : {}; elt.preventDefault(); ks.i = +$("input.i").val(); ks.klubMaster = $("input.klubMaster").val() || "anonymous"; ks.date = $("input.date").val(); ks.voteer = $("input.vote").val(); ks.meetup = $("input.meetup").val(); ks.book_id = $("select[name=selBook]").val(); // Update an existent record or create it if (_id) { KSessions.update(_id, ks); } else { KSessions.insert(ks); } }, 'click .delete': function (elt) { var _id = $('input.id').val(); elt.preventDefault(); KSessions.remove(this._id); Router.go('admin'); } }); Template.ksEdit.rendered = function () { /* Add this method because it works on refresh but won't by clicking on previous list page. */ this.$("select[name='selBook']").val(this.$('input.book-id').val()); };
Template.ksEdit.helpers({ ks: function () { var ks = this; ks.books = Books.find(); return ks; } }); Template.ksEdit.events({ 'submit form': function (elt) { var _id = $('input.id').val(), ks = _id ? KSessions.findOne(_id) : {}; elt.preventDefault(); ks.i = +$("input.i").val(); - ks.klubMaster = $("input.klubMaster").val(); + ks.klubMaster = $("input.klubMaster").val() || "anonymous"; ? +++++++++++++++ ks.date = $("input.date").val(); ks.voteer = $("input.vote").val(); ks.meetup = $("input.meetup").val(); ks.book_id = $("select[name=selBook]").val(); // Update an existent record or create it if (_id) { KSessions.update(_id, ks); } else { KSessions.insert(ks); } }, 'click .delete': function (elt) { var _id = $('input.id').val(); elt.preventDefault(); KSessions.remove(this._id); Router.go('admin'); } }); Template.ksEdit.rendered = function () { /* Add this method because it works on refresh but won't by clicking on previous list page. */ this.$("select[name='selBook']").val(this.$('input.book-id').val()); };
2
0.046512
1
1
a399011f0409f001cad87624be9eca45770f2565
app/views/photos/plus_ones/index.html.slim
app/views/photos/plus_ones/index.html.slim
.margin-bottom data-replace-self-on-ajax-success=true - if plus_one.count > 0 span.pull-right.tooltip data-tooltip-position='left' title=plus_one.names | #{pluralize(plus_one.count, 'person')} +1'd this. = form_for plus_one, url: plus_one.form_url, remote: true, method: plus_one.form_method, html: { class: '' } do |f| button class=plus_one.button_css_class type='submit' | +1
.margin-bottom data-replace-self-on-ajax-success=true - if plus_one.count > 0 span.pull-right.tooltip style='margin-right: 28px' data-tooltip-position='left' title=plus_one.names | #{pluralize(plus_one.count, 'person')} +1'd this. = form_for plus_one, url: plus_one.form_url, remote: true, method: plus_one.form_method, html: { class: '' } do |f| button class=plus_one.button_css_class type='submit' | +1
Fix plus one count overlap with close button
Fix plus one count overlap with close button
Slim
mit
RobinClowers/photo-album,RobinClowers/photo-album,RobinClowers/photo-album,RobinClowers/photo-album
slim
## Code Before: .margin-bottom data-replace-self-on-ajax-success=true - if plus_one.count > 0 span.pull-right.tooltip data-tooltip-position='left' title=plus_one.names | #{pluralize(plus_one.count, 'person')} +1'd this. = form_for plus_one, url: plus_one.form_url, remote: true, method: plus_one.form_method, html: { class: '' } do |f| button class=plus_one.button_css_class type='submit' | +1 ## Instruction: Fix plus one count overlap with close button ## Code After: .margin-bottom data-replace-self-on-ajax-success=true - if plus_one.count > 0 span.pull-right.tooltip style='margin-right: 28px' data-tooltip-position='left' title=plus_one.names | #{pluralize(plus_one.count, 'person')} +1'd this. = form_for plus_one, url: plus_one.form_url, remote: true, method: plus_one.form_method, html: { class: '' } do |f| button class=plus_one.button_css_class type='submit' | +1
.margin-bottom data-replace-self-on-ajax-success=true - if plus_one.count > 0 - span.pull-right.tooltip data-tooltip-position='left' title=plus_one.names + span.pull-right.tooltip style='margin-right: 28px' data-tooltip-position='left' title=plus_one.names ? +++++++++++++++++++++++++++ | #{pluralize(plus_one.count, 'person')} +1'd this. = form_for plus_one, url: plus_one.form_url, remote: true, method: plus_one.form_method, html: { class: '' } do |f| button class=plus_one.button_css_class type='submit' | +1
2
0.25
1
1
3aba7e7f654e492fb689b8030615658cae93c2d1
txircd/modules/umode_o.py
txircd/modules/umode_o.py
from txircd.modbase import Mode class OperMode(Mode): def checkSet(self, target, param): return False # Should only be set by the OPER command; hence, reject any normal setting of the mode def checkWhoFilter(self, user, targetUser, filters, fields, channel, udata): if "o" in filters and not udata["oper"]: return {} return udata class Spawner(object): def __init__(self, ircd): self.ircd = ircd self.oper_mode = None def spawn(self): self.oper_mode = OperMode() return { "modes": { "uno": self.oper_mode }, "actions": { "wholinemodify": self.oper_mode.checkWhoFilter }, "common": True }
from txircd.modbase import Mode class OperMode(Mode): def checkSet(self, user, target, param): user.sendMessage(irc.ERR_NOPRIVILEGES, ":Permission denied - User mode o may not be set") return False # Should only be set by the OPER command; hence, reject any normal setting of the mode def checkWhoFilter(self, user, targetUser, filters, fields, channel, udata): if "o" in filters and not udata["oper"]: return {} return udata class Spawner(object): def __init__(self, ircd): self.ircd = ircd self.oper_mode = None def spawn(self): self.oper_mode = OperMode() return { "modes": { "uno": self.oper_mode }, "actions": { "wholinemodify": self.oper_mode.checkWhoFilter }, "common": True }
Fix crashing when a user attempts to set usermode +o without /oper
Fix crashing when a user attempts to set usermode +o without /oper
Python
bsd-3-clause
Heufneutje/txircd,DesertBus/txircd,ElementalAlchemist/txircd
python
## Code Before: from txircd.modbase import Mode class OperMode(Mode): def checkSet(self, target, param): return False # Should only be set by the OPER command; hence, reject any normal setting of the mode def checkWhoFilter(self, user, targetUser, filters, fields, channel, udata): if "o" in filters and not udata["oper"]: return {} return udata class Spawner(object): def __init__(self, ircd): self.ircd = ircd self.oper_mode = None def spawn(self): self.oper_mode = OperMode() return { "modes": { "uno": self.oper_mode }, "actions": { "wholinemodify": self.oper_mode.checkWhoFilter }, "common": True } ## Instruction: Fix crashing when a user attempts to set usermode +o without /oper ## Code After: from txircd.modbase import Mode class OperMode(Mode): def checkSet(self, user, target, param): user.sendMessage(irc.ERR_NOPRIVILEGES, ":Permission denied - User mode o may not be set") return False # Should only be set by the OPER command; hence, reject any normal setting of the mode def checkWhoFilter(self, user, targetUser, filters, fields, channel, udata): if "o" in filters and not udata["oper"]: return {} return udata class Spawner(object): def __init__(self, ircd): self.ircd = ircd self.oper_mode = None def spawn(self): self.oper_mode = OperMode() return { "modes": { "uno": self.oper_mode }, "actions": { "wholinemodify": self.oper_mode.checkWhoFilter }, "common": True }
from txircd.modbase import Mode class OperMode(Mode): - def checkSet(self, target, param): + def checkSet(self, user, target, param): ? ++++++ + user.sendMessage(irc.ERR_NOPRIVILEGES, ":Permission denied - User mode o may not be set") return False # Should only be set by the OPER command; hence, reject any normal setting of the mode def checkWhoFilter(self, user, targetUser, filters, fields, channel, udata): if "o" in filters and not udata["oper"]: return {} return udata class Spawner(object): def __init__(self, ircd): self.ircd = ircd self.oper_mode = None def spawn(self): self.oper_mode = OperMode() return { "modes": { "uno": self.oper_mode }, "actions": { "wholinemodify": self.oper_mode.checkWhoFilter }, "common": True }
3
0.111111
2
1
c754e54a414e11f6c91908c56b40dcfd023df0a4
README.rdoc
README.rdoc
== README In order to access the collegestar_org Rails app you must first do the following. Install or mount Nfs via homebrew. http://www.cyberciti.biz/faq/apple-mac-osx-nfs-mount-command-tutorial/ Download and install vagrant to create vagrant files. https://www.vagrantup.com/downloads.html Download and install virtual box. https://www.virtualbox.org/wiki/Downloads Create a folder to house the development_box and collegestar_org app. Create a rails virtual database in terminal using "$RAILS_ENV=test bin/rake db:create". Navigate or cd to your collegestar_org directory and type the following commmands "$vagrant init", "$vagrant ssh", "$vagrant up", "$bin/rails server --binding 0.0.0.0" to launch the rails app. Navigate to your preffered browser and input "http://localhost:3000/" as the url and the collegestar site should appear. In order to exit enter the command "$exit" followed by either "$vagrant halt"(Recommended) or "$vagrant destroy"(Not Recommended). <tt>rake doc:app</tt>.
== README 1. In order to access the collegestar_org Rails app you must first do the following. 2. Install or mount Nfs via homebrew. http://www.cyberciti.biz/faq/apple-mac-osx-nfs-mount-command-tutorial/ 3. Download and install vagrant to create vagrant files. https://www.vagrantup.com/downloads.html 4. Download and install virtual box. https://www.virtualbox.org/wiki/Downloads 5. Create a folder to house the development_box and collegestar_org app. 6. Create a rails virtual database in terminal using "$RAILS_ENV=test bin/rake db:create". 7. Navigate or cd to your collegestar_org directory and type the following commmands "$vagrant init", "$vagrant vb-guest", "$vagrant ssh", "$vagrant up", "$bin/rails server --binding 0.0.0.0" to launch the rails app. 8. Navigate to your preffered browser and input "http://localhost:3000/" as the url and the collegestar site should appear. 9. In order to exit enter the command "$exit" followed by either "$vagrant halt"(Recommended) or "$vagrant destroy"(Not Recommended). <tt>rake doc:app</tt>.
Update Readme to correct spacing error
Update Readme to correct spacing error Enumerated the steps and corrected spacing errors.
RDoc
mit
CollegeSTAR/collegestar_org,CollegeSTAR/collegestar_org,CollegeSTAR/collegestar_org
rdoc
## Code Before: == README In order to access the collegestar_org Rails app you must first do the following. Install or mount Nfs via homebrew. http://www.cyberciti.biz/faq/apple-mac-osx-nfs-mount-command-tutorial/ Download and install vagrant to create vagrant files. https://www.vagrantup.com/downloads.html Download and install virtual box. https://www.virtualbox.org/wiki/Downloads Create a folder to house the development_box and collegestar_org app. Create a rails virtual database in terminal using "$RAILS_ENV=test bin/rake db:create". Navigate or cd to your collegestar_org directory and type the following commmands "$vagrant init", "$vagrant ssh", "$vagrant up", "$bin/rails server --binding 0.0.0.0" to launch the rails app. Navigate to your preffered browser and input "http://localhost:3000/" as the url and the collegestar site should appear. In order to exit enter the command "$exit" followed by either "$vagrant halt"(Recommended) or "$vagrant destroy"(Not Recommended). <tt>rake doc:app</tt>. ## Instruction: Update Readme to correct spacing error Enumerated the steps and corrected spacing errors. ## Code After: == README 1. In order to access the collegestar_org Rails app you must first do the following. 2. Install or mount Nfs via homebrew. http://www.cyberciti.biz/faq/apple-mac-osx-nfs-mount-command-tutorial/ 3. Download and install vagrant to create vagrant files. https://www.vagrantup.com/downloads.html 4. Download and install virtual box. https://www.virtualbox.org/wiki/Downloads 5. Create a folder to house the development_box and collegestar_org app. 6. Create a rails virtual database in terminal using "$RAILS_ENV=test bin/rake db:create". 7. Navigate or cd to your collegestar_org directory and type the following commmands "$vagrant init", "$vagrant vb-guest", "$vagrant ssh", "$vagrant up", "$bin/rails server --binding 0.0.0.0" to launch the rails app. 8. Navigate to your preffered browser and input "http://localhost:3000/" as the url and the collegestar site should appear. 9. In order to exit enter the command "$exit" followed by either "$vagrant halt"(Recommended) or "$vagrant destroy"(Not Recommended). <tt>rake doc:app</tt>.
== README - In order to access the collegestar_org Rails app you must first do the following. + 1. In order to access the collegestar_org Rails app you must first do the following. ? +++ + - Install or mount Nfs via homebrew. http://www.cyberciti.biz/faq/apple-mac-osx-nfs-mount-command-tutorial/ + 2. Install or mount Nfs via homebrew. http://www.cyberciti.biz/faq/apple-mac-osx-nfs-mount-command-tutorial/ ? +++ + - Download and install vagrant to create vagrant files. https://www.vagrantup.com/downloads.html + 3. Download and install vagrant to create vagrant files. https://www.vagrantup.com/downloads.html ? +++ + - Download and install virtual box. https://www.virtualbox.org/wiki/Downloads + 4. Download and install virtual box. https://www.virtualbox.org/wiki/Downloads ? +++ + - Create a folder to house the development_box and collegestar_org app. + 5. Create a folder to house the development_box and collegestar_org app. ? +++ + - Create a rails virtual database in terminal using "$RAILS_ENV=test bin/rake db:create". + 6. Create a rails virtual database in terminal using "$RAILS_ENV=test bin/rake db:create". ? +++ + - Navigate or cd to your collegestar_org directory and type the following commmands "$vagrant init", "$vagrant ssh", "$vagrant up", "$bin/rails server --binding 0.0.0.0" to launch the rails app. + 7. Navigate or cd to your collegestar_org directory and type the following commmands "$vagrant init", "$vagrant vb-guest", "$vagrant ssh", "$vagrant up", "$bin/rails server --binding 0.0.0.0" to launch the rails app. ? +++ +++++++++++++++++++++ + - Navigate to your preffered browser and input "http://localhost:3000/" as the url and the collegestar site should appear. + 8. Navigate to your preffered browser and input "http://localhost:3000/" as the url and the collegestar site should appear. ? +++ + - In order to exit enter the command "$exit" followed by either "$vagrant halt"(Recommended) or "$vagrant destroy"(Not Recommended). + 9. In order to exit enter the command "$exit" followed by either "$vagrant halt"(Recommended) or "$vagrant destroy"(Not Recommended). ? +++ <tt>rake doc:app</tt>.
26
2
17
9
8fdae390b112641087ef4d46076ec6b2c869af4d
README.md
README.md
This middleware will ensure that all of your response include the `x-made-with` header set to `<3`. ### Why? Because all the designers are putting it in their footers. > Made with <3 Those of us working on the HTTP APIs that power the web have been left with no way to make sure everyone knows that **we care too**. ### Owin Middleware Usage app.MakeWithLove(); ### Coming soon - Web API DelegatingHandler - Express middleware - Rack middleware - ?!
This middleware will ensure that all of your response include the `x-made-with` header set to `<3`. ### Why? Because all the designers are putting it in their footers. > Made with <3 Those of us working on the HTTP APIs that power the web have been left with no way to make sure everyone knows that **we care too**. ### Owin Middleware Usage app.MakeWithLove(); To set a custom ingredient instead of the default "<3", just pass in `MadeWithLoveOptions` app.MakeWithLove(new MadeWithLoveOptions { Ingredient = "love" }); ### Web API 2 Usage config.MessageHandlers.Add(new MadeWithLoveHandler()); To set a custom ingredient instead of the default "<3", just pass in `MadeWithLoveOptions` config.MessageHandlers.Add(new MadeWithLoveOptions { Ingredient = "love" }); ### Coming soon - Express middleware - Rack middleware - ?!
Update readme with webapi usage
Update readme with webapi usage
Markdown
mit
druttka/made-with-love
markdown
## Code Before: This middleware will ensure that all of your response include the `x-made-with` header set to `<3`. ### Why? Because all the designers are putting it in their footers. > Made with <3 Those of us working on the HTTP APIs that power the web have been left with no way to make sure everyone knows that **we care too**. ### Owin Middleware Usage app.MakeWithLove(); ### Coming soon - Web API DelegatingHandler - Express middleware - Rack middleware - ?! ## Instruction: Update readme with webapi usage ## Code After: This middleware will ensure that all of your response include the `x-made-with` header set to `<3`. ### Why? Because all the designers are putting it in their footers. > Made with <3 Those of us working on the HTTP APIs that power the web have been left with no way to make sure everyone knows that **we care too**. ### Owin Middleware Usage app.MakeWithLove(); To set a custom ingredient instead of the default "<3", just pass in `MadeWithLoveOptions` app.MakeWithLove(new MadeWithLoveOptions { Ingredient = "love" }); ### Web API 2 Usage config.MessageHandlers.Add(new MadeWithLoveHandler()); To set a custom ingredient instead of the default "<3", just pass in `MadeWithLoveOptions` config.MessageHandlers.Add(new MadeWithLoveOptions { Ingredient = "love" }); ### Coming soon - Express middleware - Rack middleware - ?!
This middleware will ensure that all of your response include the `x-made-with` header set to `<3`. ### Why? Because all the designers are putting it in their footers. > Made with <3 Those of us working on the HTTP APIs that power the web have been left with no way to make sure everyone knows that **we care too**. ### Owin Middleware Usage app.MakeWithLove(); + To set a custom ingredient instead of the default "<3", just pass in `MadeWithLoveOptions` + + app.MakeWithLove(new MadeWithLoveOptions { Ingredient = "love" }); + + ### Web API 2 Usage + + config.MessageHandlers.Add(new MadeWithLoveHandler()); + + To set a custom ingredient instead of the default "<3", just pass in `MadeWithLoveOptions` + + config.MessageHandlers.Add(new MadeWithLoveOptions { Ingredient = "love" }); + ### Coming soon - - Web API DelegatingHandler - Express middleware - Rack middleware - ?!
13
0.619048
12
1
5fca7c3779f396a77f5da1eb92e29c8908bc999b
src/Mutator/WhereMutator.php
src/Mutator/WhereMutator.php
<?php namespace Underscore\Mutator; use Underscore\Collection; use Underscore\Mutator; /** * Class WhereMutator * @package Underscore\Mutator */ class WhereMutator extends Mutator { /** * Remove all values that do not match the given key-value pairs. * * By default strict comparison is used. * * @param Collection $collection * @param array $properties * @param boolean $strict * @return Collection */ public function __invoke($collection, array $properties, $strict = true) { $collection = clone $collection; // This can be refactored to use array_filter once #54 is merged. foreach ($collection as $index => $item) { $item = new Collection($item); foreach ($properties as $key => $value) { if (empty($item[$key]) || ($strict && $item[$key] !== $value) || (!$strict && $item[$key] != $value) ) { unset($collection[$index]); } } } return $collection; } }
<?php namespace Underscore\Mutator; use Underscore\Collection; use Underscore\Mutator; class WhereMutator extends Mutator { /** * Remove all values that do not match the given key-value pairs. * * By default strict comparison is used. * * @param Collection $collection * @param array $properties * @param boolean $strict * @return Collection */ public function __invoke($collection, array $properties, $strict = true) { return $this->wrap(array_filter((array)$collection, function ($item) use ($properties, $strict) { foreach ($properties as $key => $value) { if (empty($item[$key]) || ($strict && $item[$key] !== $value) || (!$strict && $item[$key] != $value) ) { return false; } } return true; })); } }
Fix and refactor where() mutator
Fix and refactor where() mutator
PHP
mit
Im0rtality/Underscore
php
## Code Before: <?php namespace Underscore\Mutator; use Underscore\Collection; use Underscore\Mutator; /** * Class WhereMutator * @package Underscore\Mutator */ class WhereMutator extends Mutator { /** * Remove all values that do not match the given key-value pairs. * * By default strict comparison is used. * * @param Collection $collection * @param array $properties * @param boolean $strict * @return Collection */ public function __invoke($collection, array $properties, $strict = true) { $collection = clone $collection; // This can be refactored to use array_filter once #54 is merged. foreach ($collection as $index => $item) { $item = new Collection($item); foreach ($properties as $key => $value) { if (empty($item[$key]) || ($strict && $item[$key] !== $value) || (!$strict && $item[$key] != $value) ) { unset($collection[$index]); } } } return $collection; } } ## Instruction: Fix and refactor where() mutator ## Code After: <?php namespace Underscore\Mutator; use Underscore\Collection; use Underscore\Mutator; class WhereMutator extends Mutator { /** * Remove all values that do not match the given key-value pairs. * * By default strict comparison is used. * * @param Collection $collection * @param array $properties * @param boolean $strict * @return Collection */ public function __invoke($collection, array $properties, $strict = true) { return $this->wrap(array_filter((array)$collection, function ($item) use ($properties, $strict) { foreach ($properties as $key => $value) { if (empty($item[$key]) || ($strict && $item[$key] !== $value) || (!$strict && $item[$key] != $value) ) { return false; } } return true; })); } }
<?php namespace Underscore\Mutator; use Underscore\Collection; use Underscore\Mutator; - /** - * Class WhereMutator - * @package Underscore\Mutator - */ class WhereMutator extends Mutator { /** * Remove all values that do not match the given key-value pairs. * * By default strict comparison is used. * * @param Collection $collection - * @param array $properties + * @param array $properties ? +++++ - * @param boolean $strict + * @param boolean $strict ? +++ * @return Collection */ public function __invoke($collection, array $properties, $strict = true) { + return $this->wrap(array_filter((array)$collection, function ($item) use ($properties, $strict) { - $collection = clone $collection; - - // This can be refactored to use array_filter once #54 is merged. - foreach ($collection as $index => $item) { - $item = new Collection($item); foreach ($properties as $key => $value) { if (empty($item[$key]) || ($strict && $item[$key] !== $value) || (!$strict && $item[$key] != $value) ) { - unset($collection[$index]); + return false; } } - } - return $collection; + return true; + })); } }
20
0.465116
6
14
3cfff33b3de2b65981370f75dba780067c63ec8e
app/views/locations/_ros_index.html.erb
app/views/locations/_ros_index.html.erb
<div class="search-bar-and-results-section"> <%= form_tag(search_path(location), method: "get", onsubmit: "return false") do %> <div class="input-group" > <%= text_field_tag("search_text2", nil, placeholder: "search a #{location_name} school by school name or by district name (e.g. Albany)", size: 250, class:'form-control') %> </div> <% end %> <div id="results2"></div> <script type="text/javascript"> $("#search_text2").keyup(function(event) { $.get('/search/2?search='+ $(this).val()); }); </script> </div>
<div class="search-bar-and-results-section"> <%= form_tag(search_path(location), method: "get", onsubmit: "return false") do %> <div class="input-group" > <%= text_field_tag("search_text2", nil, placeholder: "search a #{location_name} school by school name or by district name (e.g. Albany)", size: 250, class:'form-control') %> </div> <% end %> <div id="results2"></div> <script type="text/javascript"> $("#search_text2").keyup(function(event) { $.get('/search/2?search='+ $(this).val()); }); </script> </div> <div class="row totals-row"> <hr> <div class="col-xs-12 col-md-12"> <div class="col-md-4"> <div class="amount-owed-section"> <h4 class="info-text">amount owed to <%= location_name %></h4> <h3 class="info-number highlight-title">$<%= number_with_precision(totals[:total_owed], :precision => 0, :delimiter => ',') %></h3> </div> </div> <div class="col-md-4"> <div class="enrollment-section"> <h4 class="info-text">total enrollment</h4> <h3 class="info-number highlight-title"><%= totals[:total_enrollment] %></h3> </div> </div> <div class="col-md-4"> <div class="amount-per-student-section"> <h4 class="info-text">amount owed per student</h4> <h3 class="info-number highlight-title">$<%= number_with_precision(totals[:amount_per_student], :precision=> 2, :delimiter => ',') %></h3> </div> </div> </div> </div> <hr>
Add section with totals information.
Add section with totals information.
HTML+ERB
mit
fma2/cfe-money,fma2/cfe-money,fma2/cfe-money
html+erb
## Code Before: <div class="search-bar-and-results-section"> <%= form_tag(search_path(location), method: "get", onsubmit: "return false") do %> <div class="input-group" > <%= text_field_tag("search_text2", nil, placeholder: "search a #{location_name} school by school name or by district name (e.g. Albany)", size: 250, class:'form-control') %> </div> <% end %> <div id="results2"></div> <script type="text/javascript"> $("#search_text2").keyup(function(event) { $.get('/search/2?search='+ $(this).val()); }); </script> </div> ## Instruction: Add section with totals information. ## Code After: <div class="search-bar-and-results-section"> <%= form_tag(search_path(location), method: "get", onsubmit: "return false") do %> <div class="input-group" > <%= text_field_tag("search_text2", nil, placeholder: "search a #{location_name} school by school name or by district name (e.g. Albany)", size: 250, class:'form-control') %> </div> <% end %> <div id="results2"></div> <script type="text/javascript"> $("#search_text2").keyup(function(event) { $.get('/search/2?search='+ $(this).val()); }); </script> </div> <div class="row totals-row"> <hr> <div class="col-xs-12 col-md-12"> <div class="col-md-4"> <div class="amount-owed-section"> <h4 class="info-text">amount owed to <%= location_name %></h4> <h3 class="info-number highlight-title">$<%= number_with_precision(totals[:total_owed], :precision => 0, :delimiter => ',') %></h3> </div> </div> <div class="col-md-4"> <div class="enrollment-section"> <h4 class="info-text">total enrollment</h4> <h3 class="info-number highlight-title"><%= totals[:total_enrollment] %></h3> </div> </div> <div class="col-md-4"> <div class="amount-per-student-section"> <h4 class="info-text">amount owed per student</h4> <h3 class="info-number highlight-title">$<%= number_with_precision(totals[:amount_per_student], :precision=> 2, :delimiter => ',') %></h3> </div> </div> </div> </div> <hr>
<div class="search-bar-and-results-section"> - <%= form_tag(search_path(location), method: "get", onsubmit: "return false") do %> <div class="input-group" > <%= text_field_tag("search_text2", nil, placeholder: "search a #{location_name} school by school name or by district name (e.g. Albany)", size: 250, class:'form-control') %> </div> <% end %> <div id="results2"></div> <script type="text/javascript"> $("#search_text2").keyup(function(event) { $.get('/search/2?search='+ $(this).val()); }); </script> </div> + + + <div class="row totals-row"> + <hr> + + <div class="col-xs-12 col-md-12"> + <div class="col-md-4"> + <div class="amount-owed-section"> + <h4 class="info-text">amount owed to <%= location_name %></h4> + <h3 class="info-number highlight-title">$<%= number_with_precision(totals[:total_owed], :precision => 0, :delimiter => ',') %></h3> + </div> + </div> + <div class="col-md-4"> + <div class="enrollment-section"> + <h4 class="info-text">total enrollment</h4> + <h3 class="info-number highlight-title"><%= totals[:total_enrollment] %></h3> + </div> + </div> + <div class="col-md-4"> + <div class="amount-per-student-section"> + <h4 class="info-text">amount owed per student</h4> + <h3 class="info-number highlight-title">$<%= number_with_precision(totals[:amount_per_student], :precision=> 2, :delimiter => ',') %></h3> + </div> + </div> + </div> + </div> + <hr>
28
2
27
1
9efa5805d462dae76b3f0d3db42b8122ace78318
lib/oxford_learners_dictionaries/definition.rb
lib/oxford_learners_dictionaries/definition.rb
require 'nokogiri' module OxfordLearnersDictionaries class Definition attr_reader :signification, :examples def initialize page @page = page @examples = Array.new end def parse_single_definition signification = @page.css('.def') @signification = signification.count > 0 ? signification[0].text : signification.text @examples.push(::OxfordLearnersDictionaries::Example.new(@page.css('.x-g'))) self end def parse_multiple_definitions index @signification = @page.css('.def')[index].text @page.css('.x-gs')[index].css('.x-g').each do |example| @examples.push(::OxfordLearnersDictionaries::Example.new(example)) end self end end end
require 'nokogiri' module OxfordLearnersDictionaries class Definition attr_reader :signification, :examples def initialize page @page = page @examples = Array.new end def parse_single_definition signification = @page.css('.def') @signification = signification.count > 0 ? signification[0].text : signification.text @examples.push(::OxfordLearnersDictionaries::Example.new(@page.css('.x-g'))) self end def parse_multiple_definitions index @signification = @page.css('.def')[index].text return self if @page.css('.x-gs')[index].nil? @page.css('.x-gs')[index].css('.x-g').each do |example| @examples.push(::OxfordLearnersDictionaries::Example.new(example)) end self end end end
Check for examples before parsing them
Check for examples before parsing them
Ruby
mit
fpgentil/oxford_learners_dictionaries
ruby
## Code Before: require 'nokogiri' module OxfordLearnersDictionaries class Definition attr_reader :signification, :examples def initialize page @page = page @examples = Array.new end def parse_single_definition signification = @page.css('.def') @signification = signification.count > 0 ? signification[0].text : signification.text @examples.push(::OxfordLearnersDictionaries::Example.new(@page.css('.x-g'))) self end def parse_multiple_definitions index @signification = @page.css('.def')[index].text @page.css('.x-gs')[index].css('.x-g').each do |example| @examples.push(::OxfordLearnersDictionaries::Example.new(example)) end self end end end ## Instruction: Check for examples before parsing them ## Code After: require 'nokogiri' module OxfordLearnersDictionaries class Definition attr_reader :signification, :examples def initialize page @page = page @examples = Array.new end def parse_single_definition signification = @page.css('.def') @signification = signification.count > 0 ? signification[0].text : signification.text @examples.push(::OxfordLearnersDictionaries::Example.new(@page.css('.x-g'))) self end def parse_multiple_definitions index @signification = @page.css('.def')[index].text return self if @page.css('.x-gs')[index].nil? @page.css('.x-gs')[index].css('.x-g').each do |example| @examples.push(::OxfordLearnersDictionaries::Example.new(example)) end self end end end
require 'nokogiri' module OxfordLearnersDictionaries class Definition attr_reader :signification, :examples def initialize page @page = page @examples = Array.new end def parse_single_definition signification = @page.css('.def') @signification = signification.count > 0 ? signification[0].text : signification.text @examples.push(::OxfordLearnersDictionaries::Example.new(@page.css('.x-g'))) self end def parse_multiple_definitions index @signification = @page.css('.def')[index].text + return self if @page.css('.x-gs')[index].nil? + @page.css('.x-gs')[index].css('.x-g').each do |example| @examples.push(::OxfordLearnersDictionaries::Example.new(example)) end self end end end
2
0.074074
2
0
6f78a01090d71eb6f4a43a1bba3c995ef19039b8
.github/workflows/ci.yml
.github/workflows/ci.yml
name: CI on: push: branches: [ '**' ] pull_request: branches: [ main ] jobs: tests: name: Build and Validate runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 # Validate via ReSpec # See https://github.com/w3c/spec-prod/blob/main/docs/examples.md - name: ReSpec Checker uses: w3c/spec-prod@v1 with: TOOLCHAIN: respec SOURCE: cg-spec/editors_draft.html VALIDATE_LINKS: true VALIDATE_MARKUP: true
name: CI on: push: branches: [ '**' ] pull_request: branches: [ main ] jobs: tests: name: Build and Validate runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 # Validate via ReSpec # See https://github.com/w3c/spec-prod/blob/main/docs/examples.md - name: ReSpec Checker uses: w3c/spec-prod@v1 with: TOOLCHAIN: respec VALIDATE_LINKS: true VALIDATE_MARKUP: true
Remove SOURCE from respec config.
Remove SOURCE from respec config.
YAML
mit
shexSpec/primer,shexSpec/primer
yaml
## Code Before: name: CI on: push: branches: [ '**' ] pull_request: branches: [ main ] jobs: tests: name: Build and Validate runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 # Validate via ReSpec # See https://github.com/w3c/spec-prod/blob/main/docs/examples.md - name: ReSpec Checker uses: w3c/spec-prod@v1 with: TOOLCHAIN: respec SOURCE: cg-spec/editors_draft.html VALIDATE_LINKS: true VALIDATE_MARKUP: true ## Instruction: Remove SOURCE from respec config. ## Code After: name: CI on: push: branches: [ '**' ] pull_request: branches: [ main ] jobs: tests: name: Build and Validate runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 # Validate via ReSpec # See https://github.com/w3c/spec-prod/blob/main/docs/examples.md - name: ReSpec Checker uses: w3c/spec-prod@v1 with: TOOLCHAIN: respec VALIDATE_LINKS: true VALIDATE_MARKUP: true
name: CI on: push: branches: [ '**' ] pull_request: branches: [ main ] jobs: tests: name: Build and Validate runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 # Validate via ReSpec # See https://github.com/w3c/spec-prod/blob/main/docs/examples.md - name: ReSpec Checker uses: w3c/spec-prod@v1 with: TOOLCHAIN: respec - SOURCE: cg-spec/editors_draft.html VALIDATE_LINKS: true VALIDATE_MARKUP: true
1
0.043478
0
1
a322ff11edfaead7df7f60b22878caf0c7b7fbcb
src/Philipbrown/Math/Math.php
src/Philipbrown/Math/Math.php
<?php namespace Philipbrown\Math; class Math { public function add($a, $b, $scale = 0) { return bcadd($a, $b, $scale); } }
<?php namespace Philipbrown\Math; class Math { /** * Add * * @param string $a * @param string $a * @param integer $scale * @return string */ public function add($a, $b, $scale = 0) { return bcadd($a, $b, $scale); } }
Add docblock to add method
Add docblock to add method
PHP
mit
philipbrown/math
php
## Code Before: <?php namespace Philipbrown\Math; class Math { public function add($a, $b, $scale = 0) { return bcadd($a, $b, $scale); } } ## Instruction: Add docblock to add method ## Code After: <?php namespace Philipbrown\Math; class Math { /** * Add * * @param string $a * @param string $a * @param integer $scale * @return string */ public function add($a, $b, $scale = 0) { return bcadd($a, $b, $scale); } }
<?php namespace Philipbrown\Math; class Math { + /** + * Add + * + * @param string $a + * @param string $a + * @param integer $scale + * @return string + */ public function add($a, $b, $scale = 0) { return bcadd($a, $b, $scale); } }
8
0.8
8
0
12d2682160a0cbc8cbc56d1627230d898065d36a
src/main/resources/ecplugins/azure/ConfigurationManagement.gwt.xml
src/main/resources/ecplugins/azure/ConfigurationManagement.gwt.xml
<module> <entry-point class="ecplugins.azure.client.ConfigurationManagementFactory"/> <inherits name="com.electriccloud.commander.gwt.ComponentBase"/> <inherits name="ecinternal.ECInternal"/> <!-- The following property limits the plugin to work with Firefox. This saves tremendously during development because the gwt compiler has to generate less <language,browser> sets of javascript files. Be careful to re-comment this when doing a build of your plugin that you plan to publish! --> <set-property name="user.agent" value="gecko1_8" /> <!-- Reduce JAR size by restricting locales to build: remove this if the plugin is localized --> <set-property name="locale" value="default"/> </module>
<module> <entry-point class="ecplugins.azure.client.ConfigurationManagementFactory"/> <inherits name="com.electriccloud.commander.gwt.ComponentBase"/> <inherits name="ecinternal.ECInternal"/> <!-- The following property limits the plugin to work with Firefox. This saves tremendously during development because the gwt compiler has to generate less <language,browser> sets of javascript files. Be careful to re-comment this when doing a build of your plugin that you plan to publish! <set-property name="user.agent" value="gecko1_8" /> --> <!-- Reduce JAR size by restricting locales to build: remove this if the plugin is localized --> <set-property name="locale" value="default"/> </module>
Drop restriction for firefox only permutation.
[EC-Azure] Drop restriction for firefox only permutation. [git-p4: depot-paths = "//depot/nimbus/integrations/EC-Azure/main/": change = 64233]
XML
apache-2.0
electric-cloud/EC-Azure,electric-cloud/EC-Azure,electric-cloud/EC-Azure
xml
## Code Before: <module> <entry-point class="ecplugins.azure.client.ConfigurationManagementFactory"/> <inherits name="com.electriccloud.commander.gwt.ComponentBase"/> <inherits name="ecinternal.ECInternal"/> <!-- The following property limits the plugin to work with Firefox. This saves tremendously during development because the gwt compiler has to generate less <language,browser> sets of javascript files. Be careful to re-comment this when doing a build of your plugin that you plan to publish! --> <set-property name="user.agent" value="gecko1_8" /> <!-- Reduce JAR size by restricting locales to build: remove this if the plugin is localized --> <set-property name="locale" value="default"/> </module> ## Instruction: [EC-Azure] Drop restriction for firefox only permutation. [git-p4: depot-paths = "//depot/nimbus/integrations/EC-Azure/main/": change = 64233] ## Code After: <module> <entry-point class="ecplugins.azure.client.ConfigurationManagementFactory"/> <inherits name="com.electriccloud.commander.gwt.ComponentBase"/> <inherits name="ecinternal.ECInternal"/> <!-- The following property limits the plugin to work with Firefox. This saves tremendously during development because the gwt compiler has to generate less <language,browser> sets of javascript files. Be careful to re-comment this when doing a build of your plugin that you plan to publish! <set-property name="user.agent" value="gecko1_8" /> --> <!-- Reduce JAR size by restricting locales to build: remove this if the plugin is localized --> <set-property name="locale" value="default"/> </module>
<module> <entry-point class="ecplugins.azure.client.ConfigurationManagementFactory"/> <inherits name="com.electriccloud.commander.gwt.ComponentBase"/> <inherits name="ecinternal.ECInternal"/> <!-- The following property limits the plugin to work with Firefox. This saves tremendously during development because the gwt compiler has to generate less <language,browser> sets of javascript files. Be careful to re-comment this when doing a build of your plugin that you plan to publish! + <set-property name="user.agent" value="gecko1_8" /> + --> + - <set-property name="user.agent" value="gecko1_8" /> - <!-- Reduce JAR size by restricting locales to build: remove this if the plugin is localized --> <set-property name="locale" value="default"/> </module>
5
0.357143
3
2
f9e9d2e7bd1208c82b4e1183a3763f31d3bfb7b0
README.md
README.md
Namespace.js is a lightweight JavaScript helper checking for or creating namespace objects. Is compatible with all new and old browsers like IE6. ## Usage ``` Namespace.is('foo.bar'); // -> false Namespace.create('foo.bar'); // -> [object] Namespace.is('foo.bar'); // -> true ```
Namespace.js is a lightweight JavaScript helper checking for or creating namespace objects. Is compatible with all new and old browsers like IE6. ## Usage ``` Namespace.create('foo.bar'); foo.bar.Magic = function () { // your magic code }; ```
Update usage section in readme file
Update usage section in readme file
Markdown
mit
cange/namespace-js,cange/namespace-js
markdown
## Code Before: Namespace.js is a lightweight JavaScript helper checking for or creating namespace objects. Is compatible with all new and old browsers like IE6. ## Usage ``` Namespace.is('foo.bar'); // -> false Namespace.create('foo.bar'); // -> [object] Namespace.is('foo.bar'); // -> true ``` ## Instruction: Update usage section in readme file ## Code After: Namespace.js is a lightweight JavaScript helper checking for or creating namespace objects. Is compatible with all new and old browsers like IE6. ## Usage ``` Namespace.create('foo.bar'); foo.bar.Magic = function () { // your magic code }; ```
Namespace.js is a lightweight JavaScript helper checking for or creating namespace objects. Is compatible with all new and old browsers like IE6. ## Usage ``` - Namespace.is('foo.bar'); // -> false - - Namespace.create('foo.bar'); // -> [object] ? --------------- + Namespace.create('foo.bar'); - - Namespace.is('foo.bar'); // -> true + foo.bar.Magic = function () { + // your magic code + }; ```
9
0.75
4
5
6a5b6df58bea4fa0e7f88fd41f650dbd52cd38db
app/index.php
app/index.php
<?php // You can adjust this following constants if necessary. // The APP constant is where your application folder located. define('APP', dirname(__FILE__) . '/'); // The INDEX_FILE constant is this defailt file name. define('INDEX_FILE', basename(__FILE__)); // And the GEAR constant is where panada folder located. define('GEAR', '../panada/'); require_once GEAR.'Gear.php'; // http://www.php.net/error_reporting new Gear;
<?php // You can adjust this following constants if necessary. // The APP constant is where your application folder located. define('APP', dirname(__FILE__) . '/'); // The INDEX_FILE constant is this defailt file name. define('INDEX_FILE', basename(__FILE__)); // And the GEAR constant is where panada folder located. define('GEAR', '../panada/'); require_once GEAR.'Gear.php'; // To sets which PHP errors are reported just like documented in this page // http://php.net/manual/en/function.error-reporting.php // You can pass a parameter into the Gear class. // Turn off all errors reporting - production use. // new Gear(0); // By default all errors will displayed - development use. new Gear;
Add litle doc to disable/enable error display
Add litle doc to disable/enable error display
PHP
bsd-3-clause
ericariyanto/Panada,tyaslab/Panada,Pasarkode/Panada,panada/Panada,kamarasta201/232015
php
## Code Before: <?php // You can adjust this following constants if necessary. // The APP constant is where your application folder located. define('APP', dirname(__FILE__) . '/'); // The INDEX_FILE constant is this defailt file name. define('INDEX_FILE', basename(__FILE__)); // And the GEAR constant is where panada folder located. define('GEAR', '../panada/'); require_once GEAR.'Gear.php'; // http://www.php.net/error_reporting new Gear; ## Instruction: Add litle doc to disable/enable error display ## Code After: <?php // You can adjust this following constants if necessary. // The APP constant is where your application folder located. define('APP', dirname(__FILE__) . '/'); // The INDEX_FILE constant is this defailt file name. define('INDEX_FILE', basename(__FILE__)); // And the GEAR constant is where panada folder located. define('GEAR', '../panada/'); require_once GEAR.'Gear.php'; // To sets which PHP errors are reported just like documented in this page // http://php.net/manual/en/function.error-reporting.php // You can pass a parameter into the Gear class. // Turn off all errors reporting - production use. // new Gear(0); // By default all errors will displayed - development use. new Gear;
<?php // You can adjust this following constants if necessary. // The APP constant is where your application folder located. define('APP', dirname(__FILE__) . '/'); // The INDEX_FILE constant is this defailt file name. define('INDEX_FILE', basename(__FILE__)); // And the GEAR constant is where panada folder located. define('GEAR', '../panada/'); require_once GEAR.'Gear.php'; - // http://www.php.net/error_reporting + // To sets which PHP errors are reported just like documented in this page + // http://php.net/manual/en/function.error-reporting.php + // You can pass a parameter into the Gear class. + + // Turn off all errors reporting - production use. + // new Gear(0); + + // By default all errors will displayed - development use. new Gear;
9
0.529412
8
1
afcb84900d406f9c78841f060347bec239201a1a
lib/capistrano/tasks/dotenv.rake
lib/capistrano/tasks/dotenv.rake
fiftyfive_recipe :dotenv do during "provision", "update" prior_to "deploy:publishing", "update" end namespace :fiftyfive do namespace :dotenv do desc "Replace/create .env file with values provided at console" task :replace do set_up_secret_prompts on release_roles(:all) do update_dotenv_file end end desc "Update .env file with any missing values" task :update do set_up_secret_prompts on release_roles(:all) do existing_env = capture("cat #{shared_dotenv_path} || echo") update_dotenv_file(existing_env) end end def shared_dotenv_path "#{shared_path}/#{fetch(:fiftyfive_dotenv_filename)}" end def set_up_secret_prompts fetch(:fiftyfive_dotenv_keys).each { |k| ask_secretly(k) } end def update_dotenv_file(existing="") updated = existing.dup fetch(:fiftyfive_dotenv_keys).each do |key| next if existing =~ /^#{Regexp.escape(key.upcase)}=/ fetch(:fiftyfive_dotenv_monitor).synchronize do updated << "\n" unless updated.end_with?("\n") updated << "#{key.upcase}=#{fetch(key)}\n" end end unless existing == updated put(updated, shared_dotenv_path, :mode => "600") end end end end
fiftyfive_recipe :dotenv do during "provision", "update" prior_to "deploy:publishing", "update" end namespace :fiftyfive do namespace :dotenv do desc "Replace/create .env file with values provided at console" task :replace do set_up_secret_prompts on release_roles(:all) do update_dotenv_file end end desc "Update .env file with any missing values" task :update do set_up_secret_prompts on release_roles(:all) do existing_env = if test("[ -f #{shared_dotenv_path} ]") download!(shared_dotenv_path) end update_dotenv_file(existing_env || "") end end def shared_dotenv_path "#{shared_path}/#{fetch(:fiftyfive_dotenv_filename)}" end def set_up_secret_prompts fetch(:fiftyfive_dotenv_keys).each { |k| ask_secretly(k) } end def update_dotenv_file(existing="") updated = existing.dup fetch(:fiftyfive_dotenv_keys).each do |key| next if existing =~ /^#{Regexp.escape(key.upcase)}=/ fetch(:fiftyfive_dotenv_monitor).synchronize do updated << "\n" unless updated.end_with?("\n") updated << "#{key.upcase}=#{fetch(key)}\n" end end unless existing == updated put(updated, shared_dotenv_path, :mode => "600") end end end end
Use download instead of capture.
Use download instead of capture. This solves a problem were secrets from being logged when the log level was set to debug.
Ruby
mit
m43nu/capistrano-mb,x44x45x41x4E/capistrano-mb,mattbrictson/capistrano-mb,m43nu/capistrano-mb,mattbrictson/capistrano-mb,mattbrictson/capistrano-mb,m43nu/capistrano-mb,x44x45x41x4E/capistrano-mb,x44x45x41x4E/capistrano-mb
ruby
## Code Before: fiftyfive_recipe :dotenv do during "provision", "update" prior_to "deploy:publishing", "update" end namespace :fiftyfive do namespace :dotenv do desc "Replace/create .env file with values provided at console" task :replace do set_up_secret_prompts on release_roles(:all) do update_dotenv_file end end desc "Update .env file with any missing values" task :update do set_up_secret_prompts on release_roles(:all) do existing_env = capture("cat #{shared_dotenv_path} || echo") update_dotenv_file(existing_env) end end def shared_dotenv_path "#{shared_path}/#{fetch(:fiftyfive_dotenv_filename)}" end def set_up_secret_prompts fetch(:fiftyfive_dotenv_keys).each { |k| ask_secretly(k) } end def update_dotenv_file(existing="") updated = existing.dup fetch(:fiftyfive_dotenv_keys).each do |key| next if existing =~ /^#{Regexp.escape(key.upcase)}=/ fetch(:fiftyfive_dotenv_monitor).synchronize do updated << "\n" unless updated.end_with?("\n") updated << "#{key.upcase}=#{fetch(key)}\n" end end unless existing == updated put(updated, shared_dotenv_path, :mode => "600") end end end end ## Instruction: Use download instead of capture. This solves a problem were secrets from being logged when the log level was set to debug. ## Code After: fiftyfive_recipe :dotenv do during "provision", "update" prior_to "deploy:publishing", "update" end namespace :fiftyfive do namespace :dotenv do desc "Replace/create .env file with values provided at console" task :replace do set_up_secret_prompts on release_roles(:all) do update_dotenv_file end end desc "Update .env file with any missing values" task :update do set_up_secret_prompts on release_roles(:all) do existing_env = if test("[ -f #{shared_dotenv_path} ]") download!(shared_dotenv_path) end update_dotenv_file(existing_env || "") end end def shared_dotenv_path "#{shared_path}/#{fetch(:fiftyfive_dotenv_filename)}" end def set_up_secret_prompts fetch(:fiftyfive_dotenv_keys).each { |k| ask_secretly(k) } end def update_dotenv_file(existing="") updated = existing.dup fetch(:fiftyfive_dotenv_keys).each do |key| next if existing =~ /^#{Regexp.escape(key.upcase)}=/ fetch(:fiftyfive_dotenv_monitor).synchronize do updated << "\n" unless updated.end_with?("\n") updated << "#{key.upcase}=#{fetch(key)}\n" end end unless existing == updated put(updated, shared_dotenv_path, :mode => "600") end end end end
fiftyfive_recipe :dotenv do during "provision", "update" prior_to "deploy:publishing", "update" end namespace :fiftyfive do namespace :dotenv do desc "Replace/create .env file with values provided at console" task :replace do set_up_secret_prompts on release_roles(:all) do update_dotenv_file end end desc "Update .env file with any missing values" task :update do set_up_secret_prompts on release_roles(:all) do - existing_env = capture("cat #{shared_dotenv_path} || echo") ? ^^^ -- ^^^ ^^^^^^^ + existing_env = if test("[ -f #{shared_dotenv_path} ]") ? ^^^ ++ ^^^^ ^ + download!(shared_dotenv_path) + end - update_dotenv_file(existing_env) + update_dotenv_file(existing_env || "") ? ++++++ end end def shared_dotenv_path "#{shared_path}/#{fetch(:fiftyfive_dotenv_filename)}" end def set_up_secret_prompts fetch(:fiftyfive_dotenv_keys).each { |k| ask_secretly(k) } end def update_dotenv_file(existing="") updated = existing.dup fetch(:fiftyfive_dotenv_keys).each do |key| next if existing =~ /^#{Regexp.escape(key.upcase)}=/ fetch(:fiftyfive_dotenv_monitor).synchronize do updated << "\n" unless updated.end_with?("\n") updated << "#{key.upcase}=#{fetch(key)}\n" end end unless existing == updated put(updated, shared_dotenv_path, :mode => "600") end end end end
6
0.117647
4
2
e14b3ea6dbb4b475958f59f0ae4ef85e1ce96b4e
app/js/arethusa.js
app/js/arethusa.js
"use strict"; angular.module( 'arethusa', [ 'mm.foundation', 'ngRoute', 'arethusa.core', 'arethusa.morph', 'arethusa.hist' ], function($routeProvider, MAIN_ROUTE) { $routeProvider.when('/', MAIN_ROUTE); } );
"use strict"; angular.module( 'arethusa', [ 'mm.foundation', 'ngRoute', 'arethusa.core', 'arethusa.morph', 'arethusa.hist' ], function($routeProvider, MAIN_ROUTE) { $routeProvider.when('/', MAIN_ROUTE); $routeProvider.when('/:conf', MAIN_ROUTE); } );
Allow to set the conf param through route matching
Allow to set the conf param through route matching
JavaScript
mit
alpheios-project/arethusa,latin-language-toolkit/arethusa,fbaumgardt/arethusa,alpheios-project/arethusa,latin-language-toolkit/arethusa,fbaumgardt/arethusa,PonteIneptique/arethusa,fbaumgardt/arethusa,Masoumeh/arethusa,PonteIneptique/arethusa,alpheios-project/arethusa,Masoumeh/arethusa
javascript
## Code Before: "use strict"; angular.module( 'arethusa', [ 'mm.foundation', 'ngRoute', 'arethusa.core', 'arethusa.morph', 'arethusa.hist' ], function($routeProvider, MAIN_ROUTE) { $routeProvider.when('/', MAIN_ROUTE); } ); ## Instruction: Allow to set the conf param through route matching ## Code After: "use strict"; angular.module( 'arethusa', [ 'mm.foundation', 'ngRoute', 'arethusa.core', 'arethusa.morph', 'arethusa.hist' ], function($routeProvider, MAIN_ROUTE) { $routeProvider.when('/', MAIN_ROUTE); $routeProvider.when('/:conf', MAIN_ROUTE); } );
"use strict"; angular.module( 'arethusa', [ 'mm.foundation', 'ngRoute', 'arethusa.core', 'arethusa.morph', 'arethusa.hist' ], function($routeProvider, MAIN_ROUTE) { $routeProvider.when('/', MAIN_ROUTE); + $routeProvider.when('/:conf', MAIN_ROUTE); } );
1
0.071429
1
0
c380a1683f427d1fd30d07920f12f1590512db75
README.rst
README.rst
httpie-ntlm =========== NTLM auth plugin for `HTTPie <https://github.com/jkbr/httpie>`_. Installation ------------ .. code-block:: bash $ pip install httpie-ntlm You should now see ``ntlm`` under ``--auth-type`` in ``$ http --help`` output. Usage ----- .. code-block:: bash $ http --auth-type=ntlm --auth='domain\\username:password' example.org You can also use `HTTPie sessions <https://github.com/jkbr/httpie#sessions>`_: .. code-block:: bash # Create session $ http --session=logged-in --auth-type=ntlm --auth='domain\\username:password' example.org # Re-use auth $ http --session=logged-in POST example.org hello=world
httpie-ntlm =========== NTLM auth plugin for `HTTPie <https://github.com/jkbr/httpie>`_. Installation ------------ .. code-block:: bash $ pip install httpie-ntlm You should now see ``ntlm`` under ``--auth-type`` in ``$ http --help`` output. Usage ----- .. code-block:: bash $ http --auth-type=ntlm --auth='domain\\username:password' example.org You can also use `HTTPie sessions <https://github.com/jkbr/httpie#sessions>`_: .. code-block:: bash # Create session $ http --session=logged-in --auth-type=ntlm --auth='domain\\username:password' example.org # Re-use auth $ http --session=logged-in POST example.org hello=world Requirements ------------ - requests-ntlm_ .. _requests-ntlm: https://github.com/requests/requests-ntlm/
Add link to upstream project
Add link to upstream project
reStructuredText
bsd-3-clause
jkbrzt/httpie-ntlm
restructuredtext
## Code Before: httpie-ntlm =========== NTLM auth plugin for `HTTPie <https://github.com/jkbr/httpie>`_. Installation ------------ .. code-block:: bash $ pip install httpie-ntlm You should now see ``ntlm`` under ``--auth-type`` in ``$ http --help`` output. Usage ----- .. code-block:: bash $ http --auth-type=ntlm --auth='domain\\username:password' example.org You can also use `HTTPie sessions <https://github.com/jkbr/httpie#sessions>`_: .. code-block:: bash # Create session $ http --session=logged-in --auth-type=ntlm --auth='domain\\username:password' example.org # Re-use auth $ http --session=logged-in POST example.org hello=world ## Instruction: Add link to upstream project ## Code After: httpie-ntlm =========== NTLM auth plugin for `HTTPie <https://github.com/jkbr/httpie>`_. Installation ------------ .. code-block:: bash $ pip install httpie-ntlm You should now see ``ntlm`` under ``--auth-type`` in ``$ http --help`` output. Usage ----- .. code-block:: bash $ http --auth-type=ntlm --auth='domain\\username:password' example.org You can also use `HTTPie sessions <https://github.com/jkbr/httpie#sessions>`_: .. code-block:: bash # Create session $ http --session=logged-in --auth-type=ntlm --auth='domain\\username:password' example.org # Re-use auth $ http --session=logged-in POST example.org hello=world Requirements ------------ - requests-ntlm_ .. _requests-ntlm: https://github.com/requests/requests-ntlm/
httpie-ntlm =========== NTLM auth plugin for `HTTPie <https://github.com/jkbr/httpie>`_. Installation ------------ .. code-block:: bash $ pip install httpie-ntlm You should now see ``ntlm`` under ``--auth-type`` in ``$ http --help`` output. Usage ----- .. code-block:: bash $ http --auth-type=ntlm --auth='domain\\username:password' example.org You can also use `HTTPie sessions <https://github.com/jkbr/httpie#sessions>`_: .. code-block:: bash # Create session $ http --session=logged-in --auth-type=ntlm --auth='domain\\username:password' example.org # Re-use auth $ http --session=logged-in POST example.org hello=world + Requirements + ------------ + + - requests-ntlm_ + + .. _requests-ntlm: https://github.com/requests/requests-ntlm/
6
0.171429
6
0
79aceb55541a11c0a0e3e58b0eda05d1ef77f365
src/utils/mapValues.js
src/utils/mapValues.js
/** * Identical to `Array.prototype.map()` except for object values. * @param {Object} object - The object whose values will be mapped. * @param {Function} callback - The callback to map the object values. Gets passed * equivalent parameters as `Array.prototype.map()`. * @returns {Object} A new mapped object. * @private */ export default function mapValues(object, callback = value => value) { const entries = Object.entries(object); return entries.reduce((mapped, [key, val]) => { mapped[key] = callback(val, key, object); // eslint-disable-line no-param-reassign return mapped; }, {}); }
/** * Identical to `Array.prototype.map()` except for object values. * @param {Object} object - The object whose values will be mapped. * @param {Function} callback - The callback to map the object values. Gets passed * equivalent parameters as `Array.prototype.map()`. * @returns {Object} A new mapped object. * @private */ export default function mapValues(object, callback = value => value) { const keys = Object.keys(object); return keys.reduce((mapped, nextKey) => { mapped[nextKey] = callback(object[nextKey], nextKey, object); // eslint-disable-line return mapped; }, {}); }
Change Object.entries() to ES5 compatible method.
Change Object.entries() to ES5 compatible method.
JavaScript
mit
hkwu/wargamer
javascript
## Code Before: /** * Identical to `Array.prototype.map()` except for object values. * @param {Object} object - The object whose values will be mapped. * @param {Function} callback - The callback to map the object values. Gets passed * equivalent parameters as `Array.prototype.map()`. * @returns {Object} A new mapped object. * @private */ export default function mapValues(object, callback = value => value) { const entries = Object.entries(object); return entries.reduce((mapped, [key, val]) => { mapped[key] = callback(val, key, object); // eslint-disable-line no-param-reassign return mapped; }, {}); } ## Instruction: Change Object.entries() to ES5 compatible method. ## Code After: /** * Identical to `Array.prototype.map()` except for object values. * @param {Object} object - The object whose values will be mapped. * @param {Function} callback - The callback to map the object values. Gets passed * equivalent parameters as `Array.prototype.map()`. * @returns {Object} A new mapped object. * @private */ export default function mapValues(object, callback = value => value) { const keys = Object.keys(object); return keys.reduce((mapped, nextKey) => { mapped[nextKey] = callback(object[nextKey], nextKey, object); // eslint-disable-line return mapped; }, {}); }
/** * Identical to `Array.prototype.map()` except for object values. * @param {Object} object - The object whose values will be mapped. * @param {Function} callback - The callback to map the object values. Gets passed * equivalent parameters as `Array.prototype.map()`. * @returns {Object} A new mapped object. * @private */ export default function mapValues(object, callback = value => value) { - const entries = Object.entries(object); ? ^^^^^ ^^^^^ + const keys = Object.keys(object); ? + ^ + ^ - return entries.reduce((mapped, [key, val]) => { ? ^^^^^ ^^ ------ + return keys.reduce((mapped, nextKey) => { ? + ^ ^^^^^ - mapped[key] = callback(val, key, object); // eslint-disable-line no-param-reassign + mapped[nextKey] = callback(object[nextKey], nextKey, object); // eslint-disable-line return mapped; }, {}); }
6
0.352941
3
3
ef333a82a2dd4036b1a7c13140f01ef649eb08f5
requirements.txt
requirements.txt
Flask Jinja2 MarkupSafe Werkzeug itsdangerous pymongo wsgiref gunicorn happymongo Flask-WTF WTForms python-memcached python-dateutil requests isoweek
Flask Jinja2 MarkupSafe Werkzeug itsdangerous pymongo wsgiref gunicorn happymongo Flask-WTF WTForms python-memcached python-dateutil requests isoweek flask-classy
Add in requirement for module
Add in requirement for module
Text
apache-2.0
rackerlabs/pitchfork,rackerlabs/pitchfork,oldarmyc/pitchfork,rackerlabs/pitchfork,oldarmyc/pitchfork,oldarmyc/pitchfork
text
## Code Before: Flask Jinja2 MarkupSafe Werkzeug itsdangerous pymongo wsgiref gunicorn happymongo Flask-WTF WTForms python-memcached python-dateutil requests isoweek ## Instruction: Add in requirement for module ## Code After: Flask Jinja2 MarkupSafe Werkzeug itsdangerous pymongo wsgiref gunicorn happymongo Flask-WTF WTForms python-memcached python-dateutil requests isoweek flask-classy
Flask Jinja2 MarkupSafe Werkzeug itsdangerous pymongo wsgiref gunicorn happymongo Flask-WTF WTForms python-memcached python-dateutil requests isoweek + flask-classy
1
0.066667
1
0
7c95dea64966181b9ad816072ccb24c74b8e9f1e
pypwa/meta.yaml
pypwa/meta.yaml
package: name: pypwa version: "2.0.0b1" source: git_rev: v2.0.0b1 git_url: git@github.com:JeffersonLab/PyPWA.git requirements: build: - python - setuptools - iminuit - appdirs - tabulate - pyyaml - numpy - pytest - pytest-cov - pytest-runner run: - python - iminuit - appdirs - tabulate - pyyaml - numpy about: home: https://github.com/JeffersonLab/PyPWA license: GNU General Public License v3 (GPLv3) summary: "Pythonic Partial Wave Analysis Toolkit."
package: name: pypwa version: "3.0.0b1" source: git_rev: development git_url: git@github.com:JeffersonLab/PyPWA.git requirements: build: - python>=3.6,<4 - setuptools>=46 - tqdm>=4.45,<5 - iminuit>=1.3,<2 - scipy>=1.4,<2 - numpy>=1.18,<2 - pyyaml>=5.3,<6 - tabulate>=0.8,<1 - appdirs>=1.4,<2 - pytables>=3.6,<4 - pandas>=1,<2 - openpyxl>=3,<4 - matplotlib>=3.1,<4 - numexpr>=2.7,<3 run: - python>=3.6,<4 - setuptools>=46 - tqdm>=4.45,<5 - iminuit>=1.3,<2 - scipy>=1.4,<2 - numpy>=1.18,<2 - pyyaml>=5.3,<6 - tabulate>=0.8,<1 - appdirs>=1.4,<2 - pytables>=3.6,<4 - pandas>=1,<2 - openpyxl>=3,<4 - matplotlib>=3.1,<4 - numexpr>=2.7,<3 about: home: https://github.com/JeffersonLab/PyPWA license: GNU General Public License v3 (GPLv3) summary: "Pythonic Partial Wave Analysis Toolkit."
Update PyPWA dependencies to match 3.0
Update PyPWA dependencies to match 3.0
YAML
bsd-3-clause
Markjonestx/conda_pypwa
yaml
## Code Before: package: name: pypwa version: "2.0.0b1" source: git_rev: v2.0.0b1 git_url: git@github.com:JeffersonLab/PyPWA.git requirements: build: - python - setuptools - iminuit - appdirs - tabulate - pyyaml - numpy - pytest - pytest-cov - pytest-runner run: - python - iminuit - appdirs - tabulate - pyyaml - numpy about: home: https://github.com/JeffersonLab/PyPWA license: GNU General Public License v3 (GPLv3) summary: "Pythonic Partial Wave Analysis Toolkit." ## Instruction: Update PyPWA dependencies to match 3.0 ## Code After: package: name: pypwa version: "3.0.0b1" source: git_rev: development git_url: git@github.com:JeffersonLab/PyPWA.git requirements: build: - python>=3.6,<4 - setuptools>=46 - tqdm>=4.45,<5 - iminuit>=1.3,<2 - scipy>=1.4,<2 - numpy>=1.18,<2 - pyyaml>=5.3,<6 - tabulate>=0.8,<1 - appdirs>=1.4,<2 - pytables>=3.6,<4 - pandas>=1,<2 - openpyxl>=3,<4 - matplotlib>=3.1,<4 - numexpr>=2.7,<3 run: - python>=3.6,<4 - setuptools>=46 - tqdm>=4.45,<5 - iminuit>=1.3,<2 - scipy>=1.4,<2 - numpy>=1.18,<2 - pyyaml>=5.3,<6 - tabulate>=0.8,<1 - appdirs>=1.4,<2 - pytables>=3.6,<4 - pandas>=1,<2 - openpyxl>=3,<4 - matplotlib>=3.1,<4 - numexpr>=2.7,<3 about: home: https://github.com/JeffersonLab/PyPWA license: GNU General Public License v3 (GPLv3) summary: "Pythonic Partial Wave Analysis Toolkit."
package: name: pypwa - version: "2.0.0b1" ? ^ + version: "3.0.0b1" ? ^ source: - git_rev: v2.0.0b1 + git_rev: development git_url: git@github.com:JeffersonLab/PyPWA.git + requirements: build: - - python + - python>=3.6,<4 ? ++++++++ - - setuptools + - setuptools>=46 ? ++++ + - tqdm>=4.45,<5 - - iminuit + - iminuit>=1.3,<2 ? ++++++++ - - appdirs + - scipy>=1.4,<2 + - numpy>=1.18,<2 + - pyyaml>=5.3,<6 - - tabulate + - tabulate>=0.8,<1 ? ++++++++ - - pyyaml - - numpy - - pytest - - pytest-cov - - pytest-runner + - appdirs>=1.4,<2 + - pytables>=3.6,<4 + - pandas>=1,<2 + - openpyxl>=3,<4 + - matplotlib>=3.1,<4 + - numexpr>=2.7,<3 run: - - python + - python>=3.6,<4 ? ++++++++ + - setuptools>=46 + - tqdm>=4.45,<5 - - iminuit + - iminuit>=1.3,<2 ? ++++++++ - - appdirs + - scipy>=1.4,<2 + - numpy>=1.18,<2 + - pyyaml>=5.3,<6 - - tabulate + - tabulate>=0.8,<1 ? ++++++++ - - pyyaml - - numpy + - appdirs>=1.4,<2 + - pytables>=3.6,<4 + - pandas>=1,<2 + - openpyxl>=3,<4 + - matplotlib>=3.1,<4 + - numexpr>=2.7,<3 about: home: https://github.com/JeffersonLab/PyPWA license: GNU General Public License v3 (GPLv3) summary: "Pythonic Partial Wave Analysis Toolkit."
49
1.484848
31
18
c5c177aafdd078561359edabc1084d2af5d0156d
client/Components/Tabs.tsx
client/Components/Tabs.tsx
import * as React from "react"; interface TabsProps { options: string[]; selected?: string; onChoose: (option: string) => void; } interface TabsState { } export class Tabs extends React.Component<TabsProps, TabsState> { constructor(props) { super(props); } public render() { const spanElements = this.props.options.map( option => <span className={this.props.selected == option ? "s-selected" : ""} onClick={() => this.props.onChoose(option)}>{option}</span> ); return <div className="c-tabs"> {spanElements} </div>; } }
import * as React from "react"; interface TabsProps { options: string[]; selected?: string; onChoose: (option: string) => void; } interface TabsState { } export class Tabs extends React.Component<TabsProps, TabsState> { constructor(props) { super(props); } public render() { const spanElements = this.props.options.map( (option, i) => <span key={i} className={this.props.selected == option ? "s-selected" : ""} onClick={() => this.props.onChoose(option)}>{option}</span> ); return <div className="c-tabs"> {spanElements} </div>; } }
Add key to tab spans
Add key to tab spans
TypeScript
mit
cynicaloptimist/improved-initiative,cynicaloptimist/improved-initiative,cynicaloptimist/improved-initiative
typescript
## Code Before: import * as React from "react"; interface TabsProps { options: string[]; selected?: string; onChoose: (option: string) => void; } interface TabsState { } export class Tabs extends React.Component<TabsProps, TabsState> { constructor(props) { super(props); } public render() { const spanElements = this.props.options.map( option => <span className={this.props.selected == option ? "s-selected" : ""} onClick={() => this.props.onChoose(option)}>{option}</span> ); return <div className="c-tabs"> {spanElements} </div>; } } ## Instruction: Add key to tab spans ## Code After: import * as React from "react"; interface TabsProps { options: string[]; selected?: string; onChoose: (option: string) => void; } interface TabsState { } export class Tabs extends React.Component<TabsProps, TabsState> { constructor(props) { super(props); } public render() { const spanElements = this.props.options.map( (option, i) => <span key={i} className={this.props.selected == option ? "s-selected" : ""} onClick={() => this.props.onChoose(option)}>{option}</span> ); return <div className="c-tabs"> {spanElements} </div>; } }
import * as React from "react"; interface TabsProps { options: string[]; selected?: string; onChoose: (option: string) => void; } interface TabsState { } export class Tabs extends React.Component<TabsProps, TabsState> { constructor(props) { super(props); } public render() { const spanElements = this.props.options.map( - option => <span className={this.props.selected == option ? "s-selected" : ""} onClick={() => this.props.onChoose(option)}>{option}</span> + (option, i) => <span key={i} className={this.props.selected == option ? "s-selected" : ""} onClick={() => this.props.onChoose(option)}>{option}</span> ? + ++++ ++++++++ ); return <div className="c-tabs"> {spanElements} </div>; } }
2
0.083333
1
1
f8e59dd8996cc5dcfcd42dfefa367f4c0a38b435
inc/Silki/Build.pm
inc/Silki/Build.pm
package Silki::Build; use strict; use warnings; use base 'Module::Build'; my %Requires = ( 'Catalyst::Plugin::Session::Store::DBI' => '0.15', 'Data::Localize' => '0.00013_03', 'Fey::ORM' => '0.32', 'MooseX::ClassAttribute' => '0', 'MooseX::StrictConstructor' => '0', ); my %BuildRequires = ( 'Test::Exception' => '0', 'Test::More' => '0.88', ); sub new { my $class = shift; return $class->SUPER::new( license => 'perl', module_name => 'Silki', requires => \%Requires, build_requires => \%BuildRequires, script_files => [ glob('bin/*.pl') ], recursive_test_files => 1, meta_merge => { resources => { repository => 'http://hg.urth.org/hg/Silki', }, }, ); } 1;
package Silki::Build; use strict; use warnings; use base 'Module::Build'; my %Requires = ( 'Catalyst::Plugin::Session::Store::DBI' => '0.15', 'Data::Localize' => '0.00013_03', 'Fey::ORM' => '0.32', 'Markdent' => '0.10', 'MooseX::ClassAttribute' => '0', 'MooseX::StrictConstructor' => '0', ); my %BuildRequires = ( 'Test::Exception' => '0', 'Test::More' => '0.88', ); sub new { my $class = shift; return $class->SUPER::new( license => 'perl', module_name => 'Silki', requires => \%Requires, build_requires => \%BuildRequires, script_files => [ glob('bin/*.pl') ], recursive_test_files => 1, meta_merge => { resources => { repository => 'http://hg.urth.org/hg/Silki', }, }, ); } 1;
Add Markdent 0.10 as a prereq
Add Markdent 0.10 as a prereq
Perl
agpl-3.0
autarch/Silki,autarch/Silki,autarch/Silki,autarch/Silki
perl
## Code Before: package Silki::Build; use strict; use warnings; use base 'Module::Build'; my %Requires = ( 'Catalyst::Plugin::Session::Store::DBI' => '0.15', 'Data::Localize' => '0.00013_03', 'Fey::ORM' => '0.32', 'MooseX::ClassAttribute' => '0', 'MooseX::StrictConstructor' => '0', ); my %BuildRequires = ( 'Test::Exception' => '0', 'Test::More' => '0.88', ); sub new { my $class = shift; return $class->SUPER::new( license => 'perl', module_name => 'Silki', requires => \%Requires, build_requires => \%BuildRequires, script_files => [ glob('bin/*.pl') ], recursive_test_files => 1, meta_merge => { resources => { repository => 'http://hg.urth.org/hg/Silki', }, }, ); } 1; ## Instruction: Add Markdent 0.10 as a prereq ## Code After: package Silki::Build; use strict; use warnings; use base 'Module::Build'; my %Requires = ( 'Catalyst::Plugin::Session::Store::DBI' => '0.15', 'Data::Localize' => '0.00013_03', 'Fey::ORM' => '0.32', 'Markdent' => '0.10', 'MooseX::ClassAttribute' => '0', 'MooseX::StrictConstructor' => '0', ); my %BuildRequires = ( 'Test::Exception' => '0', 'Test::More' => '0.88', ); sub new { my $class = shift; return $class->SUPER::new( license => 'perl', module_name => 'Silki', requires => \%Requires, build_requires => \%BuildRequires, script_files => [ glob('bin/*.pl') ], recursive_test_files => 1, meta_merge => { resources => { repository => 'http://hg.urth.org/hg/Silki', }, }, ); } 1;
package Silki::Build; use strict; use warnings; use base 'Module::Build'; my %Requires = ( 'Catalyst::Plugin::Session::Store::DBI' => '0.15', 'Data::Localize' => '0.00013_03', 'Fey::ORM' => '0.32', + 'Markdent' => '0.10', 'MooseX::ClassAttribute' => '0', 'MooseX::StrictConstructor' => '0', ); my %BuildRequires = ( 'Test::Exception' => '0', 'Test::More' => '0.88', ); sub new { my $class = shift; return $class->SUPER::new( license => 'perl', module_name => 'Silki', requires => \%Requires, build_requires => \%BuildRequires, script_files => [ glob('bin/*.pl') ], recursive_test_files => 1, meta_merge => { resources => { repository => 'http://hg.urth.org/hg/Silki', }, }, ); } 1;
1
0.025
1
0
3905b423a9e9683d0c85db724eb845230bedc8c2
package.json
package.json
{ "name": "smart-router", "version": "0.2.2", "author": "Callixte <ccauchois@virtuoz.com>", "description": "a message routing system that routes messages based on their content.", "main": "./lib/index", "repository": { "type": "git", "url": "https://github.com/VirtuOz/smart-router.git" }, "dependencies": { "jsclass": "3.0.9", "amqp": "git://github.com/sbellone/node-amqp.git#fixReconnectAndPassiveQueues", "socket.io": "0.9", "socket.io-client": "0.9", "winston": "0.6.2", "config": "0.4.17", "nagios": "1.0.0" }, "devDependencies": { "mocha": "1.7.0", "chai": "1.3.0", "nock": "0.13.5", "xunit-html-cov": "0.0.2" }, "engines": { "node": ">=0.8.18" }, "scripts": { "test": "PORT=8889 mocha --ignore-leaks -R spec -t 30000 --ui bdd", "test-coverage": "scripts/runTestsWithCoverage.sh", "clean": "rm -rf target" }, "license": "Apache2" }
{ "name": "smart-router", "version": "0.2.2", "author": "Callixte <ccauchois@virtuoz.com>", "description": "a message routing system that routes messages based on their content.", "main": "./lib/index", "repository": { "type": "git", "url": "https://github.com/VirtuOz/smart-router.git" }, "dependencies": { "jsclass": "3.0.9", "amqp": "git+ssh://git@github.com:VirtuOz/node-amqp.git#fixReconnectAndPassiveQueues", "socket.io": "0.9", "socket.io-client": "0.9", "winston": "0.6.2", "config": "0.4.17", "nagios": "1.0.0" }, "devDependencies": { "mocha": "1.7.0", "chai": "1.3.0", "nock": "0.13.5", "xunit-html-cov": "0.0.2" }, "engines": { "node": ">=0.8.18" }, "scripts": { "test": "PORT=8889 mocha --ignore-leaks -R spec -t 30000 --ui bdd", "test-coverage": "scripts/runTestsWithCoverage.sh", "clean": "rm -rf target" }, "license": "Apache2" }
Use patched amqp fro VirtuOz repo
Use patched amqp fro VirtuOz repo
JSON
apache-2.0
VirtuOz/smart-router,VirtuOz/smart-router
json
## Code Before: { "name": "smart-router", "version": "0.2.2", "author": "Callixte <ccauchois@virtuoz.com>", "description": "a message routing system that routes messages based on their content.", "main": "./lib/index", "repository": { "type": "git", "url": "https://github.com/VirtuOz/smart-router.git" }, "dependencies": { "jsclass": "3.0.9", "amqp": "git://github.com/sbellone/node-amqp.git#fixReconnectAndPassiveQueues", "socket.io": "0.9", "socket.io-client": "0.9", "winston": "0.6.2", "config": "0.4.17", "nagios": "1.0.0" }, "devDependencies": { "mocha": "1.7.0", "chai": "1.3.0", "nock": "0.13.5", "xunit-html-cov": "0.0.2" }, "engines": { "node": ">=0.8.18" }, "scripts": { "test": "PORT=8889 mocha --ignore-leaks -R spec -t 30000 --ui bdd", "test-coverage": "scripts/runTestsWithCoverage.sh", "clean": "rm -rf target" }, "license": "Apache2" } ## Instruction: Use patched amqp fro VirtuOz repo ## Code After: { "name": "smart-router", "version": "0.2.2", "author": "Callixte <ccauchois@virtuoz.com>", "description": "a message routing system that routes messages based on their content.", "main": "./lib/index", "repository": { "type": "git", "url": "https://github.com/VirtuOz/smart-router.git" }, "dependencies": { "jsclass": "3.0.9", "amqp": "git+ssh://git@github.com:VirtuOz/node-amqp.git#fixReconnectAndPassiveQueues", "socket.io": "0.9", "socket.io-client": "0.9", "winston": "0.6.2", "config": "0.4.17", "nagios": "1.0.0" }, "devDependencies": { "mocha": "1.7.0", "chai": "1.3.0", "nock": "0.13.5", "xunit-html-cov": "0.0.2" }, "engines": { "node": ">=0.8.18" }, "scripts": { "test": "PORT=8889 mocha --ignore-leaks -R spec -t 30000 --ui bdd", "test-coverage": "scripts/runTestsWithCoverage.sh", "clean": "rm -rf target" }, "license": "Apache2" }
{ "name": "smart-router", "version": "0.2.2", "author": "Callixte <ccauchois@virtuoz.com>", "description": "a message routing system that routes messages based on their content.", "main": "./lib/index", "repository": { "type": "git", "url": "https://github.com/VirtuOz/smart-router.git" }, "dependencies": { "jsclass": "3.0.9", - "amqp": "git://github.com/sbellone/node-amqp.git#fixReconnectAndPassiveQueues", ? ^^^^^^^^^ + "amqp": "git+ssh://git@github.com:VirtuOz/node-amqp.git#fixReconnectAndPassiveQueues", ? ++++ ++++ ^^^^^^^^ "socket.io": "0.9", "socket.io-client": "0.9", "winston": "0.6.2", "config": "0.4.17", "nagios": "1.0.0" }, "devDependencies": { "mocha": "1.7.0", "chai": "1.3.0", "nock": "0.13.5", "xunit-html-cov": "0.0.2" }, "engines": { "node": ">=0.8.18" }, "scripts": { "test": "PORT=8889 mocha --ignore-leaks -R spec -t 30000 --ui bdd", "test-coverage": "scripts/runTestsWithCoverage.sh", "clean": "rm -rf target" }, "license": "Apache2" }
2
0.057143
1
1
d15fc4574851414193fbf4c465b037e51bfe7064
README.md
README.md
Bioimaging ========== Monte Carlo simulation toolkit for bioimaging systems Requirements ------------ You need Python 3 and its libraries, `numpy` and `scipy`, to run `bioimaging`. Quick start ----------- ``` $ python setup.py test install ``` ``` $ python script.py (initial time) (final time) ``` License ------- `bioimaging` is licensed under the terms of BSD-3-Clause (see [LICENSE](/LICENSE)). Citation -------- If this package contributes to your work, please cite the followings. [https://doi.org/10.1371/journal.pone.0130089](https://doi.org/10.1371/journal.pone.0130089)
Bioimaging ========== [![Codacy Badge](https://api.codacy.com/project/badge/Grade/ca714025c04b456dbaa036e0275cb603)](https://www.codacy.com/app/ecell/bioimaging?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=ecell/bioimaging&amp;utm_campaign=Badge_Grade) Monte Carlo simulation toolkit for bioimaging systems Requirements ------------ You need Python 3 and its libraries, `numpy` and `scipy`, to run `bioimaging`. Quick start ----------- ``` $ python setup.py test install ``` ``` $ python script.py (initial time) (final time) ``` License ------- `bioimaging` is licensed under the terms of BSD-3-Clause (see [LICENSE](/LICENSE)). Citation -------- If this package contributes to your work, please cite the followings. [https://doi.org/10.1371/journal.pone.0130089](https://doi.org/10.1371/journal.pone.0130089)
Add a badge for Codacy
Add a badge for Codacy
Markdown
bsd-3-clause
ecell/bioimaging
markdown
## Code Before: Bioimaging ========== Monte Carlo simulation toolkit for bioimaging systems Requirements ------------ You need Python 3 and its libraries, `numpy` and `scipy`, to run `bioimaging`. Quick start ----------- ``` $ python setup.py test install ``` ``` $ python script.py (initial time) (final time) ``` License ------- `bioimaging` is licensed under the terms of BSD-3-Clause (see [LICENSE](/LICENSE)). Citation -------- If this package contributes to your work, please cite the followings. [https://doi.org/10.1371/journal.pone.0130089](https://doi.org/10.1371/journal.pone.0130089) ## Instruction: Add a badge for Codacy ## Code After: Bioimaging ========== [![Codacy Badge](https://api.codacy.com/project/badge/Grade/ca714025c04b456dbaa036e0275cb603)](https://www.codacy.com/app/ecell/bioimaging?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=ecell/bioimaging&amp;utm_campaign=Badge_Grade) Monte Carlo simulation toolkit for bioimaging systems Requirements ------------ You need Python 3 and its libraries, `numpy` and `scipy`, to run `bioimaging`. Quick start ----------- ``` $ python setup.py test install ``` ``` $ python script.py (initial time) (final time) ``` License ------- `bioimaging` is licensed under the terms of BSD-3-Clause (see [LICENSE](/LICENSE)). Citation -------- If this package contributes to your work, please cite the followings. [https://doi.org/10.1371/journal.pone.0130089](https://doi.org/10.1371/journal.pone.0130089)
Bioimaging ========== + + [![Codacy Badge](https://api.codacy.com/project/badge/Grade/ca714025c04b456dbaa036e0275cb603)](https://www.codacy.com/app/ecell/bioimaging?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=ecell/bioimaging&amp;utm_campaign=Badge_Grade) Monte Carlo simulation toolkit for bioimaging systems Requirements ------------ You need Python 3 and its libraries, `numpy` and `scipy`, to run `bioimaging`. Quick start ----------- ``` $ python setup.py test install ``` ``` $ python script.py (initial time) (final time) ``` License ------- `bioimaging` is licensed under the terms of BSD-3-Clause (see [LICENSE](/LICENSE)). Citation -------- If this package contributes to your work, please cite the followings. [https://doi.org/10.1371/journal.pone.0130089](https://doi.org/10.1371/journal.pone.0130089)
2
0.0625
2
0
776efe3eb461edba083918934795e6d8387cf2e7
charts_builder/templates/partials/form-view.html
charts_builder/templates/partials/form-view.html
<form action="{{ url_for('charts_builder.update') if view else url_for('charts_builder.create') }}" class="well" id="save-view-form" method="POST" role="form"> <button class="pull-right btn btn-lg btn-primary"><span class="fa fa-check"></span> {% if view %}update{% else %}save{% endif %} layout</button> {% if view %} <input type="hidden" name="id" value="{{ view.id }}"> {% endif %} <label> View Name <input class="form-control" type="text" name="name" value="{% if view %}{{ view.name }}{% endif %}" placeholder="name"> </label> <div class="modules hidden"> {% if view %} {% for module in view.modules %} <input type="text" id="{{ module.guid }}" class="form-control" name="module_{{ module.name }}" value="{{ module|jsonstring }}"> {% endfor %} {% endif %} </div> <a href="#chart-options" id="add-module" class="btn btn-md btn-success" data-toggle="modal"> <span class="fa fa-plus"></span> Add module </a> </form>
<form action="{{ url_for('charts_builder.update') if view else url_for('charts_builder.create') }}" class="well" id="save-view-form" method="POST" role="form"> <button class="pull-right btn btn-lg btn-primary"><span class="fa fa-check"></span> {% if view %}update{% else %}save{% endif %} layout</button> {% if view %} <input type="hidden" name="id" value="{{ view.id }}"> {% endif %} <label> View Name <input class="form-control" type="text" name="name" value="{% if view %}{{ view.name }}{% endif %}" placeholder="name"> </label> <div class="modules hidden"> {% if view %} {% for module in view.modules %} <input type="text" id="{{ module.guid }}" class="form-control" name="module_{{ module.name }}" value="{{ module|jsonstring }}"> {% endfor %} {% endif %} </div> {% if view %} <a href="#chart-options" id="add-module" class="btn btn-md btn-success" data-toggle="modal"> <span class="fa fa-plus"></span> Add module </a> {% endif %} </form>
Hide add modules button on index page.
Hide add modules button on index page.
HTML
mit
christabor/flask_jsondash,christabor/flask_jsondash,christabor/flask_jsondash
html
## Code Before: <form action="{{ url_for('charts_builder.update') if view else url_for('charts_builder.create') }}" class="well" id="save-view-form" method="POST" role="form"> <button class="pull-right btn btn-lg btn-primary"><span class="fa fa-check"></span> {% if view %}update{% else %}save{% endif %} layout</button> {% if view %} <input type="hidden" name="id" value="{{ view.id }}"> {% endif %} <label> View Name <input class="form-control" type="text" name="name" value="{% if view %}{{ view.name }}{% endif %}" placeholder="name"> </label> <div class="modules hidden"> {% if view %} {% for module in view.modules %} <input type="text" id="{{ module.guid }}" class="form-control" name="module_{{ module.name }}" value="{{ module|jsonstring }}"> {% endfor %} {% endif %} </div> <a href="#chart-options" id="add-module" class="btn btn-md btn-success" data-toggle="modal"> <span class="fa fa-plus"></span> Add module </a> </form> ## Instruction: Hide add modules button on index page. ## Code After: <form action="{{ url_for('charts_builder.update') if view else url_for('charts_builder.create') }}" class="well" id="save-view-form" method="POST" role="form"> <button class="pull-right btn btn-lg btn-primary"><span class="fa fa-check"></span> {% if view %}update{% else %}save{% endif %} layout</button> {% if view %} <input type="hidden" name="id" value="{{ view.id }}"> {% endif %} <label> View Name <input class="form-control" type="text" name="name" value="{% if view %}{{ view.name }}{% endif %}" placeholder="name"> </label> <div class="modules hidden"> {% if view %} {% for module in view.modules %} <input type="text" id="{{ module.guid }}" class="form-control" name="module_{{ module.name }}" value="{{ module|jsonstring }}"> {% endfor %} {% endif %} </div> {% if view %} <a href="#chart-options" id="add-module" class="btn btn-md btn-success" data-toggle="modal"> <span class="fa fa-plus"></span> Add module </a> {% endif %} </form>
<form action="{{ url_for('charts_builder.update') if view else url_for('charts_builder.create') }}" class="well" id="save-view-form" method="POST" role="form"> <button class="pull-right btn btn-lg btn-primary"><span class="fa fa-check"></span> {% if view %}update{% else %}save{% endif %} layout</button> {% if view %} <input type="hidden" name="id" value="{{ view.id }}"> {% endif %} <label> View Name <input class="form-control" type="text" name="name" value="{% if view %}{{ view.name }}{% endif %}" placeholder="name"> </label> <div class="modules hidden"> {% if view %} {% for module in view.modules %} <input type="text" id="{{ module.guid }}" class="form-control" name="module_{{ module.name }}" value="{{ module|jsonstring }}"> {% endfor %} {% endif %} </div> + {% if view %} <a href="#chart-options" id="add-module" class="btn btn-md btn-success" data-toggle="modal"> <span class="fa fa-plus"></span> Add module </a> + {% endif %} </form>
2
0.105263
2
0
010f6151792869cafaf03d948c9a3b410367f9c2
README.md
README.md
Yeoman generator for [Odddrupal](https://github.com/oddhill/odddrupal) and [Oddbaby](https://github.com/oddhill/oddbaby) ## Install ``` npm install -g generator-odd ``` ## How to use ``` yo odd:drupal site-name yo odd:baby theme-name ``` Files and folders will be put in the cwd. ## Tests ``` npm test ```
Yeoman generator for [Odddrupal](https://github.com/oddhill/odddrupal) and [Oddbaby](https://github.com/oddhill/oddbaby) ## Install ``` npm install -g generator-odd ``` ## How to use ``` yo odd:baby theme-name ``` Files and folders will be put in the cwd. ## Tests ``` npm test ```
Remove drupal from readme
Remove drupal from readme [ci skip]
Markdown
mit
oddhill/generator-odd
markdown
## Code Before: Yeoman generator for [Odddrupal](https://github.com/oddhill/odddrupal) and [Oddbaby](https://github.com/oddhill/oddbaby) ## Install ``` npm install -g generator-odd ``` ## How to use ``` yo odd:drupal site-name yo odd:baby theme-name ``` Files and folders will be put in the cwd. ## Tests ``` npm test ``` ## Instruction: Remove drupal from readme [ci skip] ## Code After: Yeoman generator for [Odddrupal](https://github.com/oddhill/odddrupal) and [Oddbaby](https://github.com/oddhill/oddbaby) ## Install ``` npm install -g generator-odd ``` ## How to use ``` yo odd:baby theme-name ``` Files and folders will be put in the cwd. ## Tests ``` npm test ```
Yeoman generator for [Odddrupal](https://github.com/oddhill/odddrupal) and [Oddbaby](https://github.com/oddhill/oddbaby) ## Install ``` npm install -g generator-odd ``` ## How to use ``` - yo odd:drupal site-name yo odd:baby theme-name ``` Files and folders will be put in the cwd. ## Tests ``` npm test ```
1
0.05
0
1
4a0e50ddd5da0ad298b0807f3ea0cb5adc4693b5
integration/shared/isolated/set_org_role_command_test.go
integration/shared/isolated/set_org_role_command_test.go
package isolated import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" "code.cloudfoundry.org/cli/integration/helpers" ) var _ = Describe("set-org-role command", func() { When("the org and user both exist", func() { var ( username string orgName string ) BeforeEach(func() { helpers.LoginCF() orgName = helpers.NewOrgName() helpers.CreateOrg(orgName) username, _ = helpers.CreateUser() }) It("sets the org role for the user", func() { session := helpers.CF("set-org-role", username, orgName, "OrgAuditor") Eventually(session).Should(Say("Assigning role OrgAuditor to user %s in org %s as admin...", username, orgName)) Eventually(session).Should(Say("OK")) Eventually(session).Should(Exit(0)) }) }) })
package isolated import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" "code.cloudfoundry.org/cli/integration/helpers" ) var _ = Describe("set-org-role command", func() { When("the org and user both exist", func() { var ( username string orgName string ) BeforeEach(func() { helpers.LoginCF() orgName = helpers.NewOrgName() helpers.CreateOrg(orgName) username, _ = helpers.CreateUser() }) It("sets the org role for the user", func() { session := helpers.CF("set-org-role", username, orgName, "OrgAuditor") Eventually(session).Should(Say("Assigning role OrgAuditor to user %s in org %s as admin...", username, orgName)) Eventually(session).Should(Say("OK")) Eventually(session).Should(Exit(0)) }) When("the user already has the desired role", func() { BeforeEach(func() { session := helpers.CF("set-org-role", username, orgName, "OrgManager") Eventually(session).Should(Say("Assigning role OrgManager to user %s in org %s as admin...", username, orgName)) Eventually(session).Should(Exit(0)) }) It("is idempotent", func() { session := helpers.CF("set-org-role", username, orgName, "OrgManager") Eventually(session).Should(Say("Assigning role OrgManager to user %s in org %s as admin...", username, orgName)) Eventually(session).Should(Exit(0)) }) }) }) })
Test that set-org-role is idempotent
Test that set-org-role is idempotent [Finishes #164089698] Signed-off-by: Tom Viehman <ef9e7682e71c138189ac51545830b782ff2b8b7d@pivotal.io>
Go
apache-2.0
cloudfoundry/cli,cloudfoundry/cli,cloudfoundry/cli
go
## Code Before: package isolated import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" "code.cloudfoundry.org/cli/integration/helpers" ) var _ = Describe("set-org-role command", func() { When("the org and user both exist", func() { var ( username string orgName string ) BeforeEach(func() { helpers.LoginCF() orgName = helpers.NewOrgName() helpers.CreateOrg(orgName) username, _ = helpers.CreateUser() }) It("sets the org role for the user", func() { session := helpers.CF("set-org-role", username, orgName, "OrgAuditor") Eventually(session).Should(Say("Assigning role OrgAuditor to user %s in org %s as admin...", username, orgName)) Eventually(session).Should(Say("OK")) Eventually(session).Should(Exit(0)) }) }) }) ## Instruction: Test that set-org-role is idempotent [Finishes #164089698] Signed-off-by: Tom Viehman <ef9e7682e71c138189ac51545830b782ff2b8b7d@pivotal.io> ## Code After: package isolated import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" "code.cloudfoundry.org/cli/integration/helpers" ) var _ = Describe("set-org-role command", func() { When("the org and user both exist", func() { var ( username string orgName string ) BeforeEach(func() { helpers.LoginCF() orgName = helpers.NewOrgName() helpers.CreateOrg(orgName) username, _ = helpers.CreateUser() }) It("sets the org role for the user", func() { session := helpers.CF("set-org-role", username, orgName, "OrgAuditor") Eventually(session).Should(Say("Assigning role OrgAuditor to user %s in org %s as admin...", username, orgName)) Eventually(session).Should(Say("OK")) Eventually(session).Should(Exit(0)) }) When("the user already has the desired role", func() { BeforeEach(func() { session := helpers.CF("set-org-role", username, orgName, "OrgManager") Eventually(session).Should(Say("Assigning role OrgManager to user %s in org %s as admin...", username, orgName)) Eventually(session).Should(Exit(0)) }) It("is idempotent", func() { session := helpers.CF("set-org-role", username, orgName, "OrgManager") Eventually(session).Should(Say("Assigning role OrgManager to user %s in org %s as admin...", username, orgName)) Eventually(session).Should(Exit(0)) }) }) }) })
package isolated import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gbytes" . "github.com/onsi/gomega/gexec" "code.cloudfoundry.org/cli/integration/helpers" ) var _ = Describe("set-org-role command", func() { When("the org and user both exist", func() { var ( username string orgName string ) BeforeEach(func() { helpers.LoginCF() orgName = helpers.NewOrgName() helpers.CreateOrg(orgName) username, _ = helpers.CreateUser() }) It("sets the org role for the user", func() { session := helpers.CF("set-org-role", username, orgName, "OrgAuditor") Eventually(session).Should(Say("Assigning role OrgAuditor to user %s in org %s as admin...", username, orgName)) Eventually(session).Should(Say("OK")) Eventually(session).Should(Exit(0)) }) + + When("the user already has the desired role", func() { + BeforeEach(func() { + session := helpers.CF("set-org-role", username, orgName, "OrgManager") + Eventually(session).Should(Say("Assigning role OrgManager to user %s in org %s as admin...", username, orgName)) + Eventually(session).Should(Exit(0)) + }) + + It("is idempotent", func() { + session := helpers.CF("set-org-role", username, orgName, "OrgManager") + Eventually(session).Should(Say("Assigning role OrgManager to user %s in org %s as admin...", username, orgName)) + Eventually(session).Should(Exit(0)) + }) + }) }) })
14
0.424242
14
0
47ccfad8cb8d6aa6162d2616324a42ec99eb978a
README.md
README.md
base-front-end-project ====================== A useful front-end base project. A little SCSS framework is included along with a mini jQuery starting point. A HTML5 boilerplate is added for good measure too. Please only use as a base. [andy-bell.co.uk](http://andy-bell.co.uk)
Base Front End Project ====================== A useful front-end base project. A little SCSS framework is included along with a mini jQuery starting point. A HTML5 boilerplate is added for good measure too. Please only use as a base. [andy-bell.co.uk](http://andy-bell.co.uk) SCSS Structure -------------- **framework** - You shouldn't modify any of these files if you can help it. Customisations can be made within the vars area in **project** - **_build.scss** - This is a central file that pulls all the framework resources together - **base** - **_csswizardry-grids.scss** - [CSSWizardry grid system](https://github.com/csswizardry/csswizardry-grids) - **_reset.scss** - Simple CSS reset/normalize - **mixins** - **_font-size.scss** - Font size media query for generating REM unit font sizes and line-heights - **_media-query.scss** - Human readable media queries - **_opacity.scss** - Cross browser friendly opacity - **_print.scss** - Simple print styles media query - **_vendor.scss** - Vendor prefixer **project** - **components** - Add all your reusable component partials here and import in global.scss - **layout** - Add major layout partials here and import in global.scss - **vars** - **_metrics.scss** - All metric vars such as breakpoints, widths etc. live here - **_typography.scss** - All typography vars such as fonts, base font sizes etc. live here - **_color.scss** - All color vars live here - **_generic.scss** - All generic vars that don't fit into the other groups live here
Add SCSS structure to readme
Add SCSS structure to readme
Markdown
unlicense
hankchizljaw/base-front-end-project,hankchizljaw/base-front-end-project,4ndeh/base-front-end-project,4ndeh/base-front-end-project
markdown
## Code Before: base-front-end-project ====================== A useful front-end base project. A little SCSS framework is included along with a mini jQuery starting point. A HTML5 boilerplate is added for good measure too. Please only use as a base. [andy-bell.co.uk](http://andy-bell.co.uk) ## Instruction: Add SCSS structure to readme ## Code After: Base Front End Project ====================== A useful front-end base project. A little SCSS framework is included along with a mini jQuery starting point. A HTML5 boilerplate is added for good measure too. Please only use as a base. [andy-bell.co.uk](http://andy-bell.co.uk) SCSS Structure -------------- **framework** - You shouldn't modify any of these files if you can help it. Customisations can be made within the vars area in **project** - **_build.scss** - This is a central file that pulls all the framework resources together - **base** - **_csswizardry-grids.scss** - [CSSWizardry grid system](https://github.com/csswizardry/csswizardry-grids) - **_reset.scss** - Simple CSS reset/normalize - **mixins** - **_font-size.scss** - Font size media query for generating REM unit font sizes and line-heights - **_media-query.scss** - Human readable media queries - **_opacity.scss** - Cross browser friendly opacity - **_print.scss** - Simple print styles media query - **_vendor.scss** - Vendor prefixer **project** - **components** - Add all your reusable component partials here and import in global.scss - **layout** - Add major layout partials here and import in global.scss - **vars** - **_metrics.scss** - All metric vars such as breakpoints, widths etc. live here - **_typography.scss** - All typography vars such as fonts, base font sizes etc. live here - **_color.scss** - All color vars live here - **_generic.scss** - All generic vars that don't fit into the other groups live here
- base-front-end-project + Base Front End Project ====================== A useful front-end base project. A little SCSS framework is included along with a mini jQuery starting point. A HTML5 boilerplate is added for good measure too. Please only use as a base. [andy-bell.co.uk](http://andy-bell.co.uk) + + SCSS Structure + -------------- + + + **framework** - You shouldn't modify any of these files if you can help it. Customisations can be made within the vars area in **project** + + - **_build.scss** - This is a central file that pulls all the framework resources together + + - **base** + - **_csswizardry-grids.scss** - [CSSWizardry grid system](https://github.com/csswizardry/csswizardry-grids) + - **_reset.scss** - Simple CSS reset/normalize + + - **mixins** + - **_font-size.scss** - Font size media query for generating REM unit font sizes and line-heights + - **_media-query.scss** - Human readable media queries + - **_opacity.scss** - Cross browser friendly opacity + - **_print.scss** - Simple print styles media query + - **_vendor.scss** - Vendor prefixer + + + **project** + + - **components** - Add all your reusable component partials here and import in global.scss + + - **layout** - Add major layout partials here and import in global.scss + + - **vars** + - **_metrics.scss** - All metric vars such as breakpoints, widths etc. live here + - **_typography.scss** - All typography vars such as fonts, base font sizes etc. live here + - **_color.scss** - All color vars live here + - **_generic.scss** - All generic vars that don't fit into the other groups live here
34
4.25
33
1
01a9b6457d78dd583637bf8174edda40e2bd3276
django_website/blog/feeds.py
django_website/blog/feeds.py
from __future__ import absolute_import from django.contrib.syndication.views import Feed from .models import Entry class WeblogEntryFeed(Feed): title = "The Django weblog" link = "http://www.djangoproject.com/weblog/" description = "Latest news about Django, the Python Web framework." def items(self): return Entry.objects.published()[:10] def item_pubdate(self, item): return item.pub_date
from __future__ import absolute_import from django.contrib.syndication.views import Feed from .models import Entry class WeblogEntryFeed(Feed): title = "The Django weblog" link = "http://www.djangoproject.com/weblog/" description = "Latest news about Django, the Python Web framework." def items(self): return Entry.objects.published()[:10] def item_pubdate(self, item): return item.pub_date def item_author_name(self, item): return item.author def item_description(self, item): return item.body_html
Add author name and body to the weblog RSS feed.
Add author name and body to the weblog RSS feed.
Python
bsd-3-clause
alawnchen/djangoproject.com,django/djangoproject.com,nanuxbe/django,django/djangoproject.com,khkaminska/djangoproject.com,khkaminska/djangoproject.com,django/djangoproject.com,rmoorman/djangoproject.com,rmoorman/djangoproject.com,django/djangoproject.com,nanuxbe/django,django/djangoproject.com,xavierdutreilh/djangoproject.com,gnarf/djangoproject.com,relekang/djangoproject.com,rmoorman/djangoproject.com,relekang/djangoproject.com,rmoorman/djangoproject.com,hassanabidpk/djangoproject.com,vxvinh1511/djangoproject.com,vxvinh1511/djangoproject.com,khkaminska/djangoproject.com,nanuxbe/django,alawnchen/djangoproject.com,khkaminska/djangoproject.com,vxvinh1511/djangoproject.com,xavierdutreilh/djangoproject.com,xavierdutreilh/djangoproject.com,hassanabidpk/djangoproject.com,xavierdutreilh/djangoproject.com,gnarf/djangoproject.com,relekang/djangoproject.com,hassanabidpk/djangoproject.com,vxvinh1511/djangoproject.com,django/djangoproject.com,alawnchen/djangoproject.com,relekang/djangoproject.com,gnarf/djangoproject.com,gnarf/djangoproject.com,hassanabidpk/djangoproject.com,nanuxbe/django,alawnchen/djangoproject.com
python
## Code Before: from __future__ import absolute_import from django.contrib.syndication.views import Feed from .models import Entry class WeblogEntryFeed(Feed): title = "The Django weblog" link = "http://www.djangoproject.com/weblog/" description = "Latest news about Django, the Python Web framework." def items(self): return Entry.objects.published()[:10] def item_pubdate(self, item): return item.pub_date ## Instruction: Add author name and body to the weblog RSS feed. ## Code After: from __future__ import absolute_import from django.contrib.syndication.views import Feed from .models import Entry class WeblogEntryFeed(Feed): title = "The Django weblog" link = "http://www.djangoproject.com/weblog/" description = "Latest news about Django, the Python Web framework." def items(self): return Entry.objects.published()[:10] def item_pubdate(self, item): return item.pub_date def item_author_name(self, item): return item.author def item_description(self, item): return item.body_html
from __future__ import absolute_import from django.contrib.syndication.views import Feed from .models import Entry class WeblogEntryFeed(Feed): title = "The Django weblog" link = "http://www.djangoproject.com/weblog/" description = "Latest news about Django, the Python Web framework." def items(self): return Entry.objects.published()[:10] def item_pubdate(self, item): return item.pub_date + + def item_author_name(self, item): + return item.author + + def item_description(self, item): + return item.body_html
6
0.4
6
0
6290989c018ee014a03410e87764970d78de3032
lib/file_data/formats/mpeg4/mpeg4.rb
lib/file_data/formats/mpeg4/mpeg4.rb
require_relative 'box_path' require_relative 'box_parsers/meta_box' require_relative 'box_parsers/mvhd_box' module FileData Mpeg4ValueInfo = Struct.new(:name, :parser_class, :method_name, :box_path) # Parses and returns metadata from an Mpeg4 file class Mpeg4 class << self ['.mp4', '.mpeg4', '.m4v'].each { |e| FileInfo.info_maps[e] = Mpeg4 } values = [Mpeg4ValueInfo.new('origin_date', MetaBoxParser, 'creation_date', %w[moov meta]), Mpeg4ValueInfo.new('creation_date', MvhdBoxParser, 'creation_time', %w[moov mvhd])] values.each do |v| define_method(v.name) do |stream| get_value(stream, v.parser_class, v.method_name, *v.box_path) end end end def self.get_value(stream, parser, method, *box_path) box = BoxPath.get_root_path(stream, *box_path) parser.parse(box.content_stream).send(method) unless box.nil? end end end
require_relative 'box_path' require_relative 'box_parsers/meta_box' require_relative 'box_parsers/mvhd_box' module FileData Mpeg4ValueInfo = Struct.new(:name, :parser_class, :method_name, :box_path) # Parses and returns metadata from an Mpeg4 file class Mpeg4 class << self ['.mp4', '.mpeg4', '.m4v'].each { |e| FileInfo.info_maps[e] = Mpeg4 } values = [['origin_date', MetaBoxParser, 'creation_date', 'moov', 'meta'], ['creation_date', MvhdBoxParser, 'creation_time', 'moov', 'mvhd']] values.each do |v| define_method(v[0]) do |stream| get_value(*v.drop(1).unshift(stream)) end end end def self.get_value(stream, parser, method, *box_path) box = BoxPath.get_root_path(stream, *box_path) parser.parse(box.content_stream).send(method) unless box.nil? end end end
Simplify the method creation logic in Mpeg4.rb
Simplify the method creation logic in Mpeg4.rb
Ruby
mit
ScottHaney/file_data
ruby
## Code Before: require_relative 'box_path' require_relative 'box_parsers/meta_box' require_relative 'box_parsers/mvhd_box' module FileData Mpeg4ValueInfo = Struct.new(:name, :parser_class, :method_name, :box_path) # Parses and returns metadata from an Mpeg4 file class Mpeg4 class << self ['.mp4', '.mpeg4', '.m4v'].each { |e| FileInfo.info_maps[e] = Mpeg4 } values = [Mpeg4ValueInfo.new('origin_date', MetaBoxParser, 'creation_date', %w[moov meta]), Mpeg4ValueInfo.new('creation_date', MvhdBoxParser, 'creation_time', %w[moov mvhd])] values.each do |v| define_method(v.name) do |stream| get_value(stream, v.parser_class, v.method_name, *v.box_path) end end end def self.get_value(stream, parser, method, *box_path) box = BoxPath.get_root_path(stream, *box_path) parser.parse(box.content_stream).send(method) unless box.nil? end end end ## Instruction: Simplify the method creation logic in Mpeg4.rb ## Code After: require_relative 'box_path' require_relative 'box_parsers/meta_box' require_relative 'box_parsers/mvhd_box' module FileData Mpeg4ValueInfo = Struct.new(:name, :parser_class, :method_name, :box_path) # Parses and returns metadata from an Mpeg4 file class Mpeg4 class << self ['.mp4', '.mpeg4', '.m4v'].each { |e| FileInfo.info_maps[e] = Mpeg4 } values = [['origin_date', MetaBoxParser, 'creation_date', 'moov', 'meta'], ['creation_date', MvhdBoxParser, 'creation_time', 'moov', 'mvhd']] values.each do |v| define_method(v[0]) do |stream| get_value(*v.drop(1).unshift(stream)) end end end def self.get_value(stream, parser, method, *box_path) box = BoxPath.get_root_path(stream, *box_path) parser.parse(box.content_stream).send(method) unless box.nil? end end end
require_relative 'box_path' require_relative 'box_parsers/meta_box' require_relative 'box_parsers/mvhd_box' module FileData Mpeg4ValueInfo = Struct.new(:name, :parser_class, :method_name, :box_path) # Parses and returns metadata from an Mpeg4 file class Mpeg4 class << self ['.mp4', '.mpeg4', '.m4v'].each { |e| FileInfo.info_maps[e] = Mpeg4 } - values = [Mpeg4ValueInfo.new('origin_date', MetaBoxParser, ? ^^^^^^^^^^^^^^^^^^^ + values = [['origin_date', MetaBoxParser, ? ^ - 'creation_date', %w[moov meta]), ? ^^^ - + 'creation_date', 'moov', 'meta'], ? ^ ++ + + - Mpeg4ValueInfo.new('creation_date', MvhdBoxParser, ? ^^^^^^^^^^^^^^^^^^^ + ['creation_date', MvhdBoxParser, ? ^ - 'creation_time', %w[moov mvhd])] ? ^^^ - + 'creation_time', 'moov', 'mvhd']] ? ^ ++ + + values.each do |v| - define_method(v.name) do |stream| ? ^^^^^ + define_method(v[0]) do |stream| ? ^^^ - get_value(stream, v.parser_class, v.method_name, *v.box_path) + get_value(*v.drop(1).unshift(stream)) end end end def self.get_value(stream, parser, method, *box_path) box = BoxPath.get_root_path(stream, *box_path) parser.parse(box.content_stream).send(method) unless box.nil? end end end
12
0.387097
6
6
72a5478faa469f9023cc1802367cddfc5270acbb
.travis.yml
.travis.yml
language: go sudo: false go: - 1.3 - 1.4 - 1.5 - 1.6 - 1.7 - 1.8 services: - mysql - postgresql before_install: - mysql -e "CREATE DATABASE IF NOT EXISTS test;" -uroot - mysql -e "CREATE DATABASE IF NOT EXISTS test_env;" -uroot - psql -c "CREATE DATABASE test;" -U postgres install: - go get -t ./... - go install ./... script: - go test -v ./... - bash test-integration/postgres.sh - bash test-integration/mysql.sh - bash test-integration/mysql-flag.sh - bash test-integration/mysql-env.sh - bash test-integration/sqlite.sh
language: go sudo: false go: - 1.6 - 1.7 - 1.8 services: - mysql - postgresql before_install: - mysql -e "CREATE DATABASE IF NOT EXISTS test;" -uroot - mysql -e "CREATE DATABASE IF NOT EXISTS test_env;" -uroot - psql -c "CREATE DATABASE test;" -U postgres install: - go get -t ./... - go install ./... script: - go test -v ./... - bash test-integration/postgres.sh - bash test-integration/mysql.sh - bash test-integration/mysql-flag.sh - bash test-integration/mysql-env.sh - bash test-integration/sqlite.sh
Stop testing old Go versions
Stop testing old Go versions
YAML
mit
rubenv/sql-migrate,rubenv/sql-migrate
yaml
## Code Before: language: go sudo: false go: - 1.3 - 1.4 - 1.5 - 1.6 - 1.7 - 1.8 services: - mysql - postgresql before_install: - mysql -e "CREATE DATABASE IF NOT EXISTS test;" -uroot - mysql -e "CREATE DATABASE IF NOT EXISTS test_env;" -uroot - psql -c "CREATE DATABASE test;" -U postgres install: - go get -t ./... - go install ./... script: - go test -v ./... - bash test-integration/postgres.sh - bash test-integration/mysql.sh - bash test-integration/mysql-flag.sh - bash test-integration/mysql-env.sh - bash test-integration/sqlite.sh ## Instruction: Stop testing old Go versions ## Code After: language: go sudo: false go: - 1.6 - 1.7 - 1.8 services: - mysql - postgresql before_install: - mysql -e "CREATE DATABASE IF NOT EXISTS test;" -uroot - mysql -e "CREATE DATABASE IF NOT EXISTS test_env;" -uroot - psql -c "CREATE DATABASE test;" -U postgres install: - go get -t ./... - go install ./... script: - go test -v ./... - bash test-integration/postgres.sh - bash test-integration/mysql.sh - bash test-integration/mysql-flag.sh - bash test-integration/mysql-env.sh - bash test-integration/sqlite.sh
language: go sudo: false go: - - 1.3 - - 1.4 - - 1.5 - 1.6 - 1.7 - 1.8 services: - mysql - postgresql before_install: - mysql -e "CREATE DATABASE IF NOT EXISTS test;" -uroot - mysql -e "CREATE DATABASE IF NOT EXISTS test_env;" -uroot - psql -c "CREATE DATABASE test;" -U postgres install: - go get -t ./... - go install ./... script: - go test -v ./... - bash test-integration/postgres.sh - bash test-integration/mysql.sh - bash test-integration/mysql-flag.sh - bash test-integration/mysql-env.sh - bash test-integration/sqlite.sh
3
0.09375
0
3
9167674752d68ce717a17fc4ed9679ed34942aec
README.md
README.md
Common data structures and algorithms implemented in golang. # Plans - [x] Queue - [ ] List - [ ] Stack - [ ] Deque - [ ] Priority Queue - [ ] Set - [ ] Binary Tree - [ ] Heap - [ ] Sort
![](https://travis-ci.org/cizixs/go-algorithms.svg?branch=master) # go-algorithms Common data structures and algorithms implemented in golang. # Plans - [x] Queue - [ ] List - [ ] Stack - [ ] Deque - [ ] Priority Queue - [ ] Set - [ ] Binary Tree - [ ] Heap - [ ] Sort
Add travis CI status image
Add travis CI status image
Markdown
apache-2.0
cizixs/go-algorithms,cizixs/go-algorithms
markdown
## Code Before: Common data structures and algorithms implemented in golang. # Plans - [x] Queue - [ ] List - [ ] Stack - [ ] Deque - [ ] Priority Queue - [ ] Set - [ ] Binary Tree - [ ] Heap - [ ] Sort ## Instruction: Add travis CI status image ## Code After: ![](https://travis-ci.org/cizixs/go-algorithms.svg?branch=master) # go-algorithms Common data structures and algorithms implemented in golang. # Plans - [x] Queue - [ ] List - [ ] Stack - [ ] Deque - [ ] Priority Queue - [ ] Set - [ ] Binary Tree - [ ] Heap - [ ] Sort
+ ![](https://travis-ci.org/cizixs/go-algorithms.svg?branch=master) + + # go-algorithms Common data structures and algorithms implemented in golang. # Plans - [x] Queue - [ ] List - [ ] Stack - [ ] Deque - [ ] Priority Queue - [ ] Set - [ ] Binary Tree - [ ] Heap - [ ] Sort
3
0.230769
3
0
70e3f0f1f13d368ddd5ffddcfe23ff4a7dfa20fc
app/views/shop/messages/_closed_shop.html.haml
app/views/shop/messages/_closed_shop.html.haml
.row.closed-shop-header .small-12.columns .content{ "darker-background" => true } %h4 .warning-sign .rectangle %strong ! .message = t :shopping_oc_closed %p = render partial: "shopping_shared/next_order_cycle" = render partial: "shopping_shared/last_order_cycle" .row .small-12.columns .content .shopfront_closed_message - if shopfront_closed_message? = current_distributor.preferred_shopfront_closed_message.html_safe - else = t :shopping_oc_closed_description
.closed-shop-header .row .small-12.columns .content{ "darker-background" => true } %h4 .warning-sign .rectangle %strong ! .message = t :shopping_oc_closed %p = render partial: "shopping_shared/next_order_cycle" = render partial: "shopping_shared/last_order_cycle" .row .small-12.columns .content .shopfront_closed_message - if shopfront_closed_message? = current_distributor.preferred_shopfront_closed_message.html_safe - else = t :shopping_oc_closed_description
Fix closed shop message not displaying full-width
Fix closed shop message not displaying full-width
Haml
agpl-3.0
Matt-Yorkley/openfoodnetwork,mkllnk/openfoodnetwork,mkllnk/openfoodnetwork,Matt-Yorkley/openfoodnetwork,Matt-Yorkley/openfoodnetwork,openfoodfoundation/openfoodnetwork,lin-d-hop/openfoodnetwork,openfoodfoundation/openfoodnetwork,lin-d-hop/openfoodnetwork,openfoodfoundation/openfoodnetwork,Matt-Yorkley/openfoodnetwork,mkllnk/openfoodnetwork,lin-d-hop/openfoodnetwork,openfoodfoundation/openfoodnetwork,mkllnk/openfoodnetwork,lin-d-hop/openfoodnetwork
haml
## Code Before: .row.closed-shop-header .small-12.columns .content{ "darker-background" => true } %h4 .warning-sign .rectangle %strong ! .message = t :shopping_oc_closed %p = render partial: "shopping_shared/next_order_cycle" = render partial: "shopping_shared/last_order_cycle" .row .small-12.columns .content .shopfront_closed_message - if shopfront_closed_message? = current_distributor.preferred_shopfront_closed_message.html_safe - else = t :shopping_oc_closed_description ## Instruction: Fix closed shop message not displaying full-width ## Code After: .closed-shop-header .row .small-12.columns .content{ "darker-background" => true } %h4 .warning-sign .rectangle %strong ! .message = t :shopping_oc_closed %p = render partial: "shopping_shared/next_order_cycle" = render partial: "shopping_shared/last_order_cycle" .row .small-12.columns .content .shopfront_closed_message - if shopfront_closed_message? = current_distributor.preferred_shopfront_closed_message.html_safe - else = t :shopping_oc_closed_description
- .row.closed-shop-header ? ---- + .closed-shop-header + .row - .small-12.columns + .small-12.columns ? ++ - .content{ "darker-background" => true } + .content{ "darker-background" => true } ? ++ - %h4 + %h4 ? ++ - .warning-sign + .warning-sign ? ++ - .rectangle + .rectangle ? ++ - %strong ! + %strong ! ? ++ - .message + .message ? ++ - = t :shopping_oc_closed + = t :shopping_oc_closed ? ++ - %p + %p ? ++ - = render partial: "shopping_shared/next_order_cycle" + = render partial: "shopping_shared/next_order_cycle" ? ++ - = render partial: "shopping_shared/last_order_cycle" + = render partial: "shopping_shared/last_order_cycle" ? ++ .row .small-12.columns .content .shopfront_closed_message - if shopfront_closed_message? = current_distributor.preferred_shopfront_closed_message.html_safe - else = t :shopping_oc_closed_description
25
1.190476
13
12
bba80af4e921ca399dcb1ac2bf5f6a4899a1af6c
buildSrc/src/main/groovy/com/uber/okbuck/composer/AndroidBuildConfigRuleComposer.groovy
buildSrc/src/main/groovy/com/uber/okbuck/composer/AndroidBuildConfigRuleComposer.groovy
package com.uber.okbuck.composer import com.uber.okbuck.core.model.AndroidTarget import com.uber.okbuck.rule.AndroidBuildConfigRule final class AndroidBuildConfigRuleComposer extends AndroidBuckRuleComposer { private AndroidBuildConfigRuleComposer() { // no instance } static AndroidBuildConfigRule compose(AndroidTarget target) { return new AndroidBuildConfigRule(buildConfig(target), ["PUBLIC"], target.applicationId, target.buildConfigFields) } }
package com.uber.okbuck.composer import com.uber.okbuck.core.model.AndroidTarget import com.uber.okbuck.rule.AndroidBuildConfigRule final class AndroidBuildConfigRuleComposer extends AndroidBuckRuleComposer { private AndroidBuildConfigRuleComposer() { // no instance } static AndroidBuildConfigRule compose(AndroidTarget target) { return new AndroidBuildConfigRule(buildConfig(target), ["PUBLIC"], target.package, target.buildConfigFields) } }
Use package instead of applicationId in build config rule
Use package instead of applicationId in build config rule
Groovy
mit
aj-michael/okbuck,aj-michael/okbuck,OkBuilds/OkBuck,OkBuilds/OkBuck,Piasy/OkBuck,seanabraham/OkBuck,seanabraham/OkBuck,Piasy/OkBuck,seanabraham/OkBuck,cwoodwar6/okbuck,cwoodwar6/okbuck,cwoodwar6/okbuck
groovy
## Code Before: package com.uber.okbuck.composer import com.uber.okbuck.core.model.AndroidTarget import com.uber.okbuck.rule.AndroidBuildConfigRule final class AndroidBuildConfigRuleComposer extends AndroidBuckRuleComposer { private AndroidBuildConfigRuleComposer() { // no instance } static AndroidBuildConfigRule compose(AndroidTarget target) { return new AndroidBuildConfigRule(buildConfig(target), ["PUBLIC"], target.applicationId, target.buildConfigFields) } } ## Instruction: Use package instead of applicationId in build config rule ## Code After: package com.uber.okbuck.composer import com.uber.okbuck.core.model.AndroidTarget import com.uber.okbuck.rule.AndroidBuildConfigRule final class AndroidBuildConfigRuleComposer extends AndroidBuckRuleComposer { private AndroidBuildConfigRuleComposer() { // no instance } static AndroidBuildConfigRule compose(AndroidTarget target) { return new AndroidBuildConfigRule(buildConfig(target), ["PUBLIC"], target.package, target.buildConfigFields) } }
package com.uber.okbuck.composer import com.uber.okbuck.core.model.AndroidTarget import com.uber.okbuck.rule.AndroidBuildConfigRule final class AndroidBuildConfigRuleComposer extends AndroidBuckRuleComposer { private AndroidBuildConfigRuleComposer() { // no instance } static AndroidBuildConfigRule compose(AndroidTarget target) { - return new AndroidBuildConfigRule(buildConfig(target), ["PUBLIC"], target.applicationId, ? ---- ^^^^^^ + return new AndroidBuildConfigRule(buildConfig(target), ["PUBLIC"], target.package, ? + + ^^ target.buildConfigFields) } }
2
0.125
1
1
3d24c0529c8fdb5abebaade72859f7dc0e903262
server.go
server.go
package main import ( "log" "net" ) func StartServer() { listener, err := net.Listen("tcp", Config.String("listen")) if err != nil { log.Fatal(err) } defer listener.Close() for { conn, err := listener.Accept() if err != nil { log.Fatal(err) } go communicate(conn) } } func communicate(conn net.Conn) { log.Printf("%v connected", conn.RemoteAddr()) buf := make([]byte, TotalVoxels * 3) for { _, err := conn.Read(buf[:3]) if err != nil { log.Printf("%v disconnected", conn.RemoteAddr()) break } switch string(buf[:3]) { case "inf": conn.Write([]byte(INFO)) case "frm": for completed := 0; completed < TotalVoxels * 3; { read, err := conn.Read(buf[:TotalVoxels*3 - completed]) if err != nil { log.Printf("%v disconnected", conn.RemoteAddr()) break } for i, b := range buf[:read] { DisplayBackBuffer[completed+i] = float32(b) / 256 } completed += read } case "swp": SwapDisplayBuffer() default: conn.Write([]byte("err\n")) } } }
package main import ( "log" "net" ) func StartServer() { listener, err := net.Listen("tcp", Config.String("listen")) if err != nil { log.Fatal(err) } defer listener.Close() for { conn, err := listener.Accept() if err != nil { log.Fatal(err) } go communicate(conn) } } func communicate(conn net.Conn) { log.Printf("%v connected", conn.RemoteAddr()) buf := make([]byte, TotalVoxels * 3) for { _, err := conn.Read(buf[:3]) if err != nil { log.Printf("%v disconnected", conn.RemoteAddr()) break } switch string(buf[:3]) { case "nfo": conn.Write([]byte(INFO)) case "frm": for completed := 0; completed < TotalVoxels * 3; { read, err := conn.Read(buf[:TotalVoxels*3 - completed]) if err != nil { log.Printf("%v disconnected", conn.RemoteAddr()) break } for i, b := range buf[:read] { DisplayBackBuffer[completed+i] = float32(b) / 256 } completed += read } case "swp": SwapDisplayBuffer() } } }
Change inf command to nfo and remove err messages
Change inf command to nfo and remove err messages
Go
mit
PolyFloyd/ledcubesim,PolyFloyd/ledcubesim,PolyFloyd/ledcubesim
go
## Code Before: package main import ( "log" "net" ) func StartServer() { listener, err := net.Listen("tcp", Config.String("listen")) if err != nil { log.Fatal(err) } defer listener.Close() for { conn, err := listener.Accept() if err != nil { log.Fatal(err) } go communicate(conn) } } func communicate(conn net.Conn) { log.Printf("%v connected", conn.RemoteAddr()) buf := make([]byte, TotalVoxels * 3) for { _, err := conn.Read(buf[:3]) if err != nil { log.Printf("%v disconnected", conn.RemoteAddr()) break } switch string(buf[:3]) { case "inf": conn.Write([]byte(INFO)) case "frm": for completed := 0; completed < TotalVoxels * 3; { read, err := conn.Read(buf[:TotalVoxels*3 - completed]) if err != nil { log.Printf("%v disconnected", conn.RemoteAddr()) break } for i, b := range buf[:read] { DisplayBackBuffer[completed+i] = float32(b) / 256 } completed += read } case "swp": SwapDisplayBuffer() default: conn.Write([]byte("err\n")) } } } ## Instruction: Change inf command to nfo and remove err messages ## Code After: package main import ( "log" "net" ) func StartServer() { listener, err := net.Listen("tcp", Config.String("listen")) if err != nil { log.Fatal(err) } defer listener.Close() for { conn, err := listener.Accept() if err != nil { log.Fatal(err) } go communicate(conn) } } func communicate(conn net.Conn) { log.Printf("%v connected", conn.RemoteAddr()) buf := make([]byte, TotalVoxels * 3) for { _, err := conn.Read(buf[:3]) if err != nil { log.Printf("%v disconnected", conn.RemoteAddr()) break } switch string(buf[:3]) { case "nfo": conn.Write([]byte(INFO)) case "frm": for completed := 0; completed < TotalVoxels * 3; { read, err := conn.Read(buf[:TotalVoxels*3 - completed]) if err != nil { log.Printf("%v disconnected", conn.RemoteAddr()) break } for i, b := range buf[:read] { DisplayBackBuffer[completed+i] = float32(b) / 256 } completed += read } case "swp": SwapDisplayBuffer() } } }
package main import ( "log" "net" ) func StartServer() { listener, err := net.Listen("tcp", Config.String("listen")) if err != nil { log.Fatal(err) } defer listener.Close() for { conn, err := listener.Accept() if err != nil { log.Fatal(err) } go communicate(conn) } } func communicate(conn net.Conn) { log.Printf("%v connected", conn.RemoteAddr()) buf := make([]byte, TotalVoxels * 3) for { _, err := conn.Read(buf[:3]) if err != nil { log.Printf("%v disconnected", conn.RemoteAddr()) break } switch string(buf[:3]) { - case "inf": ? - + case "nfo": ? + conn.Write([]byte(INFO)) case "frm": for completed := 0; completed < TotalVoxels * 3; { read, err := conn.Read(buf[:TotalVoxels*3 - completed]) if err != nil { log.Printf("%v disconnected", conn.RemoteAddr()) break } for i, b := range buf[:read] { DisplayBackBuffer[completed+i] = float32(b) / 256 } completed += read } case "swp": SwapDisplayBuffer() - default: - conn.Write([]byte("err\n")) } } }
4
0.074074
1
3
4fe0bc50cafbda97ce97ab03da1248205f729a3b
week-2/wireframe-reflection.md
week-2/wireframe-reflection.md
![My Website Index Wireframe](imgs/wireframe_index.png) ![My Blog Index Wireframe](imgs/wireframe_blog_index.png)
![My Website Index Wireframe](imgs/wireframe_index.png) ![My Blog Index Wireframe](imgs/wireframe_blog_index.png) **What are the benefits of wire framing?** A great benefit of wire framing is that it gives the developer a layout of how a page should look. So the developer will be better prepared from the start when becomes time to start creating code for the page. **Did you enjoy wireframing your site?** It could have been more enjoyable. I wasted a lot of time and putting too much thought into determining placements of certain elements. I need to do a better job of just keeping it simple at this point. **Did you revise your wireframe or stick with your first idea?** All of the elements stayed the same, but just revised the placement of them. My page is pretty simple so revisions weren’t really necessary. **What questions did you ask during this challenge? What resources did you find to help you answer them?** Since my hand-writing is terrible, I wanted to find a good free web application to help assist me in creating a wire-frame. So I asked my brother, a graphic designer, and he had suggested Gliffy to me to use. So far Gliffy has worked out and has covered all my needs for wire framing. **Which parts of the challenge did you enjoy and which parts did you find tedious?** At times I found making the wire frame on Gliffy could be tedious. Just trying to get everything the right size. I’m sure after more experience with Gliffy, it will become less tedious. I did enjoy mapping out the site and visualizing how I want the site to look.
Add reflection to wireframe reflection
Add reflection to wireframe reflection
Markdown
mit
amitzman/phase-0,amitzman/phase-0,amitzman/phase-0
markdown
## Code Before: ![My Website Index Wireframe](imgs/wireframe_index.png) ![My Blog Index Wireframe](imgs/wireframe_blog_index.png) ## Instruction: Add reflection to wireframe reflection ## Code After: ![My Website Index Wireframe](imgs/wireframe_index.png) ![My Blog Index Wireframe](imgs/wireframe_blog_index.png) **What are the benefits of wire framing?** A great benefit of wire framing is that it gives the developer a layout of how a page should look. So the developer will be better prepared from the start when becomes time to start creating code for the page. **Did you enjoy wireframing your site?** It could have been more enjoyable. I wasted a lot of time and putting too much thought into determining placements of certain elements. I need to do a better job of just keeping it simple at this point. **Did you revise your wireframe or stick with your first idea?** All of the elements stayed the same, but just revised the placement of them. My page is pretty simple so revisions weren’t really necessary. **What questions did you ask during this challenge? What resources did you find to help you answer them?** Since my hand-writing is terrible, I wanted to find a good free web application to help assist me in creating a wire-frame. So I asked my brother, a graphic designer, and he had suggested Gliffy to me to use. So far Gliffy has worked out and has covered all my needs for wire framing. **Which parts of the challenge did you enjoy and which parts did you find tedious?** At times I found making the wire frame on Gliffy could be tedious. Just trying to get everything the right size. I’m sure after more experience with Gliffy, it will become less tedious. I did enjoy mapping out the site and visualizing how I want the site to look.
![My Website Index Wireframe](imgs/wireframe_index.png) ![My Blog Index Wireframe](imgs/wireframe_blog_index.png) + + **What are the benefits of wire framing?** + + A great benefit of wire framing is that it gives the developer a layout of how a page should look. So the developer will be better prepared from the start when becomes time to start creating code for the page. + + **Did you enjoy wireframing your site?** + + It could have been more enjoyable. I wasted a lot of time and putting too much thought into determining placements of certain elements. I need to do a better job of just keeping it simple at this point. + + **Did you revise your wireframe or stick with your first idea?** + + All of the elements stayed the same, but just revised the placement of them. My page is pretty simple so revisions weren’t really necessary. + + **What questions did you ask during this challenge? What resources did you find to help you answer them?** + + Since my hand-writing is terrible, I wanted to find a good free web application to help assist me in creating a wire-frame. So I asked my brother, a graphic designer, and he had suggested Gliffy to me to use. So far Gliffy has worked out and has covered all my needs for wire framing. + + **Which parts of the challenge did you enjoy and which parts did you find tedious?** + + At times I found making the wire frame on Gliffy could be tedious. Just trying to get everything the right size. I’m sure after more experience with Gliffy, it will become less tedious. I did enjoy mapping out the site and visualizing how I want the site to look.
20
6.666667
20
0
ca921ef955ee1c80f8d521bd14af0fdafbb250c9
wegas-app/src/main/webapp/2/src/Editor/EntitiesConfig/QuestionInstance.ts
wegas-app/src/main/webapp/2/src/Editor/EntitiesConfig/QuestionInstance.ts
import { ConfigurationSchema } from '../editionConfig'; import { config as variableInstanceConfig } from './VariableInstance'; export const config: ConfigurationSchema<IQuestionInstance> = { ...variableInstanceConfig, active: { type: 'boolean', view: { label: 'Active' }, }, validated: { type: 'boolean', view: { type: 'hidden' }, }, unread: { type: 'boolean', view: { type: 'hidden' }, }, };
import { ConfigurationSchema } from '../editionConfig'; import { config as variableInstanceConfig } from './VariableInstance'; export const config: ConfigurationSchema<IQuestionInstance> = { ...variableInstanceConfig, '@class': { type: 'string', value: 'QuestionInstance', view: { type: 'hidden' }, }, active: { type: 'boolean', view: { label: 'Active' }, }, validated: { type: 'boolean', view: { type: 'hidden' }, }, unread: { type: 'boolean', view: { type: 'hidden' }, }, };
Fix missing instance from questions
Fix missing instance from questions
TypeScript
mit
Heigvd/Wegas,Heigvd/Wegas,Heigvd/Wegas,Heigvd/Wegas,Heigvd/Wegas
typescript
## Code Before: import { ConfigurationSchema } from '../editionConfig'; import { config as variableInstanceConfig } from './VariableInstance'; export const config: ConfigurationSchema<IQuestionInstance> = { ...variableInstanceConfig, active: { type: 'boolean', view: { label: 'Active' }, }, validated: { type: 'boolean', view: { type: 'hidden' }, }, unread: { type: 'boolean', view: { type: 'hidden' }, }, }; ## Instruction: Fix missing instance from questions ## Code After: import { ConfigurationSchema } from '../editionConfig'; import { config as variableInstanceConfig } from './VariableInstance'; export const config: ConfigurationSchema<IQuestionInstance> = { ...variableInstanceConfig, '@class': { type: 'string', value: 'QuestionInstance', view: { type: 'hidden' }, }, active: { type: 'boolean', view: { label: 'Active' }, }, validated: { type: 'boolean', view: { type: 'hidden' }, }, unread: { type: 'boolean', view: { type: 'hidden' }, }, };
import { ConfigurationSchema } from '../editionConfig'; import { config as variableInstanceConfig } from './VariableInstance'; export const config: ConfigurationSchema<IQuestionInstance> = { ...variableInstanceConfig, + '@class': { + type: 'string', + value: 'QuestionInstance', + view: { type: 'hidden' }, + }, active: { type: 'boolean', view: { label: 'Active' }, }, validated: { type: 'boolean', view: { type: 'hidden' }, }, unread: { type: 'boolean', view: { type: 'hidden' }, }, };
5
0.294118
5
0
950bc9f6ef7ddcffe3b4bbb526c71fc0a6a73e5d
.travis.yml
.travis.yml
language: go sudo: required go: - 1.6 before_install: - sudo apt-add-repository ppa:mosquitto-dev/mosquitto-ppa -y - sudo apt-get update install: - sudo apt-get install mosquitto mosquitto-clients - make deps - make test-deps - make cover-deps before_script: - mosquitto -p 1883 1>/dev/null 2>/dev/null & services: - redis-server script: - make test - make fmt - make vet after_success: - make cover - make coveralls
language: go sudo: required go: - 1.6 before_install: - sudo apt-get update install: - sudo apt-get install mosquitto - make deps - make test-deps - make cover-deps before_script: - mosquitto -p 1883 1>/dev/null 2>/dev/null & services: - redis-server script: - make test - make fmt - make vet after_success: - make cover - make coveralls
Use Ubuntu mosquitto in Travis
[ci] Use Ubuntu mosquitto in Travis
YAML
mit
TheThingsNetwork/ttn,TheThingsNetwork/ttn,LoRaWanSoFa/ttn,jvanmalder/ttn,jvanmalder/ttn,mgranberry/ttn,mgranberry/ttn,mgranberry/ttn,jvanmalder/ttn,TheThingsNetwork/ttn,LoRaWanSoFa/ttn
yaml
## Code Before: language: go sudo: required go: - 1.6 before_install: - sudo apt-add-repository ppa:mosquitto-dev/mosquitto-ppa -y - sudo apt-get update install: - sudo apt-get install mosquitto mosquitto-clients - make deps - make test-deps - make cover-deps before_script: - mosquitto -p 1883 1>/dev/null 2>/dev/null & services: - redis-server script: - make test - make fmt - make vet after_success: - make cover - make coveralls ## Instruction: [ci] Use Ubuntu mosquitto in Travis ## Code After: language: go sudo: required go: - 1.6 before_install: - sudo apt-get update install: - sudo apt-get install mosquitto - make deps - make test-deps - make cover-deps before_script: - mosquitto -p 1883 1>/dev/null 2>/dev/null & services: - redis-server script: - make test - make fmt - make vet after_success: - make cover - make coveralls
language: go sudo: required go: - 1.6 before_install: - - sudo apt-add-repository ppa:mosquitto-dev/mosquitto-ppa -y - sudo apt-get update install: - - sudo apt-get install mosquitto mosquitto-clients ? ------------------ + - sudo apt-get install mosquitto - make deps - make test-deps - make cover-deps before_script: - mosquitto -p 1883 1>/dev/null 2>/dev/null & services: - - redis-server + - redis-server ? ++ script: - make test - make fmt - make vet after_success: - make cover - make coveralls
5
0.16129
2
3
2ce824eddd24b3cecd9f32bd39e69d5c8ae79eeb
migrations/20170218174938_hidden_comment.js
migrations/20170218174938_hidden_comment.js
export function up(knex) { return knex.schema.table('comments', (table) => { table.integer('hide_type').defaultTo(0).notNullable(); table.index('hide_type', 'comments_hide_type_idx', 'btree'); }); } export function down(knex) { return knex.schema.table('comments', (table) => { table.dropIndex('', 'comments_hide_type_idx'); table.dropColumn('hide_type'); }); }
export async function up(knex) { await knex.schema .table('comments', (table) => { table.integer('hide_type').defaultTo(0).notNullable(); table.index('hide_type', 'comments_hide_type_idx', 'btree'); }) .raw('alter table "comments" alter column "user_id" drop not null') .raw('alter table "comments" add constraint "comments_user_id_check" check (("hide_type" = 0) = ("user_id" is not null))'); } export async function down(knex) { const { rows: [{ exists }] } = await knex.raw('select exists(select 1 from "comments" where "user_id" is null)'); if (exists) { throw new Error('There are comments with null value in "user_id" column. Remove them before start this migration.'); } await knex.schema .raw('alter table "comments" drop constraint "comments_user_id_check"') .raw('alter table "comments" alter column "user_id" set not null') .table('comments', (table) => { table.dropIndex('', 'comments_hide_type_idx'); table.dropColumn('hide_type'); }); }
Allow null in comments.user_id in DB migration
Allow null in comments.user_id in DB migration
JavaScript
mit
FreeFeed/freefeed-server,FreeFeed/freefeed-server
javascript
## Code Before: export function up(knex) { return knex.schema.table('comments', (table) => { table.integer('hide_type').defaultTo(0).notNullable(); table.index('hide_type', 'comments_hide_type_idx', 'btree'); }); } export function down(knex) { return knex.schema.table('comments', (table) => { table.dropIndex('', 'comments_hide_type_idx'); table.dropColumn('hide_type'); }); } ## Instruction: Allow null in comments.user_id in DB migration ## Code After: export async function up(knex) { await knex.schema .table('comments', (table) => { table.integer('hide_type').defaultTo(0).notNullable(); table.index('hide_type', 'comments_hide_type_idx', 'btree'); }) .raw('alter table "comments" alter column "user_id" drop not null') .raw('alter table "comments" add constraint "comments_user_id_check" check (("hide_type" = 0) = ("user_id" is not null))'); } export async function down(knex) { const { rows: [{ exists }] } = await knex.raw('select exists(select 1 from "comments" where "user_id" is null)'); if (exists) { throw new Error('There are comments with null value in "user_id" column. Remove them before start this migration.'); } await knex.schema .raw('alter table "comments" drop constraint "comments_user_id_check"') .raw('alter table "comments" alter column "user_id" set not null') .table('comments', (table) => { table.dropIndex('', 'comments_hide_type_idx'); table.dropColumn('hide_type'); }); }
- export function up(knex) { + export async function up(knex) { ? ++++++ + await knex.schema - return knex.schema.table('comments', (table) => { ? ------ ^^^^^^^^^^^ + .table('comments', (table) => { ? ^ - table.integer('hide_type').defaultTo(0).notNullable(); + table.integer('hide_type').defaultTo(0).notNullable(); ? ++ - table.index('hide_type', 'comments_hide_type_idx', 'btree'); + table.index('hide_type', 'comments_hide_type_idx', 'btree'); ? ++ - }); + }) + .raw('alter table "comments" alter column "user_id" drop not null') + .raw('alter table "comments" add constraint "comments_user_id_check" check (("hide_type" = 0) = ("user_id" is not null))'); } - export function down(knex) { + export async function down(knex) { ? ++++++ + const { rows: [{ exists }] } = await knex.raw('select exists(select 1 from "comments" where "user_id" is null)'); + if (exists) { + throw new Error('There are comments with null value in "user_id" column. Remove them before start this migration.'); + } + + await knex.schema + .raw('alter table "comments" drop constraint "comments_user_id_check"') + .raw('alter table "comments" alter column "user_id" set not null') - return knex.schema.table('comments', (table) => { ? ------ ^^^^^^^^^^^ + .table('comments', (table) => { ? ^ - table.dropIndex('', 'comments_hide_type_idx'); + table.dropIndex('', 'comments_hide_type_idx'); ? ++ - table.dropColumn('hide_type'); + table.dropColumn('hide_type'); ? ++ - }); + }); ? ++ }
31
2.384615
21
10
262d628a61bc10a672398770113282bd5449a763
htdocs/admin/add_news.phtml
htdocs/admin/add_news.phtml
<?php include("../../config/settings.inc.php"); include("$rootpath/include/database.inc.php"); $title = isset($_POST["title"]) ? $_GET["title"] : ""; $body = isset($_POST["body"]) ? $_GET["body"]: ""; $author = isset($_POST["author"]) ? $_GET["author"]: ""; $url = isset($_POST["url"]) ? $_GET["url"]: ""; if (strlen($title) > 0) { $conn = iemdb("mesosite"); pg_exec($conn, "INSERT into news(body, author, title, url) VALUES ('$body', '$author', '$title', '$url')"); pg_close($conn); echo "<p>Story entered!"; } ?> <html> <head> <title>IEM Admin | Add News Item</title> </head> <body> <a href="/admin/">Back to admin home</a> <p> <form method="POST" action="add_news.phtml"> <p>Enter Title:<input type="text" name="title" size="30"> <p>Reference URL?: <input type="text" name="url" size="50"> <p>Enter Story: <textarea NAME='body' wrap="hard" ROWS="20" COLS="70"></textarea> <p>Enter Author: <input type="text" name="author" value="Daryl Herzmann"> <p>Post Story: <input type="submit"><input type="reset"> </form>
<?php include("../../config/settings.inc.php"); include("$rootpath/include/database.inc.php"); $title = isset($_POST["title"]) ? $_POST["title"] : ""; $body = isset($_POST["body"]) ? $_POST["body"]: ""; $author = isset($_POST["author"]) ? $_POST["author"]: ""; $url = isset($_POST["url"]) ? $_POST["url"]: ""; if (strlen($title) > 0) { $conn = iemdb("mesosite"); pg_exec($conn, "INSERT into news(body, author, title, url) VALUES ('$body', '$author', '$title', '$url')"); pg_close($conn); echo "<p>Story entered!"; } ?> <html> <head> <title>IEM Admin | Add News Item</title> </head> <body> <a href="/admin/">Back to admin home</a> <p> <form method="POST" action="add_news.phtml"> <p>Enter Title:<input type="text" name="title" size="30"> <p>Reference URL?: <input type="text" name="url" size="50"> <p>Enter Story: <textarea NAME='body' wrap="hard" ROWS="20" COLS="70"></textarea> <p>Enter Author: <input type="text" name="author" value="Daryl Herzmann"> <p>Post Story: <input type="submit"><input type="reset"> </form>
Fix it so that it works!
Fix it so that it works!
HTML+PHP
mit
akrherz/iem,akrherz/iem,akrherz/iem,akrherz/iem,akrherz/iem
html+php
## Code Before: <?php include("../../config/settings.inc.php"); include("$rootpath/include/database.inc.php"); $title = isset($_POST["title"]) ? $_GET["title"] : ""; $body = isset($_POST["body"]) ? $_GET["body"]: ""; $author = isset($_POST["author"]) ? $_GET["author"]: ""; $url = isset($_POST["url"]) ? $_GET["url"]: ""; if (strlen($title) > 0) { $conn = iemdb("mesosite"); pg_exec($conn, "INSERT into news(body, author, title, url) VALUES ('$body', '$author', '$title', '$url')"); pg_close($conn); echo "<p>Story entered!"; } ?> <html> <head> <title>IEM Admin | Add News Item</title> </head> <body> <a href="/admin/">Back to admin home</a> <p> <form method="POST" action="add_news.phtml"> <p>Enter Title:<input type="text" name="title" size="30"> <p>Reference URL?: <input type="text" name="url" size="50"> <p>Enter Story: <textarea NAME='body' wrap="hard" ROWS="20" COLS="70"></textarea> <p>Enter Author: <input type="text" name="author" value="Daryl Herzmann"> <p>Post Story: <input type="submit"><input type="reset"> </form> ## Instruction: Fix it so that it works! ## Code After: <?php include("../../config/settings.inc.php"); include("$rootpath/include/database.inc.php"); $title = isset($_POST["title"]) ? $_POST["title"] : ""; $body = isset($_POST["body"]) ? $_POST["body"]: ""; $author = isset($_POST["author"]) ? $_POST["author"]: ""; $url = isset($_POST["url"]) ? $_POST["url"]: ""; if (strlen($title) > 0) { $conn = iemdb("mesosite"); pg_exec($conn, "INSERT into news(body, author, title, url) VALUES ('$body', '$author', '$title', '$url')"); pg_close($conn); echo "<p>Story entered!"; } ?> <html> <head> <title>IEM Admin | Add News Item</title> </head> <body> <a href="/admin/">Back to admin home</a> <p> <form method="POST" action="add_news.phtml"> <p>Enter Title:<input type="text" name="title" size="30"> <p>Reference URL?: <input type="text" name="url" size="50"> <p>Enter Story: <textarea NAME='body' wrap="hard" ROWS="20" COLS="70"></textarea> <p>Enter Author: <input type="text" name="author" value="Daryl Herzmann"> <p>Post Story: <input type="submit"><input type="reset"> </form>
<?php include("../../config/settings.inc.php"); include("$rootpath/include/database.inc.php"); - $title = isset($_POST["title"]) ? $_GET["title"] : ""; ? ^^ + $title = isset($_POST["title"]) ? $_POST["title"] : ""; ? ^^^ - $body = isset($_POST["body"]) ? $_GET["body"]: ""; ? ^^ + $body = isset($_POST["body"]) ? $_POST["body"]: ""; ? ^^^ - $author = isset($_POST["author"]) ? $_GET["author"]: ""; ? ^^ + $author = isset($_POST["author"]) ? $_POST["author"]: ""; ? ^^^ - $url = isset($_POST["url"]) ? $_GET["url"]: ""; ? ^^ + $url = isset($_POST["url"]) ? $_POST["url"]: ""; ? ^^^ if (strlen($title) > 0) { $conn = iemdb("mesosite"); pg_exec($conn, "INSERT into news(body, author, title, url) VALUES ('$body', '$author', '$title', '$url')"); pg_close($conn); echo "<p>Story entered!"; } ?> <html> <head> <title>IEM Admin | Add News Item</title> </head> <body> <a href="/admin/">Back to admin home</a> <p> <form method="POST" action="add_news.phtml"> <p>Enter Title:<input type="text" name="title" size="30"> <p>Reference URL?: <input type="text" name="url" size="50"> <p>Enter Story: <textarea NAME='body' wrap="hard" ROWS="20" COLS="70"></textarea> <p>Enter Author: <input type="text" name="author" value="Daryl Herzmann"> <p>Post Story: <input type="submit"><input type="reset"> </form>
8
0.181818
4
4
faf3dc1bff8296e2cf1f6da58400d5f91a7514b9
test/issue-41.js
test/issue-41.js
const { prep, Volume } = require('./_common'); describe('If a symlink target does not exist', function () { it('should throw an ENOENT error with default options', function () { const fs = Volume.fromJSON({ 'file': 'content' }, 'folder'); fs.symlinkSync('non-existing-file', 'soft-link'); const hash = prep(fs); const expected = 'ENOENT: no such file or directory, stat \'soft-link\''; return hash('.').should.eventually.be.rejectedWith(expected); }); it('should hash the name if `ignoreMissingSymlink=true`', function () { const fs = Volume.fromJSON({ 'file': 'content' }, 'folder'); fs.symlinkSync('non-existing-file', 'soft-link'); const hash = prep(fs); return hash('.', { ignoreMissingSymLinks: true }).then(result => { result.children[1].hash.should.equal('2rAbS3Cr1VJjcXABKQhmBD2SS3s='); result.hash.should.equal('lGA66Gdtt7YF6wp4oWOwHSezcMg='); }); }); });
const { prep, Volume } = require('./_common'); describe('Issue 41: Ignore missing symbolic link targets', function () { // Note: The different link types are only relevant on windows ['file', 'dir', 'junction'].map(linkType); }); function linkType(type) { describe(`If a "${type}" symlink target does not exist`, function () { it('should throw an ENOENT error with default options', function () { const fs = Volume.fromJSON({ 'file': 'content' }, 'folder'); fs.symlinkSync('non-existing-file', 'soft-link', type); const hash = prep(fs); const expected = 'ENOENT: no such file or directory, stat \'soft-link\''; return hash('.').should.eventually.be.rejectedWith(expected); }); it('should hash the name if `ignoreMissingSymlink=true`', function () { const fs = Volume.fromJSON({ 'file': 'content' }, 'folder'); fs.symlinkSync('non-existing-file', 'soft-link', type); const hash = prep(fs); return hash('.', { ignoreMissingSymLinks: true }).then(result => { result.children[1].hash.should.equal('2rAbS3Cr1VJjcXABKQhmBD2SS3s='); result.hash.should.equal('lGA66Gdtt7YF6wp4oWOwHSezcMg='); }); }); }); }
Add tests for windows-specific symlink types
Add tests for windows-specific symlink types
JavaScript
mit
marc136/node-folder-hash
javascript
## Code Before: const { prep, Volume } = require('./_common'); describe('If a symlink target does not exist', function () { it('should throw an ENOENT error with default options', function () { const fs = Volume.fromJSON({ 'file': 'content' }, 'folder'); fs.symlinkSync('non-existing-file', 'soft-link'); const hash = prep(fs); const expected = 'ENOENT: no such file or directory, stat \'soft-link\''; return hash('.').should.eventually.be.rejectedWith(expected); }); it('should hash the name if `ignoreMissingSymlink=true`', function () { const fs = Volume.fromJSON({ 'file': 'content' }, 'folder'); fs.symlinkSync('non-existing-file', 'soft-link'); const hash = prep(fs); return hash('.', { ignoreMissingSymLinks: true }).then(result => { result.children[1].hash.should.equal('2rAbS3Cr1VJjcXABKQhmBD2SS3s='); result.hash.should.equal('lGA66Gdtt7YF6wp4oWOwHSezcMg='); }); }); }); ## Instruction: Add tests for windows-specific symlink types ## Code After: const { prep, Volume } = require('./_common'); describe('Issue 41: Ignore missing symbolic link targets', function () { // Note: The different link types are only relevant on windows ['file', 'dir', 'junction'].map(linkType); }); function linkType(type) { describe(`If a "${type}" symlink target does not exist`, function () { it('should throw an ENOENT error with default options', function () { const fs = Volume.fromJSON({ 'file': 'content' }, 'folder'); fs.symlinkSync('non-existing-file', 'soft-link', type); const hash = prep(fs); const expected = 'ENOENT: no such file or directory, stat \'soft-link\''; return hash('.').should.eventually.be.rejectedWith(expected); }); it('should hash the name if `ignoreMissingSymlink=true`', function () { const fs = Volume.fromJSON({ 'file': 'content' }, 'folder'); fs.symlinkSync('non-existing-file', 'soft-link', type); const hash = prep(fs); return hash('.', { ignoreMissingSymLinks: true }).then(result => { result.children[1].hash.should.equal('2rAbS3Cr1VJjcXABKQhmBD2SS3s='); result.hash.should.equal('lGA66Gdtt7YF6wp4oWOwHSezcMg='); }); }); }); }
const { prep, Volume } = require('./_common'); + describe('Issue 41: Ignore missing symbolic link targets', function () { + // Note: The different link types are only relevant on windows + ['file', 'dir', 'junction'].map(linkType); + }); - describe('If a symlink target does not exist', function () { - it('should throw an ENOENT error with default options', function () { - const fs = Volume.fromJSON({ 'file': 'content' }, 'folder'); - fs.symlinkSync('non-existing-file', 'soft-link'); - const hash = prep(fs); - const expected = 'ENOENT: no such file or directory, stat \'soft-link\''; - return hash('.').should.eventually.be.rejectedWith(expected); - }); + function linkType(type) { + describe(`If a "${type}" symlink target does not exist`, function () { + it('should throw an ENOENT error with default options', function () { + const fs = Volume.fromJSON({ 'file': 'content' }, 'folder'); + fs.symlinkSync('non-existing-file', 'soft-link', type); + const hash = prep(fs); + const expected = 'ENOENT: no such file or directory, stat \'soft-link\''; + return hash('.').should.eventually.be.rejectedWith(expected); + }); - it('should hash the name if `ignoreMissingSymlink=true`', function () { - const fs = Volume.fromJSON({ 'file': 'content' }, 'folder'); - fs.symlinkSync('non-existing-file', 'soft-link'); - const hash = prep(fs); + it('should hash the name if `ignoreMissingSymlink=true`', function () { + const fs = Volume.fromJSON({ 'file': 'content' }, 'folder'); + fs.symlinkSync('non-existing-file', 'soft-link', type); + const hash = prep(fs); + - return hash('.', { ignoreMissingSymLinks: true }).then(result => { + return hash('.', { ignoreMissingSymLinks: true }).then(result => { ? ++++ - result.children[1].hash.should.equal('2rAbS3Cr1VJjcXABKQhmBD2SS3s='); + result.children[1].hash.should.equal('2rAbS3Cr1VJjcXABKQhmBD2SS3s='); ? ++++ - result.hash.should.equal('lGA66Gdtt7YF6wp4oWOwHSezcMg='); + result.hash.should.equal('lGA66Gdtt7YF6wp4oWOwHSezcMg='); ? ++++ + }); }); }); - }); + }
39
1.695652
23
16
3fed4ad4d519ff053b2be56173d9180b97c366b5
test/functions/cli_test.jl
test/functions/cli_test.jl
@testset "Cli Function Tests" begin @test isdefined(Julz, :cli) == true end
@testset "Cli Function Tests" begin @test isdefined(Julz, :cli) == true originalSTDOUT = STDOUT (outRead, outWrite) = redirect_stdout() run(`julia -L $(Pkg.dir("Julz"))/src/functions/cli.jl -e 'cli()' -- hello`) close(outWrite) data = readavailable(outRead) close(outRead) redirect_stdout(originalSTDOUT) @test String(data) == "Hello, World!\n" end
Add test for cli usage
Add test for cli usage
Julia
mit
djsegal/julz,djsegal/julz
julia
## Code Before: @testset "Cli Function Tests" begin @test isdefined(Julz, :cli) == true end ## Instruction: Add test for cli usage ## Code After: @testset "Cli Function Tests" begin @test isdefined(Julz, :cli) == true originalSTDOUT = STDOUT (outRead, outWrite) = redirect_stdout() run(`julia -L $(Pkg.dir("Julz"))/src/functions/cli.jl -e 'cli()' -- hello`) close(outWrite) data = readavailable(outRead) close(outRead) redirect_stdout(originalSTDOUT) @test String(data) == "Hello, World!\n" end
@testset "Cli Function Tests" begin @test isdefined(Julz, :cli) == true + originalSTDOUT = STDOUT + + (outRead, outWrite) = redirect_stdout() + + run(`julia -L $(Pkg.dir("Julz"))/src/functions/cli.jl -e 'cli()' -- hello`) + + close(outWrite) + + data = readavailable(outRead) + + close(outRead) + + redirect_stdout(originalSTDOUT) + + @test String(data) == "Hello, World!\n" + end
16
3.2
16
0
56a11217686a0b275eacd07a2950193a7a870d99
src/SMS/drivers/Plivo.js
src/SMS/drivers/Plivo.js
const plivo = require('plivo'); class Log { constructor (Config) { this.config = Config; const authId = this.config.get('sms.plivo.authId'); const authToken = this.config.get('sms.plivo.authToken'); if (!authId) throw new Error('Auth Id not found in Plivo config.'); if (!authToken) throw new Error('Auth Token not found in Plivo config.'); this.plivo = plivo.RestAPI({ authId, authToken }); } send (message, config) { if (config) this.config = config; return new Promise((resolve, reject) => { this.plivo.send_message({ src: message.from, dst: message.to, text: message.text }, (status, response) => { if (status < 200 || status > 299) { return reject(`${status} response - ${response.error}`); } return resolve(response.message_uuid); }); }); } } module.exports = Log;
const plivo = require('plivo'); class Plivo { constructor (Config) { this.config = Config; const authId = this.config.get('sms.plivo.authId'); const authToken = this.config.get('sms.plivo.authToken'); if (!authId) throw new Error('Auth Id not found in Plivo config.'); if (!authToken) throw new Error('Auth Token not found in Plivo config.'); this.plivo = plivo.RestAPI({ authId, authToken }); } send (message, config) { if (config) this.config = config; return new Promise((resolve, reject) => { this.plivo.send_message({ src: message.from, dst: message.to, text: message.text }, (status, response) => { if (status < 200 || status > 299) { return reject(`${status} response - ${response.error}`); } return resolve(response.message_uuid); }); }); } } module.exports = Plivo;
Change exported name to plivo
Change exported name to plivo
JavaScript
mit
nrempel/adonis-sms
javascript
## Code Before: const plivo = require('plivo'); class Log { constructor (Config) { this.config = Config; const authId = this.config.get('sms.plivo.authId'); const authToken = this.config.get('sms.plivo.authToken'); if (!authId) throw new Error('Auth Id not found in Plivo config.'); if (!authToken) throw new Error('Auth Token not found in Plivo config.'); this.plivo = plivo.RestAPI({ authId, authToken }); } send (message, config) { if (config) this.config = config; return new Promise((resolve, reject) => { this.plivo.send_message({ src: message.from, dst: message.to, text: message.text }, (status, response) => { if (status < 200 || status > 299) { return reject(`${status} response - ${response.error}`); } return resolve(response.message_uuid); }); }); } } module.exports = Log; ## Instruction: Change exported name to plivo ## Code After: const plivo = require('plivo'); class Plivo { constructor (Config) { this.config = Config; const authId = this.config.get('sms.plivo.authId'); const authToken = this.config.get('sms.plivo.authToken'); if (!authId) throw new Error('Auth Id not found in Plivo config.'); if (!authToken) throw new Error('Auth Token not found in Plivo config.'); this.plivo = plivo.RestAPI({ authId, authToken }); } send (message, config) { if (config) this.config = config; return new Promise((resolve, reject) => { this.plivo.send_message({ src: message.from, dst: message.to, text: message.text }, (status, response) => { if (status < 200 || status > 299) { return reject(`${status} response - ${response.error}`); } return resolve(response.message_uuid); }); }); } } module.exports = Plivo;
const plivo = require('plivo'); - class Log { ? ^ - + class Plivo { ? ^^^^ constructor (Config) { this.config = Config; const authId = this.config.get('sms.plivo.authId'); const authToken = this.config.get('sms.plivo.authToken'); if (!authId) throw new Error('Auth Id not found in Plivo config.'); if (!authToken) throw new Error('Auth Token not found in Plivo config.'); this.plivo = plivo.RestAPI({ authId, authToken }); } send (message, config) { if (config) this.config = config; return new Promise((resolve, reject) => { this.plivo.send_message({ src: message.from, dst: message.to, text: message.text }, (status, response) => { if (status < 200 || status > 299) { return reject(`${status} response - ${response.error}`); } return resolve(response.message_uuid); }); }); } } - module.exports = Log; ? ^ - + module.exports = Plivo; ? ^^^^
4
0.129032
2
2
5836da29e5c84b142861e3a5346861b56fe5d132
nixtape/utils/resolve-external.php
nixtape/utils/resolve-external.php
<?php function resolve_external_url($url) { if (substr($url, 0, 10) == 'jamendo://') { return process_jamendo_url($url); } return $url; } function process_jamendo_url($url) { if (substr($url, 10, 13) == 'track/stream/') { $id = substr($url, 23); return 'http://api.jamendo.com/get2/stream/track/redirect/?id=' . $id . '&streamencoding=ogg2'; } if (substr($url, 10, 15) == 'album/download/') { $id = substr($url, 25); return 'http://api.jamendo.com/get2/bittorrent/file/plain/?album_id=' . $id . '&type=archive&class=ogg3'; } if (substr($url, 10, 10) == 'album/art/') { $id = substr($url, 20); return 'http://api.jamendo.com/get2/image/album/redirect/?id=' . $id . '&imagesize=200'; } // We don't know what this is return $url; }
<?php function resolve_external_url($url) { if (substr($url, 0, 10) == 'jamendo://') { return process_jamendo_url($url); } return $url; } function process_jamendo_url($url) { if (substr($url, 10, 13) == 'track/stream/') { $id = substr($url, 23); return 'http://gigue.rrbone.net/' . $id . '.ogg2'; } if (substr($url, 10, 15) == 'album/download/') { $id = substr($url, 25); return 'http://api.jamendo.com/get2/bittorrent/file/plain/?album_id=' . $id . '&type=archive&class=ogg3'; } if (substr($url, 10, 10) == 'album/art/') { $id = substr($url, 20); return 'http://api.jamendo.com/get2/image/album/redirect/?id=' . $id . '&imagesize=200'; } // We don't know what this is return $url; }
Switch to using Eimann's mirror to resolve jamendo track ids, due to jamendo downtime.
Switch to using Eimann's mirror to resolve jamendo track ids, due to jamendo downtime.
PHP
agpl-3.0
foocorp/gnu-fm,foocorp/gnu-fm,foocorp/gnu-fm,foocorp/gnu-fm,foocorp/gnu-fm,foocorp/gnu-fm,foocorp/gnu-fm,foocorp/gnu-fm,foocorp/gnu-fm
php
## Code Before: <?php function resolve_external_url($url) { if (substr($url, 0, 10) == 'jamendo://') { return process_jamendo_url($url); } return $url; } function process_jamendo_url($url) { if (substr($url, 10, 13) == 'track/stream/') { $id = substr($url, 23); return 'http://api.jamendo.com/get2/stream/track/redirect/?id=' . $id . '&streamencoding=ogg2'; } if (substr($url, 10, 15) == 'album/download/') { $id = substr($url, 25); return 'http://api.jamendo.com/get2/bittorrent/file/plain/?album_id=' . $id . '&type=archive&class=ogg3'; } if (substr($url, 10, 10) == 'album/art/') { $id = substr($url, 20); return 'http://api.jamendo.com/get2/image/album/redirect/?id=' . $id . '&imagesize=200'; } // We don't know what this is return $url; } ## Instruction: Switch to using Eimann's mirror to resolve jamendo track ids, due to jamendo downtime. ## Code After: <?php function resolve_external_url($url) { if (substr($url, 0, 10) == 'jamendo://') { return process_jamendo_url($url); } return $url; } function process_jamendo_url($url) { if (substr($url, 10, 13) == 'track/stream/') { $id = substr($url, 23); return 'http://gigue.rrbone.net/' . $id . '.ogg2'; } if (substr($url, 10, 15) == 'album/download/') { $id = substr($url, 25); return 'http://api.jamendo.com/get2/bittorrent/file/plain/?album_id=' . $id . '&type=archive&class=ogg3'; } if (substr($url, 10, 10) == 'album/art/') { $id = substr($url, 20); return 'http://api.jamendo.com/get2/image/album/redirect/?id=' . $id . '&imagesize=200'; } // We don't know what this is return $url; }
<?php function resolve_external_url($url) { if (substr($url, 0, 10) == 'jamendo://') { return process_jamendo_url($url); } return $url; } function process_jamendo_url($url) { if (substr($url, 10, 13) == 'track/stream/') { $id = substr($url, 23); - return 'http://api.jamendo.com/get2/stream/track/redirect/?id=' . $id . '&streamencoding=ogg2'; + return 'http://gigue.rrbone.net/' . $id . '.ogg2'; } if (substr($url, 10, 15) == 'album/download/') { $id = substr($url, 25); return 'http://api.jamendo.com/get2/bittorrent/file/plain/?album_id=' . $id . '&type=archive&class=ogg3'; } if (substr($url, 10, 10) == 'album/art/') { $id = substr($url, 20); return 'http://api.jamendo.com/get2/image/album/redirect/?id=' . $id . '&imagesize=200'; } // We don't know what this is return $url; }
2
0.071429
1
1
56255aaea6813f17d08e7a0d976f0fedd0bb9f43
stylesheets/_component.progress-bars.scss
stylesheets/_component.progress-bars.scss
// Outer container .progress { background-color: $progress-bg; border-radius: $border-radius; box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1); height: $line-height-computed; margin-bottom: $line-height-computed; overflow: hidden; } // Bar of progress .progress-bar { background-color: color(primary); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15); color: color(white); float: left; font-size: $font-size-small; height: 100%; overflow: hidden; padding-right: 5px; text-align: right; text-shadow: 0 1px 0 rgba(0, 0, 0, .15); transition: width .6s ease; width: 0%; } .progress-bar--success { background-color: color(success); } .progress-bar--warning { background-color: color(warning); } .progress-bar--danger { background-color: color(danger); } .progress-bar--compact { height: 5px; }
// Outer container .progress { background-color: $progress-bg; border-radius: $border-radius; box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1); height: $line-height-computed; margin-bottom: $line-height-computed; overflow: hidden; } // Bar of progress .progress-bar { background-color: color(primary); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15); color: color(white); float: left; font-size: $font-size-small; height: 100%; overflow: hidden; padding-right: 5px; text-align: right; text-shadow: 0 1px 0 rgba(0, 0, 0, .15); transition: width .6s ease; width: 0%; } .progress-bar--success { background-color: color(success); } .progress-bar--warning { background-color: color(warning); color: color(warning, alt); } .progress-bar--danger { background-color: color(danger); } .progress-bar--compact { height: 5px; }
Fix contrast issue with warning progress bar + visible value
Fix contrast issue with warning progress bar + visible value
SCSS
mit
jadu/pulsar,jadu/pulsar,jadu/pulsar
scss
## Code Before: // Outer container .progress { background-color: $progress-bg; border-radius: $border-radius; box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1); height: $line-height-computed; margin-bottom: $line-height-computed; overflow: hidden; } // Bar of progress .progress-bar { background-color: color(primary); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15); color: color(white); float: left; font-size: $font-size-small; height: 100%; overflow: hidden; padding-right: 5px; text-align: right; text-shadow: 0 1px 0 rgba(0, 0, 0, .15); transition: width .6s ease; width: 0%; } .progress-bar--success { background-color: color(success); } .progress-bar--warning { background-color: color(warning); } .progress-bar--danger { background-color: color(danger); } .progress-bar--compact { height: 5px; } ## Instruction: Fix contrast issue with warning progress bar + visible value ## Code After: // Outer container .progress { background-color: $progress-bg; border-radius: $border-radius; box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1); height: $line-height-computed; margin-bottom: $line-height-computed; overflow: hidden; } // Bar of progress .progress-bar { background-color: color(primary); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15); color: color(white); float: left; font-size: $font-size-small; height: 100%; overflow: hidden; padding-right: 5px; text-align: right; text-shadow: 0 1px 0 rgba(0, 0, 0, .15); transition: width .6s ease; width: 0%; } .progress-bar--success { background-color: color(success); } .progress-bar--warning { background-color: color(warning); color: color(warning, alt); } .progress-bar--danger { background-color: color(danger); } .progress-bar--compact { height: 5px; }
// Outer container .progress { background-color: $progress-bg; border-radius: $border-radius; box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1); height: $line-height-computed; margin-bottom: $line-height-computed; overflow: hidden; } // Bar of progress .progress-bar { background-color: color(primary); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15); color: color(white); float: left; font-size: $font-size-small; height: 100%; overflow: hidden; padding-right: 5px; text-align: right; text-shadow: 0 1px 0 rgba(0, 0, 0, .15); transition: width .6s ease; width: 0%; } .progress-bar--success { background-color: color(success); } .progress-bar--warning { background-color: color(warning); + color: color(warning, alt); } .progress-bar--danger { background-color: color(danger); } .progress-bar--compact { height: 5px; }
1
0.02439
1
0
75171ed80079630d22463685768072ad7323e653
boundary/action_installed.py
boundary/action_installed.py
from api_cli import ApiCli class ActionInstalled (ApiCli): def __init__(self): ApiCli.__init__(self) self.method = "GET" self.path = "v1/actions/installed" def getDescription(self): return "Returns the actions associated with the Boundary account"
from api_cli import ApiCli class ActionInstalled (ApiCli): def __init__(self): ApiCli.__init__(self) self.method = "GET" self.path = "v1/actions/installed" def getDescription(self): return "Returns the actions configured within a Boundary account"
Change code to be PEP-8 compliant
Change code to be PEP-8 compliant
Python
apache-2.0
boundary/boundary-api-cli,boundary/boundary-api-cli,jdgwartney/boundary-api-cli,jdgwartney/pulse-api-cli,wcainboundary/boundary-api-cli,wcainboundary/boundary-api-cli,jdgwartney/pulse-api-cli,boundary/pulse-api-cli,jdgwartney/boundary-api-cli,boundary/pulse-api-cli
python
## Code Before: from api_cli import ApiCli class ActionInstalled (ApiCli): def __init__(self): ApiCli.__init__(self) self.method = "GET" self.path = "v1/actions/installed" def getDescription(self): return "Returns the actions associated with the Boundary account" ## Instruction: Change code to be PEP-8 compliant ## Code After: from api_cli import ApiCli class ActionInstalled (ApiCli): def __init__(self): ApiCli.__init__(self) self.method = "GET" self.path = "v1/actions/installed" def getDescription(self): return "Returns the actions configured within a Boundary account"
from api_cli import ApiCli class ActionInstalled (ApiCli): def __init__(self): ApiCli.__init__(self) self.method = "GET" self.path = "v1/actions/installed" def getDescription(self): - return "Returns the actions associated with the Boundary account" ? ^^^ ^ ^^ ^^^ + return "Returns the actions configured within a Boundary account" ? ^ ^^ ^^^ ++ ^ - +
4
0.333333
2
2
69f752b2001c31a2b162104963dc49d0117a28eb
.github/workflows/run.yml
.github/workflows/run.yml
name: .NET Core on: push jobs: Run: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Setup .NET Core uses: actions/setup-dotnet@v1 with: dotnet-version: 3.1.300 - name: Build benchmarks run: dotnet publish -c Release - name: Run benchmarks run: dotnet BenchmarkMockNet.dll working-directory: bin/Release/netcoreapp3.1/publish - name: Upload results uses: actions/upload-artifact@v2 with: name: Results path: bin/Release/netcoreapp3.1/publish/BenchmarkDotNet.Artifacts/results/*.md
name: .NET Core on: push jobs: Run: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Setup .NET Core uses: actions/setup-dotnet@v1 with: dotnet-version: 5.0.x - name: Build benchmarks run: dotnet publish -c Release - name: Run benchmarks run: dotnet BenchmarkMockNet.dll working-directory: bin/Release/net5.0/publish - name: Upload results uses: actions/upload-artifact@v2 with: name: Results path: bin/Release/net5.0/publish/BenchmarkDotNet.Artifacts/results/*.md
Update GitHub Actions workflow to use .NET 5
Update GitHub Actions workflow to use .NET 5
YAML
mit
stevedesmond-ca/BenchmarkMockNet
yaml
## Code Before: name: .NET Core on: push jobs: Run: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Setup .NET Core uses: actions/setup-dotnet@v1 with: dotnet-version: 3.1.300 - name: Build benchmarks run: dotnet publish -c Release - name: Run benchmarks run: dotnet BenchmarkMockNet.dll working-directory: bin/Release/netcoreapp3.1/publish - name: Upload results uses: actions/upload-artifact@v2 with: name: Results path: bin/Release/netcoreapp3.1/publish/BenchmarkDotNet.Artifacts/results/*.md ## Instruction: Update GitHub Actions workflow to use .NET 5 ## Code After: name: .NET Core on: push jobs: Run: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Setup .NET Core uses: actions/setup-dotnet@v1 with: dotnet-version: 5.0.x - name: Build benchmarks run: dotnet publish -c Release - name: Run benchmarks run: dotnet BenchmarkMockNet.dll working-directory: bin/Release/net5.0/publish - name: Upload results uses: actions/upload-artifact@v2 with: name: Results path: bin/Release/net5.0/publish/BenchmarkDotNet.Artifacts/results/*.md
name: .NET Core on: push jobs: Run: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Setup .NET Core uses: actions/setup-dotnet@v1 with: - dotnet-version: 3.1.300 ? ^ ^ ^^^ + dotnet-version: 5.0.x ? ^ ^ ^ - name: Build benchmarks run: dotnet publish -c Release - name: Run benchmarks run: dotnet BenchmarkMockNet.dll - working-directory: bin/Release/netcoreapp3.1/publish ? ^^^^^^^^ ^ + working-directory: bin/Release/net5.0/publish ? ^ ^ - name: Upload results uses: actions/upload-artifact@v2 with: name: Results - path: bin/Release/netcoreapp3.1/publish/BenchmarkDotNet.Artifacts/results/*.md ? ^^^^^^^^ ^ + path: bin/Release/net5.0/publish/BenchmarkDotNet.Artifacts/results/*.md ? ^ ^
6
0.206897
3
3
0faa4b62920a0cd2558d7912e933dd6d431d8157
static/global/refactor-sass/screen-refactor.scss
static/global/refactor-sass/screen-refactor.scss
// libs @import 'lib/bourbon/bourbon'; @import 'base/grid-settings'; @import 'lib/neat/neat'; // mixins @import 'mixins/custom'; // @import 'mixins/bb-icons'; // reset @import 'base/normalize'; // variables @import 'variables'; // global @import "base/base"; @import 'base/typography'; // modules @import 'modules/wallpost-update'; @import 'modules/wallpost'; @import 'modules/activity'; // pages @import 'pages/project-detail-header'; @import 'pages/wall';
// libs @import 'lib/bourbon/bourbon'; @import 'base/grid-settings'; @import 'lib/neat/neat'; // mixins @import 'mixins/custom'; // @import 'mixins/bb-icons'; // reset @import 'base/normalize'; // variables @import 'variables'; // global @import "base/base"; @import 'base/typography'; // modules @import 'modules/wallpost-update'; @import 'modules/wallpost'; @import 'modules/activity'; @import 'modules/donations'; // pages @import 'pages/project-detail-header'; @import 'pages/wall';
Add dummy donation share buttons
Add dummy donation share buttons
SCSS
bsd-3-clause
onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site
scss
## Code Before: // libs @import 'lib/bourbon/bourbon'; @import 'base/grid-settings'; @import 'lib/neat/neat'; // mixins @import 'mixins/custom'; // @import 'mixins/bb-icons'; // reset @import 'base/normalize'; // variables @import 'variables'; // global @import "base/base"; @import 'base/typography'; // modules @import 'modules/wallpost-update'; @import 'modules/wallpost'; @import 'modules/activity'; // pages @import 'pages/project-detail-header'; @import 'pages/wall'; ## Instruction: Add dummy donation share buttons ## Code After: // libs @import 'lib/bourbon/bourbon'; @import 'base/grid-settings'; @import 'lib/neat/neat'; // mixins @import 'mixins/custom'; // @import 'mixins/bb-icons'; // reset @import 'base/normalize'; // variables @import 'variables'; // global @import "base/base"; @import 'base/typography'; // modules @import 'modules/wallpost-update'; @import 'modules/wallpost'; @import 'modules/activity'; @import 'modules/donations'; // pages @import 'pages/project-detail-header'; @import 'pages/wall';
// libs @import 'lib/bourbon/bourbon'; @import 'base/grid-settings'; @import 'lib/neat/neat'; // mixins @import 'mixins/custom'; // @import 'mixins/bb-icons'; // reset @import 'base/normalize'; // variables @import 'variables'; // global @import "base/base"; @import 'base/typography'; // modules @import 'modules/wallpost-update'; @import 'modules/wallpost'; @import 'modules/activity'; + @import 'modules/donations'; // pages @import 'pages/project-detail-header'; @import 'pages/wall';
1
0.037037
1
0
061589b33f3475c738a7b416e050a0e30f11fb45
.travis.yml
.travis.yml
language: php php: - 5.3 before_install: - "git submodule update --init --recursive" before_script: - "pear channel-discover pear.phing.info" - "pear install phing/phing" - "phpenv rehash" - "composer install" script: "phing test" notifications: irc: channels: - "irc.freenode.org#kohana" template: - "%{repository}/%{branch} (%{commit}) - %{author}: %{message}" - "Build details: %{build_url}" email: false
language: php php: - 5.3 - 5.4 - 5.5 - 5.6 - hhvm before_install: - "git submodule update --init --recursive" before_script: - "pear channel-discover pear.phing.info" - "pear install phing/phing" - "phpenv rehash" - "composer install" script: "phing test" notifications: irc: channels: - "irc.freenode.org#kohana" template: - "%{repository}/%{branch} (%{commit}) - %{author}: %{message}" - "Build details: %{build_url}" email: false
Support for PHP 5.3+ and HHVM
Support for PHP 5.3+ and HHVM closes kohana/core#504
YAML
bsd-3-clause
driutheman/kohana,dreamsxin/kohana,16nsk/kohana,exlant/kohana,exlant/kohana,kohana/kohana,JanvanCasteren/kohana,web-player/kohana,zhangjingpu/kohana,mattwadey/kohana,ajose1024/kohana,gold3bear/kohana,anhnt0212/kohana,qianzy96/kohana,driutheman/kohana,jellycheng/kohana,yeysman/kohana
yaml
## Code Before: language: php php: - 5.3 before_install: - "git submodule update --init --recursive" before_script: - "pear channel-discover pear.phing.info" - "pear install phing/phing" - "phpenv rehash" - "composer install" script: "phing test" notifications: irc: channels: - "irc.freenode.org#kohana" template: - "%{repository}/%{branch} (%{commit}) - %{author}: %{message}" - "Build details: %{build_url}" email: false ## Instruction: Support for PHP 5.3+ and HHVM closes kohana/core#504 ## Code After: language: php php: - 5.3 - 5.4 - 5.5 - 5.6 - hhvm before_install: - "git submodule update --init --recursive" before_script: - "pear channel-discover pear.phing.info" - "pear install phing/phing" - "phpenv rehash" - "composer install" script: "phing test" notifications: irc: channels: - "irc.freenode.org#kohana" template: - "%{repository}/%{branch} (%{commit}) - %{author}: %{message}" - "Build details: %{build_url}" email: false
language: php php: - 5.3 + - 5.4 + - 5.5 + - 5.6 + - hhvm before_install: - "git submodule update --init --recursive" before_script: - "pear channel-discover pear.phing.info" - "pear install phing/phing" - "phpenv rehash" - "composer install" script: "phing test" notifications: irc: channels: - "irc.freenode.org#kohana" template: - "%{repository}/%{branch} (%{commit}) - %{author}: %{message}" - "Build details: %{build_url}" email: false
4
0.166667
4
0
91c522e54636399ca212295459d7080444657ce7
package.json
package.json
{ "description": "A cache module for node.js that uses a two-level cache (in-memory cache for recently accessed data plus Redis for distributed caching) with some extra features to avoid cache stampedes and thundering herds.", "dependencies": { "async": "^3.1.0", "lock": "^1.1.0", "memory-cache": "^0.2.0", "redis": "^2.8.0" }, "devDependencies": { "coveralls": "*", "istanbul": "*", "mocha": "*" }, "homepage": "https://github.com/mediocre/petty-cache", "keywords": [ "cache", "lock", "mutex", "redis", "semaphore" ], "license": "Apache-2.0", "main": "index.js", "name": "petty-cache", "scripts": { "coveralls": "istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- --exit --reporter spec && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage", "test": "mocha --exit --reporter spec" }, "repository": { "type": "git", "url": "https://github.com/mediocre/petty-cache.git" }, "version": "2.6.1" }
{ "description": "A cache module for node.js that uses a two-level cache (in-memory cache for recently accessed data plus Redis for distributed caching) with some extra features to avoid cache stampedes and thundering herds.", "dependencies": { "async": "~3.1.1", "lock": "~1.1.0", "memory-cache": "~0.2.0", "redis": "~3.0.2" }, "devDependencies": { "coveralls": "*", "istanbul": "*", "mocha": "*" }, "homepage": "https://github.com/mediocre/petty-cache", "keywords": [ "cache", "lock", "mutex", "redis", "semaphore" ], "license": "Apache-2.0", "main": "index.js", "name": "petty-cache", "scripts": { "coveralls": "istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- --exit --reporter spec && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage", "test": "mocha --exit --reporter spec" }, "repository": { "type": "git", "url": "https://github.com/mediocre/petty-cache.git" }, "version": "3.0.0" }
Update redis module to v3.0.2
Update redis module to v3.0.2
JSON
apache-2.0
mediocre/petty-cache
json
## Code Before: { "description": "A cache module for node.js that uses a two-level cache (in-memory cache for recently accessed data plus Redis for distributed caching) with some extra features to avoid cache stampedes and thundering herds.", "dependencies": { "async": "^3.1.0", "lock": "^1.1.0", "memory-cache": "^0.2.0", "redis": "^2.8.0" }, "devDependencies": { "coveralls": "*", "istanbul": "*", "mocha": "*" }, "homepage": "https://github.com/mediocre/petty-cache", "keywords": [ "cache", "lock", "mutex", "redis", "semaphore" ], "license": "Apache-2.0", "main": "index.js", "name": "petty-cache", "scripts": { "coveralls": "istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- --exit --reporter spec && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage", "test": "mocha --exit --reporter spec" }, "repository": { "type": "git", "url": "https://github.com/mediocre/petty-cache.git" }, "version": "2.6.1" } ## Instruction: Update redis module to v3.0.2 ## Code After: { "description": "A cache module for node.js that uses a two-level cache (in-memory cache for recently accessed data plus Redis for distributed caching) with some extra features to avoid cache stampedes and thundering herds.", "dependencies": { "async": "~3.1.1", "lock": "~1.1.0", "memory-cache": "~0.2.0", "redis": "~3.0.2" }, "devDependencies": { "coveralls": "*", "istanbul": "*", "mocha": "*" }, "homepage": "https://github.com/mediocre/petty-cache", "keywords": [ "cache", "lock", "mutex", "redis", "semaphore" ], "license": "Apache-2.0", "main": "index.js", "name": "petty-cache", "scripts": { "coveralls": "istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- --exit --reporter spec && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage", "test": "mocha --exit --reporter spec" }, "repository": { "type": "git", "url": "https://github.com/mediocre/petty-cache.git" }, "version": "3.0.0" }
{ "description": "A cache module for node.js that uses a two-level cache (in-memory cache for recently accessed data plus Redis for distributed caching) with some extra features to avoid cache stampedes and thundering herds.", "dependencies": { - "async": "^3.1.0", ? ^ ^ + "async": "~3.1.1", ? ^ ^ - "lock": "^1.1.0", ? ^ + "lock": "~1.1.0", ? ^ - "memory-cache": "^0.2.0", ? ^ + "memory-cache": "~0.2.0", ? ^ - "redis": "^2.8.0" ? ^^^^ + "redis": "~3.0.2" ? ^^ ++ }, "devDependencies": { "coveralls": "*", "istanbul": "*", "mocha": "*" }, "homepage": "https://github.com/mediocre/petty-cache", "keywords": [ "cache", "lock", "mutex", "redis", "semaphore" ], "license": "Apache-2.0", "main": "index.js", "name": "petty-cache", "scripts": { "coveralls": "istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- --exit --reporter spec && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage", "test": "mocha --exit --reporter spec" }, "repository": { "type": "git", "url": "https://github.com/mediocre/petty-cache.git" }, - "version": "2.6.1" ? ^ ^ ^ + "version": "3.0.0" ? ^ ^ ^ }
10
0.294118
5
5
c733392cb24a7644348a3587079b8a94eb79d648
web_modules/components/Avatar/index.js
web_modules/components/Avatar/index.js
import React, { Component, PropTypes } from "react" import { baseUrl } from "../../../config" import joinUri from "join-uri" export default class Avatar extends Component { static propTypes = { template: PropTypes.string.isRequired, size: PropTypes.number, }; static defaultProps = { size: 120, } render() { const { template, size, ...props } = this.props const url = baseUrl + joinUri("/", template.replace("{size}", size)) return ( <img src={ url } { ...props } /> ) } }
import React, { Component, PropTypes } from "react" import { baseUrlHttp as baseUrl } from "../../../config" import joinUri from "join-uri" export default class Avatar extends Component { static propTypes = { template: PropTypes.string.isRequired, size: PropTypes.number, }; static defaultProps = { size: 120, } render() { const { template, size, ...props } = this.props const url = baseUrl + joinUri("/", template.replace("{size}", size)) return ( <img src={ url } { ...props } /> ) } }
Use http protocol for Avatar
Use http protocol for Avatar
JavaScript
mit
thangngoc89/dnh-blog
javascript
## Code Before: import React, { Component, PropTypes } from "react" import { baseUrl } from "../../../config" import joinUri from "join-uri" export default class Avatar extends Component { static propTypes = { template: PropTypes.string.isRequired, size: PropTypes.number, }; static defaultProps = { size: 120, } render() { const { template, size, ...props } = this.props const url = baseUrl + joinUri("/", template.replace("{size}", size)) return ( <img src={ url } { ...props } /> ) } } ## Instruction: Use http protocol for Avatar ## Code After: import React, { Component, PropTypes } from "react" import { baseUrlHttp as baseUrl } from "../../../config" import joinUri from "join-uri" export default class Avatar extends Component { static propTypes = { template: PropTypes.string.isRequired, size: PropTypes.number, }; static defaultProps = { size: 120, } render() { const { template, size, ...props } = this.props const url = baseUrl + joinUri("/", template.replace("{size}", size)) return ( <img src={ url } { ...props } /> ) } }
import React, { Component, PropTypes } from "react" - import { baseUrl } from "../../../config" + import { baseUrlHttp as baseUrl } from "../../../config" ? +++++++++++++++ import joinUri from "join-uri" export default class Avatar extends Component { static propTypes = { template: PropTypes.string.isRequired, size: PropTypes.number, }; static defaultProps = { size: 120, } render() { const { template, size, ...props } = this.props const url = baseUrl + joinUri("/", template.replace("{size}", size)) return ( <img src={ url } { ...props } /> ) } }
2
0.090909
1
1