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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
9602701f25beca21c126fa160e6c1dfbb413acb4 | app/views/profiles/_form.html.erb | app/views/profiles/_form.html.erb | <% semantic_form_for(@profile) do |f| %>
<%= f.error_messages %>
<% f.inputs do %>
<%= f.input :name %>
<%= f.input :path %>
<%= f.input :servers, :as => :check_boxes, :label => 'Apply to', :hint => 'Quickly apply this profile to all these servers' %>
<% end %>
<%= f.buttons %>
<% end %> | <% semantic_form_for(@profile) do |f| %>
<%= f.error_messages %>
<% f.inputs do %>
<%= f.input :name %>
<%= f.input :path %>
<%= f.input :servers, :collection => Server.find(:all, :order => 'hostname DESC'), :as => :check_boxes, :label => 'Apply to', :hint => 'Quickly apply this profile to all these ser... | Order the list of servers | Order the list of servers
| HTML+ERB | isc | Wijnand/retcon-web,driehuis/retcon-web,driehuis/retcon-web,driehuis/retcon-web,driehuis/retcon-web,Wijnand/retcon-web | html+erb | ## Code Before:
<% semantic_form_for(@profile) do |f| %>
<%= f.error_messages %>
<% f.inputs do %>
<%= f.input :name %>
<%= f.input :path %>
<%= f.input :servers, :as => :check_boxes, :label => 'Apply to', :hint => 'Quickly apply this profile to all these servers' %>
<% end %>
<%= f.buttons %>
<% en... |
341b307614509dcfb4cbbf11fb0168e63828ca0e | circle.yml | circle.yml | machine:
timezone: Asia/Tokyo
node:
version: 7.0.0
dependencies:
cache_directories:
- "~/.cache/yarn/"
pre:
- npm install -g npm
- curl -o- -L https://yarnpkg.com/install.sh | bash
- yarn --version
override:
- yarn install
test:
override:
- echo "No tests"
deployment:
master:
... | machine:
timezone: Asia/Tokyo
node:
version: 7.0.0
dependencies:
cache_directories:
- "~/.cache/yarn/"
pre:
- npm install -g npm
- curl -o- -L https://yarnpkg.com/install.sh | bash
- yarn --version
- yarn cache dir
override:
- yarn install
test:
override:
- echo "No tests"
de... | Enable to confirm yarn cache dir | :+1: Enable to confirm yarn cache dir
| YAML | mit | tsub/circleci-build-trigger | yaml | ## Code Before:
machine:
timezone: Asia/Tokyo
node:
version: 7.0.0
dependencies:
cache_directories:
- "~/.cache/yarn/"
pre:
- npm install -g npm
- curl -o- -L https://yarnpkg.com/install.sh | bash
- yarn --version
override:
- yarn install
test:
override:
- echo "No tests"
deploym... |
394818cd4928a53bbf446a09612bceeb1fef0b9a | appveyor.yml | appveyor.yml | image: Visual Studio 2017
version: 0.0.3.{build}
environment:
NUGET_API_KEY:
secure: Xgfg93dEsB7PeszT3oyiQNkB8gLvYTzREf859tknmjkVm9IvsVu75kMpVLm6fYfr
build:
verbosity: minimal
init:
- ps: |
$env:build=$env:APPVEYOR_BUILD_NUMBER
$lastDot = $env:APPVEYOR_BUILD_VERSION.LastIndexOf(".")
... | image: Visual Studio 2017
version: 0.0.3.{build}
environment:
NUGET_API_KEY:
secure: BaA4I0ILBg+7FdZ2TEdgwuu8oQ8l9Yp7yqhyw2yRiyGnQnP2sjUYPnC0zDV/nyFh
build:
verbosity: minimal
init:
- ps: |
$env:build=$env:APPVEYOR_BUILD_NUMBER
$lastDot = $env:APPVEYOR_BUILD_VERSION.LastIndexOf("."... | Update expiring nuget api key | Update expiring nuget api key
| YAML | apache-2.0 | kennethito/Akka.Cluster.SplitBrainResolver | yaml | ## Code Before:
image: Visual Studio 2017
version: 0.0.3.{build}
environment:
NUGET_API_KEY:
secure: Xgfg93dEsB7PeszT3oyiQNkB8gLvYTzREf859tknmjkVm9IvsVu75kMpVLm6fYfr
build:
verbosity: minimal
init:
- ps: |
$env:build=$env:APPVEYOR_BUILD_NUMBER
$lastDot = $env:APPVEYOR_BUILD_VERSION.LastIndexOf(".")
... |
ab28b2e29d35f34b9b5b85be42112687faeca6dd | script/ci.sh | script/ci.sh |
gem install bundler -v 1.16.0 --no-document --conservative
bundle install --jobs 3 --retry 3
bundle exec rake clobber compile test sign_hooks overcommit
|
gem install bundler -v 1.16.0 --no-document --conservative
bundle install --jobs 3 --retry 3 --path vendor/bundle
bundle exec rake clobber compile test sign_hooks overcommit
| Install gems to the folder Travis is caching | Install gems to the folder Travis is caching
| Shell | bsd-2-clause | deivid-rodriguez/byebug,deivid-rodriguez/byebug,yui-knk/byebug,yui-knk/byebug,deivid-rodriguez/byebug,yui-knk/byebug | shell | ## Code Before:
gem install bundler -v 1.16.0 --no-document --conservative
bundle install --jobs 3 --retry 3
bundle exec rake clobber compile test sign_hooks overcommit
## Instruction:
Install gems to the folder Travis is caching
## Code After:
gem install bundler -v 1.16.0 --no-document --conservative
bundle insta... |
bf469e08c9419d6b81d31408e1a57028de3fddf9 | packaging/etc/waldur/uwsgi.ini | packaging/etc/waldur/uwsgi.ini |
[uwsgi]
chmod-socket = 666
gid = waldur
logto = /var/log/waldur/uwsgi.log
module = waldur_core.server.wsgi:application
plugins = python36
processes = 4
socket = /run/waldur/uwsgi/uwsgi.sock
static-map = /static=/usr/share/waldur/static
static-map = /media=/var/lib/waldur/media
uid = waldur
|
[uwsgi]
chmod-socket = 666
gid = waldur
logto = /var/log/waldur/uwsgi.log
module = waldur_core.server.wsgi:application
plugins = python36
processes = 4
socket = /run/waldur/uwsgi/uwsgi.sock
static-map = /static=/usr/share/waldur/static
static-map = /media=/var/lib/waldur/media
uid = waldur
enable-threads = true # req... | Enable threads on uWSGI as it is required by Sentry client. | Enable threads on uWSGI as it is required by Sentry client.
| INI | mit | opennode/nodeconductor-assembly-waldur,opennode/nodeconductor-assembly-waldur,opennode/waldur-mastermind,opennode/waldur-mastermind,opennode/nodeconductor-assembly-waldur,opennode/waldur-mastermind,opennode/waldur-mastermind | ini | ## Code Before:
[uwsgi]
chmod-socket = 666
gid = waldur
logto = /var/log/waldur/uwsgi.log
module = waldur_core.server.wsgi:application
plugins = python36
processes = 4
socket = /run/waldur/uwsgi/uwsgi.sock
static-map = /static=/usr/share/waldur/static
static-map = /media=/var/lib/waldur/media
uid = waldur
## Instruct... |
a8de6aa99c1b0a9c5a9d7a888b061ad89a16eb88 | test/CMakeLists.txt | test/CMakeLists.txt |
file(
GLOB_RECURSE
unit_test_files
*.[c,h]
)
include_directories(${nstl_SOURCE_DIR}/include
${nstl_SOURCE_DIR}/ext/seatest/src)
add_executable(
unit-tests
${unit_test_files}
${nstl_SOURCE_DIR}/ext/seatest/src/seatest.c
)
add_custom_target(
run-tests
COMMAND ./uni... |
file(
GLOB_RECURSE
unit_test_files
*.[c,h]
)
include_directories(${nstl_SOURCE_DIR}/include
${nstl_SOURCE_DIR}/ext/seatest/src)
link_directories(${nstl_BINARY_DIR}/test)
add_library(seatest ${nstl_SOURCE_DIR}/ext/seatest/src/seatest.c)
add_executable(
unit-tests
${unit_test_f... | Make seatest a library in Cmake. | Make seatest a library in Cmake.
| Text | mit | ldionne/nstl,ldionne/nstl | text | ## Code Before:
file(
GLOB_RECURSE
unit_test_files
*.[c,h]
)
include_directories(${nstl_SOURCE_DIR}/include
${nstl_SOURCE_DIR}/ext/seatest/src)
add_executable(
unit-tests
${unit_test_files}
${nstl_SOURCE_DIR}/ext/seatest/src/seatest.c
)
add_custom_target(
run-tests
... |
218571074887c53b5b62050f8cd08b9ba98a2b03 | src/ci/docker/dist-x86_64-linux/build-curl.sh | src/ci/docker/dist-x86_64-linux/build-curl.sh |
set -ex
source shared.sh
VERSION=7.51.0
curl http://cool.haxx.se/download/curl-$VERSION.tar.bz2 | tar xjf -
mkdir curl-build
cd curl-build
hide_output ../curl-$VERSION/configure \
--prefix=/rustroot \
--with-ssl=/rustroot \
--disable-sspi \
--disable-gopher \
--disable-smtp \
--d... |
set -ex
source shared.sh
VERSION=7.66.0
curl https://rust-lang-ci-mirrors.s3-us-west-1.amazonaws.com/rustc/curl-$VERSION.tar.xz \
| xz --decompress \
| tar xf -
mkdir curl-build
cd curl-build
hide_output ../curl-$VERSION/configure \
--prefix=/rustroot \
--with-ssl=/rustroot \
--disable-sspi \
... | Use https for curl when building for linux | Use https for curl when building for linux
| Shell | apache-2.0 | aidancully/rust,aidancully/rust,graydon/rust,graydon/rust,graydon/rust,graydon/rust,aidancully/rust,graydon/rust,aidancully/rust,aidancully/rust,aidancully/rust,graydon/rust | shell | ## Code Before:
set -ex
source shared.sh
VERSION=7.51.0
curl http://cool.haxx.se/download/curl-$VERSION.tar.bz2 | tar xjf -
mkdir curl-build
cd curl-build
hide_output ../curl-$VERSION/configure \
--prefix=/rustroot \
--with-ssl=/rustroot \
--disable-sspi \
--disable-gopher \
--disable-... |
1ef682ecbc58d4568331f631e211853a91e71f2d | compiler/src/dotty/tools/dotc/fromtasty/TASTYCompiler.scala | compiler/src/dotty/tools/dotc/fromtasty/TASTYCompiler.scala | package dotty.tools
package dotc
package fromtasty
import core._
import Contexts._
import Phases.Phase
import dotty.tools.dotc.transform.Pickler
class TASTYCompiler extends Compiler {
override def phases: List[List[Phase]] = {
val backendPhases = super.phases.dropWhile {
case List(_: Pickler) => false
... | package dotty.tools
package dotc
package fromtasty
import core._
import Contexts._
import Phases.Phase
import dotty.tools.dotc.transform.Pickler
class TASTYCompiler extends Compiler {
override def phases: List[List[Phase]] = {
val backendPhases = super.phases.dropWhile {
case List(_: Pickler) => false
... | Read original positions in tasty compiler | Read original positions in tasty compiler
| Scala | apache-2.0 | som-snytt/dotty,lampepfl/dotty,sjrd/dotty,dotty-staging/dotty,dotty-staging/dotty,sjrd/dotty,som-snytt/dotty,lampepfl/dotty,sjrd/dotty,lampepfl/dotty,dotty-staging/dotty,som-snytt/dotty,som-snytt/dotty,lampepfl/dotty,sjrd/dotty,dotty-staging/dotty,dotty-staging/dotty,lampepfl/dotty,sjrd/dotty,som-snytt/dotty | scala | ## Code Before:
package dotty.tools
package dotc
package fromtasty
import core._
import Contexts._
import Phases.Phase
import dotty.tools.dotc.transform.Pickler
class TASTYCompiler extends Compiler {
override def phases: List[List[Phase]] = {
val backendPhases = super.phases.dropWhile {
case List(_: Pick... |
1f797788c1e8230e260ef394fbf0a98278816992 | app/src/main/java/miwax/java_conf/gr/jp/frugalitycalc/model/Operation.java | app/src/main/java/miwax/java_conf/gr/jp/frugalitycalc/model/Operation.java | package miwax.java_conf.gr.jp.frugalitycalc.model;
import java.math.BigDecimal;
public enum Operation {
PLUS { BigDecimal apply(BigDecimal x, BigDecimal y) {return x.add(y);} },
MINUS { BigDecimal apply(BigDecimal x, BigDecimal y) {return x.subtract(y);} },
MULTIPLE { BigDecimal apply(BigDecimal x,... | package miwax.java_conf.gr.jp.frugalitycalc.model;
import java.math.BigDecimal;
import java.math.MathContext;
public enum Operation {
PLUS { BigDecimal apply(BigDecimal x, BigDecimal y) {return x.add(y);} },
MINUS { BigDecimal apply(BigDecimal x, BigDecimal y) {return x.subtract(y);} },
MULTIPLE { ... | Change the accuracy of the division to the IEEE 754R Decimal28 | Change the accuracy of the division to the IEEE 754R Decimal28
| Java | mit | tomoya0x00/FrugalityCalc | java | ## Code Before:
package miwax.java_conf.gr.jp.frugalitycalc.model;
import java.math.BigDecimal;
public enum Operation {
PLUS { BigDecimal apply(BigDecimal x, BigDecimal y) {return x.add(y);} },
MINUS { BigDecimal apply(BigDecimal x, BigDecimal y) {return x.subtract(y);} },
MULTIPLE { BigDecimal app... |
c28bc55c7a14acb1e5841f8dab565ca11d2ba8de | roles/syslog/common/tasks/main.yml | roles/syslog/common/tasks/main.yml | ---
- name: Install syslog-ng
action: apt pkg=syslog-ng state=installed
| ---
- name: Install syslog-ng
action: apt pkg={{ item }} state=installed
with_items:
- syslog-ng-core
- syslog-ng
| Install syslog-ng-core before syslog-ng to work around a dependency resolution bug in Ubuntu | Install syslog-ng-core before syslog-ng to work around a dependency resolution bug in Ubuntu
| YAML | mit | Pitt-CSC/ansible,RitwikGupta/ansible,RitwikGupta/ansible,RitwikGupta/ansible,Pitt-CSC/ansible,Pitt-CSC/ansible | yaml | ## Code Before:
---
- name: Install syslog-ng
action: apt pkg=syslog-ng state=installed
## Instruction:
Install syslog-ng-core before syslog-ng to work around a dependency resolution bug in Ubuntu
## Code After:
---
- name: Install syslog-ng
action: apt pkg={{ item }} state=installed
with_items:
- syslog-ng... |
3597c56abaa1eec9499db559699d7ea9fdd1dacd | devops/jobs/JenkinsHeartbeat.groovy | devops/jobs/JenkinsHeartbeat.groovy | /*
Job to check if Jenkins is successfully running
*/
package devops.jobs
import javaposse.jobdsl.dsl.DslFactory
class JenkinsHeartbeat{
public static job( DslFactory dslFactory, Map extraVars){
dslFactory.job(extraVars.get("FOLDER_NAME","Monitoring") + "/jenkins-heartbeat") {
description("... | /*
Job to check if Jenkins is successfully running
*/
package devops.jobs
import javaposse.jobdsl.dsl.DslFactory
import static org.edx.jenkins.dsl.Constants.common_logrotator
import static org.edx.jenkins.dsl.Constants.common_wrappers
class JenkinsHeartbeat{
public static job( DslFactory dslFactory, Map extraV... | Add logging and common wrappers to heratbeat. | Add logging and common wrappers to heratbeat.
| Groovy | agpl-3.0 | edx/jenkins-job-dsl | groovy | ## Code Before:
/*
Job to check if Jenkins is successfully running
*/
package devops.jobs
import javaposse.jobdsl.dsl.DslFactory
class JenkinsHeartbeat{
public static job( DslFactory dslFactory, Map extraVars){
dslFactory.job(extraVars.get("FOLDER_NAME","Monitoring") + "/jenkins-heartbeat") {
... |
50367a2d73c395a85bb7dae058f9435be6ad7c36 | vtimshow/__init__.py | vtimshow/__init__.py | import logging
import os
import vitables
_defaults = dict(
AUTHOR = "Keith F Prussing",
AUTHOR_EMAIL = "kprussing74@gmail.com",
LICENSE = "MIT",
PLUGIN_CLASS = "VtImageViewer",
PLUGIN_NAME = "Image Viewer",
COMMENT = "Display data sets as images",
VERSION = "{VERSION!s}",
UID = "image_... | import logging
import os
import vitables
_defaults = dict(
AUTHOR = "Keith F Prussing",
AUTHOR_EMAIL = "kprussing74@gmail.com",
LICENSE = "MIT",
PLUGIN_CLASS = "VtImageViewer",
PLUGIN_NAME = "Image Viewer",
COMMENT = "Display data sets as images",
VERSION = "{VERSION!s}",
UID = "image_... | Add method to log to console | Add method to log to console
Add a method to set the GUI logging window to be the stream handler for
my plug in.
| Python | mit | kprussing/vtimshow | python | ## Code Before:
import logging
import os
import vitables
_defaults = dict(
AUTHOR = "Keith F Prussing",
AUTHOR_EMAIL = "kprussing74@gmail.com",
LICENSE = "MIT",
PLUGIN_CLASS = "VtImageViewer",
PLUGIN_NAME = "Image Viewer",
COMMENT = "Display data sets as images",
VERSION = "{VERSION!s}",
... |
7f49fef2ab4f895ccefef2b00a87e5295ce98fc8 | public/js/index.js | public/js/index.js | var plugins = require('./plugins')
var React = require('react')
var router = require('../components/router.jsx')
React.renderComponent(router, document.body);
| var plugins = require('./plugins')
// React init
var React = require('react')
React.initializeTouchEvents(true)
// Initialize the app
var router = require('../components/router.jsx')
React.renderComponent(router, document.body);
| Initialize touch events in react | Initialize touch events in react | JavaScript | mit | CzechHackathon2014/zahrajeme-cz | javascript | ## Code Before:
var plugins = require('./plugins')
var React = require('react')
var router = require('../components/router.jsx')
React.renderComponent(router, document.body);
## Instruction:
Initialize touch events in react
## Code After:
var plugins = require('./plugins')
// React init
var React = require('react')... |
144dd2d57d700712f8a138b5674391d22fc049c7 | saturn/app/Travel.php | saturn/app/Travel.php | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Travel extends Model
{
protected $dates = ["created_at", "updated_at", "departure_date"];
public function spaceship()
{
return $this->belongsTo(Spaceship::class);
}
public function delegates()
{
return $this-... | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Travel extends Model
{
protected $dates = ["created_at", "updated_at", "departure_date"];
public function spaceship()
{
return $this->belongsTo(Spaceship::class);
}
public function delegates()
{
return $this-... | Fix timestamps handling in passenger pivot table | Fix timestamps handling in passenger pivot table
| PHP | mit | code16/sharp,code16/sharp,code16/sharp | php | ## Code Before:
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Travel extends Model
{
protected $dates = ["created_at", "updated_at", "departure_date"];
public function spaceship()
{
return $this->belongsTo(Spaceship::class);
}
public function delegates()
{
... |
327b8b2f545bc28b401af9eaac930c9271a4939e | app/assets/stylesheets/components/_header.scss | app/assets/stylesheets/components/_header.scss | // Header component for the main website
//
// Styleguide header
.header {
position:relative;
padding: $baseline-unit*4 0 0 0;
border-bottom: $baseline-unit/2 solid $color-green-light;
background: $color-green-primary;
background: $color-green-primary image_url('stripes.svg') 90% 0 no-repeat;
}
| // Header component for the main website
//
// Styleguide header
.header {
position: relative;
padding: $baseline-unit*4 0 0 0;
border-bottom: $baseline-unit/2 solid $color-green-light;
background: $color-green-primary;
@if $responsive == true {
background-size: contain;
@include respond-to($mq-l) {... | Add background image to header. | Add background image to header.
| SCSS | mit | moneyadviceservice/frontend,moneyadviceservice/frontend,moneyadviceservice/frontend,moneyadviceservice/frontend | scss | ## Code Before:
// Header component for the main website
//
// Styleguide header
.header {
position:relative;
padding: $baseline-unit*4 0 0 0;
border-bottom: $baseline-unit/2 solid $color-green-light;
background: $color-green-primary;
background: $color-green-primary image_url('stripes.svg') 90% 0 no-repeat;... |
760f083f0c0a71b6bb5bdb3228867f6a0ed85c4f | app/controllers/concerns/backend/translatable_controller.rb | app/controllers/concerns/backend/translatable_controller.rb | module Concerns
module Backend
module TranslatableController
extend ActiveSupport::Concern
included do
before_action :find_models, only: [:edit_translation, :update_translation]
helper_method :translatable_path
end
def update_translation
if @translation.validate(p... | module Concerns
module Backend
module TranslatableController
extend ActiveSupport::Concern
included do
before_action :find_models, only: [:edit_translation, :update_translation]
helper_method :translatable_path
end
def update_translation
if @translation.validate(p... | Exclude the decorator from the model name. | Exclude the decorator from the model name.
| Ruby | mit | udongo/udongo,udongo/udongo,udongo/udongo | ruby | ## Code Before:
module Concerns
module Backend
module TranslatableController
extend ActiveSupport::Concern
included do
before_action :find_models, only: [:edit_translation, :update_translation]
helper_method :translatable_path
end
def update_translation
if @transl... |
76b67bb4b238dfabf9b9538dc1f26d0d4889dd89 | src/components/Footer/Footer.css | src/components/Footer/Footer.css | /**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
@import '../variables.css';
.root {
background: white;
... | /**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
@import '../variables.css';
.root {
background: white;
... | Fix link color in footer | Fix link color in footer
| CSS | mit | Skoli-Code/DerangeonsLaChambre | css | ## Code Before:
/**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
@import '../variables.css';
.root {
bac... |
e3a4b35872ec9d69253cfd69af236cfd0be530a6 | app-backend/database/src/main/scala/com/azavea/rf/database/fields/UserFkVisibleFields.scala | app-backend/database/src/main/scala/com/azavea/rf/database/fields/UserFkVisibleFields.scala | package com.azavea.rf.database.fields
import com.azavea.rf.database.ExtendedPostgresDriver.api._
import com.azavea.rf.database.query.UserQueryParameters
import com.azavea.rf.database.tables.Users
import com.azavea.rf.datamodel.{User, Visibility}
import slick.lifted.ForeignKeyQuery
trait UserFkVisibleFields extends U... | package com.azavea.rf.database.fields
import com.azavea.rf.database.ExtendedPostgresDriver.api._
import com.azavea.rf.database.query.UserQueryParameters
import com.azavea.rf.database.tables.Users
import com.azavea.rf.datamodel.{User, Visibility}
import slick.lifted.ForeignKeyQuery
trait UserFkVisibleFields extends U... | Allow root org override for user visibility filters | Allow root org override for user visibility filters
This relaxes the restriction of visibility of objects to allow root
users to see objects from all organizations.
| Scala | apache-2.0 | aaronxsu/raster-foundry,azavea/raster-foundry,azavea/raster-foundry,raster-foundry/raster-foundry,aaronxsu/raster-foundry,aaronxsu/raster-foundry,raster-foundry/raster-foundry,azavea/raster-foundry,raster-foundry/raster-foundry,azavea/raster-foundry,azavea/raster-foundry,aaronxsu/raster-foundry | scala | ## Code Before:
package com.azavea.rf.database.fields
import com.azavea.rf.database.ExtendedPostgresDriver.api._
import com.azavea.rf.database.query.UserQueryParameters
import com.azavea.rf.database.tables.Users
import com.azavea.rf.datamodel.{User, Visibility}
import slick.lifted.ForeignKeyQuery
trait UserFkVisible... |
60895adb980455249d11662b8b670d759330f6cc | src/support/src/arm.rs | src/support/src/arm.rs | use core::intrinsics::*;
use core::ops::FnOnce;
#[cfg(not(test))]
#[inline(always)]
/// NOP instruction
pub fn nop() {
unsafe { asm!("nop" :::: "volatile"); }
}
#[cfg(test)]
/// NOP instruction (mock)
pub fn nop() {
}
#[cfg(not(test))]
#[inline(always)]
/// WFI instruction
pub unsafe fn wfi() {
asm!("wfi" ::::... | use core::intrinsics::*;
use core::ops::FnOnce;
#[cfg(not(test))]
#[inline(always)]
/// NOP instruction
pub fn nop() {
unsafe { asm!("nop" :::: "volatile"); }
}
#[cfg(test)]
/// NOP instruction (mock)
pub fn nop() {
}
#[cfg(not(test))]
#[inline(always)]
/// WFI instruction
pub unsafe fn wfi() {
asm!("wfi" ::::... | Remove stale definitions for __aeabi_unwind_cpp_* | Remove stale definitions for __aeabi_unwind_cpp_*
| Rust | apache-2.0 | google/tock-on-titan,google/tock-on-titan,google/tock-on-titan | rust | ## Code Before:
use core::intrinsics::*;
use core::ops::FnOnce;
#[cfg(not(test))]
#[inline(always)]
/// NOP instruction
pub fn nop() {
unsafe { asm!("nop" :::: "volatile"); }
}
#[cfg(test)]
/// NOP instruction (mock)
pub fn nop() {
}
#[cfg(not(test))]
#[inline(always)]
/// WFI instruction
pub unsafe fn wfi() {
... |
c6eb7447e73d895d70c4c3cc0edccc2d5301e2f6 | spec/decorators/redirect_decorator_spec.rb | spec/decorators/redirect_decorator_spec.rb | require 'rails_helper'
describe RedirectDecorator do
it '#respond_to?' do
expect(build(:redirect).decorate).to respond_to(
:status_code_collection, :summary
)
end
end
| require 'rails_helper'
describe RedirectDecorator do
let(:instance) { build(:redirect).decorate }
it '#status_code_collection' do
expect(instance.status_code_collection).to eq [
['301 (Moved Permanently)', '301'],
... | Add better specs for the redirect decorator. | Add better specs for the redirect decorator.
| Ruby | mit | udongo/udongo,udongo/udongo,udongo/udongo | ruby | ## Code Before:
require 'rails_helper'
describe RedirectDecorator do
it '#respond_to?' do
expect(build(:redirect).decorate).to respond_to(
:status_code_collection, :summary
)
end
end
## Instruction:
Add better specs for the redirect decorator.
## Code After:
require 'rails_helper'
describe Redirec... |
6024838bdf76586bf8693286f4873eaea5f82687 | app/views/loudmouth/comments/_comment_form.html.haml | app/views/loudmouth/comments/_comment_form.html.haml | :javascript
function prepareTextField(e, msg) {
if (e) {
if (e.value == msg) {
e.value = '';
}
}
}
function revertTextField(e, msg) {
if (e)
if (e.value == '') {
e.value = msg;
}
}
%h3 New Comment
= form_for topic_comment.to_sym do |f|
%table
%tr
... | :javascript
msg = "#{new_comment_content}"
function prepareTextField(e) {
if (e) {
if (e.value == msg) {
e.value = '';
}
}
}
function revertTextField(e) {
if (e)
if (e.value == '') {
e.value = msg;
}
}
%h3 New Comment
= form_for topic_comment.to_sym do |f|... | Make msg a global javascript var just for that page and pre-populate it. | Make msg a global javascript var just for that page and pre-populate it.
| Haml | mit | pglombardo/loudmouth | haml | ## Code Before:
:javascript
function prepareTextField(e, msg) {
if (e) {
if (e.value == msg) {
e.value = '';
}
}
}
function revertTextField(e, msg) {
if (e)
if (e.value == '') {
e.value = msg;
}
}
%h3 New Comment
= form_for topic_comment.to_sym do |f|
%tab... |
d603bea6e9869e749b7122112351e532196b8c5a | generator/generator.go | generator/generator.go | package generator
import "os"
// Generator is in charge of generating files for packages.
type Generator struct {
filename string
}
// NewGenerator creates a new generator that can save on the given filename.
func NewGenerator(filename string) *Generator {
return &Generator{filename}
}
// Generate writes the file... | package generator
import (
"fmt"
"os"
)
// Generator is in charge of generating files for packages.
type Generator struct {
filename string
}
// NewGenerator creates a new generator that can save on the given filename.
func NewGenerator(filename string) *Generator {
return &Generator{filename}
}
// Generate wri... | Delete autogenerated kallax.go if generation failed | Delete autogenerated kallax.go if generation failed
| Go | mit | src-d/go-kallax | go | ## Code Before:
package generator
import "os"
// Generator is in charge of generating files for packages.
type Generator struct {
filename string
}
// NewGenerator creates a new generator that can save on the given filename.
func NewGenerator(filename string) *Generator {
return &Generator{filename}
}
// Generate... |
d3e18b83b2093637adfce4ccaa8c1cec4aee7e2c | public/app/services/toasterutils.service.js | public/app/services/toasterutils.service.js | (function () {
'use strict';
angular
.module('PLMApp')
.factory('toasterUtils', toasterUtils);
toasterUtils.$inject = ['toaster', '$timeout'];
function toasterUtils(toaster, $timeout) {
var service = {
info: info,
success: success,
warning: warning,
error: erro... | (function () {
'use strict';
angular
.module('PLMApp')
.factory('toasterUtils', toasterUtils);
toasterUtils.$inject = ['toaster', '$timeout'];
function toasterUtils(toaster, $timeout) {
var service = {
info: info,
success: success,
warning: warning,
error: erro... | Add parameter setting toaster's duration | Add parameter setting toaster's duration
| JavaScript | agpl-3.0 | BuggleInc/webPLM,BuggleInc/webPLM,polux/webPLM,MatthieuNICOLAS/webPLM,BuggleInc/webPLM,polux/webPLM,MatthieuNICOLAS/webPLM,BuggleInc/webPLM,polux/webPLM,polux/webPLM,MatthieuNICOLAS/webPLM,BuggleInc/webPLM,MatthieuNICOLAS/webPLM,polux/webPLM | javascript | ## Code Before:
(function () {
'use strict';
angular
.module('PLMApp')
.factory('toasterUtils', toasterUtils);
toasterUtils.$inject = ['toaster', '$timeout'];
function toasterUtils(toaster, $timeout) {
var service = {
info: info,
success: success,
warning: warning,... |
d12f99258248b06ec3b614e5860c6ad4fdd379a3 | app/controllers/mail_conversations_controller.rb | app/controllers/mail_conversations_controller.rb | class MailConversationsController < ApplicationController
def index
@mailbox_conversations = current_user.mailbox.conversations
end
def new
@recipients = Guide.where.not("id = ?", current_user.id)
end
def create
recipient = Guide.find(params[:guide_id])
receipt = current_user.send_message(r... | class MailConversationsController < ApplicationController
def index
@mailbox_conversations = current_user.mailbox.conversations
end
def inbox
end
def outbox
end
def trashcan
end
def new
@recipients = Guide.where.not("id = ?", current_user.id)
end
def create
recipient = Guide.find... | Create inbox,outbox, and trashcan routes. | Create inbox,outbox, and trashcan routes.
| Ruby | mit | erinc35/GuideMe,erinc35/GuideMe,erinc35/GuideMe | ruby | ## Code Before:
class MailConversationsController < ApplicationController
def index
@mailbox_conversations = current_user.mailbox.conversations
end
def new
@recipients = Guide.where.not("id = ?", current_user.id)
end
def create
recipient = Guide.find(params[:guide_id])
receipt = current_use... |
7aa46cae7e352fb1bfb6b2453a66e2f58c4f93aa | assets/page/___page___/js/script.___page___.js | assets/page/___page___/js/script.___page___.js | 'use strict';
/*
* Use for Async operations before displaying page
*
module.exports.prepare = function() {
this.done({});
};
*/
/*
* Compute Vue parameters
*
module.exports.vue = function() {
return {};
};
*/
/*
* Use as page starting point
*
module.exports.start = function() {
};
*/
| 'use strict';
/*
* Use for Async operations before displaying page
*
module.exports.prepare = function() {
this.done({});
};
*/
/*
* Compute Vue parameters
*
module.exports.vue = function() {
return {};
};
* or
module.exports.vue = {
};
*/
/*
* Use as page starting point
*
module.exports.start = function... | Update Layout assets to latest specifications | feat: Update Layout assets to latest specifications
| JavaScript | mit | quasarframework/quasar-cli,rstoenescu/quasar-cli | javascript | ## Code Before:
'use strict';
/*
* Use for Async operations before displaying page
*
module.exports.prepare = function() {
this.done({});
};
*/
/*
* Compute Vue parameters
*
module.exports.vue = function() {
return {};
};
*/
/*
* Use as page starting point
*
module.exports.start = function() {
};
*/
## ... |
86c1ced2f5b76aa25a023d342b2379411af94754 | tmpl.go | tmpl.go | package goutils
import (
"bytes"
"text/template"
"github.com/hoveychen/go-utils/gomap"
)
var (
textTmplCache = gomap.New()
)
func Sprintt(textTmpl string, data interface{}) string {
ret := textTmplCache.GetOrCreate(textTmpl, func() interface{} {
tpl, err := template.New("test").Parse(textTmpl)
if err != ni... | package goutils
import (
"bytes"
"text/template"
"github.com/hoveychen/go-utils/gomap"
)
var (
textTmplCache = gomap.New()
)
type Var map[string]interface{}
func Sprintt(textTmpl string, data interface{}) string {
ret := textTmplCache.GetOrCreate(textTmpl, func() interface{} {
tpl, err := template.New("test... | Add predefined type for temporary varibles. | [Tmpl] Add predefined type for temporary varibles.
| Go | apache-2.0 | hoveychen/go-utils | go | ## Code Before:
package goutils
import (
"bytes"
"text/template"
"github.com/hoveychen/go-utils/gomap"
)
var (
textTmplCache = gomap.New()
)
func Sprintt(textTmpl string, data interface{}) string {
ret := textTmplCache.GetOrCreate(textTmpl, func() interface{} {
tpl, err := template.New("test").Parse(textTmpl... |
7afe91c7bd3cd710d96761093ae571ad2dc4d993 | RunSuite.txt | RunSuite.txt | python downloadsec.py ../sectorlist.txt sectors
# generate the maps and data
pypy route.py --borders erode --min-btn 15 --route-reuse 15 --routes trade --output ../maps ../sectors/*.sec
# Upload the sector summaries.
python WikiUploadPDF.py | python PyRoute/downloadsec.py sectorlist.txt ../sectors
# generate the maps and data
nohup pypy PyRoute/route.py --borders erode --min-btn 15 --pop-code fixed --routes trade --max-jump=5 --output /root/maps /root/sectors/*.sec > route.log 2>&1 &
# Upload the sector summaries.
python PyRoute/WikiUploadPDF.py
# Upd... | Update paths to reflect the run location correctly. | Update paths to reflect the run location correctly. | Text | mit | makhidkarun/traveller_pyroute | text | ## Code Before:
python downloadsec.py ../sectorlist.txt sectors
# generate the maps and data
pypy route.py --borders erode --min-btn 15 --route-reuse 15 --routes trade --output ../maps ../sectors/*.sec
# Upload the sector summaries.
python WikiUploadPDF.py
## Instruction:
Update paths to reflect the run location c... |
b68c362e3baa518a5890fc90dc87d74790bc35a2 | .travis.yml | .travis.yml | language: node_js
node_js:
- "node"
- "6"
- "4"
env:
- REACT_VERSION=0
- REACT_VERSION=15
- REACT_VERSION=*
before_install:
- 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ]; then npm install -g npm@1.3 ; elif [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then case "$(npm --version)" in 1.*) npm install -g npm@1.4.28 ;... | language: node_js
node_js:
- "node"
- "6"
- "4"
env:
- REACT_VERSION=0
- REACT_VERSION=15
- REACT_VERSION=*
before_install:
- 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ]; then npm install -g npm@1.3 ; elif [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then case "$(npm --version)" in 1.*) npm install -g npm@1.4.28 ;... | Revert "Re-enable caching of node_modules." | Revert "Re-enable caching of node_modules."
This reverts commit 8d5202aab7e79a2326b7d3c058729409b232eeb4.
| YAML | mit | wimpyprogrammer/react-component-update | yaml | ## Code Before:
language: node_js
node_js:
- "node"
- "6"
- "4"
env:
- REACT_VERSION=0
- REACT_VERSION=15
- REACT_VERSION=*
before_install:
- 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ]; then npm install -g npm@1.3 ; elif [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then case "$(npm --version)" in 1.*) npm install... |
bf7702abea8d368ae087936f672bdd2abcb7dc11 | run_tests.sh | run_tests.sh |
(cd wikiconv/ingest_revisions; bazel test --test_output=streamed ...)
(cd wikiconv/conversation_reconstruction; bazel test --test_output=streamed ...)
|
(cd wikiconv/conversation_reconstruction; bazel test --test_output=streamed ...)
| Remove injest directory, it has not tests. | Remove injest directory, it has not tests.
| Shell | apache-2.0 | conversationai/wikidetox,conversationai/wikidetox,conversationai/wikidetox,conversationai/wikidetox,conversationai/wikidetox | shell | ## Code Before:
(cd wikiconv/ingest_revisions; bazel test --test_output=streamed ...)
(cd wikiconv/conversation_reconstruction; bazel test --test_output=streamed ...)
## Instruction:
Remove injest directory, it has not tests.
## Code After:
(cd wikiconv/conversation_reconstruction; bazel test --test_output=streame... |
9c4584d8c9503d804626bfe3954d49cd5b8fa79e | lib/tok/controller.rb | lib/tok/controller.rb | module Tok
module Controller
extend ActiveSupport::Concern
helpers = %w(authenticate! current_user model model_name model_class)
included do
helper_method(*helpers)
hide_action(*helpers)
end
def authenticate!
authentication_required unless authorized?
end
def curren... | module Tok
module Controller
extend ActiveSupport::Concern
helpers = %w(authenticate! current_user model model_name model_class)
included do
helper_method(*helpers)
hide_action(*helpers)
end
def authenticate!
authentication_required unless authorized?
end
def curren... | Read token appropriately when sent through headers | Read token appropriately when sent through headers
| Ruby | mit | ahazem/tok,ahazem/tok | ruby | ## Code Before:
module Tok
module Controller
extend ActiveSupport::Concern
helpers = %w(authenticate! current_user model model_name model_class)
included do
helper_method(*helpers)
hide_action(*helpers)
end
def authenticate!
authentication_required unless authorized?
end... |
22dce0ca7c3317d466127f21d68f8c14331fe12e | __tests__/search-test.js | __tests__/search-test.js | 'use strict';
jest.dontMock('../lib/search.jsx');
var React = require('react/addons');
var TestUtils = React.addons.TestUtils;
var Search = require('../lib/search.jsx');
describe('Search', function() {
});
| 'use strict';
jest.dontMock('../lib/search.jsx');
var React = require('react/addons');
var TestUtils = React.addons.TestUtils;
var Search = require('../lib/search.jsx');
describe('Search', function() {
it('should have a dropdown with default `all` option', function() {
var search = TestUtils.renderInto... | Add initial tests for search | Add initial tests for search
Related to #3.
| JavaScript | mit | megawidget/reactabular,adjohnson916/reactabular,reactabular/reactabular,rdoh/reactabular,reactabular/reactabular,adjohnson916/reactabular,kaushik94/reactabular,kaushik94/reactabular,megawidget/reactabular | javascript | ## Code Before:
'use strict';
jest.dontMock('../lib/search.jsx');
var React = require('react/addons');
var TestUtils = React.addons.TestUtils;
var Search = require('../lib/search.jsx');
describe('Search', function() {
});
## Instruction:
Add initial tests for search
Related to #3.
## Code After:
'use strict';
... |
ef2a8e3dc71fbe04ef7c4421bdc0fa01a3bb1103 | _layouts/test.html | _layouts/test.html | {% include head.html %}
{% include nav.html %}
{% include header.html %}
{% include indiv_post.html %}
| {% include head.html %}
{% include nav.html %}
{% include header.html %}
{% include indiv_post.html %}
{% include modals.html %}
{% include js.html %}
| Add modals and js to get navbar to render properly. WILL CHANGE HORRIBLE FILENAME | Add modals and js to get navbar to render properly. WILL CHANGE HORRIBLE FILENAME
| HTML | mit | SputterPuttRedux/SputterPuttRedux.github.io,SputterPuttRedux/SputterPuttRedux.github.io | html | ## Code Before:
{% include head.html %}
{% include nav.html %}
{% include header.html %}
{% include indiv_post.html %}
## Instruction:
Add modals and js to get navbar to render properly. WILL CHANGE HORRIBLE FILENAME
## Code After:
{% include head.html %}
{% include nav.html %}
{% include header.html %}
{% include i... |
b4eca59ff185afb6efe8de7a9b42ad711cb34246 | proto/GoogleMapsDirection.proto | proto/GoogleMapsDirection.proto | message GoogleMapsDirection {
optional string distance = 1;
required string direction = 2;
required string eta = 3;
required TurnDirection tdirection = 4;
enum TurnDirection {
Right = 0;
Left = 1;
Straight = 2;
TurnAround = 3;
}
}
| message GoogleMapsDirection {
required TurnDirection tdirection = 4;
required string distance = 1;
enum TurnDirection {
Right = 0;
Left = 1;
Straight = 2;
TurnAround = 3;
}
}
| Update proto to deal with garbage BT adapter. | Update proto to deal with garbage BT adapter.
| Protocol Buffer | mit | cujomalainey/MapsUp,cujomalainey/MapsUp,cujomalainey/MapsUp | protocol-buffer | ## Code Before:
message GoogleMapsDirection {
optional string distance = 1;
required string direction = 2;
required string eta = 3;
required TurnDirection tdirection = 4;
enum TurnDirection {
Right = 0;
Left = 1;
Straight = 2;
TurnAround = 3;
}
}
## Instruction:
Update proto to deal with g... |
44f7401a53d1952b072189b97724869b5ed21f3b | README.md | README.md | smoothscroll.js
=================
Polyfill for
* window.scroll(x, y, behavior);
* window.scrollTo(x, y, behavior);
* window.scrollBy(x, y, behavior);
* element.scrollIntoView(toTop, behavior); (incomplete)
Usage
-----
This depends upon `requestAnimationFrame`. As such you can use either
dist/smoothscroll.js if you ... | smoothscroll.js
=================
Polyfill for
* window.scroll(x, y, behavior);
* window.scrollTo(x, y, behavior);
* window.scrollBy(x, y, behavior);
* element.scrollIntoView(toTop, behavior); (incomplete)
Usage
-----
This depends upon `requestAnimationFrame`. As such you can use either
dist/smoothscroll.js if you ... | Add site’s using it in the wild | Add site’s using it in the wild | Markdown | mit | jankuca/smoothscroll,DylanPiercey/smoothscroll,jankuca/smoothscroll,iamdustan/smoothscroll,iamdustan/smoothscroll,DylanPiercey/smoothscroll | markdown | ## Code Before:
smoothscroll.js
=================
Polyfill for
* window.scroll(x, y, behavior);
* window.scrollTo(x, y, behavior);
* window.scrollBy(x, y, behavior);
* element.scrollIntoView(toTop, behavior); (incomplete)
Usage
-----
This depends upon `requestAnimationFrame`. As such you can use either
dist/smooths... |
377b91f2fc5490e2f29d64346314c890e22c27b2 | snap/snapcraft.yaml | snap/snapcraft.yaml | name: solium
version: git
summary: A customizable, stand-alone linter for Ethereum Solidity
description: |
Solium is a linter for Solidity which uses Abstract Syntax Trees and allows
the user to enable/disable existing rules and add their own ones!
grade: devel # must be 'stable' to release into candidate/stable c... | name: solium
version: git
summary: A customizable, stand-alone linter for Ethereum Solidity
description: |
Solium is a linter for Solidity which uses Abstract Syntax Trees and allows
the user to enable/disable existing rules and add their own ones!
grade: stable
confinement: strict
apps:
solium:
command: so... | Update the snap to allow stable releases | Update the snap to allow stable releases | YAML | mit | duaraghav8/Solium | yaml | ## Code Before:
name: solium
version: git
summary: A customizable, stand-alone linter for Ethereum Solidity
description: |
Solium is a linter for Solidity which uses Abstract Syntax Trees and allows
the user to enable/disable existing rules and add their own ones!
grade: devel # must be 'stable' to release into ca... |
c7f43982890adcd6319945474f34c40049ff87d4 | update.sh | update.sh |
echo "Starting Grails 3 Plugins Update..."
if ! git diff-index --quiet HEAD --; then
echo "FAILED: There are uncommited changes"
exit 1
fi
BRANCH=$(git symbolic-ref --short -q HEAD)
if [ "$BRANCH" != "master" ]; then
echo "FAILED: Run on master branch"
exit 1
fi
git remote update
LOCAL=$(git rev-pa... |
echo "Starting Grails 3 Plugins Update..."
if ! git diff-index --quiet HEAD --; then
echo "FAILED: There are uncommited changes"
exit 1
fi
BRANCH=$(git symbolic-ref --short -q HEAD)
if [ "$BRANCH" != "master" ]; then
echo "FAILED: Run on master branch"
exit 1
fi
git remote update
LOCAL=$(git rev-pa... | Fix issue with git diff-index | Fix issue with git diff-index
| Shell | apache-2.0 | sheehan/grails3-plugins,sheehan/grails3-plugins,sheehan/grails3-plugins | shell | ## Code Before:
echo "Starting Grails 3 Plugins Update..."
if ! git diff-index --quiet HEAD --; then
echo "FAILED: There are uncommited changes"
exit 1
fi
BRANCH=$(git symbolic-ref --short -q HEAD)
if [ "$BRANCH" != "master" ]; then
echo "FAILED: Run on master branch"
exit 1
fi
git remote update
LO... |
68a621005c5a520b7a97c4cad462d43fb7f3aaed | paws/views.py | paws/views.py |
from .request import Request
from .response import Response, response
import logging
log = logging.getLogger()
class View:
def __call__(self, event, context):
request = Request(event, context)
resp = self.prepare(request)
if resp:
return resp
kwargs = event.get('path... |
from .request import Request
from .response import Response, response
import logging
log = logging.getLogger()
class View:
def __call__(self, event, context):
kwargs = event.get('pathParameters') or {}
self.dispatch(request, **kwargs)
def dispatch(self, request, **kwargs):
func = g... | Break out dispatch, and drop prepare. Easier testing | Break out dispatch, and drop prepare. Easier testing
| Python | bsd-3-clause | funkybob/paws | python | ## Code Before:
from .request import Request
from .response import Response, response
import logging
log = logging.getLogger()
class View:
def __call__(self, event, context):
request = Request(event, context)
resp = self.prepare(request)
if resp:
return resp
kwargs =... |
52f33a2b725b90b51d24067260d8fa43c4af5f9d | lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/style_sheet/fills/fill/pattern_fill.rb | lib/ooxml_parser/xlsx_parser/xlsx_data/view_model/workbook/style_sheet/fills/fill/pattern_fill.rb | module OoxmlParser
# Parsing `patternFill` tag
class PatternFill < OOXMLDocumentObject
# @return [String] pattern type
attr_accessor :pattern_type
# @return [Color] foreground color
attr_accessor :foreground_color
# @return [Color] background color
attr_accessor :background_color
# Pars... | module OoxmlParser
# Parsing `patternFill` tag
class PatternFill < OOXMLDocumentObject
# @return [String] pattern type
attr_accessor :pattern_type
# @return [Color] foreground color
attr_accessor :foreground_color
# @return [Color] background color
attr_accessor :background_color
# Pars... | Support of OoxmlColor in parse xlsx fg and bg color | Support of OoxmlColor in parse xlsx fg and bg color
| Ruby | agpl-3.0 | ONLYOFFICE/ooxml_parser | ruby | ## Code Before:
module OoxmlParser
# Parsing `patternFill` tag
class PatternFill < OOXMLDocumentObject
# @return [String] pattern type
attr_accessor :pattern_type
# @return [Color] foreground color
attr_accessor :foreground_color
# @return [Color] background color
attr_accessor :background_c... |
89ca9839ade6e75275a89d6ac6dad1dd0b1cec82 | projects/random-quotes/src/stylesheet.css | projects/random-quotes/src/stylesheet.css | body {
max-width: 100%;
height: 570px;
background-size: cover;
background-image: url('http://img11.deviantart.net/d12c/i/2011/204/7/f/rain_over_window_by_kurodot-d41dh9d.jpg');
background-attachment: fixed;
}
body {
margin: 0;
padding: 0;
}
.home h1 {
color: #001f3f;
font-size: 50px;
font-weight: ... | body {
max-width: 100%;
height: 570px;
background-size: cover;
background-image: url('rain_over_window.jpg');
background-attachment: fixed;
}
body {
margin: 0;
padding: 0;
}
.home h1 {
color: #001f3f;
font-size: 50px;
font-weight: bold;
font-family: Indie Flower;
text-align: center;
}
#button... | Change url to local file path | Change url to local file path
| CSS | mit | billdevcode/billdevcode.github.io,billdevcode/billdevcode.github.io | css | ## Code Before:
body {
max-width: 100%;
height: 570px;
background-size: cover;
background-image: url('http://img11.deviantart.net/d12c/i/2011/204/7/f/rain_over_window_by_kurodot-d41dh9d.jpg');
background-attachment: fixed;
}
body {
margin: 0;
padding: 0;
}
.home h1 {
color: #001f3f;
font-size: 50px;... |
f138c95cfb0bd88b7e43683588be6dbb9122e329 | src/responses.js | src/responses.js | // Copyright (c) Martin Costello, 2017. All rights reserved.
// Licensed under the Apache 2.0 license. See the LICENSE file in the project root for full license information.
"use strict";
const responses = {
noAudioPlayer: "Sorry, this application does not support audio streams.",
noIntent: "Sorry, I don't unders... | // Copyright (c) Martin Costello, 2017. All rights reserved.
// Licensed under the Apache 2.0 license. See the LICENSE file in the project root for full license information.
"use strict";
const responses = {
noAudioPlayer: "Sorry, this application does not support audio streams.",
noIntent: "Sorry, I don't unders... | Change the default error message | Change the default error message
Make the default error message souund a bit friendlier.
| JavaScript | apache-2.0 | martincostello/alexa-london-travel | javascript | ## Code Before:
// Copyright (c) Martin Costello, 2017. All rights reserved.
// Licensed under the Apache 2.0 license. See the LICENSE file in the project root for full license information.
"use strict";
const responses = {
noAudioPlayer: "Sorry, this application does not support audio streams.",
noIntent: "Sorry... |
0291b156804b8e46eaece040381ebf11e2882bd6 | packages/en/entangle.yaml | packages/en/entangle.yaml | homepage: ''
changelog-type: ''
hash: 5a298994fdc943e5614621d6e5f136b5be74cc36e56ab8230cf257f5bd5d858a
test-bench-deps: {}
maintainer: leonardo.taglialegne@gmail.com
synopsis: An application (and library) to convert quipper circuits into Qpmc models.
changelog: ''
basic-deps:
base: ! '>=4.0 && <5.0'
matrix: ! '>=0.... | homepage: ''
changelog-type: ''
hash: 5d23f9a8472911bf859084e04999ccef13561b723d6df6a608abd995fb5d8cac
test-bench-deps: {}
maintainer: leonardo.taglialegne@gmail.com
synopsis: An application (and library) to convert quipper circuits into Qpmc models.
changelog: ''
basic-deps:
base: ! '>=4.0 && <5.0'
matrix: ! '>=0.... | Update from Hackage at 2017-01-06T22:37:45Z | Update from Hackage at 2017-01-06T22:37:45Z
| YAML | mit | commercialhaskell/all-cabal-metadata | yaml | ## Code Before:
homepage: ''
changelog-type: ''
hash: 5a298994fdc943e5614621d6e5f136b5be74cc36e56ab8230cf257f5bd5d858a
test-bench-deps: {}
maintainer: leonardo.taglialegne@gmail.com
synopsis: An application (and library) to convert quipper circuits into Qpmc models.
changelog: ''
basic-deps:
base: ! '>=4.0 && <5.0'
... |
4ac3c0e6fb9a65b89e328675383f1d51c8506c73 | atom/init.coffee | atom/init.coffee |
fs = require 'fs'
path = require 'path'
DEFAULT_WORKON_HOME = path.join(process.env.HOME, '.virtualenvs')
# Get path to directory containing all Python virtualenvs
getVirtualenvHome = ->
if process.env.WORKON_HOME
return process.env.WORKON_HOME
else
return DEFAULT_WORKON_HOME
# Activate Python virtual... |
fs = require 'fs'
path = require 'path'
DEFAULT_WORKON_HOME = path.join(process.env.HOME, '.virtualenvs')
# Get path to directory containing all Python virtualenvs
getVirtualenvHome = ->
if process.env.WORKON_HOME
return process.env.WORKON_HOME
else
return DEFAULT_WORKON_HOME
# Activate Python virtual... | Add correct virtualenv dir to PATH | Add correct virtualenv dir to PATH
| CoffeeScript | mit | caleb531/dotfiles,caleb531/dotfiles,caleb531/dotfiles,caleb531/dotfiles | coffeescript | ## Code Before:
fs = require 'fs'
path = require 'path'
DEFAULT_WORKON_HOME = path.join(process.env.HOME, '.virtualenvs')
# Get path to directory containing all Python virtualenvs
getVirtualenvHome = ->
if process.env.WORKON_HOME
return process.env.WORKON_HOME
else
return DEFAULT_WORKON_HOME
# Activat... |
abc6210b1f65ae71674f9cec48f3c351e4030f50 | README.md | README.md | Super Simple Dungeon K (K is for Crawler)
## Controls:
* Left/Right/Up/Down keys do what they are supposed to do
## Idea:
* Player needs to travel the cave to find the way out
* There are monsters and other challenges
## Features:
* Cave generation based on random walk
| Super Simple Dungeon K (K is for Crawler)
## Controls:
* Left/Right/Up/Down keys do what they are supposed to do
## Idea:
* Player needs to travel the cave to find the way out
* There are monsters and other challenges
## Features:
* Cave generation based on random walk
## References
The main menu picture is from
[... | Add references for the picture. | Add references for the picture.
| Markdown | mit | slemonide/ssdk,slemonide/ssdk | markdown | ## Code Before:
Super Simple Dungeon K (K is for Crawler)
## Controls:
* Left/Right/Up/Down keys do what they are supposed to do
## Idea:
* Player needs to travel the cave to find the way out
* There are monsters and other challenges
## Features:
* Cave generation based on random walk
## Instruction:
Add references... |
ae4dbabcb394f5e77b4d930ca77e6874b3dc76f4 | instance-app/views/contact/edit.html | instance-app/views/contact/edit.html | <label for="contact_label_<%= i %>">Label</label>
<input type="text" id="contact_label_<%= i %>" name="contact_details[<%= i %>][label]" value="<%= contact.label || '' %>">
<label for="contact_type_<%= i %>">Type</label>
<input type="text" id="contact_type_<%= i %>" name="contact_details[<%= i %>][type]" value="<%= co... | <label for="contact_label_<%= i %>">Label (e.g. 'Office Address', 'Twitter Account', 'Work Phone Number', etc.)</label>
<input type="text" id="contact_label_<%= i %>" name="contact_details[<%= i %>][label]" value="<%= contact.label || '' %>">
<label for="contact_type_<%= i %>">Type (e.g. 'twitter', 'facebook', 'cell',... | Add examples for contact details fields | Add examples for contact details fields
It's completely unclear to most users what should go in the 'Label',
'Value', 'Type' and 'Note' fields should be when adding or editing a
contact detail for a person. There's an argument that we should think
more broadly about how to redesign the entry of these kinds of details,... | HTML | agpl-3.0 | Sinar/popit,Sinar/popit,mysociety/popit,Sinar/popit,mysociety/popit,Sinar/popit,openstate/popit,mysociety/popit,openstate/popit,mysociety/popit,openstate/popit,openstate/popit,mysociety/popit | html | ## Code Before:
<label for="contact_label_<%= i %>">Label</label>
<input type="text" id="contact_label_<%= i %>" name="contact_details[<%= i %>][label]" value="<%= contact.label || '' %>">
<label for="contact_type_<%= i %>">Type</label>
<input type="text" id="contact_type_<%= i %>" name="contact_details[<%= i %>][type... |
8c52f1c654821acdc88d968e55d9421191397df6 | web/views/repoman_logs.erb | web/views/repoman_logs.erb | <div class="text-center">
<h1><%=repomans[:package_id]%></h1>
<div class="btn-group btn-group-justified">
<a class="btn btn-default <%="disabled" if repomans[:current_log].nil?%>" href="#current_log">Current Ruby Target(s)</a>
<a class="btn btn-default <%="disabled" if repomans[:next_log].nil?%>" href="#next_log"... | <div class="text-center">
<h1><%=repomans[:package_id]%></h1>
<h3><%=Time.at(repomans[:time].to_i).strftime('%Y-%m-%d')%></h3>
<div class="btn-group btn-group-justified">
<a class="btn btn-default <%="disabled" if repomans[:current_log].nil?%>" href="#current_log">Current Ruby Target(s)</a>
<a class="btn btn-def... | Add timestamps to log pages | Add timestamps to log pages
| HTML+ERB | agpl-3.0 | p8952/ruby-tinderbox,p8952/ruby-tinderbox,p8952/ruby-tinderbox,p8952/ruby-tinderbox,p8952/ruby-tinderbox | html+erb | ## Code Before:
<div class="text-center">
<h1><%=repomans[:package_id]%></h1>
<div class="btn-group btn-group-justified">
<a class="btn btn-default <%="disabled" if repomans[:current_log].nil?%>" href="#current_log">Current Ruby Target(s)</a>
<a class="btn btn-default <%="disabled" if repomans[:next_log].nil?%>" ... |
181aa25a00af3c30adb8d1f13058184a8d701ecd | examples/champion.yaml | examples/champion.yaml | initial_walls:
x: [29, 50]
y: [31]
z: [264]
intra_node_shape: [64,46,512]
monitor_interval: 32
mpi_grid_shape: [2,2,2]
temporal_blocking_interval: 8
option_strings: ['stick-single-comp', 'omp', 'omp-collapse', 'no-subroutine', 'nbux2']
| initial_walls:
x: [29, 50]
y: [31]
z: [264]
intra_node_shape: [64,46,512]
monitor_interval: 32
mpi_grid_shape: [2,2,2]
temporal_blocking_interval: 8
option_strings: ['stick-single-comp', 'omp', 'omp-collapse', 'no-subroutine', 'nbux2', 'bench-fine-collection', 'bench-fine-fapp']
| Set benchmark mode in C++ | Set benchmark mode in C++
| YAML | mit | nushio3/formura,nushio3/formura,nushio3/formura,nushio3/formura,nushio3/formura,nushio3/formura | yaml | ## Code Before:
initial_walls:
x: [29, 50]
y: [31]
z: [264]
intra_node_shape: [64,46,512]
monitor_interval: 32
mpi_grid_shape: [2,2,2]
temporal_blocking_interval: 8
option_strings: ['stick-single-comp', 'omp', 'omp-collapse', 'no-subroutine', 'nbux2']
## Instruction:
Set benchmark mode in C++
## Code After:
... |
dac6e92db642e11378c440208280fd97c7c3a7ba | pillar/software_lab.sls | pillar/software_lab.sls | software:
- edubuntu-artwork
- edubuntu-desktop
- edubuntu-docs
- edubuntu-fonts
- edubuntu-menueditor
- edubuntu-wallpapers
- ubuntu-edu-preschool
- ubuntu-edu-primary
- ubuntu-edu-secondary
- ubuntu-edu-tertiary
- audacity
- geogebra-gnome
| software:
- edubuntu-artwork
- edubuntu-desktop
- edubuntu-docs
- edubuntu-fonts
- edubuntu-menueditor
- edubuntu-wallpapers
- ubuntu-edu-preschool
- ubuntu-edu-primary
- ubuntu-edu-secondary
- ubuntu-edu-tertiary
- audacity
- geogebra-gnome
- flashplugin-installer
| Add Flash player to lab hosts | Add Flash player to lab hosts
| SaltStack | mit | ic-torre-boldone/salt | saltstack | ## Code Before:
software:
- edubuntu-artwork
- edubuntu-desktop
- edubuntu-docs
- edubuntu-fonts
- edubuntu-menueditor
- edubuntu-wallpapers
- ubuntu-edu-preschool
- ubuntu-edu-primary
- ubuntu-edu-secondary
- ubuntu-edu-tertiary
- audacity
- geogebra-gnome
## Instruction:
Add Flash player to l... |
3c37580b27893e43720357108cc3d6ff10475c01 | app/models/enhancements/artefact.rb | app/models/enhancements/artefact.rb | require "artefact"
class Artefact
# Add a non-field attribute so we can pass indexable content over to Rummager
# without persisting it
attr_accessor :indexable_content
def archived?
state == 'archived'
end
def self.relatable_items
self.in_alphabetical_order.where(:kind.nin => ["completed_transac... | require "artefact"
class Artefact
# Add a non-field attribute so we can pass indexable content over to Rummager
# without persisting it
attr_accessor :indexable_content
def archived?
state == 'archived'
end
def self.relatable_items
self.in_alphabetical_order.where(:kind.nin => ["completed_transac... | Exclude archived content from 'relatable_items' | Exclude archived content from 'relatable_items'
This shrinks the list by ~5%, and might avoid creating an incorrect
relationship.
| Ruby | mit | theodi/panopticon,alphagov/panopticon,theodi/panopticon,theodi/panopticon,alphagov/panopticon,alphagov/panopticon,alphagov/panopticon,theodi/panopticon | ruby | ## Code Before:
require "artefact"
class Artefact
# Add a non-field attribute so we can pass indexable content over to Rummager
# without persisting it
attr_accessor :indexable_content
def archived?
state == 'archived'
end
def self.relatable_items
self.in_alphabetical_order.where(:kind.nin => ["c... |
cd4152a9ea9953e4f6482bd51046fd754ffb7457 | setup.py | setup.py |
from setuptools import setup, find_packages
deps = [ line.strip()
for line in open("deps.txt")
if line and not line.startswith("#") ]
metadata = dict(
name='Yaka Core',
version='0.1dev',
url='http://www.yaka.biz/',
license='LGPL',
author='Stefane Fermigier',
author_email='sf@fermigier.c... |
from setuptools import setup, find_packages
def get_deps():
import re
deps_raw = [ line.strip() for line in open("deps.txt")]
deps = []
for dep in deps_raw:
if not dep or dep.startswith("#"):
continue
m = re.search("#egg=(.*)", dep)
if m:
dep = m.group(1)
deps.append(dep)
retur... | Fix build broken by previous commit. | Fix build broken by previous commit.
| Python | lgpl-2.1 | abilian/abilian-core,abilian/abilian-core,abilian/abilian-core,abilian/abilian-core,abilian/abilian-core | python | ## Code Before:
from setuptools import setup, find_packages
deps = [ line.strip()
for line in open("deps.txt")
if line and not line.startswith("#") ]
metadata = dict(
name='Yaka Core',
version='0.1dev',
url='http://www.yaka.biz/',
license='LGPL',
author='Stefane Fermigier',
author_email... |
d648c84ec7f0cab0bfd19a19f3ce4a6aee4f0c89 | addon/helpers/get-typed-component-name.js | addon/helpers/get-typed-component-name.js | import Ember from 'ember'
const {Helper, get} = Ember
export function getTypedComponentName ([componentKeyNamesForTypes, itemTypeKey, model, componentKey, defaultKey]) {
const type = get(model, itemTypeKey)
// Get the set of key names for this type (ex. item, itemExpansion, etc.)
let componentKeyNames = get(com... | import Ember from 'ember'
const {Helper, get} = Ember
export function getTypedComponentName ([componentKeyNamesForTypes, itemTypeKey, model, componentKey, defaultKey]) {
const type = get(model, itemTypeKey)
// Get the set of key names for this type (ex. item, itemExpansion, etc.)
let componentKeyNames = type ? ... | Fix bug in helper where undefined could get passed as argument to Ember.get | Fix bug in helper where undefined could get passed as argument to Ember.get
| JavaScript | mit | ciena-frost/ember-frost-list,ciena-frost/ember-frost-list,ciena-frost/ember-frost-list | javascript | ## Code Before:
import Ember from 'ember'
const {Helper, get} = Ember
export function getTypedComponentName ([componentKeyNamesForTypes, itemTypeKey, model, componentKey, defaultKey]) {
const type = get(model, itemTypeKey)
// Get the set of key names for this type (ex. item, itemExpansion, etc.)
let componentKe... |
b86cac522ee17eae58295b8c7ba0969419859a9a | phpunit.xml.dist | phpunit.xml.dist | <?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="./tests/bootstrap.php"
colors="true">
<testsuites>
<testsuite>
<directory>tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory suffix=".php">src</directory>
</w... | <?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="./tests/bootstrap.php" colors="true">
<php>
<!-- E_ALL & ~E_NOTICE -->
<ini name="error_reporting" value="32759"/>
</php>
<testsuites>
<testsuite>
<directory>tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
... | Set error_reporting to E_ALL & ~E_NOTICE | Set error_reporting to E_ALL & ~E_NOTICE
| unknown | mit | chrisbarr/mandrill-mailer | unknown | ## Code Before:
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="./tests/bootstrap.php"
colors="true">
<testsuites>
<testsuite>
<directory>tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory suffix=".php">src</direct... |
67bb2e1ff93cd6580e2b1449aac8726940c9a06e | features/support/vcr.rb | features/support/vcr.rb | require 'vcr'
VCR.configure do |conf|
conf.hook_into :webmock
conf.cassette_library_dir = 'features/cassettes'
conf.default_cassette_options = { :record => :new_episodes }
conf.filter_sensitive_data('<***>') { ''}
end
VCR.cucumber_tags do |t|
t.tag '@live', :record => :all
end
| require 'vcr'
VCR.configure do |conf|
conf.hook_into :webmock
conf.cassette_library_dir = 'features/cassettes'
conf.default_cassette_options = { :record => :new_episodes }
conf.filter_sensitive_data('<TOKEN>') { SETTINGS['oauth_token'] }
conf.filter_sensitive_data('<BASIC_AUTH>') { SETTINGS['basic_auth'] }
e... | Remove sensitive data from feature recordings. | Remove sensitive data from feature recordings.
| Ruby | mit | durai145/github,samphilipd/github,GistBox/github,cocktail-io/github,anabhilash619/github,yaoxiaoyong/github,joshsoftware/github,wicky-info/github,befairyliu/github,davengeo/github,MalachiTatum/github,piotrmurach/github,peter-murach/github,firstval/github | ruby | ## Code Before:
require 'vcr'
VCR.configure do |conf|
conf.hook_into :webmock
conf.cassette_library_dir = 'features/cassettes'
conf.default_cassette_options = { :record => :new_episodes }
conf.filter_sensitive_data('<***>') { ''}
end
VCR.cucumber_tags do |t|
t.tag '@live', :record => :all
end
## Instructio... |
eb6deb8980fed65626d98d35be53d23515ef64ae | docs/guide/evaluator.md | docs/guide/evaluator.md |
The Evaluator TFX pipeline component performs deep analysis on the training
results for your models, to help you understand how your model performs on
subsets of your data.
* Consumes: EvalSavedModel from [Trainer](trainer.md)
* Emits: Analysis results to [TensorFlow Metadata](mlmd.md)
## Evaluator and TensorFlo... |
The Evaluator TFX pipeline component performs deep analysis on the training
results for your models, to help you understand how your model performs on
subsets of your data.
* Consumes: EvalSavedModel from [Trainer](trainer.md)
* Emits: Analysis results to [TensorFlow Metadata](mlmd.md)
## Evaluator and TensorFlo... | Add fairness_indicator_thresholds to TFX Evaluator documentation | Add fairness_indicator_thresholds to TFX Evaluator documentation
PiperOrigin-RevId: 276370760
| Markdown | apache-2.0 | tensorflow/tfx,tensorflow/tfx | markdown | ## Code Before:
The Evaluator TFX pipeline component performs deep analysis on the training
results for your models, to help you understand how your model performs on
subsets of your data.
* Consumes: EvalSavedModel from [Trainer](trainer.md)
* Emits: Analysis results to [TensorFlow Metadata](mlmd.md)
## Evaluat... |
e50c9e7c523703bebe2078830cbd598119009e7b | app/src/main/java/org/stepic/droid/storage/migration/MigrationFrom75To76.kt | app/src/main/java/org/stepic/droid/storage/migration/MigrationFrom75To76.kt | package org.stepic.droid.storage.migration
import androidx.room.migration.Migration
import androidx.sqlite.db.SupportSQLiteDatabase
import org.stepic.droid.storage.structure.DbStructureCourse
object MigrationFrom75To76 : Migration(75, 76) {
override fun migrate(db: SupportSQLiteDatabase) {
db.execSQL("ALT... | package org.stepic.droid.storage.migration
import androidx.room.migration.Migration
import androidx.sqlite.db.SupportSQLiteDatabase
import org.stepic.droid.storage.structure.DbStructureCourse
object MigrationFrom75To76 : Migration(75, 76) {
override fun migrate(db: SupportSQLiteDatabase) {
db.execSQL("ALT... | Remove visited courses from courses table upon migration | Remove visited courses from courses table upon migration
| Kotlin | apache-2.0 | StepicOrg/stepik-android,StepicOrg/stepik-android,StepicOrg/stepik-android | kotlin | ## Code Before:
package org.stepic.droid.storage.migration
import androidx.room.migration.Migration
import androidx.sqlite.db.SupportSQLiteDatabase
import org.stepic.droid.storage.structure.DbStructureCourse
object MigrationFrom75To76 : Migration(75, 76) {
override fun migrate(db: SupportSQLiteDatabase) {
... |
07295895217699e6a6337522c0abf4b2c3b9a928 | dotfiles/bash.d/rc/ruby.sh | dotfiles/bash.d/rc/ruby.sh |
export RUBYOPT=rubygems
export PATH=$HOME/.gem/ruby/1.9.1/bin:$HOME/.gem/ruby/1.8/bin:$PATH
function man {
env man $* || gem man $*
}
if which -s yard; then
alias gemyard='yard server --gems --cache --docroot=~/Library/Caches/org.yardoc/index'
fi
|
export RUBYOPT=rubygems
export PATH=$HOME/.gem/ruby/1.9.1/bin:$HOME/.gem/ruby/1.8/bin:$PATH
function man {
env man $* || gem man $*
}
if which -s yard; then
which -s thin && gemyardserver=' --server=thin'
alias gemyard='yard server --gems --cache --docroot=~/Library/Caches/org.yardoc/index'"$gemyardserver"
... | Use thin if possible for gemyard | Use thin if possible for gemyard
| Shell | mit | cdlm/infrastructure,cdlm/infrastructure,cdlm/infrastructure,cdlm/infrastructure | shell | ## Code Before:
export RUBYOPT=rubygems
export PATH=$HOME/.gem/ruby/1.9.1/bin:$HOME/.gem/ruby/1.8/bin:$PATH
function man {
env man $* || gem man $*
}
if which -s yard; then
alias gemyard='yard server --gems --cache --docroot=~/Library/Caches/org.yardoc/index'
fi
## Instruction:
Use thin if possible for gemyar... |
c8fb67a0f9665fea65b16c8e3940e7fbabf2c034 | app/test/notesTabControllerSpec.js | app/test/notesTabControllerSpec.js | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
(function () {
'use strict';
describe('Unit: NotesTabController', function () {
//Load the module with NotesTabCo... | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
(function () {
'use strict';
describe('Unit: NotesTabController', function () {
//Load the module with NotesTabCo... | Add $httpbackend test to test notesTabController | Add $httpbackend test to test notesTabController | JavaScript | mit | tahminak/tracker_web,tahminak/tracker_web | javascript | ## Code Before:
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
(function () {
'use strict';
describe('Unit: NotesTabController', function () {
//Load the module... |
8d7a55acbc9094f4ba3d9c43e16caf3515bdfbd8 | webserver/templates/greta/greta_base.html | webserver/templates/greta/greta_base.html | {% extends "base.html" %}
{% load url from future %}
{% load greta_tags %}
{% load code_tags %}
{% block page-header %}
<div class="page-header">
<h1>
{{ repo.name|clean_repo_name }} <small>{{ ref|pretty_ref|truncatechars:15 }}</small>
{% if repo.owner.competition %}
<small class="text-right ... | {% extends "base.html" %}
{% load url from future %}
{% load greta_tags %}
{% load code_tags %}
{% block page-header %}
<div class="page-header">
{% include "greta/_branch_and_tag.html" %}
<h1>
{{ repo.name|clean_repo_name }} <small>{{ ref|pretty_ref|truncatechars:15 }}</small>
{% if repo.owner.c... | Include branch and tag buttons on repo page | Include branch and tag buttons on repo page
| HTML | bsd-3-clause | siggame/webserver,siggame/webserver,siggame/webserver | html | ## Code Before:
{% extends "base.html" %}
{% load url from future %}
{% load greta_tags %}
{% load code_tags %}
{% block page-header %}
<div class="page-header">
<h1>
{{ repo.name|clean_repo_name }} <small>{{ ref|pretty_ref|truncatechars:15 }}</small>
{% if repo.owner.competition %}
<small cl... |
538eba46a493c254d44b364a051146dd387a990a | src/material-ui/MuiNumber.js | src/material-ui/MuiNumber.js | /**
* Created by steve on 15/09/15.
*/
import React from 'react';
var utils = require('../utils');
var classNames = require('classnames');
import ValidationMixin from '../ValidationMixin';
class MuiNumber extends React.Component {
render() {
let formClasses = classNames('form-group', { 'has-error' : thi... | /**
* Created by steve on 15/09/15.
*/
import React from 'react';
var utils = require('../utils');
var classNames = require('classnames');
import ValidationMixin from '../ValidationMixin';
const TextField = require('material-ui/lib/text-field');
/**
* There is no default number picker as part of Material-UI.
* Ins... | Add number input to mui | Add number input to mui
| JavaScript | mit | Codafication/react-schema-form,networknt/react-schema-form,Codafication/react-schema-form,networknt/react-schema-form | javascript | ## Code Before:
/**
* Created by steve on 15/09/15.
*/
import React from 'react';
var utils = require('../utils');
var classNames = require('classnames');
import ValidationMixin from '../ValidationMixin';
class MuiNumber extends React.Component {
render() {
let formClasses = classNames('form-group', { '... |
788cc159e4d734b972e22ccf06dbcd8ed8f94885 | distutils/_collections.py | distutils/_collections.py | import collections
import itertools
# from jaraco.collections 3.5
class DictStack(list, collections.abc.Mapping):
"""
A stack of dictionaries that behaves as a view on those dictionaries,
giving preference to the last.
>>> stack = DictStack([dict(a=1, c=2), dict(b=2, a=2)])
>>> stack['a']
2
... | import collections
import itertools
# from jaraco.collections 3.5.1
class DictStack(list, collections.abc.Mapping):
"""
A stack of dictionaries that behaves as a view on those dictionaries,
giving preference to the last.
>>> stack = DictStack([dict(a=1, c=2), dict(b=2, a=2)])
>>> stack['a']
2... | Update DictStack implementation from jaraco.collections 3.5.1 | Update DictStack implementation from jaraco.collections 3.5.1
| Python | mit | pypa/setuptools,pypa/setuptools,pypa/setuptools | python | ## Code Before:
import collections
import itertools
# from jaraco.collections 3.5
class DictStack(list, collections.abc.Mapping):
"""
A stack of dictionaries that behaves as a view on those dictionaries,
giving preference to the last.
>>> stack = DictStack([dict(a=1, c=2), dict(b=2, a=2)])
>>> st... |
09453b297551b180ef38529b07f60ef2e86798f9 | build.xml | build.xml | <?xml version="1.0"?>
<project name="MMIR build resources" default="copy-resources">
<target name="copy-resources">
<!-- copy resources to parent directory
* ANT scripts and settings
* Cordova hooks for building MMIR apps
-->
<copy todir="../" pre... | <?xml version="1.0"?>
<project name="MMIR build resources" default="copy-resources">
<target name="copy-resources">
<!-- copy resources to parent directory
* ANT scripts and settings
* Cordova hooks for building MMIR apps
-->
<copy todir="../" pre... | FIX set executable file-permission for scripts (on UNIX) | FIX set executable file-permission for scripts (on UNIX) | XML | mit | mmig/mmir-tooling,mmig/mmir-tooling | xml | ## Code Before:
<?xml version="1.0"?>
<project name="MMIR build resources" default="copy-resources">
<target name="copy-resources">
<!-- copy resources to parent directory
* ANT scripts and settings
* Cordova hooks for building MMIR apps
-->
<copy todir="..... |
9000f0c7a297674c6d3ed4f34ac05949dbac1c35 | .github/workflows/future-php.yml | .github/workflows/future-php.yml | name: Future PHP Versions
on:
schedule:
- cron: '33 1 * * 1' # weekly, on Monday morning
env:
MAILER_DSN: null://null
ILIOS_LOCALE: en
ILIOS_SECRET: ThisTokenIsNotSoSecretChangeIt
ILIOS_FILE_SYSTEM_STORAGE_PATH: /tmp
SYMFONY_DEPRECATIONS_HELPER: disabled=1
jobs:
test:
name: Test
runs-on: ub... | name: Future PHP Versions
on:
schedule:
- cron: '33 1 * * 1' # weekly, on Monday morning
env:
MAILER_DSN: null://null
ILIOS_LOCALE: en
ILIOS_SECRET: ThisTokenIsNotSoSecretChangeIt
ILIOS_FILE_SYSTEM_STORAGE_PATH: /tmp
SYMFONY_DEPRECATIONS_HELPER: disabled=1
jobs:
test:
name: Test
runs-on: ub... | Add missing extensions for PHP 8 install | Add missing extensions for PHP 8 install
| YAML | mit | ilios/ilios,thecoolestguy/ilios,dartajax/ilios,Trott/ilios,Trott/ilios,stopfstedt/ilios,dartajax/ilios,ilios/ilios,stopfstedt/ilios,thecoolestguy/ilios | yaml | ## Code Before:
name: Future PHP Versions
on:
schedule:
- cron: '33 1 * * 1' # weekly, on Monday morning
env:
MAILER_DSN: null://null
ILIOS_LOCALE: en
ILIOS_SECRET: ThisTokenIsNotSoSecretChangeIt
ILIOS_FILE_SYSTEM_STORAGE_PATH: /tmp
SYMFONY_DEPRECATIONS_HELPER: disabled=1
jobs:
test:
name: Test... |
3f04785f77899b286d02a0a95dd7fbfc341dc999 | activesupport/lib/active_support/core_ext/module/deprecation.rb | activesupport/lib/active_support/core_ext/module/deprecation.rb | require 'active_support/deprecation/method_wrappers'
class Module
# deprecate :foo
# deprecate bar: 'message'
# deprecate :foo, :bar, baz: 'warning!', qux: 'gone!'
#
# You can also use custom deprecator instance:
#
# deprecate :foo, deprecator: MyLib::Deprecator.new
# deprecate :foo, bar: "wa... | require 'active_support/deprecation/method_wrappers'
class Module
# deprecate :foo
# deprecate bar: 'message'
# deprecate :foo, :bar, baz: 'warning!', qux: 'gone!'
#
# You can also use custom deprecator instance:
#
# deprecate :foo, deprecator: MyLib::Deprecator.new
# deprecate :foo, bar: "wa... | Fix documentation to the custom Deprecator | Fix documentation to the custom Deprecator
[ci skip] | Ruby | mit | coreyward/rails,utilum/rails,georgeclaghorn/rails,hanystudy/rails,fabianoleittes/rails,illacceptanything/illacceptanything,shioyama/rails,88rabbit/newRails,illacceptanything/illacceptanything,Stellenticket/rails,mohitnatoo/rails,untidy-hair/rails,Edouard-chin/rails,pschambacher/rails,kenta-s/rails,vassilevsky/rails,uti... | ruby | ## Code Before:
require 'active_support/deprecation/method_wrappers'
class Module
# deprecate :foo
# deprecate bar: 'message'
# deprecate :foo, :bar, baz: 'warning!', qux: 'gone!'
#
# You can also use custom deprecator instance:
#
# deprecate :foo, deprecator: MyLib::Deprecator.new
# deprecat... |
fae5907fefa2bdf088f802229b1dd20915c27bdd | README.md | README.md | C++ wrapper for Activetick data service to facilitate back testing and live trading
| C++ wrapper for Activetick data service to facilitate back testing and live trading
## Getting started
```
git clone https://github.com/willhoyle/activepp.git
cd activepp
mkdir build
cd build
cmake ..
make -DACTIVETICK_SHARED_LIB=/path/to/lib
``` | Add instructions to get started quickly | Add instructions to get started quickly
| Markdown | mit | willhoyle/activepp | markdown | ## Code Before:
C++ wrapper for Activetick data service to facilitate back testing and live trading
## Instruction:
Add instructions to get started quickly
## Code After:
C++ wrapper for Activetick data service to facilitate back testing and live trading
## Getting started
```
git clone https://github.com/willhoyle... |
6e0b7f2873fb8ede6bfd8dbf29b30200330b2662 | __mocks__/react-relay.js | __mocks__/react-relay.js | // Comes from https://github.com/facebook/relay/issues/161
// Should be used in tests as a replacement for `react-storybooks-relay-container`
//
var React = require.requireActual("react")
const graphql = (strings, ...keys) => {
const lastIndex = strings.length - 1
return (
strings.slice(0, lastIndex).reduce((p... | // Comes from https://github.com/facebook/relay/issues/161
// Should be used in tests as a replacement for `react-storybooks-relay-container`
var React = require.requireActual("react")
// This is a template string function, which returns the original string
// It's based on https://github.com/lleaff/tagged-template-n... | Document noop `graphql` tagged template | [mock] Document noop `graphql` tagged template
[skip ci]
| JavaScript | mit | artsy/reaction,artsy/reaction,artsy/reaction-force,artsy/reaction-force,artsy/reaction | javascript | ## Code Before:
// Comes from https://github.com/facebook/relay/issues/161
// Should be used in tests as a replacement for `react-storybooks-relay-container`
//
var React = require.requireActual("react")
const graphql = (strings, ...keys) => {
const lastIndex = strings.length - 1
return (
strings.slice(0, last... |
f62d95141303ac4bff2c38aaded93dad48246ffc | chemtools/templates/chemtools/bjob.txt | chemtools/templates/chemtools/bjob.txt |
name={{ name }}
base=$HOME{% if internal %}/chemtools/{% endif %}
# Make the module command available
source /usr/share/modules/init/csh
set echo
# Load the gaussian module
module load gaussian09
# Copy the input files to the scratch directory.
# The scratch directory offers large capacity and high pe... |
set name = {{ name }}
set base = $HOME{% if internal %}/chemtools/{% endif %}
# Make the module command available
source /usr/share/modules/init/csh
set echo
# Load the gaussian module
module load gaussian09
# Copy the input files to the scratch directory.
# The scratch directory offers large capacity... | Fix typos in blacklight job template | Fix typos in blacklight job template
| Text | mit | crcollins/chemtools-webapp,crcollins/chemtools-webapp,crcollins/chemtools-webapp,crcollins/chemtools-webapp,crcollins/chemtools-webapp | text | ## Code Before:
name={{ name }}
base=$HOME{% if internal %}/chemtools/{% endif %}
# Make the module command available
source /usr/share/modules/init/csh
set echo
# Load the gaussian module
module load gaussian09
# Copy the input files to the scratch directory.
# The scratch directory offers large capacity and high... |
a40b43dbf747a957bf7636729772e54b383dfc2e | nim/benchmark.nim | nim/benchmark.nim | import times
import os
import re
import strformat
if paramCount() == 0:
echo "Usage: ./benchmark <filename>"
quit(QuitFailure)
proc measure(data:string, pattern:string) =
let time = cpuTime()
let r_pattern = re(pattern)
let matches: seq[string] = data.findAll(r_pattern)
let elapsed_time = cpuTime() - tim... | import times
import os
import re
import strformat
if paramCount() == 0:
echo "Usage: ./benchmark <filename>"
quit(QuitFailure)
proc measure(data:string, pattern:string) =
let time = cpuTime()
let r_pattern = re(pattern)
let matches: seq[string] = data.findAll(r_pattern)
let count = len(matches)
let ela... | Add count to the measurement | Add count to the measurement
| Nimrod | mit | mariomka/regex-benchmark,mariomka/regex-benchmark,mariomka/regex-benchmark,mariomka/regex-benchmark,mariomka/regex-benchmark,mariomka/regex-benchmark,mariomka/regex-benchmark,mariomka/regex-benchmark,mariomka/regex-benchmark,mariomka/regex-benchmark,mariomka/regex-benchmark,mariomka/regex-benchmark,mariomka/regex-bench... | nimrod | ## Code Before:
import times
import os
import re
import strformat
if paramCount() == 0:
echo "Usage: ./benchmark <filename>"
quit(QuitFailure)
proc measure(data:string, pattern:string) =
let time = cpuTime()
let r_pattern = re(pattern)
let matches: seq[string] = data.findAll(r_pattern)
let elapsed_time =... |
64cade14f0bfb0e5406c2297d1cf4062a1c52895 | _scss/careers/_positions.scss | _scss/careers/_positions.scss | .careers-page {
.positions {
padding-bottom: 40px;
.container {
display: flex;
flex-direction: column;
align-items: center;
}
.positionslist {
display: flex;
flex-wrap: wrap;
justify-content: space-around;
}
.positionslist .item {
flex-grow: 1;
... | .careers-page {
.positions {
padding-bottom: 40px;
.container {
display: flex;
flex-direction: column;
align-items: center;
}
.positionslist {
display: flex;
flex-wrap: wrap;
justify-content: space-around;
}
.positionslist .item {
flex-grow: 1;
... | Revert bottom margin for h3 elements | Revert bottom margin for h3 elements
| SCSS | apache-2.0 | RapidRiverSoftware/rapidriversoftware.github.io,RapidRiverSoftware/rapidriversoftware.github.io,RapidRiverSoftware/rapidriversoftware.github.io,RapidRiverSoftware/rapidriversoftware.github.io | scss | ## Code Before:
.careers-page {
.positions {
padding-bottom: 40px;
.container {
display: flex;
flex-direction: column;
align-items: center;
}
.positionslist {
display: flex;
flex-wrap: wrap;
justify-content: space-around;
}
.positionslist .item {
fl... |
a8b69abffbbd3d01e165d4acd16e45c5460a32dd | README.md | README.md |
This development environment is intended as a starter for those wanting to use
Vagrant to develop PHP applications, and includes the necessary software for
doing so.
##Support
This environment currently supports either Apache2 or Nginx. Each provisioner
includes the following software:
* PHP 5.3 (Ubuntu LTS latest)
... |
This development environment is intended as a starter for those wanting to use
Vagrant to develop PHP applications, and includes the necessary software for
doing so.
**UPDATE**: The entire environment has been rebuilt using Puppet, as opposed to
Shell scripts.
##Support
This environment currently supports the follo... | Update Readme to include information relevant to the new puppet setup. | Update Readme to include information relevant to the new puppet setup. | Markdown | mit | jamiefdhurst/vagrant-dev,jamiefdhurst/vagrant-dev,jamiefdhurst/vagrant-dev | markdown | ## Code Before:
This development environment is intended as a starter for those wanting to use
Vagrant to develop PHP applications, and includes the necessary software for
doing so.
##Support
This environment currently supports either Apache2 or Nginx. Each provisioner
includes the following software:
* PHP 5.3 (Ubu... |
646ffa6be9ac4c851c03f086f8c0d878aa1b0ad2 | lib/strategy/whitelist.rb | lib/strategy/whitelist.rb | module DataAnon
module Strategy
class Whitelist < DataAnon::Strategy::Base
def self.whitelist?
true
end
def process_record(index, record)
dest_record_map = {}
record.attributes.each do |field_name, field_value|
unless field_value.nil? || is_primary_key?(field_... | module DataAnon
module Strategy
class Whitelist < DataAnon::Strategy::Base
def self.whitelist?
true
end
def process_record(index, record)
dest_record_map = {}
record.attributes.each do |field_name, field_value|
unless field_value.nil? || is_primary_key?(field_... | Fix for rails mass-assignment protection | Fix for rails mass-assignment protection
In rails 3.2.8, mass assignment can mean that the ActiveModel class
doesn't support mass assignment. This change ignores any such
protection and assumes it's your own data and you know what you're
doing with it.
| Ruby | mit | sunitparekh/data-anonymization,yanismydj/data-anonymization,paulhendricks/data-anonymization,paulhendricks/data-anonymization,sunitparekh/data-anonymization,justinwiley/data-anonymization,justinwiley/data-anonymization,yanismydj/data-anonymization | ruby | ## Code Before:
module DataAnon
module Strategy
class Whitelist < DataAnon::Strategy::Base
def self.whitelist?
true
end
def process_record(index, record)
dest_record_map = {}
record.attributes.each do |field_name, field_value|
unless field_value.nil? || is_pri... |
84ca5618f677692bd4fd5fb72fcce5b5277210b4 | SwabContentBlocker/blockerList.json | SwabContentBlocker/blockerList.json | [
{
"action": {
"type": "block"
},
"trigger": {
"url-filter": "https?://connect.decknetwork.net"
}
}
] | [
{
"action": {
"type": "block"
},
"trigger": {
"url-filter": "https?://connect.decknetwork.net--WARNING_REMOVE"
}
}
]
| Remove blanket blocking to test individual sites. | Remove blanket blocking to test individual sites.
| JSON | bsd-3-clause | pkamb/Swab | json | ## Code Before:
[
{
"action": {
"type": "block"
},
"trigger": {
"url-filter": "https?://connect.decknetwork.net"
}
}
]
## Instruction:
Remove blanket blocking to test individual sites.
## Code After:
[
{
"action": {
"type": "block"... |
643813d12d0005b45d607a726a6c1efab5dfdcb3 | metadata/moe.minori.pgpclipper.txt | metadata/moe.minori.pgpclipper.txt | Categories:Security
License:Apache2
Web Site:
Source Code:https://github.com/Mnkai/PGPClipper
Issue Tracker:https://github.com/Mnkai/PGPClipper/issues
Auto Name:PGPClipper
Summary:Add PGP support via clipboard
Description:
Use PGPClipper to easily and safely write and receive PGP messages in apps that
let you copy and... | Categories:Security
License:Apache2
Web Site:
Source Code:https://github.com/Mnkai/PGPClipper
Issue Tracker:https://github.com/Mnkai/PGPClipper/issues
Auto Name:PGPClipper
Summary:Add PGP support via clipboard
Description:
Use PGPClipper to easily and safely write and receive PGP messages in apps that
let you copy and... | Update PGPClipper to 0.11 (2) | Update PGPClipper to 0.11 (2)
| Text | agpl-3.0 | f-droid/fdroid-data,f-droid/fdroiddata,f-droid/fdroiddata | text | ## Code Before:
Categories:Security
License:Apache2
Web Site:
Source Code:https://github.com/Mnkai/PGPClipper
Issue Tracker:https://github.com/Mnkai/PGPClipper/issues
Auto Name:PGPClipper
Summary:Add PGP support via clipboard
Description:
Use PGPClipper to easily and safely write and receive PGP messages in apps that
... |
ea1cd58066bbcf73fe36658461ad0f214eed2d0d | src/attributeFields.js | src/attributeFields.js | import * as typeMapper from './typeMapper';
import { GraphQLNonNull, GraphQLEnumType } from 'graphql';
import { globalIdField } from 'graphql-relay';
module.exports = function (Model, options) {
options = options || {};
var result = Object.keys(Model.rawAttributes).reduce(function (memo, key) {
if (options.ex... | import * as typeMapper from './typeMapper';
import { GraphQLNonNull, GraphQLEnumType } from 'graphql';
import { globalIdField } from 'graphql-relay';
module.exports = function (Model, options) {
options = options || {};
var result = Object.keys(Model.rawAttributes).reduce(function (memo, key) {
if (options.ex... | Use primaryKeyAttribute to resolve globalIdField | Use primaryKeyAttribute to resolve globalIdField
| JavaScript | mit | mickhansen/graphql-sequelize,janmeier/graphql-sequelize | javascript | ## Code Before:
import * as typeMapper from './typeMapper';
import { GraphQLNonNull, GraphQLEnumType } from 'graphql';
import { globalIdField } from 'graphql-relay';
module.exports = function (Model, options) {
options = options || {};
var result = Object.keys(Model.rawAttributes).reduce(function (memo, key) {
... |
fe38f12b7cbffceb9d96e74466380e45648d3cbe | config/deploy/production.rb | config/deploy/production.rb | set :stage, :production
set :user, 'root'
role :app, '162.243.221.218'
role :web, '162.243.221.218'
role :db, '162.243.221.218', primary: true
| set :stage, :production
set :user, 'deployer'
set :use_sudo, false
role :app, '162.243.221.218'
role :web, '162.243.221.218'
role :db, '162.243.221.218', primary: true
| Deploy with deployer user not root. | Deploy with deployer user not root. | Ruby | mit | danielstutzman/online-ruby-tutor,danielstutzman/online-ruby-tutor,danielstutzman/online-ruby-tutor | ruby | ## Code Before:
set :stage, :production
set :user, 'root'
role :app, '162.243.221.218'
role :web, '162.243.221.218'
role :db, '162.243.221.218', primary: true
## Instruction:
Deploy with deployer user not root.
## Code After:
set :stage, :production
set :user, 'deployer'
set :use_sudo, false
role :app, '162.243.2... |
3bdc7250f7a40ef4b3ad5f431c6b6e3e92ccacc8 | app.py | app.py | from flask import Flask, render_template, request, redirect
import requests
import pandas as pd
from datetime import datetime
from bokeh.plotting import figure, output_notebook, output_file, save
app = Flask(__name__)
# @app.route('/')
# def main():
# return redirect('/index')
@app.route('/', methods=['GET', 'PO... | from flask import Flask, render_template, request, redirect
import requests
import pandas as pd
from datetime import datetime
from bokeh.plotting import figure, output_notebook, output_file, save
app = Flask(__name__)
@app.route('/')
def main():
return redirect('/index')
@app.route('/index', methods=['GET', 'POS... | Revert "Remove redirect to avoid Chrome privacy error" | Revert "Remove redirect to avoid Chrome privacy error"
This reverts commit e5322958f14b2428b74de726476fd98adae8c454.
| Python | mit | gsganden/pitcher-reports,gsganden/pitcher-reports | python | ## Code Before:
from flask import Flask, render_template, request, redirect
import requests
import pandas as pd
from datetime import datetime
from bokeh.plotting import figure, output_notebook, output_file, save
app = Flask(__name__)
# @app.route('/')
# def main():
# return redirect('/index')
@app.route('/', met... |
1c00703a3ac96f44da886596dbb1db50ab79069f | cli/run.js | cli/run.js | /**
* @file
* Run validation by CLI
*/
var Q = require('q');
var getOptions = require('../actions/cli/get-options');
var suppressMessages = require('../actions/suppress');
var validateByW3c = require('../actions/validate-by-w3c');
var getReporter = require('../reporter');
function main() {
getOptions()
... | /**
* @file
* Run validation by CLI
*/
var Q = require('q');
var getOptions = require('../actions/cli/get-options');
var suppressMessages = require('../actions/suppress');
var validateByW3c = require('../actions/validate-by-w3c');
var getReporter = require('../reporter');
function main() {
getOptions()
... | Implement positive exit code if feed is not valid | Implement positive exit code if feed is not valid
| JavaScript | mit | andre487/feed-validator,Andre-487/feed-validator,andre487/feed-validator,Andre-487/feed-validator | javascript | ## Code Before:
/**
* @file
* Run validation by CLI
*/
var Q = require('q');
var getOptions = require('../actions/cli/get-options');
var suppressMessages = require('../actions/suppress');
var validateByW3c = require('../actions/validate-by-w3c');
var getReporter = require('../reporter');
function main() {
get... |
4febcfd44d3e6d7a26168bcbf71712bc27e4dcda | test/test_helper.rb | test/test_helper.rb | ENV['RAILS_ENV'] ||= 'test'
require_relative '../config/environment'
require 'test/unit/rails/test_help'
require 'test/unit/rr'
require 'test/unit/capybara'
require 'webmock/test_unit'
WebMock.disable_net_connect!(allow_localhost: true)
module FixturePath
def fixture_path(fixture_name)
Rails.root.join("test/fi... | ENV['RAILS_ENV'] ||= 'test'
require_relative '../config/environment'
require 'test/unit/rails/test_help'
require 'test/unit/rr'
require 'test/unit/capybara'
require 'capybara-screenshot/testunit' # for integration test
require 'webmock/test_unit'
WebMock.disable_net_connect!(allow_localhost: true)
module FixturePath... | Use capybara-screenshot for integration test | Use capybara-screenshot for integration test
Signed-off-by: Kenji Okimoto <7a4b90a0a1e6fc688adec907898b6822ce215e6c@clear-code.com>
| Ruby | apache-2.0 | fluent/fluentd-ui,fluent/fluentd-ui,fluent/fluentd-ui | ruby | ## Code Before:
ENV['RAILS_ENV'] ||= 'test'
require_relative '../config/environment'
require 'test/unit/rails/test_help'
require 'test/unit/rr'
require 'test/unit/capybara'
require 'webmock/test_unit'
WebMock.disable_net_connect!(allow_localhost: true)
module FixturePath
def fixture_path(fixture_name)
Rails.ro... |
04079d893a21f0958819655aead88977dbb0ff69 | digdag-spi/src/main/java/io/digdag/spi/AuthenticatedUser.java | digdag-spi/src/main/java/io/digdag/spi/AuthenticatedUser.java | package io.digdag.spi;
import io.digdag.client.config.Config;
import org.immutables.value.Value;
@Value.Immutable
public interface AuthenticatedUser
{
int getSiteId();
default boolean isAdmin()
{
return false;
}
Config getUserInfo();
// this context will not be stored on database in... | package io.digdag.spi;
import io.digdag.client.config.Config;
import org.immutables.value.Value;
@Value.Immutable
public interface AuthenticatedUser
{
int getSiteId();
@Value.Default
default boolean isAdmin()
{
return false;
}
Config getUserInfo();
// this context will not be st... | Fix build error on default method with Immutable. | Fix build error on default method with Immutable.
| Java | apache-2.0 | treasure-data/digdag,treasure-data/digdag,treasure-data/digdag,treasure-data/digdag,treasure-data/digdag,treasure-data/digdag,treasure-data/digdag | java | ## Code Before:
package io.digdag.spi;
import io.digdag.client.config.Config;
import org.immutables.value.Value;
@Value.Immutable
public interface AuthenticatedUser
{
int getSiteId();
default boolean isAdmin()
{
return false;
}
Config getUserInfo();
// this context will not be store... |
cdabf7c74eb7ca4cd672291f883beb6d90098b3b | app/assets/stylesheets/smart_answer_builder.css | app/assets/stylesheets/smart_answer_builder.css | .builder-container .node legend {
border: none;
margin: 0;
}
.builder-container .node > .col-md-8 {
border-top: 1px solid #cccccc;
padding-top: 10px;
border-bottom: none;
margin: 30px 0 20px;
}
.builder-container .option select {
width: 450px;
}
.builder-container .options ul {
margin: 0;
}
.builde... | .builder-container .node legend {
border: none;
margin: 0;
}
.builder-container .node > .col-md-8 {
border-top: 1px solid #cccccc;
padding-top: 10px;
border-bottom: none;
margin: 30px 0 20px;
}
.builder-container .option input[type='text'],
.builder-container .option select {
width: 100%;
}
.builder-c... | Tweak the styling of the SimpleSmartAnswer Node Options UI | Tweak the styling of the SimpleSmartAnswer Node Options UI
The display of the Options UI does not respond well when the user is
using a tablet or mobile device. In particular the fixed-width next_node
field causes significant breaks in the UI and diminishes the user
experience.
We should make the UI: as responsive as... | CSS | mit | alphagov/publisher,alphagov/publisher,alphagov/publisher | css | ## Code Before:
.builder-container .node legend {
border: none;
margin: 0;
}
.builder-container .node > .col-md-8 {
border-top: 1px solid #cccccc;
padding-top: 10px;
border-bottom: none;
margin: 30px 0 20px;
}
.builder-container .option select {
width: 450px;
}
.builder-container .options ul {
margi... |
2a1a9dd86b305d8b52304c23a791352148831957 | third-party/README.md | third-party/README.md |
http://sourceforge.net/projects/nomlib/files/nomlib_windows-dependencies.zip/download
## OS X ##
http://sourceforge.net/projects/nomlib/files/nomlib_osx-dependencies.tar.gz/download
|
[nomlib's](http://github.com/i8degrees/nomlib/) third-party dependencies. Pre-packaged libraries are available for the OS X and Windows platforms and may be found listed as nomlib_**\<PLATFORM\>-dependencies** at:
* [nomlib's sourceforge.net project files](http://sourceforge.net/projects/nomlib/files/)
## Installati... | Add installation, source & license info for deps | Add installation, source & license info for deps
third-party/README.md now looks like an actual README :)
| Markdown | bsd-2-clause | i8degrees/nomlib,i8degrees/nomlib,i8degrees/nomlib,i8degrees/nomlib | markdown | ## Code Before:
http://sourceforge.net/projects/nomlib/files/nomlib_windows-dependencies.zip/download
## OS X ##
http://sourceforge.net/projects/nomlib/files/nomlib_osx-dependencies.tar.gz/download
## Instruction:
Add installation, source & license info for deps
third-party/README.md now looks like an actual READM... |
6c835293cfd5fe8c63c4308f7f9c71e3f69d14e1 | .github/PULL_REQUEST_TEMPLATE.md | .github/PULL_REQUEST_TEMPLATE.md | Issue # (if available):
Description of changes:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
| **Issue # (if available):**
**Description of changes:**
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
| Make PR Template Titles bold | Make PR Template Titles bold | Markdown | apache-2.0 | PKRoma/s2n,wcs1only/s2n,bpdavidson/s2n,alexeblee/s2n,colmmacc/s2n,PKRoma/s2n,alexeblee/s2n,alexeblee/s2n,raycoll/s2n,bpdavidson/s2n,gibson-compsci/s2n,colmmacc/s2n,gibson-compsci/s2n,wcs1only/s2n,awslabs/s2n,bpdavidson/s2n,alexeblee/s2n,wcs1only/s2n,wcs1only/s2n,wcs1only/s2n,PKRoma/s2n,raycoll/s2n,colmmacc/s2n,awslabs/... | markdown | ## Code Before:
Issue # (if available):
Description of changes:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
## Instruction:
Make PR Template Titles bold
## Code After:
**Issue # (if available):**
**Description of changes:**
By submitting t... |
3126f4b765e3838333d67a0904d19dcaa9d48110 | config/default.json | config/default.json | {
"host": "localhost",
"port": 3030,
"nedb": "../data/",
"public": "../public/",
"auth": {
"token": {
"secret": "nZ86QLdSUhhYxfOO7b85xjbbkpg5hFz5DJ34CD1NVUyH3Te4a2w0ZFCZxNTYimPafVSoTbTYXCxL54+fXlnbzw=="
},
"local": {}
},
"corsWhitelist": []
}
| {
"host": "localhost",
"port": 3030,
"nedb": "../data/",
"public": "../public/",
"auth": {
"token": {
"secret": "nZ86QLdSUhhYxfOO7b85xjbbkpg5hFz5DJ34CD1NVUyH3Te4a2w0ZFCZxNTYimPafVSoTbTYXCxL54+fXlnbzw=="
},
"local": {},
"successRedirect": "/organizations/",
"cookie": "1970-01-01T00:30... | Change cookie expiration to something reasonable. | Change cookie expiration to something reasonable.
| JSON | mit | frank-trampe/turkeywing,frank-trampe/turkeywing | json | ## Code Before:
{
"host": "localhost",
"port": 3030,
"nedb": "../data/",
"public": "../public/",
"auth": {
"token": {
"secret": "nZ86QLdSUhhYxfOO7b85xjbbkpg5hFz5DJ34CD1NVUyH3Te4a2w0ZFCZxNTYimPafVSoTbTYXCxL54+fXlnbzw=="
},
"local": {}
},
"corsWhitelist": []
}
## Instruction:
Change cooki... |
3665720719ccf94151408eb83722dc23a5b48a1c | app/view/twig/components/panel-news.twig | app/view/twig/components/panel-news.twig | {##
# Sidebar-Panel: Displays the latest news on Bolt
# (Usage Example: Dashboards sidebar)
#}
{% for news in context %}
{{ include('@bolt/components/panel-news-item.twig') }}
{% endfor %}
| {##
# Sidebar-Panel: Displays the latest news on Bolt
# (Usage Example: Dashboards sidebar)
#}
{% for news in context if not context.disable %}
{{ include('@bolt/components/panel-news-item.twig') }}
{% endfor %}
| Disable the news. We want the film now! | Disable the news. We want the film now!
See
https://github.com/bolt/bolt/blob/858d652e49c3b61fef7e0f66f47750a4fe97d766/src/Controller/Async/General.php#L93-L117
for more info
| Twig | mit | cdowdy/bolt,Raistlfiren/bolt,nikgo/bolt,rarila/bolt,joshuan/bolt,joshuan/bolt,bolt/bolt,bolt/bolt,rarila/bolt,nikgo/bolt,bolt/bolt,cdowdy/bolt,GawainLynch/bolt,nikgo/bolt,lenvanessen/bolt,lenvanessen/bolt,GawainLynch/bolt,Intendit/bolt,Intendit/bolt,electrolinux/bolt,rarila/bolt,electrolinux/bolt,cdowdy/bolt,cdowdy/bol... | twig | ## Code Before:
{##
# Sidebar-Panel: Displays the latest news on Bolt
# (Usage Example: Dashboards sidebar)
#}
{% for news in context %}
{{ include('@bolt/components/panel-news-item.twig') }}
{% endfor %}
## Instruction:
Disable the news. We want the film now!
See
https://github.com/bolt/bolt/blob/858d652e49c3... |
70337ba902091da5ae139b506fe6b5cf3b38ffae | README.md | README.md | highlight.js-cli
================
Use [highlight.js](http://highlightjs.org/) from command line on HTML or Markdown files.
## Install
```
npm install highlight.js-cli -g
```
## Use
Default selector is "pre code".
```
hljs < input.html > output.html
```
To use a different selector use --s option. You can use any ... | highlight.js-cli
================
Use [highlight.js](http://highlightjs.org/) from command line on HTML file.
## Installation
```
npm install highlight.js-cli -g
```
## Usage
Input it taken from stdin, the default selector is "pre code", i.e. `<pre><code>...</code></pre>`. Other DOM elements than those fitting the... | Add some more examples and explanation | Add some more examples and explanation
| Markdown | bsd-3-clause | maseek/highlight.js-cli,chk1/highlight.js-cli | markdown | ## Code Before:
highlight.js-cli
================
Use [highlight.js](http://highlightjs.org/) from command line on HTML or Markdown files.
## Install
```
npm install highlight.js-cli -g
```
## Use
Default selector is "pre code".
```
hljs < input.html > output.html
```
To use a different selector use --s option. ... |
0dbd55f505f8afd0cd7f1256bb7ed5156fbe157d | lib/settings/DefaultSettings.ts | lib/settings/DefaultSettings.ts | import {VoidHook} from "../tasks/Hooks";
export default {
projectType: "frontend",
port: 5000,
liveReloadPort: 35729,
distribution: "dist",
targets: "targets",
bootstrapperStyles: "",
watchStyles: [
"styles"
],
test: "test/**/*.ts",
images: "images",
assets: "assets... | import {VoidHook} from "../tasks/Hooks";
export default {
projectType: "frontend",
port: 5000,
liveReloadPort: 35729,
distribution: "dist",
targets: "targets",
bootstrapperStyles: "",
watchStyles: [
"styles"
],
test: "test/**/*.ts",
images: "images",
assets: "assets... | Add typescript path in default settings | Add typescript path in default settings
| TypeScript | mit | mtfranchetto/smild,mtfranchetto/smild,mtfranchetto/smild | typescript | ## Code Before:
import {VoidHook} from "../tasks/Hooks";
export default {
projectType: "frontend",
port: 5000,
liveReloadPort: 35729,
distribution: "dist",
targets: "targets",
bootstrapperStyles: "",
watchStyles: [
"styles"
],
test: "test/**/*.ts",
images: "images",
... |
62680bb0b1626863a45a24fbd9b0c1aad9fc6a85 | spec/unit/accept_nested_attributes_spec.rb | spec/unit/accept_nested_attributes_spec.rb | require 'spec_helper'
describe "AcceptsNestedAttributes" do
describe User do
it { should accept_nested_attributes_for(:articles) }
end
end | require 'spec_helper'
describe "AcceptsNestedAttributes" do
describe User do
it { should accept_nested_attributes_for(:articles) }
xit { should accept_nested_attributes_for(:comments).limit(1) }
end
describe Site do
xit { should accept_nested_attributes_for(:users).allow_destroy(true) }
end
des... | Add pending specs to test options limit, allow_destroy, update_only with accepts_nested_attributes_of matcher. | Add pending specs to test options limit, allow_destroy, update_only with accepts_nested_attributes_of matcher. | Ruby | mit | nofxx/mongoid-rspec,bartes/mongoid-rspec,mongoid-rspec/mongoid-rspec,xronos-i-am/mongoid-rspec | ruby | ## Code Before:
require 'spec_helper'
describe "AcceptsNestedAttributes" do
describe User do
it { should accept_nested_attributes_for(:articles) }
end
end
## Instruction:
Add pending specs to test options limit, allow_destroy, update_only with accepts_nested_attributes_of matcher.
## Code After:
require 'spec_... |
70560a4141140b43cd8db42ffc2a77874c664434 | sonar-project.properties | sonar-project.properties | sonar.coverage.exclusions=src/**/__tests__/**,src/__mocks__/**,
sonar.javascript.lcov.reportPaths=coverage/lcov.info
sonar.organization=rognan
sonar.projectKey=rognan_chrome-extension-custom-new-tab
sonar.projectName=chrome-extension-custom-new-tab
sonar.projectVersion=1.0
sonar.sourceEncoding=UTF-8
sonar.sources=src
s... | sonar.coverage.exclusions=src/**/__tests__/**,src/__mocks__/**,
sonar.javascript.lcov.reportPaths=coverage/lcov.info
sonar.organization=rognan
sonar.projectKey=rognan_chrome-extension-custom-new-tab
sonar.projectName=chrome-extension-custom-new-tab
sonar.projectVersion=1.0
sonar.sourceEncoding=UTF-8
sonar.sources=src
s... | Remove unused test execution report path | Remove unused test execution report path
| INI | mit | rognan/chrome-extension-custom-new-tab,rognan/chrome-extension-custom-new-tab,rognan/chrome-extension-custom-new-tab | ini | ## Code Before:
sonar.coverage.exclusions=src/**/__tests__/**,src/__mocks__/**,
sonar.javascript.lcov.reportPaths=coverage/lcov.info
sonar.organization=rognan
sonar.projectKey=rognan_chrome-extension-custom-new-tab
sonar.projectName=chrome-extension-custom-new-tab
sonar.projectVersion=1.0
sonar.sourceEncoding=UTF-8
son... |
315715a069afb8f2e2411dbfde35853d64fe3796 | src/Action.js | src/Action.js | var Dispatcher = require('./Dispatcher');
/**
* Action class
*/
class Action {
/**
* Constructs an Action object
*
* @param {function} callback - Callback method for Action
* @constructor
*/
constructor(callback) {
this.callback = callback;
}
/**
* Calls callback method from Dispatche... | var Dispatcher = require('./Dispatcher');
/**
* Action class
*/
class Action {
/**
* Constructs an Action object
*
* @param {function} callback - Callback method for Action
* @constructor
*/
constructor(callback) {
this.callback = callback;
}
/**
* Calls callback method from Dispatche... | Allow actions with multiple parameters | Allow actions with multiple parameters
Pass all action parameters on to wrapped action methods
| JavaScript | bsd-3-clause | gs-akhan/mcfly,FormidableLabs/biff,mbjorkegren/biff,gs-akhan/mcfly,FormidableLabs/biff,beni55/biff,morenoh149/biff,morenoh149/biff,mbjorkegren/biff,kenwheeler/mcfly,jcperez-ch/flaxs,kenwheeler/mcfly,beni55/biff | javascript | ## Code Before:
var Dispatcher = require('./Dispatcher');
/**
* Action class
*/
class Action {
/**
* Constructs an Action object
*
* @param {function} callback - Callback method for Action
* @constructor
*/
constructor(callback) {
this.callback = callback;
}
/**
* Calls callback metho... |
af857940ebc9eeaa540511c33aedf43cd5c4d0de | lib/rails_admin/config/fields/types/boolean.rb | lib/rails_admin/config/fields/types/boolean.rb | module RailsAdmin
module Config
module Fields
module Types
class Boolean < RailsAdmin::Config::Fields::Base
# Register field type for the type loader
RailsAdmin::Config::Fields::Types.register(self)
register_instance_option :view_helper do
:check_box
... | module RailsAdmin
module Config
module Fields
module Types
class Boolean < RailsAdmin::Config::Fields::Base
# Register field type for the type loader
RailsAdmin::Config::Fields::Types.register(self)
register_instance_option :view_helper do
:check_box
... | Update Boolean pretty_value to include default fallback | Update Boolean pretty_value to include default fallback
This will prevent the interface from breaking in the event a value is not correctly matched as 'true' or 'false'
| Ruby | mit | sferik/rails_admin,sferik/rails_admin,sferik/rails_admin | ruby | ## Code Before:
module RailsAdmin
module Config
module Fields
module Types
class Boolean < RailsAdmin::Config::Fields::Base
# Register field type for the type loader
RailsAdmin::Config::Fields::Types.register(self)
register_instance_option :view_helper do
:... |
857e8efadbca6841bc380408b30c2ab6f4c71a78 | mTorch/src/main/java/com/wkovacs64/mtorch/SettingsActivity.java | mTorch/src/main/java/com/wkovacs64/mtorch/SettingsActivity.java | package com.wkovacs64.mtorch;
import android.os.Bundle;
import android.preference.PreferenceActivity;
import android.util.Log;
public class SettingsActivity extends PreferenceActivity {
private static final String TAG = SettingsActivity.class.getSimpleName();
@SuppressWarnings("deprecation")
@Override
... | package com.wkovacs64.mtorch;
import android.os.Bundle;
import android.preference.PreferenceActivity;
import android.util.Log;
public class SettingsActivity extends PreferenceActivity {
private static final String TAG = SettingsActivity.class.getSimpleName();
@Override
protected void onCreate(Bundle sav... | Reduce deprecation suppression scope to specific statement | Reduce deprecation suppression scope to specific statement
| Java | mit | wKovacs64/mTorch | java | ## Code Before:
package com.wkovacs64.mtorch;
import android.os.Bundle;
import android.preference.PreferenceActivity;
import android.util.Log;
public class SettingsActivity extends PreferenceActivity {
private static final String TAG = SettingsActivity.class.getSimpleName();
@SuppressWarnings("deprecation")... |
67414dd968fe19234658385b3ef1fca06240ef55 | io/curses/output.go | io/curses/output.go | package curses
// Handles all output.
import (
"code.google.com/p/goncurses"
"github.com/discoviking/roguemike/io"
)
var screen *goncurses.Window
var Input chan *io.UpdateBundle
func Init() error {
s, err := goncurses.Init()
screen = s
if err != nil {
return err
}
goncurses.Raw(true)
goncurses.Echo(false... | package curses
// Handles all output.
import (
"github.com/discoviking/roguemike/io"
"github.com/rthornton128/goncurses"
)
var screen *goncurses.Window
var Input chan *io.UpdateBundle
func Init() error {
s, err := goncurses.Init()
screen = s
if err != nil {
return err
}
goncurses.Raw(true)
goncurses.Echo... | Use more proper curses package.' | Use more proper curses package.'
| Go | mit | DiscoViking/roguemike | go | ## Code Before:
package curses
// Handles all output.
import (
"code.google.com/p/goncurses"
"github.com/discoviking/roguemike/io"
)
var screen *goncurses.Window
var Input chan *io.UpdateBundle
func Init() error {
s, err := goncurses.Init()
screen = s
if err != nil {
return err
}
goncurses.Raw(true)
gonc... |
34d9ba6d2cc577aec487aba2dbaaffd1df5f5090 | requirements.txt | requirements.txt | requests==1.2.3
lxml==2.3.2
Flask==0.8 | requests==1.2.3
lxml==2.3.2
Flask==0.8
hive-thrift-py==0.0.1
| ADD missing Python module requeriment in past PR | ADD missing Python module requeriment in past PR
| Text | agpl-3.0 | telefonicaid/fiware-livedemoapp,telefonicaid/fiware-livedemoapp,telefonicaid/fiware-livedemoapp,telefonicaid/fiware-livedemoapp | text | ## Code Before:
requests==1.2.3
lxml==2.3.2
Flask==0.8
## Instruction:
ADD missing Python module requeriment in past PR
## Code After:
requests==1.2.3
lxml==2.3.2
Flask==0.8
hive-thrift-py==0.0.1
|
eaf66bd8fb744e62d82f62e7d26ea5386f0dc5fa | app/assets/javascripts/admin/modules/linked_modal.js | app/assets/javascripts/admin/modules/linked_modal.js | (function(Modules) {
"use strict";
/*
If `data-toggle=modal` and `data-target` are used on a link element in
Bootstrap 3, then Bootstrap attempts to load the contents of the link's
href remotely, putting it into the modal container. There's no way of
disabling this. (The feature is being removed in... | (function(Modules) {
"use strict";
/*
If `data-toggle=modal` and `data-target` are used on a link element in
Bootstrap 3, then Bootstrap attempts to load the contents of the link's
href remotely, putting it into the modal container. There's no way of
disabling this. (The feature is being removed in... | Make force publish better on IE7 | Make force publish better on IE7
Disable linked modals on IE7, as modals don’t work well.
| JavaScript | mit | robinwhittleton/whitehall,YOTOV-LIMITED/whitehall,YOTOV-LIMITED/whitehall,ggoral/whitehall,alphagov/whitehall,askl56/whitehall,robinwhittleton/whitehall,askl56/whitehall,hotvulcan/whitehall,robinwhittleton/whitehall,ggoral/whitehall,hotvulcan/whitehall,hotvulcan/whitehall,robinwhittleton/whitehall,alphagov/whitehall,as... | javascript | ## Code Before:
(function(Modules) {
"use strict";
/*
If `data-toggle=modal` and `data-target` are used on a link element in
Bootstrap 3, then Bootstrap attempts to load the contents of the link's
href remotely, putting it into the modal container. There's no way of
disabling this. (The feature is ... |
e2740857e2ea57b5c8e4cd5e136f4aee6cc6f658 | Source/Extensions/UITextField+Utilities.swift | Source/Extensions/UITextField+Utilities.swift | //
// Created by Pierluigi Cifani on 12/07/2018.
//
import UIKit
extension UITextField {
static func autolayoutTextFieldWith(textStyle style: UIFont.TextStyle, placeholderText: String) -> UITextField {
let textField = UITextField()
textField.translatesAutoresizingMaskIntoConstraints = false
... | //
// Created by Pierluigi Cifani on 12/07/2018.
//
import UIKit
extension UITextField {
static func autolayoutTextFieldWith(textStyle style: UIFont.TextStyle, placeholderText: String) -> UITextField {
let textField = UITextField()
textField.translatesAutoresizingMaskIntoConstraints = false
... | Make sure the textField is using the right font | Make sure the textField is using the right font
| Swift | mit | BlurredSoftware/BSWInterfaceKit,BlurredSoftware/BSWInterfaceKit | swift | ## Code Before:
//
// Created by Pierluigi Cifani on 12/07/2018.
//
import UIKit
extension UITextField {
static func autolayoutTextFieldWith(textStyle style: UIFont.TextStyle, placeholderText: String) -> UITextField {
let textField = UITextField()
textField.translatesAutoresizingMaskIntoCons... |
3b897b6b681bc9c02570b03654202c69c48551fc | app/views/sessions/new.html.haml | app/views/sessions/new.html.haml | .page-header
%h1= t(:sign_in)
= form_tag sessions_path, :html => { class: "form-horizontal" } do
.form-group
= label_tag :username, t(:username), class: 'col-lg-2 control-label'
.col-lg-10
= text_field_tag :username, nil, class: 'form-control'
.form-group
= label_tag :password, t(:password), cla... | .page-header
%h1= t(:sign_in)
= form_tag sessions_path, class: "form-horizontal" do
.form-group
= label_tag :username, t(:username), class: 'col-lg-2 control-label'
.col-lg-10
= text_field_tag :username, nil, class: 'form-control'
.form-group
= label_tag :password, t(:password), class: 'col-lg-2... | Fix session new template class | Fix session new template class
| Haml | mit | youanden/eplus,youanden/eplus | haml | ## Code Before:
.page-header
%h1= t(:sign_in)
= form_tag sessions_path, :html => { class: "form-horizontal" } do
.form-group
= label_tag :username, t(:username), class: 'col-lg-2 control-label'
.col-lg-10
= text_field_tag :username, nil, class: 'form-control'
.form-group
= label_tag :password, t... |
a237857cf242bbf9f6462973c68239827661fbe4 | app/models/comment.rb | app/models/comment.rb | class Comment < ActiveRecord::Base
belongs_to :author, class_name: User
has_many :votes
end
| class Comment < ActiveRecord::Base
belongs_to :author, class_name: User
has_many :votes, :as => :voteable
validates :body, presence: true
validates :author, presence: true
end
| Add validations and polymorphic relationship | Add validations and polymorphic relationship
| Ruby | mit | katekourbatova/helium-overflow,katekourbatova/helium-overflow,katekourbatova/helium-overflow | ruby | ## Code Before:
class Comment < ActiveRecord::Base
belongs_to :author, class_name: User
has_many :votes
end
## Instruction:
Add validations and polymorphic relationship
## Code After:
class Comment < ActiveRecord::Base
belongs_to :author, class_name: User
has_many :votes, :as => :voteable
validates :body,... |
0a0afed84b904045088437177952818bde22c49d | samples/react/ReactGrid/ReactApp/components/PeopleGrid.jsx | samples/react/ReactGrid/ReactApp/components/PeopleGrid.jsx | import React from 'react';
import Griddle from 'griddle-react';
import { CustomPager } from './CustomPager.jsx';
import { fakeData } from '../data/fakeData.js';
import { columnMeta } from '../data/columnMeta.jsx';
const resultsPerPage = 10;
const fakeDataWithAction = fakeData.map(data => Object.assign(data, {actions: ... | import React from 'react';
import Griddle from 'griddle-react';
import { CustomPager } from './CustomPager.jsx';
import { fakeData } from '../data/fakeData.js';
import { columnMeta } from '../data/columnMeta.jsx';
const resultsPerPage = 10;
// Griddle requires each row to have a property matching each column, even if ... | Add comment about why the 'actions' property is being patched on | Add comment about why the 'actions' property is being patched on
| JSX | apache-2.0 | aspnet/AspNetCore,aspnet/AspNetCore,aspnet/AspNetCore,aspnet/AspNetCore,aspnet/AspNetCore,aspnet/AspNetCore,aspnet/AspNetCore,aspnet/AspNetCore,aspnet/AspNetCore | jsx | ## Code Before:
import React from 'react';
import Griddle from 'griddle-react';
import { CustomPager } from './CustomPager.jsx';
import { fakeData } from '../data/fakeData.js';
import { columnMeta } from '../data/columnMeta.jsx';
const resultsPerPage = 10;
const fakeDataWithAction = fakeData.map(data => Object.assign(... |
0497334b8fcd159da7b3d7ecdf703b3e67c180e0 | app/models/category.rb | app/models/category.rb | class Category < ActiveRecord::Base
translates :title
active_admin_translates :title
acts_as_list
has_one :referencement, as: :attachable, dependent: :destroy
accepts_nested_attributes_for :referencement, reject_if: :all_blank, allow_destroy: true
delegate :description, :keywords, to: :referencement, pre... | class Category < ActiveRecord::Base
translates :title
active_admin_translates :title
acts_as_list
has_one :referencement, as: :attachable, dependent: :destroy
accepts_nested_attributes_for :referencement, reject_if: :all_blank, allow_destroy: true
delegate :description, :keywords, to: :referencement, pre... | Add Search option for categories | Add Search option for categories
| Ruby | mit | lr-agenceweb/rails-starter,lr-agenceweb/rails-starter,lr-agenceweb/rails-starter,lr-agenceweb/rails-starter | ruby | ## Code Before:
class Category < ActiveRecord::Base
translates :title
active_admin_translates :title
acts_as_list
has_one :referencement, as: :attachable, dependent: :destroy
accepts_nested_attributes_for :referencement, reject_if: :all_blank, allow_destroy: true
delegate :description, :keywords, to: :re... |
c3296b21e40be3a5cb7060ceb8f1b6db1fd79e65 | build_msvc/vcpkg.json | build_msvc/vcpkg.json | {
"name": "bitcoin-core",
"version-string": "1",
"dependencies": [
"berkeleydb",
"boost-multi-index",
"boost-process",
"boost-signals2",
"boost-test",
"sqlite3",
"double-conversion",
{
"name": "libevent",
"features": ["thread"]
},
"zeromq"
],
"builtin-baseli... | {
"name": "bitcoin-core",
"version-string": "1",
"dependencies": [
"berkeleydb",
"boost-multi-index",
"boost-process",
"boost-signals2",
"boost-test",
"sqlite3",
{
"name": "libevent",
"features": ["thread"]
},
"zeromq"
],
"builtin-baseline": "b86c0c35b88e2bf3557... | Drop `double-conversion` from MSVC dependencies | build: Drop `double-conversion` from MSVC dependencies
Qt uses its own `double-conversion`.
| JSON | mit | fujicoin/fujicoin,instagibbs/bitcoin,andreaskern/bitcoin,ajtowns/bitcoin,bitcoin/bitcoin,tecnovert/particl-core,ajtowns/bitcoin,GroestlCoin/GroestlCoin,achow101/bitcoin,fanquake/bitcoin,anditto/bitcoin,AkioNak/bitcoin,kallewoof/bitcoin,particl/particl-core,dscotese/bitcoin,AkioNak/bitcoin,andreaskern/bitcoin,jambolo/bi... | json | ## Code Before:
{
"name": "bitcoin-core",
"version-string": "1",
"dependencies": [
"berkeleydb",
"boost-multi-index",
"boost-process",
"boost-signals2",
"boost-test",
"sqlite3",
"double-conversion",
{
"name": "libevent",
"features": ["thread"]
},
"zeromq"
],
... |
e21f8ca837ff9dba1a0a67e692fb7a226bce1c91 | lib/nixToJS.nix | lib/nixToJS.nix | {stdenv}:
expr:
let
nixToJS = expr:
if expr == null then "null"
else
if builtins.isBool expr then
if expr then "true" else "false"
else if builtins.isInt expr then builtins.toString expr
else if builtins.isString expr then "\"${expr}\""
else if builtins.isList expr then "[ ${stdenv.lib.co... | {stdenv}:
expr:
let
nixToJS = expr:
if expr == null then "null"
else
if builtins.isBool expr then
if expr then "true" else "false"
else if builtins.isInt expr then builtins.toString expr
else if builtins.isString expr then "\"${expr}\""
else if builtins.isList expr then "[ ${stdenv.lib.co... | Fix conversion process a bit, a function is forbidden but the rest is not | Fix conversion process a bit, a function is forbidden but the rest is not
| Nix | mit | svanderburg/nijs,svanderburg/nijs | nix | ## Code Before:
{stdenv}:
expr:
let
nixToJS = expr:
if expr == null then "null"
else
if builtins.isBool expr then
if expr then "true" else "false"
else if builtins.isInt expr then builtins.toString expr
else if builtins.isString expr then "\"${expr}\""
else if builtins.isList expr then "[... |
492fdc48b043f94b7baed13b8fe6ff1b80b4c8b4 | scss/typography/_tag.scss | scss/typography/_tag.scss | //
// Siimple - minimal css framework for flat and clean websites
// Under the MIT LICENSE.
// License: https://github.com/siimple/siimple/blob/master/LICENSE.md
// Repository: https://github.com/siimple
// Website: https://www.siimple.xyz
//
//Tag variables
$siimple-tag-height: 22px;
$siimple-tag-font-size: 12p... | //
// Siimple - minimal css framework for flat and clean websites
// Under the MIT LICENSE.
// License: https://github.com/siimple/siimple/blob/master/LICENSE.md
// Repository: https://github.com/siimple
// Website: https://www.siimple.xyz
//
@import "siimple-colors/scss/_all.scss";
@import "../_variables.scss";
... | Rewrite tags mixins to single class | Rewrite tags mixins to single class
| SCSS | mit | siimple/siimple,jmjuanes/siimple,jmjuanes/siimple,siimple/siimple | scss | ## Code Before:
//
// Siimple - minimal css framework for flat and clean websites
// Under the MIT LICENSE.
// License: https://github.com/siimple/siimple/blob/master/LICENSE.md
// Repository: https://github.com/siimple
// Website: https://www.siimple.xyz
//
//Tag variables
$siimple-tag-height: 22px;
$siimple-ta... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.