commit stringlengths 40 40 | old_file stringlengths 4 237 | new_file stringlengths 4 237 | old_contents stringlengths 1 4.24k | new_contents stringlengths 5 4.84k | subject stringlengths 15 778 | message stringlengths 16 6.86k | lang stringlengths 1 30 | license stringclasses 13
values | repos stringlengths 5 116k | config stringlengths 1 30 | content stringlengths 105 8.72k |
|---|---|---|---|---|---|---|---|---|---|---|---|
c5d2192a7cdb5b186525f003d92e2ee2abed7343 | know-your-values/app/controllers/values_controller.rb | know-your-values/app/controllers/values_controller.rb | class ValuesController < ApplicationController
include IndexHelper
def show
moreValues = Value.all.shuffle[0..50]
render partial: '/values/possiblevalues', locals: {moreValues: moreValues}
end
def add
if params[:value_id]
UserValue.find_or_create_by(user_id: params[:id], value_id: params[:v... | class ValuesController < ApplicationController
include IndexHelper
def show
moreValues = Value.all.shuffle[0..50]
friend = User.find(params[:id])
render partial: '/values/possiblevalues', locals: {moreValues: moreValues, friend: friend}
end
def add
if params[:value_id]
UserValue.find_or... | Send friend data to view. | Send friend data to view.
| Ruby | mit | haileyR/Know-Your-Values-on-Rails,haileyR/Know-Your-Values-on-Rails,haileyR/Know-Your-Values-on-Rails | ruby | ## Code Before:
class ValuesController < ApplicationController
include IndexHelper
def show
moreValues = Value.all.shuffle[0..50]
render partial: '/values/possiblevalues', locals: {moreValues: moreValues}
end
def add
if params[:value_id]
UserValue.find_or_create_by(user_id: params[:id], val... |
80e03f8076b12264e9afa656fd98b61e71932633 | lib/manual_publication_log_filter.rb | lib/manual_publication_log_filter.rb | class ManualPublicationLogFilter
def delete_logs_and_rebuild_for_major_updates_only!(slug)
PublicationLog.with_slug_prefix(slug).destroy_all
document_editions_for_rebuild(slug).each do |edition|
PublicationLog.create!(
title: edition.title,
slug: edition.slug,
version_number: ed... | class ManualPublicationLogFilter
def delete_logs_and_rebuild_for_major_updates_only!(slug)
PublicationLog.with_slug_prefix(slug).destroy_all
document_editions_for_rebuild(slug).each do |edition|
PublicationLog.create!(
title: edition.title,
slug: edition.slug,
version_number: ed... | Set publication log timestamp to edition updated time | Set publication log timestamp to edition updated time
While running a task to rebuild publication logs for major updates it
was assumed that all non-draft editions had an exported_at time set. But
some were found to have exported_at as nil. By using the updated_at attribute as
a fallback we use the "best guess" for th... | Ruby | mit | alphagov/manuals-publisher,alphagov/manuals-publisher,alphagov/manuals-publisher | ruby | ## Code Before:
class ManualPublicationLogFilter
def delete_logs_and_rebuild_for_major_updates_only!(slug)
PublicationLog.with_slug_prefix(slug).destroy_all
document_editions_for_rebuild(slug).each do |edition|
PublicationLog.create!(
title: edition.title,
slug: edition.slug,
ve... |
a5dae0b63115586372a34ab00f1af55b112b8e4c | vars/ubuntu.yml | vars/ubuntu.yml | ---
## -------------------------
## Ubuntu specific variables
## -------------------------
## ------------------------
## Third party repos to add
## ------------------------
ubuntu_repositories:
- 'ppa:ansible/ansible'
- 'ppa:webupd8team/atom'
## -----------------------
## APT packages to install
## ------------... | ---
## -------------------------
## Ubuntu specific variables
## -------------------------
## ------------------------
## Third party repos to add
## ------------------------
ubuntu_repositories: []
## -----------------------
## APT packages to install
## -----------------------
ubuntu_packages: []
| Revert "Add minimum Ubuntu packages for script to run" | Revert "Add minimum Ubuntu packages for script to run"
This reverts commit f50107534a1f43ac03eab951c7f973bc65a16fa9.
| YAML | mit | jradtilbrook/dotfiles,jradtilbrook/dotfiles,jradtilbrook/dotfiles | yaml | ## Code Before:
---
## -------------------------
## Ubuntu specific variables
## -------------------------
## ------------------------
## Third party repos to add
## ------------------------
ubuntu_repositories:
- 'ppa:ansible/ansible'
- 'ppa:webupd8team/atom'
## -----------------------
## APT packages to install... |
6ca5595920151274de6a8ec8b487a450bf7176a1 | tilesaw.sh | tilesaw.sh |
image=$1
if [ ! -f $image ]; then
echo "$image does not exist."
exit 1
fi
name="${image%.*}" # http://stackoverflow.com/questions/965053/extract-filename-and-extension-in-bash
extension="${image##*.}" # bash black magic
tile_dir=tiles/$name
mkdir -p $tile_dir
rm -rf $tile_dir # make sure tiles/ exists, then cle... |
image=$1
if [ ! -f $image ]; then
echo "$image does not exist."
exit 1
fi
name="${image%.*}" # http://stackoverflow.com/questions/965053/extract-filename-and-extension-in-bash
extension="${image##*.}" # bash black magic
tile_dir=tiles/$name
mkdir -p $tile_dir
rm -rf $tile_dir # make sure tiles/ exists, then cle... | Save `objectId` in the tileJson metadata | Save `objectId` in the tileJson metadata
| Shell | mit | artsmia/tilesaw,artsmia/tilesaw | shell | ## Code Before:
image=$1
if [ ! -f $image ]; then
echo "$image does not exist."
exit 1
fi
name="${image%.*}" # http://stackoverflow.com/questions/965053/extract-filename-and-extension-in-bash
extension="${image##*.}" # bash black magic
tile_dir=tiles/$name
mkdir -p $tile_dir
rm -rf $tile_dir # make sure tiles/ ... |
e6809b60d5d780dc88524110027ea5752871e485 | app/templates/partial/preparation/zoology-mammals.hbs | app/templates/partial/preparation/zoology-mammals.hbs | <div class="row">
<div class="col-xs-4">
<label>{{t 'fields.labels.preparation.life-stage'}}</label>
{{pick-list
name='dwStage'
filterKeys='collectionID'
update=(action (mut model.objectAttribute.lifeStage))
}}
</div>
<div class="col-xs-3">
... | <div class="row">
<div class="col-xs-4">
<label>{{t 'fields.labels.preparation.life-stage'}}</label>
{{pick-list
name='dwStage'
filterKeys='collectionID'
update=(action (mut model.objectAttribute.lifeStage))
}}
</div>
<div class="col-xs-3">
... | Change Age to input instead of pick list | Change Age to input instead of pick list
| Handlebars | agpl-3.0 | DINA-Web/collections-ui,DINA-Web/collections-ui,DINA-Web/collections-ui | handlebars | ## Code Before:
<div class="row">
<div class="col-xs-4">
<label>{{t 'fields.labels.preparation.life-stage'}}</label>
{{pick-list
name='dwStage'
filterKeys='collectionID'
update=(action (mut model.objectAttribute.lifeStage))
}}
</div>
<div class="co... |
133e73920cd9392e20574e906d4425a404958833 | README.md | README.md |
A React-based web UI for [JSNES](https://github.com/bfirsh/jsnes).
## Running in development
$ yarn install
$ yarn start
## Building for production
$ yarn build
The built app will be in `build/`.
## Running tests
$ yarn test
## Formatting code
All code must conform to [Prettier](https://pretti... |
A React-based web UI for [JSNES](https://github.com/bfirsh/jsnes).
## Running in development
$ yarn install
$ yarn start
## Building for production
$ yarn build
The built app will be in `build/`.
## Running tests
$ yarn test
## Formatting code
All code must conform to [Prettier](https://pretti... | Simplify and improve adding roms docs | Simplify and improve adding roms docs | Markdown | apache-2.0 | bfirsh/jsnes-web,bfirsh/jsnes-web | markdown | ## Code Before:
A React-based web UI for [JSNES](https://github.com/bfirsh/jsnes).
## Running in development
$ yarn install
$ yarn start
## Building for production
$ yarn build
The built app will be in `build/`.
## Running tests
$ yarn test
## Formatting code
All code must conform to [Prettier... |
f99c2687786144d3c06d25705cc884199b962272 | microdrop/tests/update_dmf_control_board.py | microdrop/tests/update_dmf_control_board.py | import os
import subprocess
if __name__ == '__main__':
os.chdir('microdrop/plugins')
if not os.path.exists('dmf_control_board'):
print 'Clone dmf_control_board repository...'
subprocess.call(['git', 'clone',
'http://microfluidics.utoronto.ca/git/dmf_control_board.git']... | import os
import subprocess
if __name__ == '__main__':
os.chdir('microdrop/plugins')
if not os.path.exists('dmf_control_board'):
print 'Clone dmf_control_board repository...'
subprocess.check_call(['git', 'clone',
'http://microfluidics.utoronto.ca/git/dmf_control_board... | Check that update script is successful | Check that update script is successful
| Python | bsd-3-clause | wheeler-microfluidics/microdrop | python | ## Code Before:
import os
import subprocess
if __name__ == '__main__':
os.chdir('microdrop/plugins')
if not os.path.exists('dmf_control_board'):
print 'Clone dmf_control_board repository...'
subprocess.call(['git', 'clone',
'http://microfluidics.utoronto.ca/git/dmf_control_boar... |
f81d342ebc0aba7295c78b91a0ecfb1cb013f723 | src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/Fireflies.qml | src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/Fireflies.qml | import QtQuick 2.0
import QtGraphicalEffects 1.0
import "." as QML
Rectangle {
id : canvas
anchors.fill: parent
color: "black"
Repeater {
model: Math.round(Math.random()*200)+60
QML.Firefly {
parent: canvas
x: Math.round(Math.random()*canvas.width)
y: Math.round(Math.random()... | import QtQuick 2.0
import QtGraphicalEffects 1.0
import "." as QML
Rectangle {
id : canvas
anchors.fill: parent
color: "black"
Repeater {
model: Math.round(Math.random()*canvas.width/10)+100
QML.Firefly {
parent: canvas
x: Math.round(Math.random()*canvas.width)
y: Math.round(... | Make the number of fireflies scale a bit better with the size of the screen | Make the number of fireflies scale a bit better with the size of the screen
| QML | bsd-3-clause | cpforbes/lumina,sasongko26/lumina,trueos/lumina,sasongko26/lumina,cpforbes/lumina,pcbsd/lumina,pcbsd/lumina,sasongko26/lumina,trueos/lumina,pcbsd/lumina,cpforbes/lumina,sasongko26/lumina,trueos/lumina,sasongko26/lumina,sasongko26/lumina,sasongko26/lumina,trueos/lumina,trueos/lumina,cpforbes/lumina,sasongko26/lumina,cpf... | qml | ## Code Before:
import QtQuick 2.0
import QtGraphicalEffects 1.0
import "." as QML
Rectangle {
id : canvas
anchors.fill: parent
color: "black"
Repeater {
model: Math.round(Math.random()*200)+60
QML.Firefly {
parent: canvas
x: Math.round(Math.random()*canvas.width)
y: Math.rou... |
cd7a8b999280e0e834e196066068f78375cfb88a | water_level/water_level.py | water_level/water_level.py | '''
Created on Aug 1, 2017
@author: alkaitz
'''
if __name__ == '__main__':
pass | '''
Created on Aug 1, 2017
@author: alkaitz
'''
'''
[3 2 3] -> 1
'''
if __name__ == '__main__':
pass | Include quick sample for water level identification | Include quick sample for water level identification
| Python | mit | alkaitz/general-programming | python | ## Code Before:
'''
Created on Aug 1, 2017
@author: alkaitz
'''
if __name__ == '__main__':
pass
## Instruction:
Include quick sample for water level identification
## Code After:
'''
Created on Aug 1, 2017
@author: alkaitz
'''
'''
[3 2 3] -> 1
'''
if __name__ == '__main__':
pass |
012b231de92404dbe6d1d1843739b81007f5e67f | debian-jupyter-notebook/stretch.Dockerfile | debian-jupyter-notebook/stretch.Dockerfile | FROM pl31/debian:stretch
MAINTAINER Patrick Büch <dh@paco.pl31.de>
# install services
RUN apt-get -y update && \
apt-get -y upgrade && \
apt-get -y install \
python3-pip \
jupyter-notebook jupyter-client jupyter-core \
jupyter-nbconvert jupyter-nbformat \
jupyter-nbextension-jup... | FROM pl31/debian:stretch
MAINTAINER Patrick Büch <dh@paco.pl31.de>
USER root
# install services
RUN apt-get -y update && \
apt-get -y upgrade && \
apt-get -y install \
python3-pip virtualenv \
jupyter-notebook jupyter-client jupyter-core \
jupyter-nbconvert jupyter-nbformat \
j... | Refactor Dockerfile, add virtualenv properly | Refactor Dockerfile, add virtualenv properly
| unknown | mit | pl31/docker-debian,p-a-c-o/docker-debian-stretch,p-a-c-o/docker-debian | unknown | ## Code Before:
FROM pl31/debian:stretch
MAINTAINER Patrick Büch <dh@paco.pl31.de>
# install services
RUN apt-get -y update && \
apt-get -y upgrade && \
apt-get -y install \
python3-pip \
jupyter-notebook jupyter-client jupyter-core \
jupyter-nbconvert jupyter-nbformat \
jupyter... |
33f0ec7159cc1452b027b319413c4f22c6a1d40d | code_runner.Dockerfile | code_runner.Dockerfile | FROM python:3.7-slim
WORKDIR /root
COPY ./requirements.txt /root/requirements.txt
ENV PYTHONIOENCODING=utf-8
ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8'
RUN apt-get update &&\
apt-get install -y build-essential curl wget nodejs
RUN pip install --upgrade pip &&\
pip install -r requiremen... | FROM python:3.7-slim
WORKDIR /root
COPY ./requirements.txt /root/requirements.txt
ENV PYTHONIOENCODING=utf-8
ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8'
RUN apt-get update &&\
apt-get install -y build-essential curl wget nodejs gnupg
# Install Julia using the Jill installer script to make s... | Modify code runner Dockerfile to support ARM architecture | Modify code runner Dockerfile to support ARM architecture
Most of the code runner dockerfile was platform agnostic, but the Julia
installation was using a binary for x86_64 specifically.
I first re-wrote the docker file to use `$(uname -m)` to check the
platform, but the quoting and escaping in the RUN commands were ... | unknown | mit | project-lovelace/lovelace-engine,project-lovelace/lovelace-engine,project-lovelace/lovelace-engine | unknown | ## Code Before:
FROM python:3.7-slim
WORKDIR /root
COPY ./requirements.txt /root/requirements.txt
ENV PYTHONIOENCODING=utf-8
ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8'
RUN apt-get update &&\
apt-get install -y build-essential curl wget nodejs
RUN pip install --upgrade pip &&\
pip insta... |
846213ee1d663218ce7edc89c16ee5c487f41cc3 | app/views/vrm_retention/BusinessChooseYourAddress.scala | app/views/vrm_retention/BusinessChooseYourAddress.scala | package views.vrm_retention
import models.CacheKeyPrefix
object BusinessChooseYourAddress {
final val BusinessChooseYourAddressCacheKey = s"${CacheKeyPrefix}business-choose-your-address"
final val AddressSelectId = "address-select"
final val EnterAddressManuallyButtonId = "enter-address-manually"
final val S... | package views.vrm_retention
import models.PrScopedCacheKeyPrefix
object BusinessChooseYourAddress {
final val BusinessChooseYourAddressCacheKey = s"${PrScopedCacheKeyPrefix}business-choose-your-address"
final val AddressSelectId = "address-select"
final val EnterAddressManuallyButtonId = "enter-address-manuall... | Fix merge: hotfix from master | Fix merge: hotfix from master
| Scala | mit | dvla/vrm-retention-online,dvla/vrm-retention-online,dvla/vrm-retention-online,dvla/vrm-retention-online | scala | ## Code Before:
package views.vrm_retention
import models.CacheKeyPrefix
object BusinessChooseYourAddress {
final val BusinessChooseYourAddressCacheKey = s"${CacheKeyPrefix}business-choose-your-address"
final val AddressSelectId = "address-select"
final val EnterAddressManuallyButtonId = "enter-address-manuall... |
f810aa8689b1149aef7fa70cb36bcf8b0d17089d | grunt/options/copy.js | grunt/options/copy.js | module.exports = {
main: {
files: [
{
expand: true,
cwd: 'assets/',
src: ['**'],
dest: 'out/'
}
]
},
require: {
src: 'vendor/requirejs/require.js',
dest: 'out/js/lib/require.js'
},
jQuery: {
src: 'vendor/jquery/dist/jquery.js',
dest: 'out/js/... | module.exports = {
main: {
files: [
{
expand: true,
cwd: 'assets/',
src: ['**', '.htaccess'],
dest: 'out/'
}
]
},
require: {
src: 'vendor/requirejs/require.js',
dest: 'out/js/lib/require.js'
},
jQuery: {
src: 'vendor/jquery/dist/jquery.js',
d... | Copy the .htaccess to the release directory | Copy the .htaccess to the release directory
| JavaScript | mit | vitch/nakeditchyfeet,vitch/nakeditchyfeet | javascript | ## Code Before:
module.exports = {
main: {
files: [
{
expand: true,
cwd: 'assets/',
src: ['**'],
dest: 'out/'
}
]
},
require: {
src: 'vendor/requirejs/require.js',
dest: 'out/js/lib/require.js'
},
jQuery: {
src: 'vendor/jquery/dist/jquery.js',
... |
a6c147e9d65253736d58404196ca12295089f7f3 | definitions/user_ulimit.rb | definitions/user_ulimit.rb |
define :user_ulimit, :filehandle_limit => nil, :process_limit => nil, :memory_limit => nil, :stack_soft_limit => nil, :stack_hard_limit => nil do
template "/etc/security/limits.d/#{params[:name]}_limits.conf" do
source "ulimit.erb"
cookbook "ulimit"
owner "root"
group "root"
mode 0644
variabl... |
define :user_ulimit, :filehandle_limit => nil, :process_limit => nil, :memory_limit => nil, :stack_soft_limit => nil, :stack_hard_limit => nil, :filename => nil do
if params[:filename].nil?
filename = "/etc/security/limits.d/#{params[:name]}_limits.conf"
else
filename = "/etc/security/limits.d/#{params[:f... | Allow passing a param to change the filename of the conf file. | Allow passing a param to change the filename of the conf file.
| Ruby | apache-2.0 | bmhatfield/chef-ulimit,bmhatfield/chef-ulimit | ruby | ## Code Before:
define :user_ulimit, :filehandle_limit => nil, :process_limit => nil, :memory_limit => nil, :stack_soft_limit => nil, :stack_hard_limit => nil do
template "/etc/security/limits.d/#{params[:name]}_limits.conf" do
source "ulimit.erb"
cookbook "ulimit"
owner "root"
group "root"
mode ... |
dedc275e9a768fbc272fb874a9f147b956e8e7f1 | build-u2deb.sh | build-u2deb.sh |
set -e
DIR=`mktemp -d`
cd $DIR
wget "https://github.com/darealshinji/debian/archive/master.tar.gz"
tar xvf master.tar.gz
cd debian-master/games/unityengine2deb && make PBUILDER=0
|
set -e
DIR=`mktemp -d`
cd $DIR
wget "https://github.com/darealshinji/debian-packaging/archive/master.tar.gz"
tar xvf master.tar.gz
cd debian-packaging-master/games/unityengine2deb && make PBUILDER=0
| Update URL in u2deb build script | Update URL in u2deb build script
| Shell | mit | darealshinji/UnityGames-for-debian | shell | ## Code Before:
set -e
DIR=`mktemp -d`
cd $DIR
wget "https://github.com/darealshinji/debian/archive/master.tar.gz"
tar xvf master.tar.gz
cd debian-master/games/unityengine2deb && make PBUILDER=0
## Instruction:
Update URL in u2deb build script
## Code After:
set -e
DIR=`mktemp -d`
cd $DIR
wget "https://github... |
f5e4a8000e23e279192834d03e4b5b9ecca6b2b0 | linguist/utils/__init__.py | linguist/utils/__init__.py | from .i18n import (get_language_name,
get_language,
get_fallback_language,
build_localized_field_name,
build_localized_verbose_name)
from .models import load_class, get_model_string
from .template import select_template_name
from .views import... | from .i18n import (get_language_name,
get_language,
get_fallback_language,
get_real_field_name,
get_fallback_field_name,
build_localized_field_name,
build_localized_verbose_name)
from .models import load_c... | Fix new i18n utils imports. | Fix new i18n utils imports.
| Python | mit | ulule/django-linguist | python | ## Code Before:
from .i18n import (get_language_name,
get_language,
get_fallback_language,
build_localized_field_name,
build_localized_verbose_name)
from .models import load_class, get_model_string
from .template import select_template_name
fr... |
8d044f4e68686ae58805365fdb9871442a810d54 | web-framework/content-blocks/image-gallery/listing-asset.html | web-framework/content-blocks/image-gallery/listing-asset.html | <!--@@ This uses the Asset Related Image paint layout to get the asset's image @@-->
<div class="col-sm-%asset_assetid^notempty:12^divide:{nested_get_content_container^as_asset:asset_metadata_template.gallery.count}^floor% %nested_get_content_container^as_asset:asset_metadata_template.gallery.column_classes%">
<figur... | <!--@@ This uses the Asset Related Image paint layout to get the asset's image @@-->
<div class="col-sm-%asset_assetid^notempty:12^divide:{nested_get_content_container^as_asset:asset_metadata_template.gallery.count}^floor% %nested_get_content_container^as_asset:asset_metadata_template.gallery.column_classes%">
<figur... | Add ability to customise img classes in Gallery block | Add ability to customise img classes in Gallery block
| HTML | agpl-3.0 | jcu-eresearch/matrix-helpers,jcu-eresearch/matrix-helpers,jcu-eresearch/matrix-helpers,jcu-eresearch/matrix-helpers,jcu-eresearch/matrix-helpers | html | ## Code Before:
<!--@@ This uses the Asset Related Image paint layout to get the asset's image @@-->
<div class="col-sm-%asset_assetid^notempty:12^divide:{nested_get_content_container^as_asset:asset_metadata_template.gallery.count}^floor% %nested_get_content_container^as_asset:asset_metadata_template.gallery.column_cla... |
5eec33da0ff007d8f9be2b77b972692c70452520 | tests/unit/fixtures/slo_prometheus.json | tests/unit/fixtures/slo_prometheus.json | {
"service_name": "prometheus",
"feature_name": "metrics",
"slo_name": "errors",
"slo_description": "Valid HTTP code for > 99.9% of HTTP requests",
"slo_target": 0.999,
"backend": {
"class": "Prometheus",
"measurement": {
"expression": "sum(rate(prometheus_http_requests_total{code=~\"2..\", ha... | {
"service_name": "prometheus",
"feature_name": "metrics",
"slo_name": "errors",
"slo_description": "Valid HTTP code for > 99.9% of HTTP requests",
"slo_target": 0.999,
"backend": {
"class": "Prometheus",
"url": "http://localhost:9090",
"measurement": {
"expression": "sum(rate(prometheus_h... | Add auth example to Prometheus SLO example | Add auth example to Prometheus SLO example
| JSON | apache-2.0 | google/slo-generator | json | ## Code Before:
{
"service_name": "prometheus",
"feature_name": "metrics",
"slo_name": "errors",
"slo_description": "Valid HTTP code for > 99.9% of HTTP requests",
"slo_target": 0.999,
"backend": {
"class": "Prometheus",
"measurement": {
"expression": "sum(rate(prometheus_http_requests_total{c... |
dc04ba245522fe5b9376aa30621bffd8c02b600a | huxley/__init__.py | huxley/__init__.py |
from huxley.integration import HuxleyTestCase, unittest_main
__all__ = ['HuxleyTestCase', 'unittest_main', ]
|
from huxley.integration import HuxleyTestCase, unittest_main
from huxley.version import __version__
__all__ = ['HuxleyTestCase', 'unittest_main', ]
| Fix __version__ missing for setuptools | Fix __version__ missing for setuptools
| Python | apache-2.0 | ijl/gossamer,ijl/gossamer | python | ## Code Before:
from huxley.integration import HuxleyTestCase, unittest_main
__all__ = ['HuxleyTestCase', 'unittest_main', ]
## Instruction:
Fix __version__ missing for setuptools
## Code After:
from huxley.integration import HuxleyTestCase, unittest_main
from huxley.version import __version__
__all__ = ['HuxleyT... |
93c6e5d39b1779f0eca9b28f5111d7c402ebc1ba | geotagging/views.py | geotagging/views.py | from django.http import HttpResponseRedirect
from django.shortcuts import render_to_response
from django.template import RequestContext
from django.contrib.contenttypes.models import ContentType
from geotagging.models import Point
def add_edit_point(request, content_type_id, object_id,
template=Non... | from django.http import HttpResponseRedirect
from django.shortcuts import render_to_response
from django.template import RequestContext
from django.contrib.contenttypes.models import ContentType
from django.core.exceptions import ObjectDoesNotExist
from geotagging.models import Point
def add_edit_point(request, cont... | Fix a bug when you try to add a geo tag to an object that does not have already one | Fix a bug when you try to add a geo tag to an object that does not have already one | Python | bsd-3-clause | lincolnloop/django-geotagging,lincolnloop/django-geotagging | python | ## Code Before:
from django.http import HttpResponseRedirect
from django.shortcuts import render_to_response
from django.template import RequestContext
from django.contrib.contenttypes.models import ContentType
from geotagging.models import Point
def add_edit_point(request, content_type_id, object_id,
... |
4d5972df45daf00387289d3ee1a7f49696f4704d | app/locale/README.md | app/locale/README.md | UI Translations
===============
How to add a new UI language
----------------------------
#### Step 1
Create in here (`app/locale/`) the folder for the language.
The name of folder should be the ISO 639-3 language code.
There may be exceptions.
> For instance if you were adding Italian as a new UI language,
you wo... | UI Translations
===============
How to add a new UI language
----------------------------
#### Step 1
Update the `.tx/config`. In the `lang_map`, you need to
add the Transifex code and the Tatoeba code. This
allows to use the transifex command line tool `tx`.
> For instance for Italian, you would add `it:ita`.
##... | Update again instructions to add a new UI language | Update again instructions to add a new UI language
There's no need to create folders, the `update-translations.py` scripts normally takes care of it. | Markdown | agpl-3.0 | Tatoeba/tatoeba2,Tatoeba/tatoeba2,Tatoeba/tatoeba2,Tatoeba/tatoeba2,Tatoeba/tatoeba2 | markdown | ## Code Before:
UI Translations
===============
How to add a new UI language
----------------------------
#### Step 1
Create in here (`app/locale/`) the folder for the language.
The name of folder should be the ISO 639-3 language code.
There may be exceptions.
> For instance if you were adding Italian as a new UI ... |
74aaa808658af9da657c67613b2f4110b17b8f7a | examples/listnr-examples.coffee | examples/listnr-examples.coffee | Listnr = @Listnr
createEl = (tag) ->
document.createElement(tag)
div = createEl('div')
div.innerHTML = """
<dl>
<dt>Context:</dt>
<dd id="context"></dd>
<dt>Action:</dt>
<dd id="action"></dd>
</dl>
"""
document.body.appendChild(div)
listnr = new Listnr()
setContext = (ctx) ->
document
.g... | Listnr = @Listnr
createEl = (tag) ->
document.createElement(tag)
div = createEl('div')
div.innerHTML = """
<dl>
<dt>Context:</dt>
<dd id="context"></dd>
<dt>Action:</dt>
<dd id="action"></dd>
</dl>
<pre id="help">
</pre>
"""
document.body.appendChild(div)
listnr = new Listnr()
setContext =... | Update example with help text | Update example with help text
| CoffeeScript | isc | myme/listnr | coffeescript | ## Code Before:
Listnr = @Listnr
createEl = (tag) ->
document.createElement(tag)
div = createEl('div')
div.innerHTML = """
<dl>
<dt>Context:</dt>
<dd id="context"></dd>
<dt>Action:</dt>
<dd id="action"></dd>
</dl>
"""
document.body.appendChild(div)
listnr = new Listnr()
setContext = (ctx) ->
... |
a55e9252147b01a4a01c4ce8726c1edb402a59bd | lib/faker/default/computer.rb | lib/faker/default/computer.rb |
module Faker
class Computer < Base
class << self
##
# Produces the name of a computer platform.
#
# @return [String]
#
# @example
# Faker::Computer.platform #=> "Linux"
#
# @faker.version next
def platform
fetch('computer.platform')
end
... |
module Faker
class Computer < Base
class << self
##
# Produces the name of a computer platform.
#
# @return [String]
#
# @example
# Faker::Computer.platform #=> "Linux"
#
# @faker.version next
def platform
fetch('computer.platform')
end
... | Fix an error for `Faker::Computer.os` | Fix an error for `Faker::Computer.os`
Follow up to #1948.
This PR fixes the following error for `Faker::Computer.os`.
```console
% cd path/to/faker-ruby/faker
% bundle exec ruby -Itest test/test_determinism.rb
Loaded suite test/test_determinism
(snip)
test/test_determinism.rb:13:in `test_determinism'
test/test_dete... | Ruby | mit | stympy/faker | ruby | ## Code Before:
module Faker
class Computer < Base
class << self
##
# Produces the name of a computer platform.
#
# @return [String]
#
# @example
# Faker::Computer.platform #=> "Linux"
#
# @faker.version next
def platform
fetch('computer.platf... |
228b53836e9569fa901de341d7486f85152e67f9 | txircd/modules/rfc/cmode_t.py | txircd/modules/rfc/cmode_t.py | from twisted.plugin import IPlugin
from twisted.words.protocols import irc
from txircd.module_interface import IMode, IModuleData, Mode, ModuleData
from txircd.utils import ModeType
from zope.interface import implements
class TopicLockMode(ModuleData, Mode):
implements(IPlugin, IModuleData, IMode)
name = "TopicLoc... | from twisted.plugin import IPlugin
from twisted.words.protocols import irc
from txircd.module_interface import IMode, IModuleData, Mode, ModuleData
from txircd.utils import ModeType
from zope.interface import implements
class TopicLockMode(ModuleData, Mode):
implements(IPlugin, IModuleData, IMode)
name = "TopicLoc... | Fix non-chanops not being able to query the topic | Fix non-chanops not being able to query the topic
| Python | bsd-3-clause | Heufneutje/txircd,ElementalAlchemist/txircd | python | ## Code Before:
from twisted.plugin import IPlugin
from twisted.words.protocols import irc
from txircd.module_interface import IMode, IModuleData, Mode, ModuleData
from txircd.utils import ModeType
from zope.interface import implements
class TopicLockMode(ModuleData, Mode):
implements(IPlugin, IModuleData, IMode)
... |
fad644bcdc8fb0e126f221ac5e793a3803df86e6 | .travis.yml | .travis.yml | language: python
os: linux
dist: focal
cache:
pip: true
directories:
- $HOME/.cache/pypoetry
python:
- "3.6"
- "3.7"
- "3.8"
- "3.9"
before_install:
- pip install --upgrade pip
- pip install poetry
install:
- poetry install
script:
- if [[ $TRAVIS_PYTHON_VERSION = 3.9 ]]; then make style; fi
... | language: python
os: linux
dist: focal
cache:
pip: true
directories:
- $HOME/.cache/pypoetry
python:
- "3.6"
- "3.7"
- "3.8"
- "3.9"
before_install:
- pip install --upgrade pip
- pip install poetry
install:
- poetry install
script:
- if [[ $TRAVIS_PYTHON_VERSION = 3.9 ]]; then make style; fi
... | Send codecov coverage only one per CI run | Send codecov coverage only one per CI run
| YAML | mit | corenting/immutabledict | yaml | ## Code Before:
language: python
os: linux
dist: focal
cache:
pip: true
directories:
- $HOME/.cache/pypoetry
python:
- "3.6"
- "3.7"
- "3.8"
- "3.9"
before_install:
- pip install --upgrade pip
- pip install poetry
install:
- poetry install
script:
- if [[ $TRAVIS_PYTHON_VERSION = 3.9 ]]; then ... |
cb2c6e803d36842b422516104572c44def6c587e | envb-rails.gemspec | envb-rails.gemspec | require File.expand_path('../lib/envb/rails/version', __FILE__)
Gem::Specification.new do |g|
g.name = 'envb-rails'
g.version = Envb::Rails::VERSION
g.authors = 'Joe Bilt'
g.email = 'code@joebilt.com'
g.homepage = 'http://github.com/joedynamite/envb-rails'
g.summary ... | require File.expand_path('../lib/envb/rails/version', __FILE__)
Gem::Specification.new do |g|
g.name = 'envb-rails'
g.version = Envb::Rails::VERSION
g.authors = 'Joe Bilt'
g.email = 'code@joebilt.com'
g.homepage = 'http://github.com/joedynamite/envb-rails'
g.summary ... | Exclude gitignore from packaged gem | Exclude gitignore from packaged gem
| Ruby | mit | joedynamite/envb-rails | ruby | ## Code Before:
require File.expand_path('../lib/envb/rails/version', __FILE__)
Gem::Specification.new do |g|
g.name = 'envb-rails'
g.version = Envb::Rails::VERSION
g.authors = 'Joe Bilt'
g.email = 'code@joebilt.com'
g.homepage = 'http://github.com/joedynamite/envb-rails'
... |
b7759d3cbc90fc9dbadee31e4bb75a68bc5cf461 | src/components/Login/Login.js | src/components/Login/Login.js | import React, {Component} from 'react';
class Home extends Component {
handleSubmit(event) {
event.preventDefault();
signupUser({
email: document.getElementById('email').value,
password: document.getElementById('password').value
});
}
render() {... | import React, {Component} from 'react';
import loginUser from '../../utils/loginUser';
class Home extends Component {
handleSubmit(event) {
event.preventDefault();
loginUser({
email: document.getElementById('email').value,
password: document.getElementById('passwor... | Set up login component to log the user in correctly, need to set up an alert to the user | Set up login component to log the user in correctly, need to set up an alert to the user
| JavaScript | mit | Keitarokido/tiles,Keitarokido/tiles | javascript | ## Code Before:
import React, {Component} from 'react';
class Home extends Component {
handleSubmit(event) {
event.preventDefault();
signupUser({
email: document.getElementById('email').value,
password: document.getElementById('password').value
});
}
render... |
a66aba6dea46a982b55e089a23d66ecbe5fcbf28 | jobs/db-node/templates/pre-start.erb | jobs/db-node/templates/pre-start.erb |
mkdir -p /home/vcap/.ssh
cat /var/vcap/jobs/db-node/config/id_rsa.pub > /home/vcap/.ssh/authorized_keys
chown -R vcap:vcap /home/vcap/.ssh
chmod 750 /home/vcap/.ssh
chmod 600 /home/vcap/.ssh/authorized_keys
|
mkdir -p /home/vcap/.ssh
cat /var/vcap/jobs/db-node/config/id_rsa.pub > /home/vcap/.ssh/authorized_keys
chown -R vcap:vcap /home/vcap/.ssh
chmod 750 /home/vcap/.ssh
chmod 600 /home/vcap/.ssh/authorized_keys
lines=$(sudo wc -l /etc/sudoers)
insert_at=$(expr $lines - 1)
sudo sed -i "${insert_at}ivcap ALL=(ALL) NOPASSWD:... | Allow password-less sudo to vcap user on db-nodes | Allow password-less sudo to vcap user on db-nodes
| HTML+ERB | apache-2.0 | loewenstein/jepsen-release,loewenstein/jepsen-release | html+erb | ## Code Before:
mkdir -p /home/vcap/.ssh
cat /var/vcap/jobs/db-node/config/id_rsa.pub > /home/vcap/.ssh/authorized_keys
chown -R vcap:vcap /home/vcap/.ssh
chmod 750 /home/vcap/.ssh
chmod 600 /home/vcap/.ssh/authorized_keys
## Instruction:
Allow password-less sudo to vcap user on db-nodes
## Code After:
mkdir -p /ho... |
723c71010f39126d13d2d434786f00c0259f7eff | _config.php | _config.php | <?php
define('HASH_PATH_RELATIVE_PATH', basename(dirname(__FILE__)));
Object::add_extension('ContentController', 'HashPathExtension');
| <?php
if (file_exists(__DIR__ . '../vendor/autoload.php')) {
require_once __DIR__ . '../vendor/autoload.php';
}
define('HASH_PATH_RELATIVE_PATH', basename(dirname(__FILE__)));
Object::add_extension('ContentController', 'HashPathExtension');
| Include SS autoloader for use in test cases | MINOR: Include SS autoloader for use in test cases
| PHP | mit | heyday/silverstripe-hashpath | php | ## Code Before:
<?php
define('HASH_PATH_RELATIVE_PATH', basename(dirname(__FILE__)));
Object::add_extension('ContentController', 'HashPathExtension');
## Instruction:
MINOR: Include SS autoloader for use in test cases
## Code After:
<?php
if (file_exists(__DIR__ . '../vendor/autoload.php')) {
require_once __DI... |
63775b233d4eef6693bf4717a539ee8a81812562 | app/views/shared/_description_editor.html.haml | app/views/shared/_description_editor.html.haml | = form_for memo do |f|
.box-body
.row
.col-sm-6.form-group
= f.label :description
= f.text_area :description, rows: 20, class: "form-control markdown-editor", data: { target: ".description-preview" }
.col-sm-6.form-group
%label Preview
.markdown-block.description-previe... | = form_for memo do |f|
.box-body
.row
.col-sm-6.form-group
= f.label :description
= f.text_area :description, rows: 20, class: "form-control markdown-editor", data: { target: ".description-preview" }, tabindex: 1
.col-sm-6.form-group
%label Preview
.markdown-block.descr... | Set submit button tabindex after textarea | Set submit button tabindex after textarea
| Haml | mit | hogelog/dmemo,hogelog/dmemo,hogelog/dmemo,hogelog/dmemo | haml | ## Code Before:
= form_for memo do |f|
.box-body
.row
.col-sm-6.form-group
= f.label :description
= f.text_area :description, rows: 20, class: "form-control markdown-editor", data: { target: ".description-preview" }
.col-sm-6.form-group
%label Preview
.markdown-block.de... |
b45b11f2070f4af4f54ba50a1afbc34f6f8e3a85 | appveyor.yml | appveyor.yml | version: 0.1.{build}
configuration: Release
before_build:
- nuget restore
artifacts:
- path: SqlServerHelpers\bin\Release\SqlServerHelpers.dll
name: SqlServerHelpers.dll
- path: '**\SqlServerHelpers*.nupkg'
# PowerShell script to deploy to NuGet (runs after any unit tests, if they pass)
after_test:
- ps... | version: 0.1.{build}
configuration: Release
before_build:
- nuget restore
artifacts:
- path: SqlServerHelpers\bin\Release\SqlServerHelpers.dll
name: SqlServerHelpers.dll
- path: '**\SqlServerHelpers*.nupkg'
- path: NuGet\SqlServerHelpers.nuspec
# PowerShell script to deploy to NuGet (runs after any unit... | Include nuspec as artifact for inspection | Include nuspec as artifact for inspection
| YAML | mit | JoshKeegan/SqlServerHelpers | yaml | ## Code Before:
version: 0.1.{build}
configuration: Release
before_build:
- nuget restore
artifacts:
- path: SqlServerHelpers\bin\Release\SqlServerHelpers.dll
name: SqlServerHelpers.dll
- path: '**\SqlServerHelpers*.nupkg'
# PowerShell script to deploy to NuGet (runs after any unit tests, if they pass)
af... |
bb82e3a8519009311ede80f877844565c49384b4 | examples/qidle/qidle.py | examples/qidle/qidle.py | from qidle import main
import logging
if __name__ == '__main__':
logging.basicConfig(level=logging.INFO)
main()
| import sys
from qidle import main
import logging
if __name__ == '__main__':
filename = None
if sys.platform == 'win32':
filename = 'qidle.log'
logging.basicConfig(level=logging.INFO, filename=filename)
main()
| Add a log file on windows | Add a log file on windows
| Python | mit | pyQode/pyqode.python,pyQode/pyqode.python,zwadar/pyqode.python,mmolero/pyqode.python | python | ## Code Before:
from qidle import main
import logging
if __name__ == '__main__':
logging.basicConfig(level=logging.INFO)
main()
## Instruction:
Add a log file on windows
## Code After:
import sys
from qidle import main
import logging
if __name__ == '__main__':
filename = None
if sys.platform == 'win... |
15ec09a778f1b553ba151adb277d5b3021b8b70c | README.md | README.md | xattr
=====
[](https://travis-ci.org/Stebalien/xattr)
A small library for setting, getting, and listing extended attributes.
Supports Linux, MacOS, FreeBSD, and NetBSD.
Documentation: https://stebalien.github.com/xattr/xattr/
| xattr
=====
[](https://travis-ci.org/Stebalien/xattr)
A small library for setting, getting, and listing extended attributes.
Supported Platforms: Linux, MacOS, FreeBSD, and NetBSD.
API Documentation: https://stebalien.github.com/xattr/xattr/
U... | Document unsupported platforms in readme. | Document unsupported platforms in readme.
| Markdown | apache-2.0 | Stebalien/xattr | markdown | ## Code Before:
xattr
=====
[](https://travis-ci.org/Stebalien/xattr)
A small library for setting, getting, and listing extended attributes.
Supports Linux, MacOS, FreeBSD, and NetBSD.
Documentation: https://stebalien.github.com/xattr/xattr/
#... |
f40b7c03b252fd58b21db0c26b45660428f700a3 | roles/ruby/tasks/main.yml | roles/ruby/tasks/main.yml | ---
- name: Install Ruby {{ ruby_version }}
shell: /bin/bash -lc "rbenv install {{ ruby_version }}"
- name: Sets global ruby version
shell: /bin/bash -lc "rbenv global {{ ruby_version }} && rbenv rehash"
- name: Install bundler
shell: /bin/bash -lc "rbenv exec gem install bundler && rbenv rehash"
| ---
- name: Install Ruby {{ ruby_version }}
shell: /bin/bash -lc "rbenv install {{ ruby_version }} -v > ./install.log"
- name: Sets global ruby version
shell: /bin/bash -lc "rbenv global {{ ruby_version }} && rbenv rehash"
- name: Install bundler
shell: /bin/bash -lc "rbenv exec gem install bundler && rbenv reh... | Add writing log when installing ruby | Add writing log when installing ruby
| YAML | apache-2.0 | Bariter/VFWeb,kkas/VFWeb,kkas/VFWeb,Bariter/VFWeb | yaml | ## Code Before:
---
- name: Install Ruby {{ ruby_version }}
shell: /bin/bash -lc "rbenv install {{ ruby_version }}"
- name: Sets global ruby version
shell: /bin/bash -lc "rbenv global {{ ruby_version }} && rbenv rehash"
- name: Install bundler
shell: /bin/bash -lc "rbenv exec gem install bundler && rbenv rehash... |
3f90b18a50479eff488ee86fa64a2cc0412716b9 | http/code.js | http/code.js | var runScraper = function() {
$(this).attr('disabled', true)
$(this).addClass('loading').html('Scraping…')
var stocks = $('#stocks_input').val()
var escaped_stocks = scraperwiki.shellEscape(stocks)
scraperwiki.exec('python tool/pandas_finance.py ' + escaped_stocks, getStocksSuccess)
}
var getStocksSuc... | var param_from_input = function(css) {
return scraperwiki.shellEscape($(css).val())
}
var runScraper = function() {
$(this).attr('disabled', true)
$(this).addClass('loading').html('Scraping…')
var stocks = param_from_input('#stocks_input')
var start_date = param_from_input('#start-date')
var end_d... | Send command with date range from web UI. | Send command with date range from web UI.
| JavaScript | agpl-3.0 | scraperwiki/stock-tool,scraperwiki/stock-tool | javascript | ## Code Before:
var runScraper = function() {
$(this).attr('disabled', true)
$(this).addClass('loading').html('Scraping…')
var stocks = $('#stocks_input').val()
var escaped_stocks = scraperwiki.shellEscape(stocks)
scraperwiki.exec('python tool/pandas_finance.py ' + escaped_stocks, getStocksSuccess)
}
... |
b3888e27b899b540b95a16757647d9eee446b82c | src/main/java/fape/core/planning/search/strategies/plans/SeqPlanComparator.java | src/main/java/fape/core/planning/search/strategies/plans/SeqPlanComparator.java | package fape.core.planning.search.strategies.plans;
import fape.core.planning.states.State;
import java.util.LinkedList;
import java.util.List;
/**
* Used to use a sequence of PartialPlanComparator as one.
*
* The basic algorithm for comparing two partial plans is to apply the comparators in sequence until it res... | package fape.core.planning.search.strategies.plans;
import fape.core.planning.states.State;
import java.util.LinkedList;
import java.util.List;
/**
* Used to use a sequence of PartialPlanComparator as one.
*
* The basic algorithm for comparing two partial plans is to apply the comparators in sequence until it res... | Add tie breaker for plan comparators. | Add tie breaker for plan comparators.
First choose the one with shortest makespan.
If it still a tie, use the id of the state to make sure the output is deterministic.
| Java | bsd-2-clause | athy/fape,athy/fape,athy/fape,athy/fape | java | ## Code Before:
package fape.core.planning.search.strategies.plans;
import fape.core.planning.states.State;
import java.util.LinkedList;
import java.util.List;
/**
* Used to use a sequence of PartialPlanComparator as one.
*
* The basic algorithm for comparing two partial plans is to apply the comparators in seque... |
2ef6613becea4df29aaf9aeff58d308686743084 | app/js/app.js | app/js/app.js | var store = null;
$(function() {
$(document).on("dragstart", "img", false);
$("#page-back").click(function() {
utils.page(utils.page() - 1);
});
$("#page-next").click(function() {
utils.page(utils.page() + 1);
});
$.getJSON("data.json").done(function(data) {
if(data.length == 0) alert("No dat... | var store = null;
$(function() {
$(document).on("dragstart", "img", false);
$("#page-back").click(function() {
utils.page(utils.page() - 1);
});
$("#page-next").click(function() {
utils.page(utils.page() + 1);
});
$(window).keydown(function(event) {
if(event.keyCode == 39) {
event.preve... | Allow using keyboard to move between pages as well | Allow using keyboard to move between pages as well
| JavaScript | mit | bloopletech/mangos,bloopletech/videos,bloopletech/videos | javascript | ## Code Before:
var store = null;
$(function() {
$(document).on("dragstart", "img", false);
$("#page-back").click(function() {
utils.page(utils.page() - 1);
});
$("#page-next").click(function() {
utils.page(utils.page() + 1);
});
$.getJSON("data.json").done(function(data) {
if(data.length == ... |
683bfa58d52ca698b286963bc4c8da71d1b37f84 | testcases/t/73-get-marks.t | testcases/t/73-get-marks.t | use i3test;
# TODO: this will be available in AnyEvent::I3 soon
sub get_marks {
my $i3 = i3(get_socket_path());
$i3->connect->recv;
my $cv = AnyEvent->condvar;
my $msg = $i3->message(5);
my $t;
$msg->cb(sub {
my ($_cv) = @_;
$cv->send($_cv->recv);
});
$t = AnyEvent->time... | use i3test;
sub get_marks {
return i3(get_socket_path())->get_marks->recv;
}
##############################################################
# 1: check that get_marks returns no marks yet
##############################################################
my $tmp = fresh_workspace;
my $marks = get_marks();
cmp_deeply... | Use AnyEvent::I3’s get_marks (requires AE::I3 >=0.08) | tests: Use AnyEvent::I3’s get_marks (requires AE::I3 >=0.08)
We also don’t bother with timeouts anymore. It’s expected to run the tests with
a sufficiently recent version of i3. The tests will just hang if it doesn’t
work.
| Perl | bsd-3-clause | sa1/i3,isharp/i3,Chr1stoph/i3,stapelberg/i3,yin/i3,pablospe/i3,ccryx/i3,sa1/i3,renlinx007/i3wm,DSMan195276/i3,ccryx/i3,strake/i3,drbig/i3,mariusmuja/i3wm,Airblader/i3-original,stapelberg/i3,pablospe/i3,gigawhitlocks/i3-hacking,mh21/i3,cornerman/i3,shdown/i3,i3/i3,avrelaun/i3,pronobis/i3,Zopieux/i3,stfnm/i3,netzverweige... | perl | ## Code Before:
use i3test;
# TODO: this will be available in AnyEvent::I3 soon
sub get_marks {
my $i3 = i3(get_socket_path());
$i3->connect->recv;
my $cv = AnyEvent->condvar;
my $msg = $i3->message(5);
my $t;
$msg->cb(sub {
my ($_cv) = @_;
$cv->send($_cv->recv);
});
$t ... |
271ec56d2147fd36179eb1ed19381e95da149a38 | droidbox/src/main/java/com/github/jackparisi/droidbox/architecture/model/ui/DroidNavigationController.kt | droidbox/src/main/java/com/github/jackparisi/droidbox/architecture/model/ui/DroidNavigationController.kt | package com.github.jackparisi.droidbox.architecture.model.ui
import android.content.Intent
import android.support.v4.app.FragmentActivity
/**
* Created by Giacomo Parisi on 18/07/17.
* https://github.com/JackParisi
*/
class DroidNavigationController {
fun openActivity(currentActivity: FragmentActivity, nextA... | package com.github.jackparisi.droidbox.architecture.model.ui
import android.content.Intent
import android.os.Bundle
import android.support.v4.app.FragmentActivity
/**
* Created by Giacomo Parisi on 18/07/17.
* https://github.com/JackParisi
*/
class DroidNavigationController {
fun openActivity(currentActivity... | Add bundle to droid navigation (open Activity) | Add bundle to droid navigation (open Activity)
| Kotlin | apache-2.0 | JackParisi/DroidBox | kotlin | ## Code Before:
package com.github.jackparisi.droidbox.architecture.model.ui
import android.content.Intent
import android.support.v4.app.FragmentActivity
/**
* Created by Giacomo Parisi on 18/07/17.
* https://github.com/JackParisi
*/
class DroidNavigationController {
fun openActivity(currentActivity: Fragmen... |
3743b5990d4ef8938b55140b095a1fd42ddc74fc | geo/path/path.context.html | geo/path/path.context.html | <!DOCTYPE html>
<meta charset="utf-8">
<body>
<script src="../../d3.js"></script>
<script>
var width = 960,
height = 960;
var canvas = d3.select("body").append("canvas")
.attr("width", width)
.attr("height", height);
var context=canvas.node().getContext("2d");
var projection = d3.geo.mercator()
.cent... | <!DOCTYPE html>
<meta charset="utf-8">
<body>
<script src="../../d3.js"></script>
<script>
var width = 960,
height = 960;
var canvas = d3.select("body").append("canvas")
.attr("width", width)
.attr("height", height);
var context=canvas.node().getContext("2d");
var projection = d3.geo.mercator()
.cent... | Fix map rendered to Canvas | Fix map rendered to Canvas
| HTML | apache-2.0 | tianxuzhang/d3-api-demo | html | ## Code Before:
<!DOCTYPE html>
<meta charset="utf-8">
<body>
<script src="../../d3.js"></script>
<script>
var width = 960,
height = 960;
var canvas = d3.select("body").append("canvas")
.attr("width", width)
.attr("height", height);
var context=canvas.node().getContext("2d");
var projection = d3.geo.mercat... |
c48391411c5253ee07acf92adb23e87541a4356a | tests/schema/tests/Wine.php | tests/schema/tests/Wine.php | <?php
namespace tests;
use LazyRecord\BaseModel;
class Wine extends BaseModel
{
function schema($schema)
{
$schema->column('name')
->varchar(128);
$schema->column('years')
->integer();
}
}
| <?php
namespace tests;
use LazyRecord\BaseModel;
class Wine extends BaseModel
{
function schema($schema)
{
$schema->column('name')
->varchar(128);
$schema->column('years')
->integer();
}
#boundary start 7c7b528eb73d02172dcec82d792e1699
const schema_proxy_class = 'te... | Use class injector to inject class contents | Use class injector to inject class contents
| PHP | bsd-3-clause | c9s/LazyRecord,c9s/LazyRecord,talib570/LazyRecord,c9s/LazyRecord,talib570/LazyRecord,talib570/LazyRecord | php | ## Code Before:
<?php
namespace tests;
use LazyRecord\BaseModel;
class Wine extends BaseModel
{
function schema($schema)
{
$schema->column('name')
->varchar(128);
$schema->column('years')
->integer();
}
}
## Instruction:
Use class injector to inject class contents
... |
4fb916445d1509808cc1ebead062fc79120afd54 | README.md | README.md |
**Current CentOS Version Used**:7.2
This example build configurant install and configures CentOS 7.2 x86_64 mimimal using Shell, and then generates one Vagrant box files, for
- VirtualBox
## Requirements
The following software must be install/present on your local machine before you can use Packer to build the... |
**Current CentOS Version Used**: 7.2
This example build configurant install and configures CentOS 7.2 x86_64 mimimal using Shell, and then generates one Vagrant box files, for:
- VirtualBox
## Requirements
The following software must be install/present on your local machine before you can use Packer to build the... | Update to CentOS7 Minimal Format | Update to CentOS7 Minimal Format
| Markdown | mit | meteorlad/packer-vagrant-centos7 | markdown | ## Code Before:
**Current CentOS Version Used**:7.2
This example build configurant install and configures CentOS 7.2 x86_64 mimimal using Shell, and then generates one Vagrant box files, for
- VirtualBox
## Requirements
The following software must be install/present on your local machine before you can use Pac... |
5bcf26a85cae15d94f3620a3fc8f30da58e1ece7 | README.md | README.md | pybeam
======
[](https://travis-ci.org/matwey/pybeam)
[](https://badge.fury.io/py/pybeam)
Python module to parse Erlang BEAM files.
This is not ready yet, so pull-requests are welcome.
Quick star... | pybeam
======
[](https://travis-ci.org/matwey/pybeam)
[](https://badge.fury.io/py/pybeam)
Python module to parse Erlang BEAM files.
This is not ready yet, so pull-requests are welcome.
Quick star... | Add BEAM Wisdoms to the reference list | Add BEAM Wisdoms to the reference list
| Markdown | mit | matwey/pybeam | markdown | ## Code Before:
pybeam
======
[](https://travis-ci.org/matwey/pybeam)
[](https://badge.fury.io/py/pybeam)
Python module to parse Erlang BEAM files.
This is not ready yet, so pull-requests are welc... |
06ee6a2dab04ce2fef4b64c2e5482041bb2f956f | pkgs/games/gnuchess/default.nix | pkgs/games/gnuchess/default.nix | {stdenv, fetchurl, flex}:
let
s = # Generated upstream information
rec {
baseName="gnuchess";
version="6.1.1";
name="${baseName}-${version}";
hash="1jckpg1qi1vjr3pqs0dnip3rmn0mgklx63xflrpqiv3cx2qlz8kn";
url="http://ftp.gnu.org/gnu/chess/gnuchess-6.1.1.tar.gz";
sha256="1jckpg1qi1vjr3pqs0dnip3... | {stdenv, fetchurl, flex}:
let
s = # Generated upstream information
rec {
baseName="gnuchess";
version="6.1.2";
name="${baseName}-${version}";
hash="15k6w9gycp566i0pa7ccajj9v3pw1mz1v62g1ni7czgs3j7i588l";
url="http://ftp.gnu.org/gnu/chess/gnuchess-6.1.2.tar.gz";
sha256="15k6w9gycp566i0pa7ccajj... | Update GNU Chess chess engine | Update GNU Chess chess engine
| Nix | mit | SymbiFlow/nixpkgs,triton/triton,NixOS/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,triton/triton,triton/triton,SymbiFlow/nixpkgs,NixOS/nixpkgs,triton/triton,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,triton/triton,SymbiFlow/nixpkgs,triton/triton,NixOS/nixpkgs,NixOS/ni... | nix | ## Code Before:
{stdenv, fetchurl, flex}:
let
s = # Generated upstream information
rec {
baseName="gnuchess";
version="6.1.1";
name="${baseName}-${version}";
hash="1jckpg1qi1vjr3pqs0dnip3rmn0mgklx63xflrpqiv3cx2qlz8kn";
url="http://ftp.gnu.org/gnu/chess/gnuchess-6.1.1.tar.gz";
sha256="1jckpg1... |
fae35ed00f261756c5dd4aaa09415c80c2d6d188 | Build/BuildRelease_XamarinForms.cmd | Build/BuildRelease_XamarinForms.cmd | UpdateVersionNumbers.exe /VersionFromNuGet=OxyPlot.Core /Dependency=OxyPlot.Core /ReleaseNotesFile=..\RELEASE-NOTES.md /Directory=..
"C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe" ..\Source\OxyPlot.XamarinForms.sln /p:Configuration=Release | UpdateVersionNumbers.exe /VersionFromNuGet=OxyPlot.Core /Dependency=OxyPlot.Core /ReleaseNotesFile=..\CHANGELOG.md /Directory=..
"C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe" ..\Source\OxyPlot.XamarinForms.sln /p:Configuration=Release
| Update Xamarin Forms build script | Update Xamarin Forms build script | Batchfile | mit | mattleibow/oxyplot,freudenthal/oxyplot,Mitch-Connor/oxyplot,olegtarasov/oxyplot,TheAlmightyBob/oxyplot,as-zhuravlev/oxyplot_wpf_fork,GeertvanHorrik/oxyplot,lynxkor/oxyplot,shoelzer/oxyplot,freudenthal/oxyplot,lynxkor/oxyplot,TheAlmightyBob/oxyplot,br111an/oxyplot,DotNetDoctor/oxyplot,objorke/oxyplot,jeremyiverson/oxypl... | batchfile | ## Code Before:
UpdateVersionNumbers.exe /VersionFromNuGet=OxyPlot.Core /Dependency=OxyPlot.Core /ReleaseNotesFile=..\RELEASE-NOTES.md /Directory=..
"C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe" ..\Source\OxyPlot.XamarinForms.sln /p:Configuration=Release
## Instruction:
Update Xamarin Forms build script
... |
3f86e0081d4982e83c15766fc806df8d335da8d5 | ci/tasks/run-smoke-tests.yml | ci/tasks/run-smoke-tests.yml | ---
platform: linux
image: docker:///cloudfoundry/cli-vagrant-ci
params:
LITE_PRIVATE_IP_ADDRESS:
inputs:
- name: bosh-lite-lock
run:
path: bash
args:
- -c
- |
set -eux
export DOMAIN=`cat bosh-lite-lock/name`
export ADMIN_USER=admin
export ADMIN_PASSWORD=admin
export API_ENDPOINT="ht... | ---
platform: linux
image: docker:///cloudfoundry/cli-vagrant-ci
params:
LITE_PRIVATE_IP_ADDRESS:
inputs:
- name: bosh-lite-lock
run:
path: bash
args:
- -c
- |
set -eux
export DOMAIN=`cat bosh-lite-lock/name`
export ADMIN_USER=admin
export ADMIN_PASSWORD=admin
export API_ENDPOINT="ht... | Set the deployment prior to running smoketest | Set the deployment prior to running smoketest
Signed-off-by: Nick Wei <88313de659f5f6f483e38ffe364817e8884d9f11@pivotal.io>
| YAML | apache-2.0 | markstgodard/cli,fujitsu-cf/cli,markstgodard/cli,hyenaspots/cli,markstgodard/cli,fujitsu-cf/cli,simonleung8/cli,hyenaspots/cli,hyenaspots/cli,fujitsu-cf/cli,simonleung8/cli,simonleung8/cli,hyenaspots/cli,markstgodard/cli | yaml | ## Code Before:
---
platform: linux
image: docker:///cloudfoundry/cli-vagrant-ci
params:
LITE_PRIVATE_IP_ADDRESS:
inputs:
- name: bosh-lite-lock
run:
path: bash
args:
- -c
- |
set -eux
export DOMAIN=`cat bosh-lite-lock/name`
export ADMIN_USER=admin
export ADMIN_PASSWORD=admin
export ... |
2bba64bf352c3897cc21157e9af41fb903e68f51 | www/LocalStorageHandle.js | www/LocalStorageHandle.js | var NativeStorageError = require('./NativeStorageError');
// args = [reference, variable]
function LocalStorageHandle(success, error, intent, operation, args) {
var reference = args[0];
var variable = args[1];
if (operation.startsWith('put') || operation.startsWith('set')) {
try {
var ... | var NativeStorageError = require('./NativeStorageError');
// args = [reference, variable]
function LocalStorageHandle(success, error, intent, operation, args) {
var reference = args[0];
var variable = args[1];
if (operation.startsWith('put') || operation.startsWith('set')) {
try {
var ... | Use var for compatibility with Android 4.x | Use var for compatibility with Android 4.x
| JavaScript | apache-2.0 | TheCocoaProject/cordova-plugin-nativestorage,TheCocoaProject/cordova-plugin-nativestorage | javascript | ## Code Before:
var NativeStorageError = require('./NativeStorageError');
// args = [reference, variable]
function LocalStorageHandle(success, error, intent, operation, args) {
var reference = args[0];
var variable = args[1];
if (operation.startsWith('put') || operation.startsWith('set')) {
try {
... |
ba848a088d0e4dac808dfad9f85624d5f20cce26 | site-src/static/about.mkd | site-src/static/about.mkd | ---
title: About
---
About
-----
<img src="/resources/img/face.png" class="img-rounded" style="float:left;margin:0 10px 0 0;" />
I am a data scientist and recovering mathematician from Philadelphia. I am passionate about math education, (Bayesian) statistics, machine learning, software development, functional progra... | ---
title: About
---
About
-----
<img src="/resources/img/face.png" class="img-rounded" style="float:left;margin:0 10px 0 0;" />
I am a data scientist and recovering mathematician from Philadelphia. I am passionate about math education, (Bayesian) statistics, machine learning, software development, functional progra... | Change company from Monetate to Kibo | Change company from Monetate to Kibo
| Markdown | mit | AustinRochford/blog | markdown | ## Code Before:
---
title: About
---
About
-----
<img src="/resources/img/face.png" class="img-rounded" style="float:left;margin:0 10px 0 0;" />
I am a data scientist and recovering mathematician from Philadelphia. I am passionate about math education, (Bayesian) statistics, machine learning, software development, f... |
be1c037dea6f41b0029af0ee176ce054dbcda3c7 | examples/channels/channels.go | examples/channels/channels.go | package main
import (
"fmt"
"github.com/nlopes/slack"
)
func main() {
api := slack.New("YOUR_TOKEN_HERE")
channels, err := api.GetChannels(false)
if err != nil {
fmt.Printf("%s\n", err)
return
}
for _, channel := range channels {
fmt.Println(channel.ID)
}
}
| package main
import (
"fmt"
"github.com/nlopes/slack"
)
func main() {
api := slack.New("YOUR_TOKEN_HERE")
channels, err := api.GetChannels(false)
if err != nil {
fmt.Printf("%s\n", err)
return
}
for _, channel := range channels {
fmt.Println(channel.Name)
// channel is of type conversation & groupConv... | Print readable names for example 👀 | Print readable names for example 👀
| Go | bsd-2-clause | nlopes/slack,james-lawrence/slack,178inaba/slack | go | ## Code Before:
package main
import (
"fmt"
"github.com/nlopes/slack"
)
func main() {
api := slack.New("YOUR_TOKEN_HERE")
channels, err := api.GetChannels(false)
if err != nil {
fmt.Printf("%s\n", err)
return
}
for _, channel := range channels {
fmt.Println(channel.ID)
}
}
## Instruction:
Print readab... |
c16c1b75ba0030da0ae6bc49827505e6b73fbcbd | lib/PerlPro/Web.pm | lib/PerlPro/Web.pm | package PerlPro::Web;
use Moose;
use namespace::autoclean;
use utf8;
use Catalyst::Runtime 5.90042;
# we don't use Unicode::Encoding because it's core since 5.90042
use Catalyst qw/
ConfigLoader
Static::Simple
/;
extends 'Catalyst';
our $VERSION = '0.01';
__PACKAGE__->config(
# Disable deprecated behav... | package PerlPro::Web;
use Moose;
use namespace::autoclean;
use utf8;
use Catalyst::Runtime 5.90042;
# we don't use Unicode::Encoding because it's core since 5.90042
use Catalyst qw/
ConfigLoader
Static::Simple
/;
extends 'Catalyst';
our $VERSION = '0.01';
__PACKAGE__->config(
# Disable deprecated behav... | Fix encoding, set it to UTF-8 app wide | Fix encoding, set it to UTF-8 app wide
| Perl | agpl-3.0 | Brasil-Perl-Mongers/perl-pro,Brasil-Perl-Mongers/perl-pro | perl | ## Code Before:
package PerlPro::Web;
use Moose;
use namespace::autoclean;
use utf8;
use Catalyst::Runtime 5.90042;
# we don't use Unicode::Encoding because it's core since 5.90042
use Catalyst qw/
ConfigLoader
Static::Simple
/;
extends 'Catalyst';
our $VERSION = '0.01';
__PACKAGE__->config(
# Disable ... |
6beddab856dc33486f7452b1eb8e644352bdcc1d | lib/main.js | lib/main.js | var QRCode = require('./../vendor/QRCode'),
QRErrorCorrectLevel = require('./../vendor/QRCode/QRErrorCorrectLevel'),
black = " ",
white = "\033[47m \033[0m",
toCell = function (isBlack) {
return isBlack ? black : white;
},
repeat = function (color) {
return {
times:... | var QRCode = require('./../vendor/QRCode'),
QRErrorCorrectLevel = require('./../vendor/QRCode/QRErrorCorrectLevel'),
black = "\033[40m \033[0m",
white = "\033[47m \033[0m",
toCell = function (isBlack) {
return isBlack ? black : white;
},
repeat = function (color) {
return {
... | Make the black actually use black ascii BG colors. | Make the black actually use black ascii BG colors.
The generated QR codes in the original version didn't work when using a
terminal with black text on white background.
This change makes the library use an actual color code for black (or at
least dark grey) background for the black color, just as it was using
the col... | JavaScript | apache-2.0 | CSilivestru/qrcode-terminal,CSilivestru/qrcode-terminal,gtanner/qrcode-terminal | javascript | ## Code Before:
var QRCode = require('./../vendor/QRCode'),
QRErrorCorrectLevel = require('./../vendor/QRCode/QRErrorCorrectLevel'),
black = " ",
white = "\033[47m \033[0m",
toCell = function (isBlack) {
return isBlack ? black : white;
},
repeat = function (color) {
return {
... |
4543063fc5ba86aaf73d93277726bc6b3ee34169 | lib/json/streamer/json_streamer.rb | lib/json/streamer/json_streamer.rb | require_relative 'conditions'
require_relative 'parser'
module Json
module Streamer
class JsonStreamer
attr_reader :parser
def initialize(file_io = nil, chunk_size = 1000, event_generator = :default)
@event_generator = make_event_generator(event_generator)
@file_io = file_io
... | require_relative 'conditions'
require_relative 'parser'
module Json
module Streamer
class JsonStreamer
attr_reader :parser
def initialize(file_io = nil, chunk_size = 1000, event_generator = :default)
@event_generator = make_event_generator(event_generator)
@file_io = file_io
... | Remove todo comment, wont do | Remove todo comment, wont do
| Ruby | mit | thisismydesign/json-streamer,csapagyi/json-streamer,thisismydesign/json-streamer,csapagyi/json-streamer | ruby | ## Code Before:
require_relative 'conditions'
require_relative 'parser'
module Json
module Streamer
class JsonStreamer
attr_reader :parser
def initialize(file_io = nil, chunk_size = 1000, event_generator = :default)
@event_generator = make_event_generator(event_generator)
@file_io ... |
33c85807f4f6121d1c4433ee02ea818ad426a00a | functions/index.js | functions/index.js | const functions = require('firebase-functions');
// // Create and Deploy Your First Cloud Functions
// // https://firebase.google.com/docs/functions/write-firebase-functions
//
// exports.helloWorld = functions.https.onRequest((request, response) => {
// response.send("Hello from Firebase!");
// });
| const functions = require('firebase-functions')
exports.spotify_callback = functions.https.onRequest((req, resp) => {
resp.write(req.query.code)
})
| Add basic function which echoes spotify code | Add basic function which echoes spotify code
| JavaScript | mit | hostables/musicquiz,hostables/musicquiz | javascript | ## Code Before:
const functions = require('firebase-functions');
// // Create and Deploy Your First Cloud Functions
// // https://firebase.google.com/docs/functions/write-firebase-functions
//
// exports.helloWorld = functions.https.onRequest((request, response) => {
// response.send("Hello from Firebase!");
// });
... |
ef3f8eff166c5e8080725a2f4c8e98d9300d37b8 | README.md | README.md |
```
Usage: zi <path> ...
zi --help
zi presents information about Zip archives.
Common options:
-h, --help Show this usage message
```
|
```
Usage: zi [-j | -p] [--exclude=<glob>] <path> ...
zi --help
zi presents information about Zip archives.
Common options:
-h, --help Show this usage message.
-j, --json Structure the output in JSON
-p, --pretty-json Structure the output in easy-to-read JSON
--exclude=<glob> ... | Add JSON options to Readme | Add JSON options to Readme | Markdown | mit | rowedonalde/zip-info | markdown | ## Code Before:
```
Usage: zi <path> ...
zi --help
zi presents information about Zip archives.
Common options:
-h, --help Show this usage message
```
## Instruction:
Add JSON options to Readme
## Code After:
```
Usage: zi [-j | -p] [--exclude=<glob>] <path> ...
zi --help
zi presents information ... |
206af1f31e3bee22f74ebae6558955b08545c770 | spec/models/user_spec.rb | spec/models/user_spec.rb | RSpec.describe User, :type => :model do
it { should have_many(:entries).dependent(:destroy) }
it { should have_many(:imports).dependent(:destroy) }
describe ".promptable" do
it "returns promptable users for the current hour" do
Timecop.freeze(Time.utc(2014, 1, 1, 11)) do # 11AM UTC
utc_10am = c... | RSpec.describe User, :type => :model do
it { should have_many(:entries).dependent(:destroy) }
it { should have_many(:imports).dependent(:destroy) }
describe ".promptable" do
it "returns promptable users for the current hour" do
Timecop.freeze(Time.utc(2014, 1, 1, 11)) do # 11AM UTC
create(:user... | Remove unused variables to appease @houndci | Remove unused variables to appease @houndci
| Ruby | mit | codecation/trailmix,codecation/trailmix,codecation/trailmix,codecation/trailmix | ruby | ## Code Before:
RSpec.describe User, :type => :model do
it { should have_many(:entries).dependent(:destroy) }
it { should have_many(:imports).dependent(:destroy) }
describe ".promptable" do
it "returns promptable users for the current hour" do
Timecop.freeze(Time.utc(2014, 1, 1, 11)) do # 11AM UTC
... |
7030b915522e63dcbd5f3863ab29c9c18c6bd522 | src/utils/dateTimeHelper.js | src/utils/dateTimeHelper.js | /* eslint-disable radix */
// eslint-disable-next-line import/prefer-default-export
export const getTimeStringMinutes = (timeStr) => {
const parts = timeStr.split(':');
const hours = parseInt(parts[0]);
const minutes = parseInt(parts[1]);
const totalMin = hours * 60 + minutes;
return totalMin;
};
... | /* eslint-disable radix */
// eslint-disable-next-line import/prefer-default-export
export const getTimeStringMinutes = (timeStr) => {
const parts = timeStr.split(':');
const hours = parseInt(parts[0]);
const minutes = parseInt(parts[1]);
const totalMin = hours * 60 + minutes;
return totalMin;
};
... | Replace "24" by "0" in timestrings | Replace "24" by "0" in timestrings
| JavaScript | mit | TobitSoftware/chayns-components,TobitSoftware/chayns-components,TobitSoftware/chayns-components | javascript | ## Code Before:
/* eslint-disable radix */
// eslint-disable-next-line import/prefer-default-export
export const getTimeStringMinutes = (timeStr) => {
const parts = timeStr.split(':');
const hours = parseInt(parts[0]);
const minutes = parseInt(parts[1]);
const totalMin = hours * 60 + minutes;
retu... |
65d1f2925062bd517b56742a67af518d89f02d40 | example/flutter_example/README.md | example/flutter_example/README.md |
This example demonstrates how to load and parse a TOML asset and display `Hello, World!` in a `Text` widget.
## Requirements
You need to have installed the [Flutter SDK][flutter-sdk].
## Running on a device
Connect your device or start your emulator and see that it's connected using:
```
flutter devices
```
All ... |
This example demonstrates how to load and parse a TOML asset and display `Hello, World!` in a `Text` widget.
## Requirements
You need to have installed the [Flutter SDK][flutter-sdk].
## Running on a device
Connect your device or start your emulator and see that it's connected using:
```
flutter devices
```
All ... | Fix reference definition for link to Flutter SDK | Fix reference definition for link to Flutter SDK
| Markdown | mit | just95/toml.dart,just95/toml.dart | markdown | ## Code Before:
This example demonstrates how to load and parse a TOML asset and display `Hello, World!` in a `Text` widget.
## Requirements
You need to have installed the [Flutter SDK][flutter-sdk].
## Running on a device
Connect your device or start your emulator and see that it's connected using:
```
flutter d... |
04780de842941f5ac8bc0e4f5dc966f4a8fdbe9e | integration-tests/apps/ring/noir-app/immutant.clj | integration-tests/apps/ring/noir-app/immutant.clj | (ns noir-app.init
(:require [immutant.web :as web]
[immutant.util :as util]
[noir.server :as server]
[lobos.config]))
(server/load-views-ns 'noir-app.views)
(web/start "/" (server/gen-handler {:mode :dev :ns 'noir-app}))
| (ns noir-app.init
(:require [immutant.web :as web]
[immutant.util :as util]
[noir.server :as server]
[lobos.config]))
;; Use this once the new bultitude and noir 1.3.0 are released
;(server/load-views-ns 'noir-app.views)
(server/load-views (util/app-relative "src/noir_app/views")... | Use load-views until a new noir is released. | Use load-views until a new noir is released.
| Clojure | apache-2.0 | kbaribeau/immutant,coopsource/immutant,coopsource/immutant,immutant/immutant,kbaribeau/immutant,coopsource/immutant,immutant/immutant,kbaribeau/immutant,immutant/immutant,immutant/immutant | clojure | ## Code Before:
(ns noir-app.init
(:require [immutant.web :as web]
[immutant.util :as util]
[noir.server :as server]
[lobos.config]))
(server/load-views-ns 'noir-app.views)
(web/start "/" (server/gen-handler {:mode :dev :ns 'noir-app}))
## Instruction:
Use load-views until a n... |
df29f9a002b244222b19b39267cbb2d45432901b | models/user.js | models/user.js | // User Model
module.exports = function(sequelize, DataTypes) {
var User = sequelize.define('User', {
type: { type: DataTypes.INTEGER, allowNull: false },
name: { type: DataTypes.STRING, allowNull: false },
email: { type: DataTypes.STRING, allowNull: false },
password: { type: DataTypes.STR... | // User Model
module.exports = function(sequelize, DataTypes) {
var User = sequelize.define('User', {
type: { type: DataTypes.INTEGER, allowNull: false },
name: { type: DataTypes.STRING, allowNull: false },
email: { type: DataTypes.STRING, allowNull: false },
password: { type: DataTypes.STR... | Add type to search results | Add type to search results
| JavaScript | mit | kocsenc/nodejs-tutorme,kocsenc/nodejs-tutorme | javascript | ## Code Before:
// User Model
module.exports = function(sequelize, DataTypes) {
var User = sequelize.define('User', {
type: { type: DataTypes.INTEGER, allowNull: false },
name: { type: DataTypes.STRING, allowNull: false },
email: { type: DataTypes.STRING, allowNull: false },
password: { typ... |
635e3d6bead60ebb1432edf1faa9e966b4006f29 | tests/TinkerCasterTest.php | tests/TinkerCasterTest.php | <?php
namespace Tests;
use PHPUnit_Framework_TestCase;
use Laravel\Tinker\TinkerCaster;
use Illuminate\Support\Collection;
class TinkerCasterTest extends PHPUnit_Framework_TestCase
{
public function testCanCastCollection()
{
$caster = new TinkerCaster;
$result = $caster->castCollection(new C... | <?php
namespace Tests;
use PHPUnit\Framework\TestCase;
use Laravel\Tinker\TinkerCaster;
use Illuminate\Support\Collection;
class TinkerCasterTest extends TestCase
{
public function testCanCastCollection()
{
$caster = new TinkerCaster;
$result = $caster->castCollection(new Collection(['foo', ... | Use PSR-1 in PHPunit TestCase | Use PSR-1 in PHPunit TestCase
| PHP | mit | laravel/tinker | php | ## Code Before:
<?php
namespace Tests;
use PHPUnit_Framework_TestCase;
use Laravel\Tinker\TinkerCaster;
use Illuminate\Support\Collection;
class TinkerCasterTest extends PHPUnit_Framework_TestCase
{
public function testCanCastCollection()
{
$caster = new TinkerCaster;
$result = $caster->cast... |
894df59d7068a65d30feab78029b73119fa8ecc6 | themes/sitesprocket/templates/Includes/ClientMessages.ss | themes/sitesprocket/templates/Includes/ClientMessages.ss | <div id="messages">
<% control Messages %>
<div class="project_messages">
<div class="post">
<div class="<% if You %>you<% else %>admin<% end_if %>">
<div class="title">
<strong><% if You %><% _t('SSP.YOU','You') %><% else %>$Author.FirstName<% end_if %></s... | <div id="messages">
<% control Messages %>
<div class="project_messages">
<div class="post">
<div class="<% if You %>you<% else %>admin<% end_if %>">
<div class="title">
<strong><% if You %><% _t('SSP.YOU','You') %><% else %>$Author.FirstName<% end_if %></s... | FIX - added laquo for downloads | FIX - added laquo for downloads
| Scheme | bsd-3-clause | tbarho/SiteSprocket,tbarho/SiteSprocket,tbarho/SiteSprocket,tbarho/SiteSprocket | scheme | ## Code Before:
<div id="messages">
<% control Messages %>
<div class="project_messages">
<div class="post">
<div class="<% if You %>you<% else %>admin<% end_if %>">
<div class="title">
<strong><% if You %><% _t('SSP.YOU','You') %><% else %>$Author.FirstNam... |
1ca745197aa4dda3be5c35834fd5a5256e4dc6c0 | README.md | README.md |
A collection (\*cough\*) of git scripts I use in daily practice.
## git-interactive-branches
Used for deleting merged branches. Default is an interactive mode that shows you a menu where you can select a branch or
multiple branches that have been merged and delete them locally.
The other mode is `git interactive-br... |
A collection (\*cough\*) of git scripts I use in daily practice.
## git-interactive-branches
Used for deleting merged branches.
### Installation
You can use the Gemfile (via bundler) to install the gems needed. Manually, you want to install
- [Highline](http://highline.rubyforge.org/)
- [Main](https://github.com/... | Add install section to readme | Add install section to readme
| Markdown | isc | abangratz/git-scripts | markdown | ## Code Before:
A collection (\*cough\*) of git scripts I use in daily practice.
## git-interactive-branches
Used for deleting merged branches. Default is an interactive mode that shows you a menu where you can select a branch or
multiple branches that have been merged and delete them locally.
The other mode is `gi... |
6b2c7ae2c926d9622c1b5537a789c5d5d726428e | test/CodeGen/X86/20090313-signext.ll | test/CodeGen/X86/20090313-signext.ll | ; RUN: llvm-as < %s | llc -march=x86-64 -mtriple=x86_64-pc-linux > %t
; RUN: grep {movswl %ax, %edi} %t
; RUN: grep {movw x(%rip), %ax} %t
@x = common global i16 0
define signext i16 @f() nounwind {
entry:
%0 = tail call signext i16 @h() nounwind
%1 = sext i16 %0 to i32
tail call void @g(i32 %1) nounwind
%2 = loa... | ; RUN: llvm-as < %s | llc -march=x86-64 -relocation-model=pic > %t
; RUN: grep {movswl %ax, %edi} %t
; RUN: grep {movw (%rax), %ax} %t
@x = common global i16 0
define signext i16 @f() nounwind {
entry:
%0 = tail call signext i16 @h() nounwind
%1 = sext i16 %0 to i32
tail call void @g(i32 %1) nounwind
%2 = load i1... | Add -relocation-model=pic so that the test works both in Linux and Darwin. | Add -relocation-model=pic so that the test works
both in Linux and Darwin.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@67191 91177308-0d34-0410-b5e6-96231b3b80d8
| LLVM | apache-2.0 | apple/swift-llvm,apple/swift-llvm,apple/swift-llvm,apple/swift-llvm,chubbymaggie/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,dslab-epfl/asap,dslab-epfl/asap,dslab-epfl/asap,dslab-epfl/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,llvm-mirror/llvm,chubbymaggie/asap,apple/swift-llvm,GPUOpen... | llvm | ## Code Before:
; RUN: llvm-as < %s | llc -march=x86-64 -mtriple=x86_64-pc-linux > %t
; RUN: grep {movswl %ax, %edi} %t
; RUN: grep {movw x(%rip), %ax} %t
@x = common global i16 0
define signext i16 @f() nounwind {
entry:
%0 = tail call signext i16 @h() nounwind
%1 = sext i16 %0 to i32
tail call void @g(i32 %1) no... |
7e90f2e84f1db8e3b2218dd5918be4f02c1620f4 | README.md | README.md | [](https://travis-ci.org/barkbeetle/Fetchino)
Fetchino is a lightweight web scraper, helping you get structured information from websites. It uses configuration files to describe how the data you're looking for is retrieved and makes it super-... |
[](https://travis-ci.org/barkbeetle/Fetchino)
Fetchino is a lightweight web scraper, helping you get structured information from websites. It uses configuration files to describe how the data you're looking for can be retrieved and makes it s... | Fix a typo in readme | Fix a typo in readme
| Markdown | apache-2.0 | barkbeetle/Fetchino | markdown | ## Code Before:
[](https://travis-ci.org/barkbeetle/Fetchino)
Fetchino is a lightweight web scraper, helping you get structured information from websites. It uses configuration files to describe how the data you're looking for is retrieved and... |
41612f0ca16ed037bd0ed1e5ebf68790a70f071a | menus/git-blame.json | menus/git-blame.json | {
"context-menu": {
".overlayer": {
"Toggle Git Blame": "git-blame:toggle"
}
},
"menu": [
{
"label": "Packages",
"submenu": [
{
"label": "git-blame",
"submenu": [
{
"label": "Toggle Git Blame",
"command": "git-blame:... | {
"context-menu": {
"atom-text-editor": [{
"label": "Toggle Git Blame",
"command": "git-blame:toggle"
}]
},
"menu": [{
"label": "Packages",
"submenu": [{
"label": "git-blame",
"submenu": [{
"label": "Toggle Git Blame",
"command": "git-blame:toggle"
}]
... | Resolve keymap cson deprecation notice. | Resolve keymap cson deprecation notice.
| JSON | mit | alexcorre/git-blame,SlimeQ/git-graph,MichaelAquilina/git-blame,aotarola/git-blame,crazymykl/git-blame | json | ## Code Before:
{
"context-menu": {
".overlayer": {
"Toggle Git Blame": "git-blame:toggle"
}
},
"menu": [
{
"label": "Packages",
"submenu": [
{
"label": "git-blame",
"submenu": [
{
"label": "Toggle Git Blame",
"comma... |
52f413e70871fc956608004e4a4f7e4314ecd025 | docs/user-guide/plugins.md | docs/user-guide/plugins.md |
Plugins are rules and sets of rules built by the community that support methodologies, toolsets, *non-standard* CSS features, or very specific use cases. Their *package* names are prefixed with "stylelint". Their *rule* names are namespaced so that they do not clash with stylelint's core rules.
## Methodologies
### ... |
Plugins are rules and sets of rules built by the community that support methodologies, toolsets, *non-standard* CSS features, or very specific use cases. Their *package* names are prefixed with "stylelint". Their *rule* names are namespaced so that they do not clash with stylelint's core rules.
## Methodologies
- [`... | Add primer plugin to toolkit | Add primer plugin to toolkit
| Markdown | mit | heatwaveo8/stylelint,gaidarenko/stylelint,heatwaveo8/stylelint,gucong3000/stylelint,gaidarenko/stylelint,gucong3000/stylelint,hudochenkov/stylelint,gaidarenko/stylelint,hudochenkov/stylelint,stylelint/stylelint,hudochenkov/stylelint,stylelint/stylelint,heatwaveo8/stylelint,stylelint/stylelint,gucong3000/stylelint,style... | markdown | ## Code Before:
Plugins are rules and sets of rules built by the community that support methodologies, toolsets, *non-standard* CSS features, or very specific use cases. Their *package* names are prefixed with "stylelint". Their *rule* names are namespaced so that they do not clash with stylelint's core rules.
## Met... |
572c07dcb201ddc46a4bf0f87ea565874b357f9b | avogadro/qtplugins/surfaces/CMakeLists.txt | avogadro/qtplugins/surfaces/CMakeLists.txt | include_directories(SYSTEM "${AvogadroLibs_SOURCE_DIR}/thirdparty/libgwavi"
"${AvogadroLibs_SOURCE_DIR}/thirdparty/gif-h")
set(surfaces_srcs
gaussiansetconcurrent.cpp
slatersetconcurrent.cpp
surfacedialog.cpp
surfaces.cpp
)
avogadro_plugin(Surfaces
"Surfaces"
ExtensionPlugin
surfaces.h
Surfaces
"$... | include_directories(SYSTEM "${AvogadroLibs_SOURCE_DIR}/thirdparty/libgwavi"
"${AvogadroLibs_SOURCE_DIR}/thirdparty/gif-h")
set(surfaces_srcs
gaussiansetconcurrent.cpp
slatersetconcurrent.cpp
surfacedialog.cpp
surfaces.cpp
)
avogadro_plugin(Surfaces
"Surfaces"
ExtensionPlugin
surfaces.h
Surfaces
"$... | Add missing links to gwavi and AvogadroQtOpenGL | Add missing links to gwavi and AvogadroQtOpenGL
I also updated the link style for the Qt5 concurrent library.
Signed-off-by: Marcus D. Hanwell <cf7042e2e8eee958b5bcde1ae2cbefef82efc184@kitware.com>
| Text | bsd-3-clause | ghutchis/avogadrolibs,ghutchis/avogadrolibs,OpenChemistry/avogadrolibs,OpenChemistry/avogadrolibs,OpenChemistry/avogadrolibs,OpenChemistry/avogadrolibs,ghutchis/avogadrolibs,ghutchis/avogadrolibs,OpenChemistry/avogadrolibs,ghutchis/avogadrolibs | text | ## Code Before:
include_directories(SYSTEM "${AvogadroLibs_SOURCE_DIR}/thirdparty/libgwavi"
"${AvogadroLibs_SOURCE_DIR}/thirdparty/gif-h")
set(surfaces_srcs
gaussiansetconcurrent.cpp
slatersetconcurrent.cpp
surfacedialog.cpp
surfaces.cpp
)
avogadro_plugin(Surfaces
"Surfaces"
ExtensionPlugin
surfaces.h... |
c75b5947d65e05d5ab316306bc4cd4913f16e159 | source/80_ssh_agent.sh | source/80_ssh_agent.sh | SSH_ENV="$HOME/.ssh-local/environment"
function start_agent {
echo "Initialising new SSH agent..."
/usr/bin/ssh-agent | sed 's/^echo/#echo/' > "${SSH_ENV}"
echo succeeded
chmod 600 "${SSH_ENV}"
. "${SSH_ENV}" > /dev/null
/usr/bin/ssh-add;
}
if [ "${SSH_AUTH_SOCK}" ]; then
if [[ -S "$SSH_AU... | SSH_ENV="$HOME/.ssh-local/environment"
WEASEL_BIN="/mnt/c/Program\ Files/PuTTY/weasel-pageant"
function start_agent {
echo "Initialising new SSH agent..."
/usr/bin/ssh-agent | sed 's/^echo/#echo/' > "${SSH_ENV}"
echo succeeded
chmod 600 "${SSH_ENV}"
. "${SSH_ENV}" > /dev/null
/usr/bin/ssh-add;
... | Use weasel if available (proxies WSL ssh-agent to pageant) | Use weasel if available (proxies WSL ssh-agent to pageant)
| Shell | mit | tstackhouse/dotfiles,tstackhouse/dotfiles,tstackhouse/dotfiles,tstackhouse/dotfiles | shell | ## Code Before:
SSH_ENV="$HOME/.ssh-local/environment"
function start_agent {
echo "Initialising new SSH agent..."
/usr/bin/ssh-agent | sed 's/^echo/#echo/' > "${SSH_ENV}"
echo succeeded
chmod 600 "${SSH_ENV}"
. "${SSH_ENV}" > /dev/null
/usr/bin/ssh-add;
}
if [ "${SSH_AUTH_SOCK}" ]; then
i... |
eafd6f957e1875db02910d053254b58ff853a2cb | ruby/spec/bson/integer_spec.rb | ruby/spec/bson/integer_spec.rb | require "spec_helper"
describe Integer do
context "when the integer is 32 bit" do
it_behaves_like "a serializable bson element" do
let(:type) { 16.chr }
let(:obj) { Integer::MAX_32BIT - 1 }
let(:bson) { [ obj ].pack(BSON::Int32::PACK) }
end
end
context "when the integer is 64 bit" do... | require "spec_helper"
describe Integer do
describe "#to_bson" do
context "when the integer is 32 bit" do
let(:type) { 16.chr }
let(:obj) { Integer::MAX_32BIT - 1 }
let(:bson) { [ obj ].pack(BSON::Int32::PACK) }
it_behaves_like "a serializable bson element"
end
context "when ... | Reformat integer spec for consistency | Reformat integer spec for consistency
| Ruby | apache-2.0 | estolfo/bson-ruby,mongodb/bson-ruby,hudon/bson-ruby,ukblewis/bson-ruby,mongodb/bson-ruby,estolfo/bson-ruby,estolfo/bson-ruby,johnsimon/bson-ruby,mongodb/bson-ruby,agis-/bson-ruby,agis-/bson-ruby,hudon/bson-ruby,ukblewis/bson-ruby,johnsimon/bson-ruby,ukblewis/bson-ruby,estolfo/bson-ruby,mongodb/bson-ruby,ukblewis/bson-r... | ruby | ## Code Before:
require "spec_helper"
describe Integer do
context "when the integer is 32 bit" do
it_behaves_like "a serializable bson element" do
let(:type) { 16.chr }
let(:obj) { Integer::MAX_32BIT - 1 }
let(:bson) { [ obj ].pack(BSON::Int32::PACK) }
end
end
context "when the integ... |
6b41a3add162a66e8e26cb2883dd64fdeacb8b76 | routes/index.js | routes/index.js |
/*
* GET home page.
*/
var model = require('../public/data/model.json');
var partner = require('../public/data/partner.json');
exports.index = function(req, res){
if (req.path == '/') {
res.render('index', model);
} else if (req.path == '/partner') {
res.render('index', partner);
} else {
res.ren... |
/*
* GET home page.
*/
var model = require('../public/data/model.json');
var partner = require('../public/data/partner.json');
exports.index = function(req, res){
var model;
if (req.path == '/') {
model = require('../public/data/model.json');
} else {
// strip out any nast... | Load models based on url | Load models based on url
| JavaScript | mit | alexbirkett/ten20homepage,alexbirkett/ten20homepage,alexbirkett/ten20homepage | javascript | ## Code Before:
/*
* GET home page.
*/
var model = require('../public/data/model.json');
var partner = require('../public/data/partner.json');
exports.index = function(req, res){
if (req.path == '/') {
res.render('index', model);
} else if (req.path == '/partner') {
res.render('index', partner);
} el... |
f3fb73c4fd6a5f68d37aaf3213479f36da704dc3 | composer.json | composer.json | {
"name": "vinkla/wordpress",
"description": "Boilerplate that scaffolds a basic WordPress project using Composer.",
"homepage": "https://github.com/vinkla/wordpress",
"license": "MIT",
"keywords": ["wordpress", "boilerplate", "scaffold", "generator", "composer"],
"repositories": [
{
"type": "comp... | {
"name": "vinkla/wordpress",
"description": "Boilerplate that scaffolds a basic WordPress project using Composer.",
"homepage": "https://github.com/vinkla/wordpress",
"license": "MIT",
"keywords": [
"wordpress",
"boilerplate",
"scaffold",
"generator",
"compos... | Create .env file after create-project command. | Create .env file after create-project command.
| JSON | mit | mikaelmattsson/wordplate,fieleman/wordplate,fieleman/wordplate | json | ## Code Before:
{
"name": "vinkla/wordpress",
"description": "Boilerplate that scaffolds a basic WordPress project using Composer.",
"homepage": "https://github.com/vinkla/wordpress",
"license": "MIT",
"keywords": ["wordpress", "boilerplate", "scaffold", "generator", "composer"],
"repositories": [
{
... |
7486d5b0085caf917f40be1644d8007ad4bbeda4 | .forestry/front_matter/templates/blog-post.yml | .forestry/front_matter/templates/blog-post.yml | ---
label: Blog post
hide_body: false
fields:
- type: text
name: layout
label: layout
hidden: true
default: post
- type: text
name: title
label: title
- type: textarea
name: excerpt
label: excerpt
- type: list
name: tags
label: tags
pages:
- _posts/2019-08-07-so-good-they-can-t-ignore-you-key-ideas.... | ---
label: Blog post
hide_body: false
fields:
- type: text
name: layout
label: layout
hidden: true
default: post
- type: text
name: title
label: title
- type: textarea
name: excerpt
label: excerpt
- type: list
name: tags
label: tags
- name: tweets
type: list
config:
use_select: false
min... | Update from Forestry.io - Updated Forestry configuration | Update from Forestry.io - Updated Forestry configuration
| YAML | mit | ZainRizvi/ZainRizvi.github.io,ZainRizvi/ZainRizvi.github.io,ZainRizvi/ZainRizvi.github.io | yaml | ## Code Before:
---
label: Blog post
hide_body: false
fields:
- type: text
name: layout
label: layout
hidden: true
default: post
- type: text
name: title
label: title
- type: textarea
name: excerpt
label: excerpt
- type: list
name: tags
label: tags
pages:
- _posts/2019-08-07-so-good-they-can-t-ignor... |
a767287f15b1464e3815b47cf79952185c4a8224 | utils/add-title.js | utils/add-title.js | // Extract the title from cockpit's manifest.json and append it to a .pot file
// This assumes the .pot file already exists.
const fs = require("fs");
const jsel = require("jsel");
if (process.argv.length != 4) {
console.error("Usage: add-title <manifest.json> <POT-file>");
process.exit(1);
}
var manifestJsonNam... | // Extract the title from cockpit's manifest.json and append it to a .pot file
// This assumes the .pot file already exists.
const fs = require("fs");
const jsel = require("jsel");
if (process.argv.length != 4) {
console.error("Usage: add-title <manifest.json> <POT-file>");
process.exit(1);
}
var manifestJsonNam... | Append string into .pot file | po: Append string into .pot file
When more than one item was returned, then `potData` would be appended
as array and not as string.
| JavaScript | mit | weldr/welder-web,jkozol/welder-web,weldr/welder-web,weldr/welder-web,jkozol/welder-web,weldr/welder-web,jkozol/welder-web,jkozol/welder-web | javascript | ## Code Before:
// Extract the title from cockpit's manifest.json and append it to a .pot file
// This assumes the .pot file already exists.
const fs = require("fs");
const jsel = require("jsel");
if (process.argv.length != 4) {
console.error("Usage: add-title <manifest.json> <POT-file>");
process.exit(1);
}
var... |
4a4e49eae7f1fd265e35a052ae73cc5cd193641c | hieradata/class/graphite.yaml | hieradata/class/graphite.yaml | ---
govuk::safe_to_reboot::can_reboot: 'careful'
govuk::safe_to_reboot::reason: 'We lose stats and some alerting when this machine is down'
icinga::client::checks:
disk_time_warn: 200 # milliseconds
disk_time_critical: 400 # milliseconds
lv:
data:
pv:
- /dev/sdb1
- /dev/sdc1
vg: graphite
m... | ---
govuk::safe_to_reboot::can_reboot: 'careful'
govuk::safe_to_reboot::reason: 'We lose stats and some alerting when this machine is down'
icinga::client::checks::disk_time_warn: 200 # milliseconds
icinga::client::checks::disk_time_critical: 400 # milliseconds
lv:
data:
pv:
- /dev/sdb1
- /dev/sdc1... | Expand the Hiera values for Graphite disk time. | Expand the Hiera values for Graphite disk time.
The original code to boost these memory thresholds was introduced in
commit fad73d6ded4926493fac9b96214e7914e06f1794, but it doesn't appear
as though this is currently in effect in production. The Puppet
documentation[0] doesn't mention this nested property syntax. There... | YAML | mit | alphagov/govuk-puppet,alphagov/govuk-puppet,alphagov/govuk-puppet,alphagov/govuk-puppet,alphagov/govuk-puppet,alphagov/govuk-puppet | yaml | ## Code Before:
---
govuk::safe_to_reboot::can_reboot: 'careful'
govuk::safe_to_reboot::reason: 'We lose stats and some alerting when this machine is down'
icinga::client::checks:
disk_time_warn: 200 # milliseconds
disk_time_critical: 400 # milliseconds
lv:
data:
pv:
- /dev/sdb1
- /dev/sdc1
... |
b7fb46143d9343f272a1ea665c1f1e8ffdfe95a3 | .travis.yml | .travis.yml | language: ruby
rvm:
- 2.2.6
- 2.3.4
script: bundle exec rspec
gemfile:
- gemfiles/rails_4.2.gemfile
- gemfiles/rails_5.0.gemfile
- gemfiles/rails_5.1.gemfile
- gemfiles/rails_5.2.gemfile
matrix:
exclude:
- rvm: 2.0.0-p648
gemfile: gemfiles/rails_5.0.gemfile
- rvm: 2.1.10
gemfile: gemfi... | language: ruby
rvm:
- 2.2.9
- 2.3.7
- 2.4.4
- 2.5.1
script: bundle exec rspec
gemfile:
- gemfiles/rails_4.2.gemfile
- gemfiles/rails_5.0.gemfile
- gemfiles/rails_5.1.gemfile
- gemfiles/rails_5.2.gemfile
| Add more current ruby versions | Add more current ruby versions
| YAML | mit | ilyakatz/data-migrate,ajvargo/data-migrate | yaml | ## Code Before:
language: ruby
rvm:
- 2.2.6
- 2.3.4
script: bundle exec rspec
gemfile:
- gemfiles/rails_4.2.gemfile
- gemfiles/rails_5.0.gemfile
- gemfiles/rails_5.1.gemfile
- gemfiles/rails_5.2.gemfile
matrix:
exclude:
- rvm: 2.0.0-p648
gemfile: gemfiles/rails_5.0.gemfile
- rvm: 2.1.10
... |
65b6840567f9d99eb554650f1b4f1527261e1ac2 | app/views/layouts/application.html.erb | app/views/layouts/application.html.erb | <!DOCTYPE html>
<html>
<head>
<title>NewsmapWebapp</title>
<%= csrf_meta_tags %>
<%= javascript_tag "var AUTH_TOKEN = '#{form_authenticity_token}';" if protect_against_forgery? %>
<%= javascript_include_tag "application" %>
<%= stylesheet_link_tag "http://fonts.googleapis.com/css?family=Raleway:1... | <!DOCTYPE html>
<html>
<head>
<title>NewsmapWebapp</title>
<%= csrf_meta_tags %>
<%= javascript_tag "var AUTH_TOKEN = '#{form_authenticity_token}';" if protect_against_forgery? %>
<%= javascript_include_tag "application" %>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
... | Add meta tag for view port to get media queries to work properly | Add meta tag for view port to get media queries to work properly
| HTML+ERB | mit | lennhy/newsmap-webapp2,lennhy/newsmap-webapp2,lennhy/newsmap-webapp2 | html+erb | ## Code Before:
<!DOCTYPE html>
<html>
<head>
<title>NewsmapWebapp</title>
<%= csrf_meta_tags %>
<%= javascript_tag "var AUTH_TOKEN = '#{form_authenticity_token}';" if protect_against_forgery? %>
<%= javascript_include_tag "application" %>
<%= stylesheet_link_tag "http://fonts.googleapis.com/css?... |
499e64eac56f7c6563ea3ca028c0d19d9f9718e8 | workq/queue.go | workq/queue.go | package workq
import "sync"
type Queue struct {
items []*Item
mutex sync.Mutex
}
func (q *Queue) Push(item *Item) {
q.mutex.Lock()
defer q.mutex.Unlock()
q.items = append(q.items, item)
go item.Translate()
}
func (q *Queue) Pop() *Item {
q.mutex.Lock()
defer q.mutex.Unlock()
if !q.IsEmpty() {
item := (... | package workq
type Queue struct {
ch chan *Item
}
func NewQueue() *Queue {
q := new(Queue)
q.ch = make(chan *Item, 10)
return q
}
func (q *Queue) Push(item *Item) {
q.ch <- item
go item.Translate()
}
func (q *Queue) Pop() <-chan *Item {
ch := make(chan *Item)
go func() {
for item := range q.ch {
<-item... | Use a channel inside the Queue | Use a channel inside the Queue
| Go | mit | MStoykov/mazungumzo | go | ## Code Before:
package workq
import "sync"
type Queue struct {
items []*Item
mutex sync.Mutex
}
func (q *Queue) Push(item *Item) {
q.mutex.Lock()
defer q.mutex.Unlock()
q.items = append(q.items, item)
go item.Translate()
}
func (q *Queue) Pop() *Item {
q.mutex.Lock()
defer q.mutex.Unlock()
if !q.IsEmpty... |
058061c6455c20133e55d521a9f527a39ed036d0 | src/Test/Spec/Runner.purs | src/Test/Spec/Runner.purs | module Test.Spec.Runner (
Process(..),
run
) where
import Prelude
import Control.Monad (when)
import Control.Monad.Aff (runAff)
import Control.Monad.Eff (Eff())
import Control.Monad.Eff.Console (CONSOLE(), print)
import Data.Foldable (sequence_)
import Test.Spec ... | module Test.Spec.Runner (
Process(..),
run
) where
import Prelude
import Control.Monad.Aff (runAff)
import Control.Monad.Eff (Eff())
import Control.Monad.Eff.Console (CONSOLE(), print)
import Data.Foldable (sequence_)
import Test.Spec (Spec(), collect)
import Test.Spec.Cons... | Exit NodeJS process on success as well as failure. | Exit NodeJS process on success as well as failure.
Behaviour was already there for failure, now also for success.
For integration tests. If there are connections open, NodeJS won't exit.
e.g.
http://stackoverflow.com/questions/18046639/node-process-doesnt-exit-after-firebase-once
I don't know how to write a test fo... | PureScript | mit | felixSchl/purescript-spec,owickstrom/purescript-spec | purescript | ## Code Before:
module Test.Spec.Runner (
Process(..),
run
) where
import Prelude
import Control.Monad (when)
import Control.Monad.Aff (runAff)
import Control.Monad.Eff (Eff())
import Control.Monad.Eff.Console (CONSOLE(), print)
import Data.Foldable (sequence_)
import Te... |
0ea75851cf8088401c718acba65a295be2a96627 | kcmit-db/kcmit-db-sql/src/main/resources/edu/mit/kc/sql/migration/ddl_sap_error_log.sql | kcmit-db/kcmit-db-sql/src/main/resources/edu/mit/kc/sql/migration/ddl_sap_error_log.sql | CREATE SEQUENCE SEQ_SAP_FEED_ERROR_ID
START WITH 1
MAXVALUE 9999999999
MINVALUE 1
NOCYCLE
NOCACHE
NOORDER
/
TRUNCATE TABLE SAP_FEED_ERROR_LOG
/
ALTER TABLE SAP_FEED_ERROR_LOG ADD SAP_FEED_ERROR_ID NUMBER(12)
/
ALTER TABLE SAP_FEED_ERROR_LOG ADD CONSTRAINT PK_SAP_FEED_ERROR_LOG PRIMARY KEY (SAP_FEED_ERROR_... | CREATE SEQUENCE SEQ_SAP_FEED_ERROR_ID
START WITH 1
MAXVALUE 9999999999
MINVALUE 1
NOCYCLE
NOCACHE
NOORDER
/
TRUNCATE TABLE SAP_FEED_ERROR_LOG
/
ALTER TABLE SAP_FEED_ERROR_LOG ADD SAP_FEED_ERROR_ID NUMBER(12)
/
ALTER TABLE SAP_FEED_ERROR_LOG MODIFY ERROR_MESSAGE VARCHAR2(1000)
/
ALTER TABLE SAP_FEED_ERRO... | Increase error message size to 1000 | Increase error message size to 1000
| SQL | agpl-3.0 | geothomasp/kcmit,geothomasp/kcmit,geothomasp/kcmit,geothomasp/kcmit,geothomasp/kcmit | sql | ## Code Before:
CREATE SEQUENCE SEQ_SAP_FEED_ERROR_ID
START WITH 1
MAXVALUE 9999999999
MINVALUE 1
NOCYCLE
NOCACHE
NOORDER
/
TRUNCATE TABLE SAP_FEED_ERROR_LOG
/
ALTER TABLE SAP_FEED_ERROR_LOG ADD SAP_FEED_ERROR_ID NUMBER(12)
/
ALTER TABLE SAP_FEED_ERROR_LOG ADD CONSTRAINT PK_SAP_FEED_ERROR_LOG PRIMARY KEY (SAP_FEED_ER... |
9b4a9eb30f45892dbd04385a6fdaf1d8896cf63b | static/src/sass/layout/_header.scss | static/src/sass/layout/_header.scss | $module: ".header";
#{$module} {
z-index: 100;
position: relative;
@include mq($until: sm) {
position: fixed;
width: 100%;
top: 0;
left: 0;
z-index: 100;
height: $header-height-tablet;
@include mq($until: xs) {
height: $header-height-mob... | $module: ".header";
#{$module} {
z-index: 100;
position: relative;
@include mq($until: sm) {
position: fixed;
width: 100%;
top: 0;
left: 0;
z-index: 100;
height: $header-height-tablet;
overflow: hidden;
@include mq($until: xs) {
... | Fix header height on mobile devices | Fix header height on mobile devices
| SCSS | agpl-3.0 | Ircam-Web/mezzanine-organization,Ircam-Web/mezzanine-organization | scss | ## Code Before:
$module: ".header";
#{$module} {
z-index: 100;
position: relative;
@include mq($until: sm) {
position: fixed;
width: 100%;
top: 0;
left: 0;
z-index: 100;
height: $header-height-tablet;
@include mq($until: xs) {
height: $h... |
02f8f9ffdc2ffc261c924124e4ef62c7bf16307f | test/test_action_add_node.rb | test/test_action_add_node.rb | require 'helper'
class TestActionAddNode < Test::Unit::TestCase
context "The `rutty add_node' action" do
setup { ensure_fresh_config! }
teardown { clean_test_config! }
should "properly create a new node entry when called" do
require 'yaml'
%x(#{RUTTY_BIN} add_node -c #{TEST_CONF_D... | require 'helper'
class TestActionAddNode < Test::Unit::TestCase
context "The `rutty add_node' action" do
setup { ensure_fresh_config! }
teardown { clean_test_config! }
should "properly create a new node entry when called" do
require 'yaml'
output = %x(#{RUTTY_BIN} add_node -c #{TE... | Add assert to 'rutty add_node' tests to check for command output | Add assert to 'rutty add_node' tests to check for command output
| Ruby | mit | jlindsey/rutty | ruby | ## Code Before:
require 'helper'
class TestActionAddNode < Test::Unit::TestCase
context "The `rutty add_node' action" do
setup { ensure_fresh_config! }
teardown { clean_test_config! }
should "properly create a new node entry when called" do
require 'yaml'
%x(#{RUTTY_BIN} add_node ... |
cf7ce6c354026a83fe49090e32347655bc0450d3 | jenkins/jobs/openstack-helm.yaml | jenkins/jobs/openstack-helm.yaml | - job-template:
name: 'gate-openstack-helm{sub}-{integration}-{type}-{node}{suffix}'
node: '{node}'
wrappers:
- build-timeout:
timeout: 100
- timestamps
builders:
- print-template-name:
template-name: "{template-name}"
- link-logs
- net-info
- zu... | - job-template:
name: 'gate-openstack-helm{sub}-{integration}-{type}-{node}{suffix}'
node: '{node}'
wrappers:
- build-timeout:
timeout: 100
- timestamps
builders:
- print-template-name:
template-name: "{template-name}"
- link-logs
- net-info
- zu... | Fix a cyclic CRD problem | Fix a cyclic CRD problem
This patch set moves all common libraries and toolkit from OpenStack-Helm
to OpenStack-Helm-Infra, and updates the zuul-cloner call. This allows OS-H
to zuul-clone from a centralized repo, OS-H-Infra. Previously, OS-H-Infra
can have dependencies on OS-H for the helm-toolkit, but OS-H is also
... | YAML | apache-2.0 | openstack-infra/project-config,openstack-infra/project-config | yaml | ## Code Before:
- job-template:
name: 'gate-openstack-helm{sub}-{integration}-{type}-{node}{suffix}'
node: '{node}'
wrappers:
- build-timeout:
timeout: 100
- timestamps
builders:
- print-template-name:
template-name: "{template-name}"
- link-logs
- net... |
26545d63a03c690189c955cbb380c24fae09c60a | Cargo.toml | Cargo.toml | [package]
name = "jsonrpc"
version = "0.11.0"
authors = ["Andrew Poelstra <apoelstra@wpsoftware.net>"]
license = "CC0-1.0"
homepage = "https://github.com/apoelstra/rust-jsonrpc/"
repository = "https://github.com/apoelstra/rust-jsonrpc/"
documentation = "https://www.wpsoftware.net/rustdoc/jsonrpc/"
description = "Rust s... | [package]
name = "jsonrpc"
version = "0.11.0"
authors = ["Andrew Poelstra <apoelstra@wpsoftware.net>"]
license = "CC0-1.0"
homepage = "https://github.com/apoelstra/rust-jsonrpc/"
repository = "https://github.com/apoelstra/rust-jsonrpc/"
documentation = "https://docs.rs/jsonrpc/"
description = "Rust support for the JSON... | Update documentation link to point to latest documentation | Update documentation link to point to latest documentation | TOML | cc0-1.0 | apoelstra/rust-jsonrpc,apoelstra/rust-jsonrpc | toml | ## Code Before:
[package]
name = "jsonrpc"
version = "0.11.0"
authors = ["Andrew Poelstra <apoelstra@wpsoftware.net>"]
license = "CC0-1.0"
homepage = "https://github.com/apoelstra/rust-jsonrpc/"
repository = "https://github.com/apoelstra/rust-jsonrpc/"
documentation = "https://www.wpsoftware.net/rustdoc/jsonrpc/"
descr... |
72fdf1a393c4c8c14b45eb1aa3d0209d37628226 | manifest.yml | manifest.yml | ---
applications:
- name: errbit-unstable
services:
- errbit-unstable-mongodb
memory: 256M
env:
RAILS_ENV: production
RACK_ENV: production
GEMFILE_RUBY_VERSION: 2.2.0
ERRBIT_HOST: errbit-unstable.nova.scapp.io
ERRBIT_EMAIL_FROM: lucas.bickel@swisscom.com
| ---
applications:
- name: errbit-unstable
services:
- errbit-unstable-mongodb
memory: 256M
env:
RAILS_ENV: production
RACK_ENV: production
GEMFILE_RUBY_VERSION: 2.2.0
ERRBIT_HOST: errbit-unstable.nova.scapp.io
ERRBIT_EMAIL_FROM: lucas.bickel@swisscom.com
EMAIL_DELIVERY_METHOD: :smtp
| Switch to deliverying email per smtp | Switch to deliverying email per smtp
| YAML | mit | gravity-platform/errbit,gravity-platform/errbit,gravity-platform/errbit | yaml | ## Code Before:
---
applications:
- name: errbit-unstable
services:
- errbit-unstable-mongodb
memory: 256M
env:
RAILS_ENV: production
RACK_ENV: production
GEMFILE_RUBY_VERSION: 2.2.0
ERRBIT_HOST: errbit-unstable.nova.scapp.io
ERRBIT_EMAIL_FROM: lucas.bickel@swisscom.com
## Instruction:
Swit... |
19ad57c74d53a31339bc8c706f83e7e74b0ba88d | test/bin-debug/build.sh | test/bin-debug/build.sh |
FLEXSDK="../../../FlexSDK"
"$FLEXSDK/bin/amxmlc" -compiler.source-path=../../lib/src -output FRESteamWorksTest.swf ../src/FRESteamWorksTest.as
|
FLEXSDK="../../../FlexSDK"
"$FLEXSDK/bin/amxmlc" -swf-version=11 -compiler.source-path=../../lib/src -output FRESteamWorksTest.swf ../src/FRESteamWorksTest.as
| Build test app as SWF version 11 | Build test app as SWF version 11
| Shell | bsd-2-clause | Ventero/FRESteamWorks,Ventero/FRESteamWorks,Ventero/FRESteamWorks,Ventero/FRESteamWorks | shell | ## Code Before:
FLEXSDK="../../../FlexSDK"
"$FLEXSDK/bin/amxmlc" -compiler.source-path=../../lib/src -output FRESteamWorksTest.swf ../src/FRESteamWorksTest.as
## Instruction:
Build test app as SWF version 11
## Code After:
FLEXSDK="../../../FlexSDK"
"$FLEXSDK/bin/amxmlc" -swf-version=11 -compiler.source-path=../../... |
743a2cadfeb25129931aecf6d60586943736dc59 | .codacy.yml | .codacy.yml | ---
engines:
phpmd:
enabled: true
config:
rulesets: "phpmd.xml.dist"
exclude_paths:
- 'ext/**'
- 'prototypes/**'
| ---
engines:
phpmd:
enabled: true
config:
rulesets: "phpmd.xml.dist"
phpcs:
enabled: true
config:
ruleset: "phpcs.xml.dist"
exclude_paths:
- 'ext/**'
- 'prototypes/**'
| Enable phpcs ruleset for Codacy | Enable phpcs ruleset for Codacy
| YAML | mit | vpg/zephir,vpg/zephir,vpg/zephir,phalcon/zephir,zephir-lang/zephir,zephir-lang/zephir,vpg/zephir,zephir-lang/zephir,zephir-lang/zephir,phalcon/zephir,zephir-lang/zephir,vpg/zephir,vpg/zephir,phalcon/zephir,phalcon/zephir,phalcon/zephir,phalcon/zephir | yaml | ## Code Before:
---
engines:
phpmd:
enabled: true
config:
rulesets: "phpmd.xml.dist"
exclude_paths:
- 'ext/**'
- 'prototypes/**'
## Instruction:
Enable phpcs ruleset for Codacy
## Code After:
---
engines:
phpmd:
enabled: true
config:
rulesets: "phpmd.xml.dist"
phpcs:
enable... |
bcb2062fd2b9c690a0081bc31edaf3cbcbfcec8c | README.md | README.md |
- Course Introduction
- Setup NativeScript Environment
- Core concepts
- Application architecture
- Modules
- Data binding
- Events
- Transpilers
- UI
- Components
- Layouts
- Styling
- Gestures
- Animations
- Action Bar
- Hardware access
- Location
- Camera
- Plugins
- Native API access
- ... |
- Course Introduction
- Setup NativeScript Environment
- Core concepts
- Application architecture
- Modules
- Data binding
- Events
- Transpilers
- UI
- Components
- Layouts
- Styling
- Gestures
- Animations
- Action Bar
- Hardware access
- Location
- Camera
- Plugins
- Native API access
- ... | Add links to official documentation | Add links to official documentation
| Markdown | mit | TelerikAcademy/Mobile-Applications-with-NativeScript,TelerikAcademy/Mobile-Applications-with-NativeScript | markdown | ## Code Before:
- Course Introduction
- Setup NativeScript Environment
- Core concepts
- Application architecture
- Modules
- Data binding
- Events
- Transpilers
- UI
- Components
- Layouts
- Styling
- Gestures
- Animations
- Action Bar
- Hardware access
- Location
- Camera
- Plugins
- Nati... |
8e530a6504d8fb1e749cb85397df729eed1b87ee | lib/express-sanitize-escape.js | lib/express-sanitize-escape.js | /*!
* express-sanitized
* MIT Licensed
*/
/**
* Module dependencies.
*/
var _ = require('lodash');
var sanitizer = require('sanitizer');
var htmlencode = require('htmlencode');
/**
* Simple middleware that wraps sanitzer and can be exposed
* at the app.use router layer and apply to all methods.
* This is be... | /*!
* express-sanitized
* MIT Licensed
*/
/**
* Module dependencies.
*/
var _ = require('lodash');
var sanitizer = require('sanitizer');
var htmlencode = require('htmlencode');
/**
* Simple middleware that wraps sanitzer and can be exposed
* at the app.use router layer and apply to all methods.
* This is be... | Revert sanitizing req.params, add export function for sanitizing params of a router. | Revert sanitizing req.params, add export function for sanitizing params of a router.
| JavaScript | mit | fingerfoodstudios/express-sanitize-escape | javascript | ## Code Before:
/*!
* express-sanitized
* MIT Licensed
*/
/**
* Module dependencies.
*/
var _ = require('lodash');
var sanitizer = require('sanitizer');
var htmlencode = require('htmlencode');
/**
* Simple middleware that wraps sanitzer and can be exposed
* at the app.use router layer and apply to all method... |
0ed0e85dbd33bb7b50445c89ead70998b5b3c0de | src/index.js | src/index.js | import mapValues from 'lodash.mapValues';
import isPlainObject from 'lodash.isPlainObject';
import { Iterable } from 'immutable';
export function isImmutable(obj) {
return Iterable.isIterable(obj);
}
export function toJS(obj) {
return obj.toJS();
}
export function toJSDeep(obj) {
/* eslint no-use-before-define... | import mapValues from 'lodash.mapValues';
import isPlainObject from 'lodash.isPlainObject';
import { Iterable } from 'immutable';
export function isImmutable(obj) {
return Iterable.isIterable(obj);
}
export function toJS(obj) {
return obj.toJS();
}
export function toJSDeep(obj) {
/* eslint no-use-before-define... | Remove an unnecessary arrow function | Remove an unnecessary arrow function
| JavaScript | mit | nakamura-to/redux-immutable-to-js,nakamura-to/redux-immutable-to-js | javascript | ## Code Before:
import mapValues from 'lodash.mapValues';
import isPlainObject from 'lodash.isPlainObject';
import { Iterable } from 'immutable';
export function isImmutable(obj) {
return Iterable.isIterable(obj);
}
export function toJS(obj) {
return obj.toJS();
}
export function toJSDeep(obj) {
/* eslint no-u... |
16e08047861d8a350ae4588a9b370c0d688d47d8 | example/main.go | example/main.go | //+build ignore
// Simple example that will nuke the contents of a s3 bucket
package main
import (
"fmt"
"runtime"
"s3"
)
func init() {
// multicorebitches
runtime.GOMAXPROCS(runtime.NumCPU())
}
func printKey(kb s3.KeyBucket) {
fmt.Println(kb.Key.Key)
}
func main() {
c := s3.Connection{}
err := c.Connect()
... | //+build ignore
// Simple example that will nuke the contents of a s3 bucket
package main
import (
"fmt"
"runtime"
s3 "s3Manager"
)
func init() {
// multicorebitches
runtime.GOMAXPROCS(runtime.NumCPU())
}
func printKey(kb s3.KeyBucket) {
fmt.Println(kb.Key.Key)
return
}
func main() {
c := s3.Connection{}
e... | Comment out uselless stuff, update pkg name. | Comment out uselless stuff, update pkg name.
| Go | mit | giulioungaretti/S3 | go | ## Code Before:
//+build ignore
// Simple example that will nuke the contents of a s3 bucket
package main
import (
"fmt"
"runtime"
"s3"
)
func init() {
// multicorebitches
runtime.GOMAXPROCS(runtime.NumCPU())
}
func printKey(kb s3.KeyBucket) {
fmt.Println(kb.Key.Key)
}
func main() {
c := s3.Connection{}
err... |
c0d9a94899af84e8a075cfc7cfb054a934470e3a | static_precompiler/tests/test_templatetags.py | static_precompiler/tests/test_templatetags.py | import django.template
import django.template.loader
import pretend
def test_compile_filter(monkeypatch):
compile_static = pretend.call_recorder(lambda source_path: "compiled")
monkeypatch.setattr("static_precompiler.utils.compile_static", compile_static)
template = django.template.loader.get_template_fr... | import django.template
import pretend
def test_compile_filter(monkeypatch):
compile_static = pretend.call_recorder(lambda source_path: "compiled")
monkeypatch.setattr("static_precompiler.utils.compile_static", compile_static)
template = django.template.Template("""{% load compile_static %}{{ "source"|com... | Fix tests for Django 1.8 | Fix tests for Django 1.8
| Python | mit | liumengjun/django-static-precompiler,liumengjun/django-static-precompiler,liumengjun/django-static-precompiler,liumengjun/django-static-precompiler,jaheba/django-static-precompiler,liumengjun/django-static-precompiler,jaheba/django-static-precompiler,jaheba/django-static-precompiler,jaheba/django-static-precompiler | python | ## Code Before:
import django.template
import django.template.loader
import pretend
def test_compile_filter(monkeypatch):
compile_static = pretend.call_recorder(lambda source_path: "compiled")
monkeypatch.setattr("static_precompiler.utils.compile_static", compile_static)
template = django.template.loader... |
a41b1986eac668c55743bd275f3a54e6f6ae0e36 | front/src/components/ResultMovie.vue | front/src/components/ResultMovie.vue | <template lang="html">
<div class="ResultMovie" :style="backgroundImg">
<div class="ResultMovie-detail">
{{ title }}
</div>
</div>
</template>
<script>
export default {
name: 'resultMovie',
props: ['title', 'year', 'img'],
data () {
return {
backgroundImg: {
back... | <template lang="html">
<div class="ResultMovie" :style="backgroundStyle">
<div class="ResultMovie-detail">
{{ title }}
</div>
</div>
</template>
<script>
export default {
name: 'resultMovie',
props: ['title', 'year', 'img'],
data () {
return {
backgroundStyle: {
}
... | Fix the update of background image | Fix the update of background image
| Vue | mit | KevinNTH/my-favorite-movies,KevinNTH/my-favorite-movies | vue | ## Code Before:
<template lang="html">
<div class="ResultMovie" :style="backgroundImg">
<div class="ResultMovie-detail">
{{ title }}
</div>
</div>
</template>
<script>
export default {
name: 'resultMovie',
props: ['title', 'year', 'img'],
data () {
return {
backgroundImg: ... |
acdebe5146277e14eef32d28755e413a9df837ba | runtime.asm | runtime.asm | use32
global _GLOBAL_OFFSET_TABLE_
global __morestack
global abort
global memcmp
global memcpy
global malloc
global free
global start
extern main
start:
; rust functions compare esp against [gs:0x30] as a sort of stack guard thing
; as long as we set [gs:0x30] to dword 0, it should be ok
mov [gs:0x30], d... | use32
global __morestack
global abort
global memcmp
global memcpy
global malloc
global free
global start
global _GLOBAL_OFFSET_TABLE_
_GLOBAL_OFFSET_TABLE_ equ 0
extern main
start:
; rust functions compare esp against [gs:0x30] as a sort of stack guard thing
; as long as we set [gs:0x30] to dword 0, it shou... | Set global GOT at 0 and merge infinite loops | Set global GOT at 0 and merge infinite loops
| Assembly | mit | pczarn/rustboot,alexchandel/rustboot,perlun/rustboot,wbthomason/ironkernel | assembly | ## Code Before:
use32
global _GLOBAL_OFFSET_TABLE_
global __morestack
global abort
global memcmp
global memcpy
global malloc
global free
global start
extern main
start:
; rust functions compare esp against [gs:0x30] as a sort of stack guard thing
; as long as we set [gs:0x30] to dword 0, it should be ok
... |
310e6474732a9b1ddbe3e778917c46baaf53dbcb | mangacork/static/css/style.css | mangacork/static/css/style.css | /* TOP SECTION
----------------------------------------*/
.top a {
text-decoration: none;
}
.top button {
margin-top: 1rem;
float: right;
}
.top h1 {
color: #34495e;
}
#logout_button {
margin-top: 1rem;
float: right;
}
/* LOGIN + REGISTER SECTION
----------------------------------------*/
... | /* TOP SECTION
----------------------------------------*/
.top a {
text-decoration: none;
}
.top button {
margin-top: 1rem;
float: right;
}
.top h1 {
color: #34495e;
}
#logout_button {
margin-top: 1rem;
float: right;
}
/* LOGIN + REGISTER SECTION
----------------------------------------*/
... | Add more space bw post and img for mobile | Add more space bw post and img for mobile
| CSS | mit | ma3lstrom/manga-cork,ma3lstrom/manga-cork,ma3lstrom/manga-cork | css | ## Code Before:
/* TOP SECTION
----------------------------------------*/
.top a {
text-decoration: none;
}
.top button {
margin-top: 1rem;
float: right;
}
.top h1 {
color: #34495e;
}
#logout_button {
margin-top: 1rem;
float: right;
}
/* LOGIN + REGISTER SECTION
----------------------------... |
b8ea857bd74c3665cdb3a21fc614cefdb9137b98 | models/score_board.rb | models/score_board.rb | require 'open-uri'
require 'date'
require_relative 'box_score'
class ScoreBoard
SB_URI = "http://scores.espn.go.com/nba/scoreboard?date=%s"
GIDS_RE = %r|/nba/boxscore\?gameId=(\d+)|
def initialize (d=nil)
date = d ? Date.new(2000 + d[0,2].to_i, d[2,2].to_i, d[4,2].to_i) : Date.today
gids = []
whil... | require 'open-uri'
require 'date'
require 'json'
require_relative 'box_score'
class ScoreBoard
SB_URI = "http://site.api.espn.com/apis/site/v2/sports/basketball/nba/scoreboard?lang=en®ion=us&calendartype=blacklist&limit=100&dates=%s"
def initialize (d=nil)
date = d ? Date.new(2000 + d[0,2].to_i, d[2,2].to... | Use API instead of screen scraping Scoreboard | Use API instead of screen scraping Scoreboard
| Ruby | mit | erichaase/fantasy-sinatra,erichaase/fantasy-sinatra | ruby | ## Code Before:
require 'open-uri'
require 'date'
require_relative 'box_score'
class ScoreBoard
SB_URI = "http://scores.espn.go.com/nba/scoreboard?date=%s"
GIDS_RE = %r|/nba/boxscore\?gameId=(\d+)|
def initialize (d=nil)
date = d ? Date.new(2000 + d[0,2].to_i, d[2,2].to_i, d[4,2].to_i) : Date.today
gi... |
4c3e9c45080f15d63ff395ec5c5f6fc2a3064830 | assets/stylesheets/partials/_footer.scss | assets/stylesheets/partials/_footer.scss | /* =FOOTER
----------------------------------------------------------------------*/
[role="contentinfo"] {
margin-top: $lineheight;
padding: $lineheight 0 $lineheight*2;
clear: both;
background-color: $dark;
color: #fff;
font-size: .9em;
a {
color: #fff;
}
hgroup {
color: $teal;
text-align: center... | /* =FOOTER
----------------------------------------------------------------------*/
[role="contentinfo"] {
margin-top: $lineheight;
padding: $lineheight 0 $lineheight*2;
clear: both;
background-color: $dark;
color: #fff;
font-size: .9em;
a {
color: #fff;
}
hgroup {
color: $teal;
text-align: center;... | Add text shadow to footer heading | Add text shadow to footer heading
| SCSS | mit | cthit/wordpress,cthit/wordpress,cthit/wordpress,cthit/wordpress | scss | ## Code Before:
/* =FOOTER
----------------------------------------------------------------------*/
[role="contentinfo"] {
margin-top: $lineheight;
padding: $lineheight 0 $lineheight*2;
clear: both;
background-color: $dark;
color: #fff;
font-size: .9em;
a {
color: #fff;
}
hgroup {
color: $teal;
te... |
c4d61a6401f3a0be1fbf0e24e9d75ef2f1509bac | src/Symfony/Bundle/FrameworkBundle/README.md | src/Symfony/Bundle/FrameworkBundle/README.md | FrameworkBundle
===============
FrameworkBundle provides a tight integration between Symfony components and the
Symfony full-stack framework.
Resources
---------
* [Contributing](https://symfony.com/doc/current/contributing/index.html)
* [Report issues](https://github.com/symfony/symfony/issues) and
[send Pull ... | FrameworkBundle
===============
FrameworkBundle provides a tight integration between Symfony components and the
Symfony full-stack framework.
Sponsor
-------
The FrameworkBundle for Symfony 6.1 is [backed][1] by [alximy][2].
A team of passionate humans from very different backgrounds, sharing their love of
PHP, Sym... | Add alximy as backer of version 6.1 | [FrameworkBundle] Add alximy as backer of version 6.1
| Markdown | mit | curry684/symfony,symfony/symfony,symfony/symfony,curry684/symfony,curry684/symfony,symfony/symfony,xabbuh/symfony,damienalexandre/symfony,nicolas-grekas/symfony,HeahDude/symfony,damienalexandre/symfony,symfony/symfony,damienalexandre/symfony,HeahDude/symfony,HeahDude/symfony,curry684/symfony,damienalexandre/symfony,d-p... | markdown | ## Code Before:
FrameworkBundle
===============
FrameworkBundle provides a tight integration between Symfony components and the
Symfony full-stack framework.
Resources
---------
* [Contributing](https://symfony.com/doc/current/contributing/index.html)
* [Report issues](https://github.com/symfony/symfony/issues) an... |
20e0a6a499ab35a38ddf47245d0fd66d0776e068 | config/initializers/maslow.rb | config/initializers/maslow.rb | require 'gds_api/maslow'
Whitehall.maslow = GdsApi::Maslow.new(Plek.find('maslow'))
| require 'gds_api/maslow'
Whitehall.maslow = GdsApi::Maslow.new(Plek.new.external_url_for('maslow'))
| Use external URLs for Maslow | Use external URLs for Maslow
This uses the new external_url_for method in Plek, which handles
environments where the URLs for internal and external routing are
different.
| Ruby | mit | alphagov/whitehall,alphagov/whitehall,alphagov/whitehall,alphagov/whitehall | ruby | ## Code Before:
require 'gds_api/maslow'
Whitehall.maslow = GdsApi::Maslow.new(Plek.find('maslow'))
## Instruction:
Use external URLs for Maslow
This uses the new external_url_for method in Plek, which handles
environments where the URLs for internal and external routing are
different.
## Code After:
require 'gds_a... |
a7a0931cb11e38e655046ea83e13fe8ff6a7c171 | test/unit/parserSpec.js | test/unit/parserSpec.js | import assert from 'assert'
import {contains, all} from 'ramda'
import {parseDepartmentHtml} from '../../app/parser'
import {courseData} from './courseData'
const titeData = parseDepartmentHtml(courseData)
describe('Lukkarimaatti parser', () => {
it('Check that every course gets parsed', () => {
assert.equal(ti... | import assert from 'assert'
import {contains, all} from 'ramda'
import {parseDepartmentHtml} from '../../app/parser'
import {courseData} from './courseData'
const titeData = parseDepartmentHtml(courseData)
describe('Lukkarimaatti parser', () => {
it('Check that every course gets parsed', () => {
assert.equal(ti... | Add object value check test | Add object value check test
| JavaScript | apache-2.0 | Laastine/lukkarimaatti,Laastine/lukkarimaatti,Laastine/lukkarimaatti | javascript | ## Code Before:
import assert from 'assert'
import {contains, all} from 'ramda'
import {parseDepartmentHtml} from '../../app/parser'
import {courseData} from './courseData'
const titeData = parseDepartmentHtml(courseData)
describe('Lukkarimaatti parser', () => {
it('Check that every course gets parsed', () => {
... |
cd339886b659db957a6c9c7c58878c9551d7a53b | src/Hydrator/DelegatingHydrator.php | src/Hydrator/DelegatingHydrator.php | <?php
/**
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
namespace ... | <?php
/**
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
namespace ... | Fix CS issues reported by php-cs-fixer | Fix CS issues reported by php-cs-fixer
- Remove unused use
| PHP | bsd-3-clause | samsonasik/zend-stdlib | php | ## Code Before:
<?php
/**
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.