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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
273249d28f038c94e3890dd7679f067409970ac5 | xfire-core/src/main/org/codehaus/xfire/handler/EndpointHandler.java | xfire-core/src/main/org/codehaus/xfire/handler/EndpointHandler.java | package org.codehaus.xfire.handler;
import org.codehaus.xfire.MessageContext;
/**
* By virtue of XFire being stream based, a service can not write its
* response until the very end of processing. So a service which needs
* to write response headers but do so first before writing the
* SOAP Body. The writeRespon... | package org.codehaus.xfire.handler;
import org.codehaus.xfire.MessageContext;
import org.codehaus.xfire.fault.XFireFault;
/**
* By virtue of XFire being stream based, a service can not write its
* response until the very end of processing. So a service which needs
* to write response headers but do so first before... | Fix the JavaServiceHandler so the response is written when its supposed to be. | Fix the JavaServiceHandler so the response is written when its
supposed to be.
git-svn-id: 9326b53cbc4a8f4c3d02979b62b178127d5150fe@101 c7d0bf07-ec0d-0410-b2cc-d48fa9be22ba
| Java | mit | eduardodaluz/xfire,eduardodaluz/xfire | java | ## Code Before:
package org.codehaus.xfire.handler;
import org.codehaus.xfire.MessageContext;
/**
* By virtue of XFire being stream based, a service can not write its
* response until the very end of processing. So a service which needs
* to write response headers but do so first before writing the
* SOAP Body. ... |
f34a38dfcaae82dc0b2de6cfc27749128a1d79c9 | .github/release-drafter.yml | .github/release-drafter.yml | _extends: .github
tag-template: analysis-model-$NEXT_MINOR_VERSION
| _extends: .github
tag-template: analysis-model-$NEXT_MINOR_VERSION
name-template: Analysis Model $NEXT_PATCH_VERSION
| Add release drafter name template. | Add release drafter name template.
| YAML | mit | jenkinsci/analysis-model,jenkinsci/analysis-model,jenkinsci/analysis-model,jenkinsci/analysis-model | yaml | ## Code Before:
_extends: .github
tag-template: analysis-model-$NEXT_MINOR_VERSION
## Instruction:
Add release drafter name template.
## Code After:
_extends: .github
tag-template: analysis-model-$NEXT_MINOR_VERSION
name-template: Analysis Model $NEXT_PATCH_VERSION
|
3c14f5d0e3912e783b15a1de5468343307a142e9 | src/Command/ContainerAwareCommand.php | src/Command/ContainerAwareCommand.php | <?php
/*
* This file is part of the awurth/silex-user package.
*
* (c) Alexis Wurth <awurth.dev@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace AWurth\SilexUser\Command;
use LogicException;
use Psr\Container... | <?php
/*
* This file is part of the awurth/silex-user package.
*
* (c) Alexis Wurth <awurth.dev@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace AWurth\SilexUser\Command;
use Psr\Container\ContainerInterface;... | Set the container in the constructor | Set the container in the constructor
| PHP | mit | awurth/silex-user,awurth/silex-user | php | ## Code Before:
<?php
/*
* This file is part of the awurth/silex-user package.
*
* (c) Alexis Wurth <awurth.dev@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace AWurth\SilexUser\Command;
use LogicException;
u... |
c077ea76ba62f3fff54e12715e64f188714e3a3f | README.md | README.md | A simple one window WatchApp, written in C.
| A simple one window WatchApp, written in C.

| Add screenshot from the CloudPebble emulator. | Add screenshot from the CloudPebble emulator. | Markdown | mit | tcpiplab/PebbleTrapped,tcpiplab/PebbleTrapped | markdown | ## Code Before:
A simple one window WatchApp, written in C.
## Instruction:
Add screenshot from the CloudPebble emulator.
## Code After:
A simple one window WatchApp, written in C.

|
e120a1941b272c666c946814592913ca601d4058 | sbt-runner/src/main/scala/com.olegych.scastie.sbt/FormatActor.scala | sbt-runner/src/main/scala/com.olegych.scastie.sbt/FormatActor.scala | package com.olegych.scastie
package sbt
import akka.actor.Actor
import com.olegych.scastie.api.{FormatRequest, FormatResponse, ScalaTarget}
import org.scalafmt.config.ScalafmtRunner.Dialect
import org.scalafmt.config.{ScalafmtConfig, ScalafmtRunner}
import org.scalafmt.{Formatted, Scalafmt}
import org.slf4j.LoggerFact... | package com.olegych.scastie
package sbt
import akka.actor.Actor
import com.olegych.scastie.api.{FormatRequest, FormatResponse, ScalaTarget}
import org.scalafmt.config.ScalafmtRunner.Dialect
import org.scalafmt.config.{ScalafmtConfig, ScalafmtRunner}
import org.scalafmt.{Formatted, Scalafmt}
import org.slf4j.LoggerFact... | Support formatting of Scala3 worksheet | Support formatting of Scala3 worksheet
| Scala | apache-2.0 | scalacenter/scastie,scalacenter/scastie,scalacenter/scastie | scala | ## Code Before:
package com.olegych.scastie
package sbt
import akka.actor.Actor
import com.olegych.scastie.api.{FormatRequest, FormatResponse, ScalaTarget}
import org.scalafmt.config.ScalafmtRunner.Dialect
import org.scalafmt.config.{ScalafmtConfig, ScalafmtRunner}
import org.scalafmt.{Formatted, Scalafmt}
import org.... |
f23509bf6026b969c7317fb51adc1910083bce36 | src/styles/partials/AdminMenu.scss | src/styles/partials/AdminMenu.scss | @import '../Constants';
.AdminMenu__mainItem {
font-weight: bold !important;
}
.AdminMenu__item {
padding-left: 16px !important;
}
@media only screen and (min-width: $screen-min-sm) {
.AdminMenu__show-xs {
display: none !important;
}
}
@media only screen and (max-width: $screen-max-xs) {
... | @import '../Constants';
.AdminMenu__mainItem {
}
.AdminMenu__item {
padding-left: 16px !important;
}
@media only screen and (min-width: $screen-min-sm) {
.AdminMenu__show-xs {
display: none !important;
}
}
@media only screen and (max-width: $screen-max-xs) {
.AdminMenu__hide-xs {
di... | Remove bold on main items in menu | Remove bold on main items in menu
| SCSS | mit | ungdev/flux2-client,ungdev/flux2-client,ungdev/flux2-client | scss | ## Code Before:
@import '../Constants';
.AdminMenu__mainItem {
font-weight: bold !important;
}
.AdminMenu__item {
padding-left: 16px !important;
}
@media only screen and (min-width: $screen-min-sm) {
.AdminMenu__show-xs {
display: none !important;
}
}
@media only screen and (max-width: $scr... |
56f5cc3ece93db4a773fd444583e485acf1cc793 | app/_includes/config.html | app/_includes/config.html | <script id="config_tmpl" type="text/template">
<div id="config">
<div class="wrapper">
<a class="configBtn" href="#" title="Close" role="button">×</a>
<h3>Configure site options</h3>
<section>
<h4>Change theme</h4>
<ul id="styleSwitcher">
<li><a class="on" href="#" id="standard"><i clas... | <script id="config_tmpl" type="text/template">
<div id="config">
<div class="wrapper">
<a class="configBtn" href="#" title="Close" role="button">×</a>
<h3>Configure site options</h3>
<section>
<h4>Change theme</h4>
<ul id="styleSwitcher">
<li><a class="on" href="#" id="standard"><i clas... | Make external link toggler show 'on' by default | Make external link toggler show 'on' by default
| HTML | mit | richardwestenra/richardwestenra-dev,richardwestenra/richardwestenra-dev,richardwestenra/richardwestenra-dev | html | ## Code Before:
<script id="config_tmpl" type="text/template">
<div id="config">
<div class="wrapper">
<a class="configBtn" href="#" title="Close" role="button">×</a>
<h3>Configure site options</h3>
<section>
<h4>Change theme</h4>
<ul id="styleSwitcher">
<li><a class="on" href="#" id="s... |
97fbcc7fd794b8c3fbabbce95fe4c255b0ba6361 | coin-selfservice-war/src/main/java/nl/surfnet/coin/selfservice/api/rest/UsersController.java | coin-selfservice-war/src/main/java/nl/surfnet/coin/selfservice/api/rest/UsersController.java | package nl.surfnet.coin.selfservice.api.rest;
import nl.surfnet.coin.selfservice.domain.CoinUser;
import nl.surfnet.coin.selfservice.util.SpringSecurity;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.st... | package nl.surfnet.coin.selfservice.api.rest;
import nl.surfnet.coin.selfservice.domain.CoinUser;
import nl.surfnet.coin.selfservice.util.SpringSecurity;
import org.owasp.esapi.waf.internal.InterceptingHTTPServletRequest;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import or... | Fix issue with the `switch-to-idp` controller mapping | Fix issue with the `switch-to-idp` controller mapping
Since the switch-to-idp path variable can be an url, including forward
slashes, it doesn’t match the specified `RequestMapping`. So this
changes the `RequestMapping` to match the complete path, including all
slashes. | Java | apache-2.0 | OpenConext/OpenConext-dashboard,OpenConext/OpenConext-dashboard,OpenConext/OpenConext-dashboard,cybera/OpenConext-dashboard,cybera/OpenConext-dashboard,OpenConext/OpenConext-dashboard,cybera/OpenConext-dashboard,cybera/OpenConext-dashboard | java | ## Code Before:
package nl.surfnet.coin.selfservice.api.rest;
import nl.surfnet.coin.selfservice.domain.CoinUser;
import nl.surfnet.coin.selfservice.util.SpringSecurity;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.sp... |
54edca05e14abc563c9128809f0221e586e557dc | setup-makefiles.sh | setup-makefiles.sh |
set -e
VENDOR=lge
DEVICE=hammerhead
# Load extractutils and do some sanity checks
MY_DIR="${BASH_SOURCE%/*}"
if [[ ! -d "$MY_DIR" ]]; then MY_DIR="$PWD"; fi
CM_ROOT="$MY_DIR"/../../..
HELPER="$CM_ROOT"/vendor/cm/build/tools/extract_utils.sh
if [ ! -f "$HELPER" ]; then
echo "Unable to find helper script at $HEL... |
set -e
INITIAL_COPYRIGHT_YEAR=2013
VENDOR=lge
DEVICE=hammerhead
# Load extractutils and do some sanity checks
MY_DIR="${BASH_SOURCE%/*}"
if [[ ! -d "$MY_DIR" ]]; then MY_DIR="$PWD"; fi
CM_ROOT="$MY_DIR"/../../..
HELPER="$CM_ROOT"/vendor/cm/build/tools/extract_utils.sh
if [ ! -f "$HELPER" ]; then
echo "Unable ... | Set initial copyright year for extract script | hammerhead: Set initial copyright year for extract script
Use new variable introduced in I6895b5b69bc7ba399042ac3c29e17f3209d15f1b
Change-Id: Ic6d9f6b1316c10aabdf89d6e8e972e32e2ff0039
| Shell | apache-2.0 | maruos/android_device_lge_hammerhead,maruos/android_device_lge_hammerhead,maruos/android_device_lge_hammerhead,maruos/android_device_lge_hammerhead | shell | ## Code Before:
set -e
VENDOR=lge
DEVICE=hammerhead
# Load extractutils and do some sanity checks
MY_DIR="${BASH_SOURCE%/*}"
if [[ ! -d "$MY_DIR" ]]; then MY_DIR="$PWD"; fi
CM_ROOT="$MY_DIR"/../../..
HELPER="$CM_ROOT"/vendor/cm/build/tools/extract_utils.sh
if [ ! -f "$HELPER" ]; then
echo "Unable to find helpe... |
80d0d6d4110036c346c5c45daf8ec2ef221fd6ce | scripts/install_doxygen.sh | scripts/install_doxygen.sh |
set -ev
# Fetch and build updated version of Doxygen from source.
wget http://ftp.stack.nl/pub/users/dimitri/doxygen-1.8.11.src.tar.gz
tar -xzvf doxygen-1.8.11.src.tar.gz
cd doxygen-1.8.11 && ./configure --prefix=$HOME/doxygen && make && make install
|
set -ev
# Fetch and build updated version of Doxygen from source.
wget http://ftp.stack.nl/pub/users/dimitri/doxygen-1.8.11.src.tar.gz
tar -xzvf doxygen-1.8.11.src.tar.gz
cd doxygen-1.8.11
mkdir build
cd build
cmake -G "Unix Makefiles" ..
make
make install | Fix commands to install Doxygen from source for Travis setup. | Fix commands to install Doxygen from source for Travis setup.
| Shell | mit | ennehekma/enne-stage,abhi-agrawal/ATOM_ADR,abhi-agrawal/ATOM_ADR,ennehekma/enne-stage,kartikkumar/cpp-project,kartikkumar/cppbase,kartikkumar/cpp-project,abhi-agrawal/TestAtomProject,ennehekma/enne-stage,abhi-agrawal/TestAtomProject | shell | ## Code Before:
set -ev
# Fetch and build updated version of Doxygen from source.
wget http://ftp.stack.nl/pub/users/dimitri/doxygen-1.8.11.src.tar.gz
tar -xzvf doxygen-1.8.11.src.tar.gz
cd doxygen-1.8.11 && ./configure --prefix=$HOME/doxygen && make && make install
## Instruction:
Fix commands to install Doxygen fr... |
f85ff86c047e4ada2fdf5168bf946f1186716320 | bin/pill.bat | bin/pill.bat | @echo off
echo "Not yet"
| @echo off
IF "%~1"=="" (
goto usage
) ELSE IF "%~1"=="init" (
mkdir _pill\bin
set CONDA_BIN_PATH="conda info --root"
set CONDA_DEFAULT_ENV
) ELSE IF "%~1"=="in" (
echo "Ready to go in"
) ELSE IF "%~1" == "out" (
echo "Ready to go out"
) ELSE (
echo "error"
goto usage
exit /b 1
)
exit /b
:usage
echo ... | Switch statement in batch file | Switch statement in batch file
| Batchfile | mit | malev/pill | batchfile | ## Code Before:
@echo off
echo "Not yet"
## Instruction:
Switch statement in batch file
## Code After:
@echo off
IF "%~1"=="" (
goto usage
) ELSE IF "%~1"=="init" (
mkdir _pill\bin
set CONDA_BIN_PATH="conda info --root"
set CONDA_DEFAULT_ENV
) ELSE IF "%~1"=="in" (
echo "Ready to go in"
) ELSE IF "%~1" ==... |
d9e198c2199dd8d5de6f6f643862abb6d6e8dc77 | packages.txt | packages.txt | autoconf
automake
brew-cask
cairo
cask
ccat
cmake
cscope
ctags
czmq
direnv
docker
emacs
fontconfig
fontforge
fpp
freetype
fzf
gdbm
gettext
git
gitsh
glib
go
gobject-introspection
harfbuzz
htop-osx
hub
icu4c
jmeter
jpeg
libevent
libffi
libgpg-error
libksba
libpng
libsodium
libtiff
libtool
libyaml
liftoff
mercurial
mysql... | autoconf
automake
cairo
cask
ccat
cmake
cscope
ctags
czmq
direnv
docker
emacs
fontconfig
fontforge
fpp
freetype
fzf
gdbm
gettext
git
gitsh
glib
go
gobject-introspection
harfbuzz
htop-osx
hub
icu4c
jmeter
jpeg
libevent
libffi
libgpg-error
libksba
libpng
libsodium
libtiff
libtool
libyaml
liftoff
mercurial
mysql
nvm
opens... | Remove brew-cask which would lead to an error | Remove brew-cask which would lead to an error
Why:
*
This change addresses the need by:
*
| Text | mit | YepengFan/dotfiles,YepengFan/dotfiles | text | ## Code Before:
autoconf
automake
brew-cask
cairo
cask
ccat
cmake
cscope
ctags
czmq
direnv
docker
emacs
fontconfig
fontforge
fpp
freetype
fzf
gdbm
gettext
git
gitsh
glib
go
gobject-introspection
harfbuzz
htop-osx
hub
icu4c
jmeter
jpeg
libevent
libffi
libgpg-error
libksba
libpng
libsodium
libtiff
libtool
libyaml
liftoff... |
34f96c2f25556024f9095ddd1536654a23ac632f | json/test_rapid.cpp | json/test_rapid.cpp |
using namespace std;
void read_file(string filename, stringstream &buffer){
ifstream f(filename.c_str());
if (f)
{
buffer << f.rdbuf();
f.close();
}
}
using namespace rapidjson;
int main() {
std::stringstream ss;
read_file("./1.json", ss);
string text = ss.str();
Document jobj; jobj... |
using namespace std;
using namespace rapidjson;
int main() {
FILE* fp = std::fopen("./1.json", "r");
char buffer[65536];
FileReadStream frs(fp, buffer, sizeof(buffer));
Document jobj;
jobj.ParseStream(frs);
const Value &coordinates = jobj["coordinates"];
int len = coordinates.Size();
... | Use FileReadStream instead of multiple conversions. | Use FileReadStream instead of multiple conversions.
Doubles timing and reduce memory usage.
| C++ | mit | kostya/benchmarks,chalucha/benchmarks,erickt/benchmarks,erickt/benchmarks,kostya/benchmarks,erickt/benchmarks,kostya/benchmarks,chalucha/benchmarks,erickt/benchmarks,chalucha/benchmarks,chalucha/benchmarks,erickt/benchmarks,erickt/benchmarks,erickt/benchmarks,erickt/benchmarks,chalucha/benchmarks,kostya/benchmarks,chal... | c++ | ## Code Before:
using namespace std;
void read_file(string filename, stringstream &buffer){
ifstream f(filename.c_str());
if (f)
{
buffer << f.rdbuf();
f.close();
}
}
using namespace rapidjson;
int main() {
std::stringstream ss;
read_file("./1.json", ss);
string text = ss.str();
Doc... |
d8299f295a5cdfdcfa10ca305695519a557310c3 | README.md | README.md |
Tinycsockets is a thin cross-platform socket library written in C. It focuses on minimal a minimal
footprint and simple usage. See the example folder for information on how to use it.
## MFAQ (Made up Frequently Asked Questions)
- How do I contribute?
You can create a merge-request at gitlan.com. Please note that we... | Tinycsockets
============
Tinycsockets is a thin cross-platform socket library written in C. It focuses on a minimal
footprint and on simple usage.
Currently support:
- Windows
Usage
------------
```C
#include <tinycsocket.h>
TinyCSocketCtx* socketCtx = NULL;
tinycsocket_create_socket(&socketCtx);
tinycsocket_conn... | Fix layout and basic readme info | Fix layout and basic readme info
| Markdown | mit | dosshell/tinycsockets,dosshell/tinycsockets,dosshell/tinycsockets | markdown | ## Code Before:
Tinycsockets is a thin cross-platform socket library written in C. It focuses on minimal a minimal
footprint and simple usage. See the example folder for information on how to use it.
## MFAQ (Made up Frequently Asked Questions)
- How do I contribute?
You can create a merge-request at gitlan.com. Ple... |
2fd30735d9c678ab81d812b29a95bd1780ed7324 | stylesheets/_mixin.media-queries.scss | stylesheets/_mixin.media-queries.scss | @mixin respond-min($width) {
@if $ie-version < 9 {
@content;
}
@else {
@media screen and (min-width: $width) {
@content;
}
}
}
@mixin respond-max($width) {
@if $ie-version < 9 {
@if $width >= $screen-medium {
@content;
}
}
@els... | @mixin respond-min($width) {
@if $ie-version < 9 {
@content;
}
@else {
@media screen and (min-width: $width) {
@content;
}
}
}
@mixin respond-max($width) {
@if $ie-version < 9 {
@if $width >= $screen-medium {
@content;
}
}
@els... | Add mixin for min-width and max-width MQs. | Add mixin for min-width and max-width MQs.
| SCSS | mit | jadu/pulsar,jadu/pulsar,jadu/pulsar | scss | ## Code Before:
@mixin respond-min($width) {
@if $ie-version < 9 {
@content;
}
@else {
@media screen and (min-width: $width) {
@content;
}
}
}
@mixin respond-max($width) {
@if $ie-version < 9 {
@if $width >= $screen-medium {
@content;
... |
74b6acc2c98dccbd3cd6cd32837ca3380785b51b | README.md | README.md | miniramp
========
Miniramp recommends new SoundCloud artists to listen to, based on an artist you already like.
All data is from the very cool SoundCloud [API](http://developers.soundcloud.com/)
Check it out at [miniramp.net](http://miniramp.net/)
| miniramp
========
Miniramp recommends new SoundCloud artists to listen to, based on an artist you already like.
All data is from the very cool SoundCloud [API](http://developers.soundcloud.com/)
Check it out at [miniramp.net](http://miniramp.net/)
graphics
========
As of Jan 2015, Miniramp also hosts some graphics... | Add graphics stuff to readme | Add graphics stuff to readme | Markdown | mit | oldhill/miniramp,oldhill/miniramp,oldhill/miniramp | markdown | ## Code Before:
miniramp
========
Miniramp recommends new SoundCloud artists to listen to, based on an artist you already like.
All data is from the very cool SoundCloud [API](http://developers.soundcloud.com/)
Check it out at [miniramp.net](http://miniramp.net/)
## Instruction:
Add graphics stuff to readme
## Code... |
690f0bf8c504d034842367e9321fc2871618fdf1 | lib/upstream/tracker/helper.rb | lib/upstream/tracker/helper.rb | require 'upstream/tracker'
module Upstream
module Tracker
module Helper
def get_config_dir
directory = File.join(ENV['HOME'], '.upstream-tracker')
unless Dir.exist?(directory)
Dir.mkdir(directory)
end
directory
end
def get_config_path
File.join... | require 'upstream/tracker'
module Upstream
module Tracker
module Helper
def get_config_dir
directory = File.join(ENV['HOME'], '.upstream-tracker')
unless Dir.exist?(directory)
Dir.mkdir(directory)
end
directory
end
def get_config_path
File.join... | Add function to get path of component | Add function to get path of component
| Ruby | mit | kenhys/upstream-tracker | ruby | ## Code Before:
require 'upstream/tracker'
module Upstream
module Tracker
module Helper
def get_config_dir
directory = File.join(ENV['HOME'], '.upstream-tracker')
unless Dir.exist?(directory)
Dir.mkdir(directory)
end
directory
end
def get_config_path
... |
4340909c0d46645a6658cbdc18c23bde93825a0e | src/MicroAPI/Model.php | src/MicroAPI/Model.php | <?php
namespace MicroAPI;
use MicroAPI\Injector;
class Model
{
/**
* Access a service from the injector
*
* @param $serviceName - The name of the service
* @return mixed
*/
public function getService($serviceName)
{
return Injector::getInstance()->getService($serviceName)... | <?php
namespace MicroAPI;
use MicroAPI\Injector;
class Model
{
/**
* Access a service from the injector
*
* @param $serviceName - The name of the service
* @return mixed
*/
public static function _service($serviceName)
{
return Injector::getInstance()->getService($service... | Allow accessing services from a static context | Allow accessing services from a static context
| PHP | apache-2.0 | tomlerendu/MicroAPI | php | ## Code Before:
<?php
namespace MicroAPI;
use MicroAPI\Injector;
class Model
{
/**
* Access a service from the injector
*
* @param $serviceName - The name of the service
* @return mixed
*/
public function getService($serviceName)
{
return Injector::getInstance()->getServi... |
4c5b6342ea0400ab779126b27f14d615b1f961e6 | docker/docker-compose.build.yaml | docker/docker-compose.build.yaml | ---
version: "3.2"
services:
web:
image: "${IMAGE_NAME:-portal_web}:${TAG:-latest}"
build:
context: ..
dockerfile: docker/Dockerfile
args:
- debian_repo="${DEBIAN_REPO:-http://dl.bintray.com/v1/content/uwcirg/${BINTRAY_DEB_REPO:-true_nth}}"
builder:
build:
context: ..
... | ---
version: "3.2"
services:
web:
image: "${IMAGE_NAME:-portal_web}:${TAG:-latest}"
build:
context: ..
dockerfile: docker/Dockerfile
args:
- debian_repo="${DEBIAN_REPO:-http://dl.bintray.com/v1/content/uwcirg/${BINTRAY_DEB_REPO:-true_nth}}"
builder:
build:
context: ..
... | Clone from local repo by default | Clone from local repo by default
| YAML | bsd-3-clause | uwcirg/true_nth_usa_portal,uwcirg/true_nth_usa_portal,uwcirg/true_nth_usa_portal,uwcirg/true_nth_usa_portal | yaml | ## Code Before:
---
version: "3.2"
services:
web:
image: "${IMAGE_NAME:-portal_web}:${TAG:-latest}"
build:
context: ..
dockerfile: docker/Dockerfile
args:
- debian_repo="${DEBIAN_REPO:-http://dl.bintray.com/v1/content/uwcirg/${BINTRAY_DEB_REPO:-true_nth}}"
builder:
build:
... |
705c67feb7b765c06e167a330d3fb1cc7cd6d8e1 | lib/ruboty/handers/fizzbuzz.rb | lib/ruboty/handers/fizzbuzz.rb | require 'ruboty/Fizzbuzz/actions/fizzbuzz'
module Ruboty
module Handler
class Fizzbuzz < Base
end
end
end
| require 'ruboty/Fizzbuzz/actions/fizzbuzz'
module Ruboty
module Handler
class Fizzbuzz < Base
on /fizzbuzz (?<number>.*?)\z/, name: 'fizzbuzz', description: 'output fizzbuzz result'
end
end
end
| Add on method in handler | Add on method in handler
| Ruby | mit | ta1kt0me/ruboty-fizzbuzz,ta1kt0me/ruboty-fizzbuzz | ruby | ## Code Before:
require 'ruboty/Fizzbuzz/actions/fizzbuzz'
module Ruboty
module Handler
class Fizzbuzz < Base
end
end
end
## Instruction:
Add on method in handler
## Code After:
require 'ruboty/Fizzbuzz/actions/fizzbuzz'
module Ruboty
module Handler
class Fizzbuzz < Base
on /fizzbuzz (?<numb... |
53718c8c91135a823c28eac05c73269fe6491df3 | cache/redis/redis.go | cache/redis/redis.go | package redis
import (
"github.com/DMarby/picsum-photos/cache"
"github.com/mediocregopher/radix/v3"
)
// Provider implements a redis cache
type Provider struct {
pool *radix.Pool
}
// New returns a new Provider instance
func New(address string, poolSize int) (*Provider, error) {
// Use the default pool, which ha... | package redis
import (
"github.com/DMarby/picsum-photos/cache"
"github.com/mediocregopher/radix/v3"
)
// Provider implements a redis cache
type Provider struct {
pool *radix.Pool
}
// New returns a new Provider instance
func New(address string, poolSize int) (*Provider, error) {
// Use the default pool, which ha... | Use radix.MaybeNil for detecting if something doesn't exist in the cache | Use radix.MaybeNil for detecting if something doesn't exist in the cache
| Go | mit | DMarby/unsplash-it,DMarby/unsplash-it | go | ## Code Before:
package redis
import (
"github.com/DMarby/picsum-photos/cache"
"github.com/mediocregopher/radix/v3"
)
// Provider implements a redis cache
type Provider struct {
pool *radix.Pool
}
// New returns a new Provider instance
func New(address string, poolSize int) (*Provider, error) {
// Use the defaul... |
97974657b06a7def883256162e732109aa75865d | lib/hyper_paranoid.rb | lib/hyper_paranoid.rb | require "hyper_paranoid/version"
module HyperParanoid
class Railtie < Rails::Railtie
config.app_generators do |g|
g.templates.unshift File::expand_path("../templates", __FILE__)
end
end
end
| require "hyper_paranoid/version"
module HyperParanoid
class Railtie < Rails::Railtie
initializer "require stuff" do
require "acts_as_paranoid"
end
config.app_generators do |g|
g.templates.unshift File::expand_path("../templates", __FILE__)
end
end
end
| Add initializer to require acts_as_paranoid in the rails app | Add initializer to require acts_as_paranoid in the rails app
| Ruby | mit | excid3/hyper_paranoid | ruby | ## Code Before:
require "hyper_paranoid/version"
module HyperParanoid
class Railtie < Rails::Railtie
config.app_generators do |g|
g.templates.unshift File::expand_path("../templates", __FILE__)
end
end
end
## Instruction:
Add initializer to require acts_as_paranoid in the rails app
## Code After:
r... |
70607a7d3fa7e6ddd51b0e62f3b405517566468b | DataMapperInterface.php | DataMapperInterface.php | <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Form;
/**
* @author Bernhard Schussek <bschussek@gma... | <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Form;
/**
* @author Bernhard Schussek <bschussek@gma... | Add \Traversable typehint to phpdoc | Add \Traversable typehint to phpdoc
| PHP | mit | symfony/Form | php | ## Code Before:
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Form;
/**
* @author Bernhard Schusse... |
24041b6cb068a1f0033a8fcca37d7da3cad51913 | src/components/Button/SpinnerWrapper.js | src/components/Button/SpinnerWrapper.js | import styled from 'styled-components';
const SpinnerWrapper = styled.span`
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
margin: auto;
`;
export default SpinnerWrapper;
| import styled from 'styled-components';
const SpinnerWrapper = styled.span`
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
display: flex;
align-items: center;
justify-content: center;
`;
export default SpinnerWrapper;
| Fix positioning of the spinner inside the button | Fix positioning of the spinner inside the button
| JavaScript | mit | thegrinder/basic-styled-uikit | javascript | ## Code Before:
import styled from 'styled-components';
const SpinnerWrapper = styled.span`
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
margin: auto;
`;
export default SpinnerWrapper;
## Instruction:
Fix positioning of the spinner inside the button
## Code After:
import styled from 'styled... |
9a178036eeb2c39b168712fed3388007217933ea | src/advent_2017/day_06.cljc | src/advent_2017/day_06.cljc | (ns advent-2017.day-06
(:require
#?(:cljs [planck.core :refer [slurp read-string]])
[#?(:clj clojure.java.io :cljs planck.io) :as io]
[clojure.string :as str]))
(def input (-> "advent_2017/day_06/input" io/resource slurp))
(def data (as-> input x (str/trim x) (str/split x #"\t") (mapv read-string x)))
(de... | (ns advent-2017.day-06
(:require
#?(:cljs [planck.core :refer [slurp read-string]])
[#?(:clj clojure.java.io :cljs planck.io) :as io]
[clojure.string :as str]))
(def input (-> "advent_2017/day_06/input" io/resource slurp))
(def data (as-> input x (str/trim x) (str/split x #"\t") (mapv read-string x)))
(de... | Work in terms of maps so merge-with use is correct | Work in terms of maps so merge-with use is correct
| Clojure | epl-1.0 | mfikes/advent-of-cljs | clojure | ## Code Before:
(ns advent-2017.day-06
(:require
#?(:cljs [planck.core :refer [slurp read-string]])
[#?(:clj clojure.java.io :cljs planck.io) :as io]
[clojure.string :as str]))
(def input (-> "advent_2017/day_06/input" io/resource slurp))
(def data (as-> input x (str/trim x) (str/split x #"\t") (mapv read-... |
e6ffbfd741dbc5e04acc643ad19ec5ce3e60cfb6 | Samples/Media/materials/programs/GLSL400/TesselationTd.glsl | Samples/Media/materials/programs/GLSL400/TesselationTd.glsl |
uniform mat4 g_mWorldViewProjection;
// GLSL tessellation evaluation shader (domain shader in HLSL).
layout(triangles, equal_spacing, cw) in;
void main()
{
// Baricentric interpolation
vec3 finalPos = (gl_TessCoord.x * gl_in[0].gl_Position + gl_TessCoord.y * gl_in[1].gl_Position + gl_TessCoord.z * gl_in[2].gl... |
uniform mat4 g_mWorldViewProjection;
// GLSL tessellation evaluation shader (domain shader in HLSL).
layout(triangles, equal_spacing, cw) in;
void main()
{
// Baricentric interpolation
vec3 finalPos = vec3(gl_TessCoord.x * gl_in[0].gl_Position +
gl_TessCoord.y * gl_in[1].gl_Position ... | Fix implicit vec 3 to vec4 conversion in Tessellation sample GLSL shader | [samples] Fix implicit vec 3 to vec4 conversion in Tessellation sample GLSL shader
| GLSL | mit | paroj/ogre,OGRECave/ogre,paroj/ogre,RealityFactory/ogre,paroj/ogre,RealityFactory/ogre,OGRECave/ogre,RealityFactory/ogre,RealityFactory/ogre,RealityFactory/ogre,paroj/ogre,OGRECave/ogre,OGRECave/ogre,paroj/ogre,OGRECave/ogre | glsl | ## Code Before:
uniform mat4 g_mWorldViewProjection;
// GLSL tessellation evaluation shader (domain shader in HLSL).
layout(triangles, equal_spacing, cw) in;
void main()
{
// Baricentric interpolation
vec3 finalPos = (gl_TessCoord.x * gl_in[0].gl_Position + gl_TessCoord.y * gl_in[1].gl_Position + gl_TessCoord... |
d66b9ecd1a28042ab6511c99b4cba38480b1b96e | fpsd/test/test_sketchy_sites.py | fpsd/test/test_sketchy_sites.py |
import unittest
from crawler import Crawler
class CrawlBadSitesTest(unittest.TestCase):
bad_sites = ["http://jlve2diknf45qwjv.onion/",
"http://money2mxtcfcauot.onion",
"http://22222222aziwzse2.onion"]
def test_crawl_of_bad_sites(self):
with Crawler(restart_on_sketc... |
import unittest
from crawler import Crawler
class CrawlBadSitesTest(unittest.TestCase):
bad_sites = ["http://jlve2diknf45qwjv.onion/",
"http://money2mxtcfcauot.onion",
"http://22222222aziwzse2.onion",
"http://xnsoeplvch4fhk3s.onion",
"http://up... | Add more sites that cause unusual errors | Add more sites that cause unusual errors
| Python | agpl-3.0 | freedomofpress/fingerprint-securedrop,freedomofpress/FingerprintSecureDrop,freedomofpress/FingerprintSecureDrop,freedomofpress/fingerprint-securedrop,freedomofpress/fingerprint-securedrop | python | ## Code Before:
import unittest
from crawler import Crawler
class CrawlBadSitesTest(unittest.TestCase):
bad_sites = ["http://jlve2diknf45qwjv.onion/",
"http://money2mxtcfcauot.onion",
"http://22222222aziwzse2.onion"]
def test_crawl_of_bad_sites(self):
with Crawler(... |
420b5dc5f1da47a88aff71a6067a0a533b3d1c80 | fish/oh-my-fish/pkg/jrduncans/init.fish | fish/oh-my-fish/pkg/jrduncans/init.fish | function mkdir --wraps mkdir
command mkdir -p $argv;
end
function jl --description 'colorized pretty-printed JSON in less'
jq -C . | less -R $argv;
end
if status --is-login
set PATH $PATH ~/bin ~/.local/bin
end
function ll --wraps exa
exa -lh --git $argv
end
function amm-cats --wraps amm
amm -p ~/dotfiles... | function mkdir --wraps mkdir
command mkdir -p $argv;
end
function jl --description 'colorized pretty-printed JSON in less'
jq -C . | less -R $argv;
end
if status --is-login
set PATH $PATH ~/bin ~/.local/bin
end
status --is-interactive; and source (rbenv init -|psub)
function ll --wraps exa
exa -lh --git $ar... | Add wrapper for ammonite to use from brew; add rbenv | Add wrapper for ammonite to use from brew; add rbenv
| fish | mit | jrduncans/dotfiles | fish | ## Code Before:
function mkdir --wraps mkdir
command mkdir -p $argv;
end
function jl --description 'colorized pretty-printed JSON in less'
jq -C . | less -R $argv;
end
if status --is-login
set PATH $PATH ~/bin ~/.local/bin
end
function ll --wraps exa
exa -lh --git $argv
end
function amm-cats --wraps amm
a... |
7c7667e555ef423cbbabd0717f8bdee3c1396a0f | app/views/layouts/application.html.haml | app/views/layouts/application.html.haml | !!!
%html.no-js{lang: 'en'}
%head
%meta{content: 'width=device-width, initial-scale=1.0', name: 'viewport'}
%title= content_for?(:title) ? yield(:title) : I18n.t('brand.name')
%meta{content: (content_for?(:description) ? yield(:description) : I18n.t('brand.name')), name: 'description'}
= stylesheet_li... | !!!
%html.no-js{lang: 'en'}
%head
%meta{content: 'width=device-width, initial-scale=1.0', name: 'viewport'}
%title= content_for?(:title) ? yield(:title) : I18n.t('brand.name')
%meta{content: (content_for?(:description) ? yield(:description) : I18n.t('brand.name')), name: 'description'}
= stylesheet_li... | Add prefix to body classes | Add prefix to body classes
Helps avoid class name collisions. | Haml | mit | Wendersonandes/emerge,Wendersonandes/emerge,Wendersonandes/emerge | haml | ## Code Before:
!!!
%html.no-js{lang: 'en'}
%head
%meta{content: 'width=device-width, initial-scale=1.0', name: 'viewport'}
%title= content_for?(:title) ? yield(:title) : I18n.t('brand.name')
%meta{content: (content_for?(:description) ? yield(:description) : I18n.t('brand.name')), name: 'description'}
... |
b147fe62836078bb15fa4b7ca144a29c63aa012f | .travis.yml | .travis.yml | language: ruby
rvm:
- 1.9.3
- 2.0.0
- 2.1.1
before_install:
- gem install puppet
- gem install librarian-puppet
- librarian-puppet install
script:
- ./run_tests.sh
notifications:
email: false
matrix:
allow_failures:
- rvm: 2.0.0
- rvm: 2.1.1
branches:
except:
- /^build_\d+$/
| language: ruby
rvm:
- 1.9.3
- 2.1.1
before_install:
- gem install puppet
- gem install librarian-puppet
- librarian-puppet install
script:
- ./run_tests.sh
notifications:
email: false
branches:
except:
- /^build_\d+$/
| Test on 1.9.3 and 2.1.1 & be less wimpy | Test on 1.9.3 and 2.1.1 & be less wimpy
Our actual "supported" ruby version is 1.9.3 so we should definitely be
testing on that.
It seems excessive to test on an additional *two* future ruby versions. Just
test on 2.1.1 and don't be wimpy about allowing failures. It's currently
passing so let's prep ourselves for a f... | YAML | mit | alphagov/pp-puppet,alphagov/pp-puppet,alphagov/pp-puppet,alphagov/pp-puppet | yaml | ## Code Before:
language: ruby
rvm:
- 1.9.3
- 2.0.0
- 2.1.1
before_install:
- gem install puppet
- gem install librarian-puppet
- librarian-puppet install
script:
- ./run_tests.sh
notifications:
email: false
matrix:
allow_failures:
- rvm: 2.0.0
- rvm: 2.1.1
branches:
except:
- /^build_\d... |
32f7ddeec8a67338d0e9663d0fb1f3e448e6d32a | renderer/components/box/box-image.css | renderer/components/box/box-image.css | .base {
position: relative;
width: 100%;
min-height: 20px;
text-align: center;
cursor: zoom-in;
}
.base svg {
position: absolute;
width: 25px;
height: 25px;
padding: 2px;
fill: white;
background-color: rgba(180, 180, 180, 0.5);
border-radius: 4px;
margin-top: 5px;
margin-left: 5px;
z-index: 100;
}
.bas... | .base {
position: relative;
width: 100%;
min-height: 20px;
text-align: center;
cursor: zoom-in;
overflow: hidden;
}
.base svg {
position: absolute;
width: 25px;
height: 25px;
padding: 2px;
fill: white;
background-color: rgba(180, 180, 180, 0.5);
border-radius: 4px;
margin-top: 5px;
margin-left: 5px;
z-... | Fix blur blur blur blur... | Fix blur blur blur blur...
| CSS | mit | akameco/PixivDeck,akameco/PixivDeck | css | ## Code Before:
.base {
position: relative;
width: 100%;
min-height: 20px;
text-align: center;
cursor: zoom-in;
}
.base svg {
position: absolute;
width: 25px;
height: 25px;
padding: 2px;
fill: white;
background-color: rgba(180, 180, 180, 0.5);
border-radius: 4px;
margin-top: 5px;
margin-left: 5px;
z-ind... |
88a174b69b5146ada43ce34470696aeb335b78a9 | vrnetlab.sh | vrnetlab.sh |
vr_mgmt_ip() {
VROUTER=$1
VR_ADDRESS=$(docker inspect --format '{{.NetworkSettings.IPAddress}}' $VROUTER)
echo $VR_ADDRESS
}
vrssh() {
VROUTER=$1
USER=$2
VR_ADDRESS=$(vr_mgmt_ip $VROUTER)
if [ -z "$USER" ] ; then
ssh $VR_ADDRESS -l vrnetlab
else
ssh $VR_ADDRESS -l $USER
fi
}
vrcons() {
VROUTER=$1
te... |
vr_mgmt_ip() {
VROUTER=$1
VR_ADDRESS=$(docker inspect --format '{{.NetworkSettings.IPAddress}}' $VROUTER)
echo $VR_ADDRESS
}
vrssh() {
VROUTER=$1
USER=$2
VR_ADDRESS=$(vr_mgmt_ip $VROUTER)
if [ -z "$USER" ] ; then
ssh -oStrictHostKeyChecking=no $VR_ADDRESS -l vrnetlab
else
ssh -oStrictHostKeyChecking=no ... | Disable strict host key checking for vrssh shorthand | Disable strict host key checking for vrssh shorthand
| Shell | mit | bdreisbach/vrnetlab,holmahenkel/vrnetlab,mzagozen/vrnetlab,mzagozen/vrnetlab,bdreisbach/vrnetlab,plajjan/vrnetlab,plajjan/vrnetlab,holmahenkel/vrnetlab | shell | ## Code Before:
vr_mgmt_ip() {
VROUTER=$1
VR_ADDRESS=$(docker inspect --format '{{.NetworkSettings.IPAddress}}' $VROUTER)
echo $VR_ADDRESS
}
vrssh() {
VROUTER=$1
USER=$2
VR_ADDRESS=$(vr_mgmt_ip $VROUTER)
if [ -z "$USER" ] ; then
ssh $VR_ADDRESS -l vrnetlab
else
ssh $VR_ADDRESS -l $USER
fi
}
vrcons() {... |
7d604df10e86db5b4f81923f655a86639e07669d | www/search_cse.php | www/search_cse.php | <?php
#
# Copyright (c) 2000-2013 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
# This file is part of the Emulab network testbed software.
#
# This file is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published by
# the Free S... | <?php
#
# Copyright (c) 2000-2013 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
# This file is part of the Emulab network testbed software.
#
# This file is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published by
# the Free S... | Send the query over to plone in the proper format. | Send the query over to plone in the proper format.
| PHP | agpl-3.0 | nmc-probe/emulab-nome,nmc-probe/emulab-nome,nmc-probe/emulab-nome,nmc-probe/emulab-nome,nmc-probe/emulab-nome,nmc-probe/emulab-nome,nmc-probe/emulab-nome,nmc-probe/emulab-nome,nmc-probe/emulab-nome,nmc-probe/emulab-nome,nmc-probe/emulab-nome | php | ## Code Before:
<?php
#
# Copyright (c) 2000-2013 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
# This file is part of the Emulab network testbed software.
#
# This file is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.