commit
stringlengths
40
40
old_file
stringlengths
4
184
new_file
stringlengths
4
184
old_contents
stringlengths
1
3.6k
new_contents
stringlengths
5
3.38k
subject
stringlengths
15
778
message
stringlengths
16
6.74k
lang
stringclasses
201 values
license
stringclasses
13 values
repos
stringlengths
6
116k
config
stringclasses
201 values
content
stringlengths
137
7.24k
diff
stringlengths
26
5.55k
diff_length
int64
1
123
relative_diff_length
float64
0.01
89
n_lines_added
int64
0
108
n_lines_deleted
int64
0
106
779e2a2dc3dab65ed4092a627e5dcf83d830b2a4
app/assets/stylesheets/base/_body.css.scss
app/assets/stylesheets/base/_body.css.scss
body { font-size: 16px; padding: 70px 0; } a { color: $brown; &:hover { color: $brown; } } p { margin-bottom: 25px; } .jumbotron { background: $lighter-grey; padding: 0 0 20px 0; } .btn-default, .pagination > li > a, .pagination > li > span { color: $brown; background: $lighter-brown; border-color: $light-brown; &:hover, &:focus, &:disabled { color: $brown; background: $light-brown; border-color: $light-brown; } } .pagination > .disabled > span, .pagination > .disabled > span:hover, .pagination > .disabled > span:focus, .pagination > .disabled > a, .pagination > .disabled > a:hover, .pagination > .disabled > a:focus { color: $transparent-brown; background: $light-brown; border-color: $light-brown; } .btn-primary { color: white; background: $brown; border-color: $brown; &:hover, &:focus { color: white; background: $brown; border-color: $brown; } } .alert-danger, .alert-success { color: $brown; background: $lighter-brown; border-color: $light-brown; }
body { font-size: 16px; padding: 70px 0; } a { color: $brown; &:hover { color: $brown; } } p { margin-bottom: 25px; } .btn-default, .pagination > li > a, .pagination > li > span { color: $brown; background: $lighter-brown; border-color: $light-brown; &:hover, &:focus, &:disabled { color: $brown; background: $light-brown; border-color: $light-brown; } } .pagination > .disabled > span, .pagination > .disabled > span:hover, .pagination > .disabled > span:focus, .pagination > .disabled > a, .pagination > .disabled > a:hover, .pagination > .disabled > a:focus { color: $transparent-brown; background: $light-brown; border-color: $light-brown; } .btn-primary { color: white; background: $brown; border-color: $brown; &:hover, &:focus { color: white; background: $brown; border-color: $brown; } } .alert-danger, .alert-success { color: $brown; background: $lighter-brown; border-color: $light-brown; } .jumbotron { background: $lighter-grey; } @media (max-width: 768px) { .jumbotron { padding: 0 0 10px 0; } }
Remove jumbotron padding on smaller screens
Remove jumbotron padding on smaller screens
SCSS
mit
codecation/trailmix,codecation/trailmix,codecation/trailmix,codecation/trailmix
scss
## Code Before: body { font-size: 16px; padding: 70px 0; } a { color: $brown; &:hover { color: $brown; } } p { margin-bottom: 25px; } .jumbotron { background: $lighter-grey; padding: 0 0 20px 0; } .btn-default, .pagination > li > a, .pagination > li > span { color: $brown; background: $lighter-brown; border-color: $light-brown; &:hover, &:focus, &:disabled { color: $brown; background: $light-brown; border-color: $light-brown; } } .pagination > .disabled > span, .pagination > .disabled > span:hover, .pagination > .disabled > span:focus, .pagination > .disabled > a, .pagination > .disabled > a:hover, .pagination > .disabled > a:focus { color: $transparent-brown; background: $light-brown; border-color: $light-brown; } .btn-primary { color: white; background: $brown; border-color: $brown; &:hover, &:focus { color: white; background: $brown; border-color: $brown; } } .alert-danger, .alert-success { color: $brown; background: $lighter-brown; border-color: $light-brown; } ## Instruction: Remove jumbotron padding on smaller screens ## Code After: body { font-size: 16px; padding: 70px 0; } a { color: $brown; &:hover { color: $brown; } } p { margin-bottom: 25px; } .btn-default, .pagination > li > a, .pagination > li > span { color: $brown; background: $lighter-brown; border-color: $light-brown; &:hover, &:focus, &:disabled { color: $brown; background: $light-brown; border-color: $light-brown; } } .pagination > .disabled > span, .pagination > .disabled > span:hover, .pagination > .disabled > span:focus, .pagination > .disabled > a, .pagination > .disabled > a:hover, .pagination > .disabled > a:focus { color: $transparent-brown; background: $light-brown; border-color: $light-brown; } .btn-primary { color: white; background: $brown; border-color: $brown; &:hover, &:focus { color: white; background: $brown; border-color: $brown; } } .alert-danger, .alert-success { color: $brown; background: $lighter-brown; border-color: $light-brown; } .jumbotron { background: $lighter-grey; } @media (max-width: 768px) { .jumbotron { padding: 0 0 10px 0; } }
body { font-size: 16px; padding: 70px 0; } a { color: $brown; &:hover { color: $brown; } } p { margin-bottom: 25px; - } - - .jumbotron { - background: $lighter-grey; - padding: 0 0 20px 0; } .btn-default, .pagination > li > a, .pagination > li > span { color: $brown; background: $lighter-brown; border-color: $light-brown; &:hover, &:focus, &:disabled { color: $brown; background: $light-brown; border-color: $light-brown; } } .pagination > .disabled > span, .pagination > .disabled > span:hover, .pagination > .disabled > span:focus, .pagination > .disabled > a, .pagination > .disabled > a:hover, .pagination > .disabled > a:focus { color: $transparent-brown; background: $light-brown; border-color: $light-brown; } .btn-primary { color: white; background: $brown; border-color: $brown; &:hover, &:focus { color: white; background: $brown; border-color: $brown; } } .alert-danger, .alert-success { color: $brown; background: $lighter-brown; border-color: $light-brown; } + + .jumbotron { + background: $lighter-grey; + } + + @media (max-width: 768px) { + .jumbotron { + padding: 0 0 10px 0; + } + }
15
0.234375
10
5
03e097d964fb19e9210c5872cb932d9ce114ea6d
scripts/create_dist.sh
scripts/create_dist.sh
builddir=$PWD if ! test -e $builddir/src/renderer; then echo "ERROR: the $builddir/renderer file is missing." exit 1 fi destdir=$(mktemp --directory) prefix=usr/local # create directory structure # mkdir --parents $destdir/$prefix || exit 1 mkdir --parents $destdir/$prefix/bin mkdir --parents $destdir/$prefix/lib/renderer target=$builddir/src/renderer version=$($target -version | cut -f 3 -d ' ') arch=$($target -version | cut -f 4 -d ' ') cp $target $destdir/$prefix/bin/ chmod a+x $destdir/$prefix/bin/renderer # webkit library files # libs="libWebKit1 libQtWebKit libQtCore" for lib in $libs; do src=$(ldd $builddir/src/renderer | grep $lib | cut -f 3 -d ' ') if test -n "$src"; then cp $src $destdir/$prefix/lib/renderer/ fi done output_file="renderer-${version}-${arch}.tar.bz2" tar -C $destdir -cvf - $prefix | bzip2 -c - > $output_file echo "Removing $destdir" rm -r $destdir echo "Created $output_file"
builddir=$PWD if ! test -e $builddir/src/renderer; then echo "ERROR: the $builddir/renderer file is missing." exit 1 fi destdir=$(mktemp --directory) prefix=usr/local # create directory structure # mkdir --parents $destdir/$prefix || exit 1 mkdir --parents $destdir/$prefix/bin mkdir --parents $destdir/$prefix/lib/renderer target=$builddir/src/renderer version=$(xvfb-run $target -version | cut -f 3 -d ' ') arch=$(xvfb-run $target -version | cut -f 4 -d ' ') cp $target $destdir/$prefix/bin/ chmod a+x $destdir/$prefix/bin/renderer # webkit library files # libs="libWebKit1 libQtWebKit" for lib in $libs; do src=$(ldd $builddir/src/renderer | grep $lib | cut -f 3 -d ' ') if test -n "$src"; then cp $src $destdir/$prefix/lib/renderer/ fi done output_file="renderer-${version}-${arch}.tar.bz2" tar -C $destdir -cvf - $prefix | bzip2 -c - > $output_file echo "Removing $destdir" rm -r $destdir echo "Created $output_file"
Use xvfb-run when getting the program version.
Use xvfb-run when getting the program version.
Shell
agpl-3.0
bjandras/Renderer,bjandras/Renderer,bjandras/Renderer,bjandras/Renderer
shell
## Code Before: builddir=$PWD if ! test -e $builddir/src/renderer; then echo "ERROR: the $builddir/renderer file is missing." exit 1 fi destdir=$(mktemp --directory) prefix=usr/local # create directory structure # mkdir --parents $destdir/$prefix || exit 1 mkdir --parents $destdir/$prefix/bin mkdir --parents $destdir/$prefix/lib/renderer target=$builddir/src/renderer version=$($target -version | cut -f 3 -d ' ') arch=$($target -version | cut -f 4 -d ' ') cp $target $destdir/$prefix/bin/ chmod a+x $destdir/$prefix/bin/renderer # webkit library files # libs="libWebKit1 libQtWebKit libQtCore" for lib in $libs; do src=$(ldd $builddir/src/renderer | grep $lib | cut -f 3 -d ' ') if test -n "$src"; then cp $src $destdir/$prefix/lib/renderer/ fi done output_file="renderer-${version}-${arch}.tar.bz2" tar -C $destdir -cvf - $prefix | bzip2 -c - > $output_file echo "Removing $destdir" rm -r $destdir echo "Created $output_file" ## Instruction: Use xvfb-run when getting the program version. ## Code After: builddir=$PWD if ! test -e $builddir/src/renderer; then echo "ERROR: the $builddir/renderer file is missing." exit 1 fi destdir=$(mktemp --directory) prefix=usr/local # create directory structure # mkdir --parents $destdir/$prefix || exit 1 mkdir --parents $destdir/$prefix/bin mkdir --parents $destdir/$prefix/lib/renderer target=$builddir/src/renderer version=$(xvfb-run $target -version | cut -f 3 -d ' ') arch=$(xvfb-run $target -version | cut -f 4 -d ' ') cp $target $destdir/$prefix/bin/ chmod a+x $destdir/$prefix/bin/renderer # webkit library files # libs="libWebKit1 libQtWebKit" for lib in $libs; do src=$(ldd $builddir/src/renderer | grep $lib | cut -f 3 -d ' ') if test -n "$src"; then cp $src $destdir/$prefix/lib/renderer/ fi done output_file="renderer-${version}-${arch}.tar.bz2" tar -C $destdir -cvf - $prefix | bzip2 -c - > $output_file echo "Removing $destdir" rm -r $destdir echo "Created $output_file"
builddir=$PWD if ! test -e $builddir/src/renderer; then echo "ERROR: the $builddir/renderer file is missing." exit 1 fi destdir=$(mktemp --directory) prefix=usr/local # create directory structure # mkdir --parents $destdir/$prefix || exit 1 mkdir --parents $destdir/$prefix/bin mkdir --parents $destdir/$prefix/lib/renderer target=$builddir/src/renderer - version=$($target -version | cut -f 3 -d ' ') + version=$(xvfb-run $target -version | cut -f 3 -d ' ') ? +++++++++ - arch=$($target -version | cut -f 4 -d ' ') + arch=$(xvfb-run $target -version | cut -f 4 -d ' ') ? +++++++++ cp $target $destdir/$prefix/bin/ chmod a+x $destdir/$prefix/bin/renderer # webkit library files # - libs="libWebKit1 libQtWebKit libQtCore" ? ---------- + libs="libWebKit1 libQtWebKit" for lib in $libs; do src=$(ldd $builddir/src/renderer | grep $lib | cut -f 3 -d ' ') if test -n "$src"; then cp $src $destdir/$prefix/lib/renderer/ fi done output_file="renderer-${version}-${arch}.tar.bz2" tar -C $destdir -cvf - $prefix | bzip2 -c - > $output_file echo "Removing $destdir" rm -r $destdir echo "Created $output_file"
6
0.146341
3
3
1731146a30d2935618acfcaca38056b48d2edd0d
Android.mk
Android.mk
ifeq ($(filter msm8610,$(TARGET_BOARD_PLATFORM)),) ifneq ($(BUILD_TINY_ANDROID),true) LOCAL_PATH := $(call my-dir) # HAL module implemenation stored in include $(CLEAR_VARS) ifneq ($(filter msm8610,$(TARGET_BOARD_PLATFORM)),) LOCAL_MODULE := sensors.$(TARGET_BOARD_PLATFORM) LOCAL_CFLAGS := -DTARGET_8610 else LOCAL_MODULE := sensors.msm8930 endif LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw LOCAL_MODULE_TAGS := optional LOCAL_CFLAGS += -DLOG_TAG=\"Sensors\" ifeq ($(call is-board-platform,msm8960),true) LOCAL_CFLAGS += -DTARGET_8930 endif LOCAL_SRC_FILES := \ sensors.cpp \ SensorBase.cpp \ LightSensor.cpp \ ProximitySensor.cpp \ AkmSensor.cpp \ Accelerometer.cpp \ Mpu3050.cpp \ Bmp180.cpp \ InputEventReader.cpp LOCAL_SHARED_LIBRARIES := liblog libcutils libdl include $(BUILD_SHARED_LIBRARY) endif #BUILD_TINY_ANDROID endif
ifneq ($(BUILD_TINY_ANDROID),true) LOCAL_PATH := $(call my-dir) # HAL module implemenation stored in include $(CLEAR_VARS) ifneq ($(filter msm8610,$(TARGET_BOARD_PLATFORM)),) LOCAL_MODULE := sensors.$(TARGET_BOARD_PLATFORM) LOCAL_CFLAGS := -DTARGET_8610 else LOCAL_MODULE := sensors.msm8930 endif LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw LOCAL_MODULE_TAGS := optional LOCAL_CFLAGS += -DLOG_TAG=\"Sensors\" ifeq ($(call is-board-platform,msm8960),true) LOCAL_CFLAGS += -DTARGET_8930 endif LOCAL_SRC_FILES := \ sensors.cpp \ SensorBase.cpp \ LightSensor.cpp \ ProximitySensor.cpp \ AkmSensor.cpp \ Accelerometer.cpp \ Mpu3050.cpp \ Bmp180.cpp \ InputEventReader.cpp LOCAL_SHARED_LIBRARIES := liblog libcutils libdl include $(BUILD_SHARED_LIBRARY) endif #BUILD_TINY_ANDROID
Revert "sensors: disable sensors HAL for 8610"
Revert "sensors: disable sensors HAL for 8610" This reverts commit f20aba48e1c53bd3fd44a423c1e03e7b36ddfd7a Change-Id: I7796356c232ed1c7f58789ec1215a6986973b325
Makefile
apache-2.0
TheStrix/platform-hardware-qcom-sensors,redmi2/android_hardware_qcom_sensors,redmi2/android_hardware_qcom_sensors,TheStrix/platform-hardware-qcom-sensors,dianlujitao/platform_hardware_qcom_sensors,dianlujitao/platform_hardware_qcom_sensors
makefile
## Code Before: ifeq ($(filter msm8610,$(TARGET_BOARD_PLATFORM)),) ifneq ($(BUILD_TINY_ANDROID),true) LOCAL_PATH := $(call my-dir) # HAL module implemenation stored in include $(CLEAR_VARS) ifneq ($(filter msm8610,$(TARGET_BOARD_PLATFORM)),) LOCAL_MODULE := sensors.$(TARGET_BOARD_PLATFORM) LOCAL_CFLAGS := -DTARGET_8610 else LOCAL_MODULE := sensors.msm8930 endif LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw LOCAL_MODULE_TAGS := optional LOCAL_CFLAGS += -DLOG_TAG=\"Sensors\" ifeq ($(call is-board-platform,msm8960),true) LOCAL_CFLAGS += -DTARGET_8930 endif LOCAL_SRC_FILES := \ sensors.cpp \ SensorBase.cpp \ LightSensor.cpp \ ProximitySensor.cpp \ AkmSensor.cpp \ Accelerometer.cpp \ Mpu3050.cpp \ Bmp180.cpp \ InputEventReader.cpp LOCAL_SHARED_LIBRARIES := liblog libcutils libdl include $(BUILD_SHARED_LIBRARY) endif #BUILD_TINY_ANDROID endif ## Instruction: Revert "sensors: disable sensors HAL for 8610" This reverts commit f20aba48e1c53bd3fd44a423c1e03e7b36ddfd7a Change-Id: I7796356c232ed1c7f58789ec1215a6986973b325 ## Code After: ifneq ($(BUILD_TINY_ANDROID),true) LOCAL_PATH := $(call my-dir) # HAL module implemenation stored in include $(CLEAR_VARS) ifneq ($(filter msm8610,$(TARGET_BOARD_PLATFORM)),) LOCAL_MODULE := sensors.$(TARGET_BOARD_PLATFORM) LOCAL_CFLAGS := -DTARGET_8610 else LOCAL_MODULE := sensors.msm8930 endif LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw LOCAL_MODULE_TAGS := optional LOCAL_CFLAGS += -DLOG_TAG=\"Sensors\" ifeq ($(call is-board-platform,msm8960),true) LOCAL_CFLAGS += -DTARGET_8930 endif LOCAL_SRC_FILES := \ sensors.cpp \ SensorBase.cpp \ LightSensor.cpp \ ProximitySensor.cpp \ AkmSensor.cpp \ Accelerometer.cpp \ Mpu3050.cpp \ Bmp180.cpp \ InputEventReader.cpp LOCAL_SHARED_LIBRARIES := liblog libcutils libdl include $(BUILD_SHARED_LIBRARY) endif #BUILD_TINY_ANDROID
- ifeq ($(filter msm8610,$(TARGET_BOARD_PLATFORM)),) ifneq ($(BUILD_TINY_ANDROID),true) LOCAL_PATH := $(call my-dir) # HAL module implemenation stored in include $(CLEAR_VARS) ifneq ($(filter msm8610,$(TARGET_BOARD_PLATFORM)),) LOCAL_MODULE := sensors.$(TARGET_BOARD_PLATFORM) LOCAL_CFLAGS := -DTARGET_8610 else LOCAL_MODULE := sensors.msm8930 endif LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw LOCAL_MODULE_TAGS := optional LOCAL_CFLAGS += -DLOG_TAG=\"Sensors\" ifeq ($(call is-board-platform,msm8960),true) LOCAL_CFLAGS += -DTARGET_8930 endif LOCAL_SRC_FILES := \ sensors.cpp \ SensorBase.cpp \ LightSensor.cpp \ ProximitySensor.cpp \ AkmSensor.cpp \ Accelerometer.cpp \ Mpu3050.cpp \ Bmp180.cpp \ InputEventReader.cpp LOCAL_SHARED_LIBRARIES := liblog libcutils libdl include $(BUILD_SHARED_LIBRARY) endif #BUILD_TINY_ANDROID - endif
2
0.05
0
2
71415de5039ad7d859a06fdbe1b4c7a20bd726bd
lib/test/TikiTestCase.php
lib/test/TikiTestCase.php
<?php // (c) Copyright 2002-2011 by authors of the Tiki Wiki CMS Groupware Project // // All Rights Reserved. See copyright.txt for details and a complete list of authors. // Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details. // $Id$ /* * Created on Jan 30, 2009 * * Parent class of all test cases. For some reason PHPUnit doesn't deal * well with globals, so $backupGlobals should be set to false. * Use this class to set other PHPUnit variables, as needed. * */ require_once('PHPUnit/Framework.php'); abstract class TikiTestCase extends PHPUnit_Framework_TestCase { protected $backupGlobals = FALSE; }
<?php // (c) Copyright 2002-2011 by authors of the Tiki Wiki CMS Groupware Project // // All Rights Reserved. See copyright.txt for details and a complete list of authors. // Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details. // $Id$ /* * Created on Jan 30, 2009 * * Parent class of all test cases. For some reason PHPUnit doesn't deal * well with globals, so $backupGlobals should be set to false. * Use this class to set other PHPUnit variables, as needed. * */ require_once (version_compare(PHPUnit_Runner_Version::id(), '3.5.0', '>=')) ? 'PHPUnit/Autoload.php' : 'PHPUnit/Framework.php'; abstract class TikiTestCase extends PHPUnit_Framework_TestCase { protected $backupGlobals = FALSE; }
Use the correct include based on the PHPUnit version.
[FIX] Use the correct include based on the PHPUnit version. git-svn-id: a7fabbc6a7c54ea5c67cbd16bd322330fd10cc35@36937 b456876b-0849-0410-b77d-98878d47e9d5
PHP
lgpl-2.1
oregional/tiki,tikiorg/tiki,changi67/tiki,oregional/tiki,tikiorg/tiki,tikiorg/tiki,tikiorg/tiki,oregional/tiki,changi67/tiki,changi67/tiki,oregional/tiki,changi67/tiki,changi67/tiki
php
## Code Before: <?php // (c) Copyright 2002-2011 by authors of the Tiki Wiki CMS Groupware Project // // All Rights Reserved. See copyright.txt for details and a complete list of authors. // Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details. // $Id$ /* * Created on Jan 30, 2009 * * Parent class of all test cases. For some reason PHPUnit doesn't deal * well with globals, so $backupGlobals should be set to false. * Use this class to set other PHPUnit variables, as needed. * */ require_once('PHPUnit/Framework.php'); abstract class TikiTestCase extends PHPUnit_Framework_TestCase { protected $backupGlobals = FALSE; } ## Instruction: [FIX] Use the correct include based on the PHPUnit version. git-svn-id: a7fabbc6a7c54ea5c67cbd16bd322330fd10cc35@36937 b456876b-0849-0410-b77d-98878d47e9d5 ## Code After: <?php // (c) Copyright 2002-2011 by authors of the Tiki Wiki CMS Groupware Project // // All Rights Reserved. See copyright.txt for details and a complete list of authors. // Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details. // $Id$ /* * Created on Jan 30, 2009 * * Parent class of all test cases. For some reason PHPUnit doesn't deal * well with globals, so $backupGlobals should be set to false. * Use this class to set other PHPUnit variables, as needed. * */ require_once (version_compare(PHPUnit_Runner_Version::id(), '3.5.0', '>=')) ? 'PHPUnit/Autoload.php' : 'PHPUnit/Framework.php'; abstract class TikiTestCase extends PHPUnit_Framework_TestCase { protected $backupGlobals = FALSE; }
<?php // (c) Copyright 2002-2011 by authors of the Tiki Wiki CMS Groupware Project // // All Rights Reserved. See copyright.txt for details and a complete list of authors. // Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details. // $Id$ /* * Created on Jan 30, 2009 * * Parent class of all test cases. For some reason PHPUnit doesn't deal * well with globals, so $backupGlobals should be set to false. * Use this class to set other PHPUnit variables, as needed. * */ - require_once('PHPUnit/Framework.php'); + require_once (version_compare(PHPUnit_Runner_Version::id(), '3.5.0', '>=')) ? 'PHPUnit/Autoload.php' : 'PHPUnit/Framework.php'; abstract class TikiTestCase extends PHPUnit_Framework_TestCase { protected $backupGlobals = FALSE; }
2
0.095238
1
1
dd1c0445f26a3495be157dbf132516a68c9e5e37
.travis.yml
.travis.yml
services: - docker install: ./build.sh script: true after_success: ./push_to_docker_registry.sh
language: python python: - 2.7 services: - docker install: - true script: - ./build.sh after_success: - ./push_to_docker_registry.sh
Change things around a little bit
Change things around a little bit
YAML
mit
danielpops/openvas
yaml
## Code Before: services: - docker install: ./build.sh script: true after_success: ./push_to_docker_registry.sh ## Instruction: Change things around a little bit ## Code After: language: python python: - 2.7 services: - docker install: - true script: - ./build.sh after_success: - ./push_to_docker_registry.sh
+ language: python + python: + - 2.7 services: - - docker + - docker ? ++++ - install: ./build.sh - script: true + install: + - true + script: + - ./build.sh + after_success: - after_success: ./push_to_docker_registry.sh ? ^^^^^^^^^^^^^^ + - ./push_to_docker_registry.sh ? ^^^^^
14
2.8
10
4
15f16862093e527ddf20b59d075bc38a92779d29
spec/piece_under_attack_spec.js
spec/piece_under_attack_spec.js
var JSChess = require('../js-chess.js'); var _ = require('lodash'); describe('Classic Chess', function() { it('everything', function() { var army1 = new JSChess.Army({ forwardDirection: 'down' }); var army2 = new JSChess.Army({ forwardDirection: 'up' }); var board = new JSChess.Board({ army1: army1, army2: army2 }); var player1 = { name: 'Player 1', army: army1 }; var player2 = { name: 'Player 2', army: army2 }; defendingPiece = new army1.Piece('king')(); board.addPiece({ piece: defendingPiece, location: { row: 0, col: 2 } }); attackingPiece = new army2.Piece('queen')(); board.addPiece({ piece: attackingPiece, location: { row: 7, col: 2 } }); expect(board.pieceUnderAttack({ piece: defendingPiece })).toBe(true); }); });
var JSChess = require('../js-chess.js'); var IDGenerator = require('../lib/id_generator.js'); var _ = require('lodash'); describe('Classic Chess', function() { it('everything', function() { var idGenerator = new IDGenerator(); var army1 = new JSChess.Army({ idGenerator: idGenerator, forwardDirection: 'down' }); var army2 = new JSChess.Army({ idGenerator: idGenerator, forwardDirection: 'up' }); var board = new JSChess.Board({ idGenerator: idGenerator, army1: army1, army2: army2 }); var player1 = { name: 'Player 1', army: army1 }; var player2 = { name: 'Player 2', army: army2 }; defendingPiece = board.addPiece({ army: army1, rank: 'king', location: { row: 0, col: 2 } }); attackingPiece = board.addPiece({ army: army2, rank: 'queen', location: { row: 7, col: 2 } }); expect(board.pieceUnderAttack({ piece: defendingPiece })).toBe(true); }); });
Fix peice under attack spec
Fix peice under attack spec
JavaScript
bsd-2-clause
billbillington/js-chess
javascript
## Code Before: var JSChess = require('../js-chess.js'); var _ = require('lodash'); describe('Classic Chess', function() { it('everything', function() { var army1 = new JSChess.Army({ forwardDirection: 'down' }); var army2 = new JSChess.Army({ forwardDirection: 'up' }); var board = new JSChess.Board({ army1: army1, army2: army2 }); var player1 = { name: 'Player 1', army: army1 }; var player2 = { name: 'Player 2', army: army2 }; defendingPiece = new army1.Piece('king')(); board.addPiece({ piece: defendingPiece, location: { row: 0, col: 2 } }); attackingPiece = new army2.Piece('queen')(); board.addPiece({ piece: attackingPiece, location: { row: 7, col: 2 } }); expect(board.pieceUnderAttack({ piece: defendingPiece })).toBe(true); }); }); ## Instruction: Fix peice under attack spec ## Code After: var JSChess = require('../js-chess.js'); var IDGenerator = require('../lib/id_generator.js'); var _ = require('lodash'); describe('Classic Chess', function() { it('everything', function() { var idGenerator = new IDGenerator(); var army1 = new JSChess.Army({ idGenerator: idGenerator, forwardDirection: 'down' }); var army2 = new JSChess.Army({ idGenerator: idGenerator, forwardDirection: 'up' }); var board = new JSChess.Board({ idGenerator: idGenerator, army1: army1, army2: army2 }); var player1 = { name: 'Player 1', army: army1 }; var player2 = { name: 'Player 2', army: army2 }; defendingPiece = board.addPiece({ army: army1, rank: 'king', location: { row: 0, col: 2 } }); attackingPiece = board.addPiece({ army: army2, rank: 'queen', location: { row: 7, col: 2 } }); expect(board.pieceUnderAttack({ piece: defendingPiece })).toBe(true); }); });
var JSChess = require('../js-chess.js'); + var IDGenerator = require('../lib/id_generator.js'); var _ = require('lodash'); describe('Classic Chess', function() { it('everything', function() { - var army1 = new JSChess.Army({ forwardDirection: 'down' }); - var army2 = new JSChess.Army({ forwardDirection: 'up' }); + var idGenerator = new IDGenerator(); + + var army1 = new JSChess.Army({ + idGenerator: idGenerator, + forwardDirection: 'down' + }); + var army2 = new JSChess.Army({ + idGenerator: idGenerator, + forwardDirection: 'up' + }); + var board = new JSChess.Board({ + idGenerator: idGenerator, army1: army1, army2: army2 }); var player1 = { name: 'Player 1', army: army1 }; var player2 = { name: 'Player 2', army: army2 }; - defendingPiece = new army1.Piece('king')(); - board.addPiece({ - piece: defendingPiece, + defendingPiece = board.addPiece({ + army: army1, + rank: 'king', location: { row: 0, col: 2 } }); - attackingPiece = new army2.Piece('queen')(); - board.addPiece({ - piece: attackingPiece, + attackingPiece = board.addPiece({ + army: army2, + rank: 'queen', location: { row: 7, col: 2 } }); expect(board.pieceUnderAttack({ piece: defendingPiece })).toBe(true); }); });
27
0.675
19
8
750ccaaab9f79e7077be73a389ca130d5482c751
README.md
README.md
[![Build Status](https://travis-ci.org/locnguyen/typescript-node-starter.svg?branch=master)](https://travis-ci.org/locnguyen/typescript-node-starter) Barebones starter kit for server apps with TypeScript ## Quick Start Install Node dependencies ```shell $ npm install ``` Run the test suite ```shell $ npm t ``` Run the code for development and watch for changes ```shell $ npm run dev ``` Compile the code for release ```shell $ npm run build ``` Run the compiled code ```shell $ node -r ./bootstrap.js build ``` ## Docker If you want to develop in a Docker container, this project along with PostgreSQL can be brought up with ```shell docker-compose up ``` See the **docker-compose.yml** file for details on this set up.
| Travis CI | GitLab CI | | - | - | | [![Build Status](https://travis-ci.org/locnguyen/typescript-node-starter.svg?branch=master)](https://travis-ci.org/locnguyen/typescript-node-starter) | [![pipeline status](https://gitlab.com/lochnguyen/typescript-node-starter/badges/master/pipeline.svg)](https://gitlab.com/lochnguyen/typescript-node-starter/commits/master) | Barebones starter kit for server apps with TypeScript ## Quick Start Install Node dependencies ```shell $ npm install ``` Run the test suite ```shell $ npm t ``` Run the code for development and watch for changes ```shell $ npm run dev ``` Compile the code for release ```shell $ npm run build ``` Run the compiled code ```shell $ node -r ./bootstrap.js build ``` ## Docker If you want to develop in a Docker container, this project along with PostgreSQL can be brought up with ```shell docker-compose up ``` See the **docker-compose.yml** file for details on this set up.
Add GitLab CI badge to readme
Add GitLab CI badge to readme
Markdown
mit
locnguyen/typescript-node-starter,locnguyen/typescript-node-starter
markdown
## Code Before: [![Build Status](https://travis-ci.org/locnguyen/typescript-node-starter.svg?branch=master)](https://travis-ci.org/locnguyen/typescript-node-starter) Barebones starter kit for server apps with TypeScript ## Quick Start Install Node dependencies ```shell $ npm install ``` Run the test suite ```shell $ npm t ``` Run the code for development and watch for changes ```shell $ npm run dev ``` Compile the code for release ```shell $ npm run build ``` Run the compiled code ```shell $ node -r ./bootstrap.js build ``` ## Docker If you want to develop in a Docker container, this project along with PostgreSQL can be brought up with ```shell docker-compose up ``` See the **docker-compose.yml** file for details on this set up. ## Instruction: Add GitLab CI badge to readme ## Code After: | Travis CI | GitLab CI | | - | - | | [![Build Status](https://travis-ci.org/locnguyen/typescript-node-starter.svg?branch=master)](https://travis-ci.org/locnguyen/typescript-node-starter) | [![pipeline status](https://gitlab.com/lochnguyen/typescript-node-starter/badges/master/pipeline.svg)](https://gitlab.com/lochnguyen/typescript-node-starter/commits/master) | Barebones starter kit for server apps with TypeScript ## Quick Start Install Node dependencies ```shell $ npm install ``` Run the test suite ```shell $ npm t ``` Run the code for development and watch for changes ```shell $ npm run dev ``` Compile the code for release ```shell $ npm run build ``` Run the compiled code ```shell $ node -r ./bootstrap.js build ``` ## Docker If you want to develop in a Docker container, this project along with PostgreSQL can be brought up with ```shell docker-compose up ``` See the **docker-compose.yml** file for details on this set up.
- [![Build Status](https://travis-ci.org/locnguyen/typescript-node-starter.svg?branch=master)](https://travis-ci.org/locnguyen/typescript-node-starter) + | Travis CI | GitLab CI | + | - | - | + | [![Build Status](https://travis-ci.org/locnguyen/typescript-node-starter.svg?branch=master)](https://travis-ci.org/locnguyen/typescript-node-starter) | [![pipeline status](https://gitlab.com/lochnguyen/typescript-node-starter/badges/master/pipeline.svg)](https://gitlab.com/lochnguyen/typescript-node-starter/commits/master) | Barebones starter kit for server apps with TypeScript ## Quick Start Install Node dependencies ```shell $ npm install ``` Run the test suite ```shell $ npm t ``` Run the code for development and watch for changes ```shell $ npm run dev ``` Compile the code for release ```shell $ npm run build ``` Run the compiled code ```shell $ node -r ./bootstrap.js build ``` ## Docker If you want to develop in a Docker container, this project along with PostgreSQL can be brought up with ```shell docker-compose up ``` See the **docker-compose.yml** file for details on this set up.
4
0.086957
3
1
5c9410633d91e9dc2db07e27f005b116f797f83c
package.json
package.json
{ "name": "repl-plus", "description": "A batteries included repl.", "version": "0.1.0", "main": "index.js", "author": "Jarom Loveridge", "license": "MIT", "scripts": { "start": "node --harmony ./lib/repl-plus.js" }, "bin": { "repl-plus": "./lib/repl-plus.js", "repl-plus-mongoose": "./lib/repl-plus-mongoose" }, "keywords": [ "repl", "shell", "deferred", "promise", "co" ], "repository": { "type": "git", "url": "https://github.com/gradecam/nodejs-repl-plus.git" }, "dependencies": { "co": "^4.5.4", "commander": "^2.8.1", "lodash": "^3.9.1", "mongoose": "^4.0.6", "q": "^1.4.1" } }
{ "name": "repl-plus", "description": "A batteries included repl.", "version": "0.1.0", "main": "index.js", "author": "Jarom Loveridge", "license": "MIT", "scripts": { "start": "node --harmony ./lib/repl-plus.js" }, "bin": { "repl-plus": "./lib/repl-plus.js", "mongoose-repl-plus": "./lib/mongoose-repl-plus.js" }, "keywords": [ "repl", "shell", "deferred", "promise", "co" ], "repository": { "type": "git", "url": "https://github.com/gradecam/nodejs-repl-plus.git" }, "dependencies": { "co": "^4.5.4", "commander": "^2.8.1", "lodash": "^3.9.1", "mongoose": "^4.0.6", "q": "^1.4.1" } }
Fix reference to mongoose repl implementation.
Fix reference to mongoose repl implementation.
JSON
mit
gradecam/nodejs-repl-plus
json
## Code Before: { "name": "repl-plus", "description": "A batteries included repl.", "version": "0.1.0", "main": "index.js", "author": "Jarom Loveridge", "license": "MIT", "scripts": { "start": "node --harmony ./lib/repl-plus.js" }, "bin": { "repl-plus": "./lib/repl-plus.js", "repl-plus-mongoose": "./lib/repl-plus-mongoose" }, "keywords": [ "repl", "shell", "deferred", "promise", "co" ], "repository": { "type": "git", "url": "https://github.com/gradecam/nodejs-repl-plus.git" }, "dependencies": { "co": "^4.5.4", "commander": "^2.8.1", "lodash": "^3.9.1", "mongoose": "^4.0.6", "q": "^1.4.1" } } ## Instruction: Fix reference to mongoose repl implementation. ## Code After: { "name": "repl-plus", "description": "A batteries included repl.", "version": "0.1.0", "main": "index.js", "author": "Jarom Loveridge", "license": "MIT", "scripts": { "start": "node --harmony ./lib/repl-plus.js" }, "bin": { "repl-plus": "./lib/repl-plus.js", "mongoose-repl-plus": "./lib/mongoose-repl-plus.js" }, "keywords": [ "repl", "shell", "deferred", "promise", "co" ], "repository": { "type": "git", "url": "https://github.com/gradecam/nodejs-repl-plus.git" }, "dependencies": { "co": "^4.5.4", "commander": "^2.8.1", "lodash": "^3.9.1", "mongoose": "^4.0.6", "q": "^1.4.1" } }
{ "name": "repl-plus", "description": "A batteries included repl.", "version": "0.1.0", "main": "index.js", "author": "Jarom Loveridge", "license": "MIT", "scripts": { "start": "node --harmony ./lib/repl-plus.js" }, "bin": { "repl-plus": "./lib/repl-plus.js", - "repl-plus-mongoose": "./lib/repl-plus-mongoose" + "mongoose-repl-plus": "./lib/mongoose-repl-plus.js" }, "keywords": [ "repl", "shell", "deferred", "promise", "co" ], "repository": { "type": "git", "url": "https://github.com/gradecam/nodejs-repl-plus.git" }, "dependencies": { "co": "^4.5.4", "commander": "^2.8.1", "lodash": "^3.9.1", "mongoose": "^4.0.6", "q": "^1.4.1" } }
2
0.060606
1
1
ecce15f103b51ece25f33490af5adaa666017a86
booksite/urls.py
booksite/urls.py
from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.tale_list, name='tale_list'), url(r'^create-book/(?P<tale_id>[0-9]+)$', views.create_book, name='create_book'), ]
from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.tale_list, name='tale_list'), url(r'^create-tale/(?P<tale_id>[0-9]+)$', views.create_tale, name='create_tale'), ]
Rename links from *book* to *tale*
Rename links from *book* to *tale*
Python
apache-2.0
mark-graciov/bookit,mark-graciov/bookit
python
## Code Before: from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.tale_list, name='tale_list'), url(r'^create-book/(?P<tale_id>[0-9]+)$', views.create_book, name='create_book'), ] ## Instruction: Rename links from *book* to *tale* ## Code After: from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.tale_list, name='tale_list'), url(r'^create-tale/(?P<tale_id>[0-9]+)$', views.create_tale, name='create_tale'), ]
from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.tale_list, name='tale_list'), - url(r'^create-book/(?P<tale_id>[0-9]+)$', views.create_book, name='create_book'), ? ^^^^ ^^^^ ^^^^ + url(r'^create-tale/(?P<tale_id>[0-9]+)$', views.create_tale, name='create_tale'), ? ^^^^ ^^^^ ^^^^ ]
2
0.285714
1
1
4a335d041960aa1dff81d3382452bbf6547357be
README.md
README.md
Miscellaneous utility scripts. - `explode` - explode directories - `finances` - tally ledger information from a JSON file - `hex2schism` - convert a 24-bit hex color to a 3-tuple for schismtracker - `moss-find` - invoke a [moss](https://github.com/jangler/moss) command with arguments given by find - `musorg` - organize audio files based on metadata using [taffy](https://github.com/jangler/taffy) - `prune` - remove empty directories from a directory tree - `taginfo` - print information about a git tag - `wdname` - rename tmux window to basename of working directory - `wri` - view formatted ri output in browser using markdown - `xsync` - synchronize clipboard with primary selection using xclip
Miscellaneous utility scripts. See [tools](https://github.com/jangler/tools) for compiled utilities. - `explode` - explode directories - `finances` - tally ledger information from a JSON file - `hex2schism` - convert a 24-bit hex color to a 3-tuple for schismtracker - `moss-find` - invoke a [moss](https://github.com/jangler/moss) command with arguments given by find - `musorg` - organize audio files based on metadata using [taffy](https://github.com/jangler/taffy) - `prune` - remove empty directories from a directory tree - `taginfo` - print information about a git tag - `wdname` - rename tmux window to basename of working directory - `wri` - view formatted ri output in browser using markdown - `xsync` - synchronize clipboard with primary selection using xclip
Add reference to tools repository
Add reference to tools repository
Markdown
unlicense
jangler/scripts,jangler/scripts,jangler/scripts
markdown
## Code Before: Miscellaneous utility scripts. - `explode` - explode directories - `finances` - tally ledger information from a JSON file - `hex2schism` - convert a 24-bit hex color to a 3-tuple for schismtracker - `moss-find` - invoke a [moss](https://github.com/jangler/moss) command with arguments given by find - `musorg` - organize audio files based on metadata using [taffy](https://github.com/jangler/taffy) - `prune` - remove empty directories from a directory tree - `taginfo` - print information about a git tag - `wdname` - rename tmux window to basename of working directory - `wri` - view formatted ri output in browser using markdown - `xsync` - synchronize clipboard with primary selection using xclip ## Instruction: Add reference to tools repository ## Code After: Miscellaneous utility scripts. See [tools](https://github.com/jangler/tools) for compiled utilities. - `explode` - explode directories - `finances` - tally ledger information from a JSON file - `hex2schism` - convert a 24-bit hex color to a 3-tuple for schismtracker - `moss-find` - invoke a [moss](https://github.com/jangler/moss) command with arguments given by find - `musorg` - organize audio files based on metadata using [taffy](https://github.com/jangler/taffy) - `prune` - remove empty directories from a directory tree - `taginfo` - print information about a git tag - `wdname` - rename tmux window to basename of working directory - `wri` - view formatted ri output in browser using markdown - `xsync` - synchronize clipboard with primary selection using xclip
- Miscellaneous utility scripts. + Miscellaneous utility scripts. See ? ++++ + [tools](https://github.com/jangler/tools) for compiled utilities. - `explode` - explode directories - `finances` - tally ledger information from a JSON file - `hex2schism` - convert a 24-bit hex color to a 3-tuple for schismtracker - `moss-find` - invoke a [moss](https://github.com/jangler/moss) command with arguments given by find - `musorg` - organize audio files based on metadata using [taffy](https://github.com/jangler/taffy) - `prune` - remove empty directories from a directory tree - `taginfo` - print information about a git tag - `wdname` - rename tmux window to basename of working directory - `wri` - view formatted ri output in browser using markdown - `xsync` - synchronize clipboard with primary selection using xclip
3
0.214286
2
1
ec392b2cc494ec5a0f1882a4b26d2336ddd94034
config/locales/en/course/mailer/assessment_closing_summary_email.yml
config/locales/en/course/mailer/assessment_closing_summary_email.yml
en: course: mailer: assessment_closing_summary_email: subject: '%{course}: Reminder about %{assessment}' message: > The following students have not submitted %{assessment}, due on %{time}: %{students}
en: course: mailer: assessment_closing_summary_email: subject: '%{course}: Reminder about %{assessment}' message: > Emails were sent to the following students to remind them that %{assessment} is due on %{time}: %{students}
Reword assessment reminder summary email.
Reword assessment reminder summary email. Mention to instructors that reminder emails have been sent to students. [ci skip]
YAML
mit
Coursemology/coursemology2,cysjonathan/coursemology2,Coursemology/coursemology2,cysjonathan/coursemology2,Coursemology/coursemology2,cysjonathan/coursemology2,Coursemology/coursemology2,Coursemology/coursemology2,Coursemology/coursemology2,Coursemology/coursemology2
yaml
## Code Before: en: course: mailer: assessment_closing_summary_email: subject: '%{course}: Reminder about %{assessment}' message: > The following students have not submitted %{assessment}, due on %{time}: %{students} ## Instruction: Reword assessment reminder summary email. Mention to instructors that reminder emails have been sent to students. [ci skip] ## Code After: en: course: mailer: assessment_closing_summary_email: subject: '%{course}: Reminder about %{assessment}' message: > Emails were sent to the following students to remind them that %{assessment} is due on %{time}: %{students}
en: course: mailer: assessment_closing_summary_email: subject: '%{course}: Reminder about %{assessment}' message: > - The following students have not submitted %{assessment}, due on %{time}: + Emails were sent to the following students to remind them that %{assessment} is due on %{time}: %{students}
2
0.222222
1
1
2c10e1e47ac90e828cca2c35bdddb0316f51ff2b
shell.nix
shell.nix
{pkgs ? import ./nixpkgs.nix {}}: with pkgs; mkShell { LANG="C.UTF-8"; buildInputs = [ less git nix stack z3 which glibcLocales cacert ]; }
{pkgs ? import ./nixpkgs.nix {}}: with pkgs; mkShell { LANG="C.UTF-8"; buildInputs = [ less git hostname nix stack z3 which glibcLocales cacert ]; }
Add hostname for nix configuration, which is needed for tests.
Add hostname for nix configuration, which is needed for tests.
Nix
bsd-3-clause
ucsd-progsys/liquidhaskell,ucsd-progsys/liquidhaskell,ucsd-progsys/liquidhaskell,ucsd-progsys/liquidhaskell,ucsd-progsys/liquidhaskell,ucsd-progsys/liquidhaskell
nix
## Code Before: {pkgs ? import ./nixpkgs.nix {}}: with pkgs; mkShell { LANG="C.UTF-8"; buildInputs = [ less git nix stack z3 which glibcLocales cacert ]; } ## Instruction: Add hostname for nix configuration, which is needed for tests. ## Code After: {pkgs ? import ./nixpkgs.nix {}}: with pkgs; mkShell { LANG="C.UTF-8"; buildInputs = [ less git hostname nix stack z3 which glibcLocales cacert ]; }
{pkgs ? import ./nixpkgs.nix {}}: with pkgs; mkShell { LANG="C.UTF-8"; buildInputs = [ less git + hostname nix stack z3 which glibcLocales cacert ]; }
1
0.052632
1
0
7dc947b5efa9e22887022325a53bc487c482a373
build.xml
build.xml
<?xml version="1.0" encoding="UTF-8"?> <project basedir="." default="fake" name="Build esteid-applets"> <!-- ant-javacard task from javacard.pro --> <target name="ant-javacard"> <ant dir="ext/ant-javacard"/> <taskdef name="javacard" classname="pro.javacard.ant.JavaCard" classpath="ext/ant-javacard/ant-javacard.jar"/> </target> <!-- FakeEstEID applet --> <target name="fake" depends="ant-javacard"> <javacard jckit="ext/sdks/jc222_kit"> <!-- FakeEstEID --> <cap output="FakeEstEID.cap" sources="src"> <applet class="org.esteid.applet.FakeEstEID" aid="D23300000045737445494420763335"/> <import exps="ext/visa_openplatform-2_0" jar="ext/visa_openplatform-2_0/visaop20.jar"/> </cap> </javacard> <!-- For testing with emulators --> <jar destfile="FakeEstEID.jar" basedir="tmp"/> </target> </project>
<?xml version="1.0" encoding="UTF-8"?> <project basedir="." default="fake" name="Build esteid-applets"> <!-- ant-javacard task from javacard.pro --> <target name="ant-javacard"> <ant dir="ext/ant-javacard"/> <taskdef name="javacard" classname="pro.javacard.ant.JavaCard" classpath="ext/ant-javacard/ant-javacard.jar"/> </target> <!-- FakeEstEID applet --> <target name="fake" depends="ant-javacard"> <javacard jckit="ext/sdks/jc222_kit"> <!-- FakeEstEID --> <cap output="FakeEstEID.cap" sources="src" classes="tmp"> <applet class="org.esteid.applet.FakeEstEID" aid="D23300000045737445494420763335"/> <import exps="ext/visa_openplatform-2_0" jar="ext/visa_openplatform-2_0/visaop20.jar"/> </cap> </javacard> <!-- For testing with emulators --> <jar destfile="FakeEstEID.jar" basedir="tmp"/> </target> </project>
Build classes to tmp folder
Build classes to tmp folder
XML
mit
martinpaljak/esteid-applets
xml
## Code Before: <?xml version="1.0" encoding="UTF-8"?> <project basedir="." default="fake" name="Build esteid-applets"> <!-- ant-javacard task from javacard.pro --> <target name="ant-javacard"> <ant dir="ext/ant-javacard"/> <taskdef name="javacard" classname="pro.javacard.ant.JavaCard" classpath="ext/ant-javacard/ant-javacard.jar"/> </target> <!-- FakeEstEID applet --> <target name="fake" depends="ant-javacard"> <javacard jckit="ext/sdks/jc222_kit"> <!-- FakeEstEID --> <cap output="FakeEstEID.cap" sources="src"> <applet class="org.esteid.applet.FakeEstEID" aid="D23300000045737445494420763335"/> <import exps="ext/visa_openplatform-2_0" jar="ext/visa_openplatform-2_0/visaop20.jar"/> </cap> </javacard> <!-- For testing with emulators --> <jar destfile="FakeEstEID.jar" basedir="tmp"/> </target> </project> ## Instruction: Build classes to tmp folder ## Code After: <?xml version="1.0" encoding="UTF-8"?> <project basedir="." default="fake" name="Build esteid-applets"> <!-- ant-javacard task from javacard.pro --> <target name="ant-javacard"> <ant dir="ext/ant-javacard"/> <taskdef name="javacard" classname="pro.javacard.ant.JavaCard" classpath="ext/ant-javacard/ant-javacard.jar"/> </target> <!-- FakeEstEID applet --> <target name="fake" depends="ant-javacard"> <javacard jckit="ext/sdks/jc222_kit"> <!-- FakeEstEID --> <cap output="FakeEstEID.cap" sources="src" classes="tmp"> <applet class="org.esteid.applet.FakeEstEID" aid="D23300000045737445494420763335"/> <import exps="ext/visa_openplatform-2_0" jar="ext/visa_openplatform-2_0/visaop20.jar"/> </cap> </javacard> <!-- For testing with emulators --> <jar destfile="FakeEstEID.jar" basedir="tmp"/> </target> </project>
<?xml version="1.0" encoding="UTF-8"?> <project basedir="." default="fake" name="Build esteid-applets"> <!-- ant-javacard task from javacard.pro --> <target name="ant-javacard"> <ant dir="ext/ant-javacard"/> <taskdef name="javacard" classname="pro.javacard.ant.JavaCard" classpath="ext/ant-javacard/ant-javacard.jar"/> </target> <!-- FakeEstEID applet --> <target name="fake" depends="ant-javacard"> <javacard jckit="ext/sdks/jc222_kit"> <!-- FakeEstEID --> - <cap output="FakeEstEID.cap" sources="src"> + <cap output="FakeEstEID.cap" sources="src" classes="tmp"> ? ++++++++++++++ <applet class="org.esteid.applet.FakeEstEID" aid="D23300000045737445494420763335"/> <import exps="ext/visa_openplatform-2_0" jar="ext/visa_openplatform-2_0/visaop20.jar"/> </cap> </javacard> <!-- For testing with emulators --> <jar destfile="FakeEstEID.jar" basedir="tmp"/> </target> </project>
2
0.095238
1
1
fa244c9b5c6e7a1d3e157e98a6a1081469ca2c54
lib/FilterPaneSearch/FilterPaneSearch.js
lib/FilterPaneSearch/FilterPaneSearch.js
import React from 'react'; import css from './FilterPaneSearch.css'; import Icon from '@folio/stripes-components/lib/Icon'; import Button from '@folio/stripes-components/lib/Button'; class FilterPaneSearch extends React.Component{ constructor(props){ super(props); this.searchInput = null; } clearSearchField(){ this.searchInput.value = ''; const evt = new Event('input', {bubbles: true}); this.searchInput.dispatchEvent(evt); } onChange() { console.log("changed: new value =", this.searchInput.value); // XXX We need to somehow feed the changed value into stripes-connect for the parent component } render(){ return( <div className={css.headerSearchContainer}> <div style={{alignSelf:"center"}}><Icon icon="search"/></div> <input className={css.headerSearchInput} ref={(ref) => this.searchInput = ref} type="text" value = {this.props.value} onChange={this.onChange.bind(this)} placeholder="Search"/> <Button className={css.headerSearchClearButton} onClick={this.clearSearchField.bind(this)} ><Icon icon="clearX" iconClassName={css.clearIcon}/></Button> </div> ); } } export default FilterPaneSearch;
import React, { PropTypes } from 'react'; import css from './FilterPaneSearch.css'; import Icon from '@folio/stripes-components/lib/Icon'; import Button from '@folio/stripes-components/lib/Button'; class FilterPaneSearch extends React.Component{ static contextTypes = { router: PropTypes.object.isRequired }; constructor(props){ super(props); this.searchInput = null; } clearSearchField(){ this.searchInput.value = ''; const evt = new Event('input', {bubbles: true}); this.searchInput.dispatchEvent(evt); } onChange() { const value = this.searchInput.value; this.context.router.transitionTo("/users/" + value); } render(){ return( <div className={css.headerSearchContainer}> <div style={{alignSelf:"center"}}><Icon icon="search"/></div> <input className={css.headerSearchInput} ref={(ref) => this.searchInput = ref} type="text" value = {this.props.value} onChange={this.onChange.bind(this)} placeholder="Search"/> <Button className={css.headerSearchClearButton} onClick={this.clearSearchField.bind(this)} ><Icon icon="clearX" iconClassName={css.clearIcon}/></Button> </div> ); } } export default FilterPaneSearch;
Set the URL to include the modified query. Part of STRIPES-85.
Set the URL to include the modified query. Part of STRIPES-85. At present we express URLs in the form: http://localhost:3000/users/water with the query in the path rather than in the URL query, as: http://localhost:3000/users?q=water That's just because at present Stripes Connect can't get at the URL query, and we want to show searching working from top to bottom. Once Stripes Connect is up to speed (probably towards the end of next week) we will change the URLs used for searching. Because that change is coming, I am not worrying too much in the short term about this wrinkle: we currently set the whole of the path to "/users/"+value, so it only works when the Users module is mounted on /users. But since that's always, I am not losing sleep.
JavaScript
apache-2.0
folio-org/ui-users,folio-org/ui-users
javascript
## Code Before: import React from 'react'; import css from './FilterPaneSearch.css'; import Icon from '@folio/stripes-components/lib/Icon'; import Button from '@folio/stripes-components/lib/Button'; class FilterPaneSearch extends React.Component{ constructor(props){ super(props); this.searchInput = null; } clearSearchField(){ this.searchInput.value = ''; const evt = new Event('input', {bubbles: true}); this.searchInput.dispatchEvent(evt); } onChange() { console.log("changed: new value =", this.searchInput.value); // XXX We need to somehow feed the changed value into stripes-connect for the parent component } render(){ return( <div className={css.headerSearchContainer}> <div style={{alignSelf:"center"}}><Icon icon="search"/></div> <input className={css.headerSearchInput} ref={(ref) => this.searchInput = ref} type="text" value = {this.props.value} onChange={this.onChange.bind(this)} placeholder="Search"/> <Button className={css.headerSearchClearButton} onClick={this.clearSearchField.bind(this)} ><Icon icon="clearX" iconClassName={css.clearIcon}/></Button> </div> ); } } export default FilterPaneSearch; ## Instruction: Set the URL to include the modified query. Part of STRIPES-85. At present we express URLs in the form: http://localhost:3000/users/water with the query in the path rather than in the URL query, as: http://localhost:3000/users?q=water That's just because at present Stripes Connect can't get at the URL query, and we want to show searching working from top to bottom. Once Stripes Connect is up to speed (probably towards the end of next week) we will change the URLs used for searching. Because that change is coming, I am not worrying too much in the short term about this wrinkle: we currently set the whole of the path to "/users/"+value, so it only works when the Users module is mounted on /users. But since that's always, I am not losing sleep. ## Code After: import React, { PropTypes } from 'react'; import css from './FilterPaneSearch.css'; import Icon from '@folio/stripes-components/lib/Icon'; import Button from '@folio/stripes-components/lib/Button'; class FilterPaneSearch extends React.Component{ static contextTypes = { router: PropTypes.object.isRequired }; constructor(props){ super(props); this.searchInput = null; } clearSearchField(){ this.searchInput.value = ''; const evt = new Event('input', {bubbles: true}); this.searchInput.dispatchEvent(evt); } onChange() { const value = this.searchInput.value; this.context.router.transitionTo("/users/" + value); } render(){ return( <div className={css.headerSearchContainer}> <div style={{alignSelf:"center"}}><Icon icon="search"/></div> <input className={css.headerSearchInput} ref={(ref) => this.searchInput = ref} type="text" value = {this.props.value} onChange={this.onChange.bind(this)} placeholder="Search"/> <Button className={css.headerSearchClearButton} onClick={this.clearSearchField.bind(this)} ><Icon icon="clearX" iconClassName={css.clearIcon}/></Button> </div> ); } } export default FilterPaneSearch;
- import React from 'react'; + import React, { PropTypes } from 'react'; ? +++++++++++++++ import css from './FilterPaneSearch.css'; import Icon from '@folio/stripes-components/lib/Icon'; import Button from '@folio/stripes-components/lib/Button'; class FilterPaneSearch extends React.Component{ + static contextTypes = { + router: PropTypes.object.isRequired + }; + constructor(props){ super(props); this.searchInput = null; } clearSearchField(){ this.searchInput.value = ''; const evt = new Event('input', {bubbles: true}); this.searchInput.dispatchEvent(evt); } onChange() { - console.log("changed: new value =", this.searchInput.value); ? ^^^^^^^^^^^^^^^^^^^^^ -- - + const value = this.searchInput.value; ? ^ - // XXX We need to somehow feed the changed value into stripes-connect for the parent component + this.context.router.transitionTo("/users/" + value); } render(){ return( <div className={css.headerSearchContainer}> <div style={{alignSelf:"center"}}><Icon icon="search"/></div> <input className={css.headerSearchInput} ref={(ref) => this.searchInput = ref} type="text" value = {this.props.value} onChange={this.onChange.bind(this)} placeholder="Search"/> <Button className={css.headerSearchClearButton} onClick={this.clearSearchField.bind(this)} ><Icon icon="clearX" iconClassName={css.clearIcon}/></Button> </div> ); } } export default FilterPaneSearch;
10
0.285714
7
3
9eb19d8b1883ff7d6cad63feebf665c944a86bfe
app/Tickets/DB/class.TicketDefaultFilter.php
app/Tickets/DB/class.TicketDefaultFilter.php
<?php namespace Tickets\DB; class TicketDefaultFilter extends \Data\Filter { function __construct($email, $discretionary=false) { $this->children[] = new \Data\FilterClause(); $this->children[0]->var1 = 'email'; $this->children[0]->var2 = "'$email'"; $this->children[0]->op = '='; $this->children[] = 'and'; $this->children[] = new \Data\FilterClause(); $this->children[2]->var1 = 'discretionary'; if($discretionary === false) { $this->children[2]->var2 = '0'; } else { $this->children[2]->var2 = '1'; } $this->children[2]->op = '='; $this->children[] = 'and'; $this->children[] = new \Data\FilterClause(); $this->children[4]->var1 = 'used'; $this->children[4]->var2 = '0'; $this->children[4]->op = '='; $this->children[] = 'and'; $this->children[] = new \Data\FilterClause(); $this->children[6]->var1 = 'year'; $this->children[6]->var2 = TicketSystemSettings::getInstance()['year']; $this->children[6]->op = '='; } } ?>
<?php namespace Tickets\DB; class TicketDefaultFilter extends \Data\Filter { function __construct($email, $discretionary=false) { $this->children[] = new \Data\FilterClause(); $this->children[0]->var1 = 'email'; $this->children[0]->var2 = "'$email'"; $this->children[0]->op = '='; $this->children[] = 'and'; $clause = new \Data\FilterClause(); if($discretionary === false) { $clause->var1 = 'sold'; $clause->var2 = '1'; $clause->op = '='; } else { $clause->var1 = 'discretionary'; $clause->var2 = '1'; $clause->op = '='; $this->children[] = $clause; $this->children[] = 'and'; $clause = new \Data\FilterClause(); $clause->var1 = 'sold'; $clause->var2 = '0'; $clause->op = '='; } $this->children[] = $clause; $this->children[] = 'and'; $clause = new \Data\FilterClause(); $clause->var1 = 'used'; $clause->var2 = '0'; $clause->op = '='; $this->children[] = $clause; $this->children[] = 'and'; $clause = new \Data\FilterClause(); $clause->var1 = 'year'; $clause->var2 = TicketSystemSettings::getInstance()['year']; $clause->op = '='; $this->children[] = $clause; } } ?>
Make discretionary filter hide sold discretionary teams
Make discretionary filter hide sold discretionary teams
PHP
apache-2.0
BurningFlipside/Tickets,BurningFlipside/Tickets,BurningFlipside/Tickets
php
## Code Before: <?php namespace Tickets\DB; class TicketDefaultFilter extends \Data\Filter { function __construct($email, $discretionary=false) { $this->children[] = new \Data\FilterClause(); $this->children[0]->var1 = 'email'; $this->children[0]->var2 = "'$email'"; $this->children[0]->op = '='; $this->children[] = 'and'; $this->children[] = new \Data\FilterClause(); $this->children[2]->var1 = 'discretionary'; if($discretionary === false) { $this->children[2]->var2 = '0'; } else { $this->children[2]->var2 = '1'; } $this->children[2]->op = '='; $this->children[] = 'and'; $this->children[] = new \Data\FilterClause(); $this->children[4]->var1 = 'used'; $this->children[4]->var2 = '0'; $this->children[4]->op = '='; $this->children[] = 'and'; $this->children[] = new \Data\FilterClause(); $this->children[6]->var1 = 'year'; $this->children[6]->var2 = TicketSystemSettings::getInstance()['year']; $this->children[6]->op = '='; } } ?> ## Instruction: Make discretionary filter hide sold discretionary teams ## Code After: <?php namespace Tickets\DB; class TicketDefaultFilter extends \Data\Filter { function __construct($email, $discretionary=false) { $this->children[] = new \Data\FilterClause(); $this->children[0]->var1 = 'email'; $this->children[0]->var2 = "'$email'"; $this->children[0]->op = '='; $this->children[] = 'and'; $clause = new \Data\FilterClause(); if($discretionary === false) { $clause->var1 = 'sold'; $clause->var2 = '1'; $clause->op = '='; } else { $clause->var1 = 'discretionary'; $clause->var2 = '1'; $clause->op = '='; $this->children[] = $clause; $this->children[] = 'and'; $clause = new \Data\FilterClause(); $clause->var1 = 'sold'; $clause->var2 = '0'; $clause->op = '='; } $this->children[] = $clause; $this->children[] = 'and'; $clause = new \Data\FilterClause(); $clause->var1 = 'used'; $clause->var2 = '0'; $clause->op = '='; $this->children[] = $clause; $this->children[] = 'and'; $clause = new \Data\FilterClause(); $clause->var1 = 'year'; $clause->var2 = TicketSystemSettings::getInstance()['year']; $clause->op = '='; $this->children[] = $clause; } } ?>
<?php namespace Tickets\DB; class TicketDefaultFilter extends \Data\Filter { function __construct($email, $discretionary=false) { $this->children[] = new \Data\FilterClause(); $this->children[0]->var1 = 'email'; $this->children[0]->var2 = "'$email'"; $this->children[0]->op = '='; $this->children[] = 'and'; - $this->children[] = new \Data\FilterClause(); ? ^^^ -------- --- + $clause = new \Data\FilterClause(); ? ^^^^ - $this->children[2]->var1 = 'discretionary'; if($discretionary === false) { - $this->children[2]->var2 = '0'; + $clause->var1 = 'sold'; + $clause->var2 = '1'; + $clause->op = '='; } else { + $clause->var1 = 'discretionary'; + $clause->var2 = '1'; + $clause->op = '='; + $this->children[] = $clause; - $this->children[2]->var2 = '1'; ? - ------ ^ + $this->children[] = 'and'; ? ^^^ + $clause = new \Data\FilterClause(); + $clause->var1 = 'sold'; + $clause->var2 = '0'; + $clause->op = '='; } - $this->children[2]->op = '='; ? - ---- ^^^ + $this->children[] = $clause; ? ^^^^^^^ $this->children[] = 'and'; - $this->children[] = new \Data\FilterClause(); ? ^^^ -------- --- + $clause = new \Data\FilterClause(); ? ^^^^ + $clause->var1 = 'used'; + $clause->var2 = '0'; + $clause->op = '='; - $this->children[4]->var1 = 'used'; ? - ------ ^ -- + $this->children[] = $clause; ? ^^^^ - $this->children[4]->var2 = '0'; - $this->children[4]->op = '='; $this->children[] = 'and'; - $this->children[] = new \Data\FilterClause(); ? ^^^ -------- --- + $clause = new \Data\FilterClause(); ? ^^^^ - $this->children[6]->var1 = 'year'; + $clause->var1 = 'year'; - $this->children[6]->var2 = TicketSystemSettings::getInstance()['year']; ? ^^^ -------- ---- + $clause->var2 = TicketSystemSettings::getInstance()['year']; ? ^^^^ + $clause->op = '='; - $this->children[6]->op = '='; ? - ---- ^^^ + $this->children[] = $clause; ? ^^^^^^^ } } ?>
37
1.027778
24
13
d547a1787a423ff0507cd2cca49bedaa41183692
buildouts/mailserver.cfg
buildouts/mailserver.cfg
[buildout] parts += lamson mailserver_install mailserver_bin lamson-supervisor = 25 lamson (redirect_stderr=true stdout_logfile=var/log/lamson.log stderr_logfile=NONE) ${buildout:directory}/bin/lamson-logger [ports] mailserver_port = 8825 [lamson] recipe = minitage.recipe.scripts eggs = lamson [mailserver_install] recipe = plone.recipe.command command = # generate lamson projekt cd ${buildout:parts-directory} ${buildout:directory}/bin/lamson gen -project mailserver -FORCE # how to use the lamson mailserver echo -e "\n\nLAMSON MAILSERVER LOGGER\n\n" echo -e "Read sent emails:" echo -e "$ cd ${buildout:parts-directory}/mailserver/ " echo -e "$ mutt -F muttrc \n" update-command = ${mailserver_install:command} [mailserver_bin] recipe = minitage.recipe.scripts eggs = lamson initialization = import sys, os from lamson import utils os.chdir('${buildout:directory}/parts/mailserver') settings = utils.make_fake_settings('127.0.0.1', ${ports:mailserver_port}) settings.receiver.start() interpreter = lamson-logger scripts = lamson-logger [supervisor] programs += ${buildout:lamson-supervisor}
[buildout] parts += lamson mailserver_install mailserver_bin lamson-supervisor = 25 lamson (redirect_stderr=true stdout_logfile=var/log/lamson.log stderr_logfile=NONE) ${buildout:directory}/bin/lamson-logger [ports] mailserver_port = 8825 [lamson] recipe = minitage.recipe.scripts eggs = lamson [mailserver_install] recipe = plone.recipe.command command = cd ${buildout:parts-directory} ${buildout:directory}/bin/lamson gen -project mailserver -FORCE echo>/dev/null ' LAMSON MAILSERVER LOGGER ------------------------------- Read sent emails: $ cd ${buildout:parts-directory}/mailserver/ $ mutt -F muttrc ' update-command = ${mailserver_install:command} [mailserver_bin] recipe = minitage.recipe.scripts eggs = lamson initialization = import sys, os from lamson import utils os.chdir('${buildout:directory}/parts/mailserver') settings = utils.make_fake_settings('127.0.0.1', ${ports:mailserver_port}) settings.receiver.start() interpreter = lamson-logger scripts = lamson-logger [supervisor] programs += ${buildout:lamson-supervisor}
Simplify lamson documentation Note that this never worked, as -e is not an option to a POSIX shell echo built-in, but only to /bin/echo
Simplify lamson documentation Note that this never worked, as -e is not an option to a POSIX shell echo built-in, but only to /bin/echo
INI
agpl-3.0
alkadis/vcv,DanielNeugebauer/adhocracy,phihag/adhocracy,SysTheron/adhocracy,DanielNeugebauer/adhocracy,alkadis/vcv,liqd/adhocracy,liqd/adhocracy,DanielNeugebauer/adhocracy,SysTheron/adhocracy,alkadis/vcv,liqd/adhocracy,alkadis/vcv,DanielNeugebauer/adhocracy,alkadis/vcv,phihag/adhocracy,SysTheron/adhocracy,phihag/adhocracy,DanielNeugebauer/adhocracy,phihag/adhocracy,liqd/adhocracy,phihag/adhocracy
ini
## Code Before: [buildout] parts += lamson mailserver_install mailserver_bin lamson-supervisor = 25 lamson (redirect_stderr=true stdout_logfile=var/log/lamson.log stderr_logfile=NONE) ${buildout:directory}/bin/lamson-logger [ports] mailserver_port = 8825 [lamson] recipe = minitage.recipe.scripts eggs = lamson [mailserver_install] recipe = plone.recipe.command command = # generate lamson projekt cd ${buildout:parts-directory} ${buildout:directory}/bin/lamson gen -project mailserver -FORCE # how to use the lamson mailserver echo -e "\n\nLAMSON MAILSERVER LOGGER\n\n" echo -e "Read sent emails:" echo -e "$ cd ${buildout:parts-directory}/mailserver/ " echo -e "$ mutt -F muttrc \n" update-command = ${mailserver_install:command} [mailserver_bin] recipe = minitage.recipe.scripts eggs = lamson initialization = import sys, os from lamson import utils os.chdir('${buildout:directory}/parts/mailserver') settings = utils.make_fake_settings('127.0.0.1', ${ports:mailserver_port}) settings.receiver.start() interpreter = lamson-logger scripts = lamson-logger [supervisor] programs += ${buildout:lamson-supervisor} ## Instruction: Simplify lamson documentation Note that this never worked, as -e is not an option to a POSIX shell echo built-in, but only to /bin/echo ## Code After: [buildout] parts += lamson mailserver_install mailserver_bin lamson-supervisor = 25 lamson (redirect_stderr=true stdout_logfile=var/log/lamson.log stderr_logfile=NONE) ${buildout:directory}/bin/lamson-logger [ports] mailserver_port = 8825 [lamson] recipe = minitage.recipe.scripts eggs = lamson [mailserver_install] recipe = plone.recipe.command command = cd ${buildout:parts-directory} ${buildout:directory}/bin/lamson gen -project mailserver -FORCE echo>/dev/null ' LAMSON MAILSERVER LOGGER ------------------------------- Read sent emails: $ cd ${buildout:parts-directory}/mailserver/ $ mutt -F muttrc ' update-command = ${mailserver_install:command} [mailserver_bin] recipe = minitage.recipe.scripts eggs = lamson initialization = import sys, os from lamson import utils os.chdir('${buildout:directory}/parts/mailserver') settings = utils.make_fake_settings('127.0.0.1', ${ports:mailserver_port}) settings.receiver.start() interpreter = lamson-logger scripts = lamson-logger [supervisor] programs += ${buildout:lamson-supervisor}
[buildout] parts += lamson mailserver_install mailserver_bin lamson-supervisor = 25 lamson (redirect_stderr=true stdout_logfile=var/log/lamson.log stderr_logfile=NONE) ${buildout:directory}/bin/lamson-logger [ports] mailserver_port = 8825 [lamson] recipe = minitage.recipe.scripts eggs = lamson [mailserver_install] recipe = plone.recipe.command command = - # generate lamson projekt cd ${buildout:parts-directory} ${buildout:directory}/bin/lamson gen -project mailserver -FORCE - # how to use the lamson mailserver + echo>/dev/null ' - echo -e "\n\nLAMSON MAILSERVER LOGGER\n\n" ? ---- -- ^^^^^ ----- + LAMSON MAILSERVER LOGGER ? ^^ - + ------------------------------- - echo -e "Read sent emails:" ? --------- - + Read sent emails: - echo -e "$ cd ${buildout:parts-directory}/mailserver/ " ? --------- -- + $ cd ${buildout:parts-directory}/mailserver/ - echo -e "$ mutt -F muttrc \n" ? --------- ---- + $ mutt -F muttrc + ' update-command = ${mailserver_install:command} [mailserver_bin] recipe = minitage.recipe.scripts eggs = lamson initialization = import sys, os from lamson import utils os.chdir('${buildout:directory}/parts/mailserver') settings = utils.make_fake_settings('127.0.0.1', ${ports:mailserver_port}) settings.receiver.start() interpreter = lamson-logger scripts = lamson-logger [supervisor] programs += ${buildout:lamson-supervisor}
14
0.264151
7
7
57d5bbc6fcd47491aa1ac41c3aca132dc50d3506
src/Bridge/Symfony/Bundle/SonataDoctrineBundle.php
src/Bridge/Symfony/Bundle/SonataDoctrineBundle.php
<?php declare(strict_types=1); /* * This file is part of the Sonata Project package. * * (c) Thomas Rabaix <thomas.rabaix@sonata-project.org> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Sonata\Doctrine\Bridge\Symfony\Bundle; use Sonata\Doctrine\Bridge\Symfony\SonataDoctrineBundle; use Symfony\Component\HttpKernel\Bundle\Bundle; @trigger_error(sprintf( 'The %s\SonataDoctrineBundle class is deprecated since sonata-project/doctrine-extensions 1.9, to be removed in version 2.0. Use %s instead.', __NAMESPACE__, SonataDoctrineBundle::class ), E_USER_DEPRECATED); if (false) { /** * NEXT_MAJOR: remove this class. * * @deprecated Since sonata-project/doctrine-extensions 1.9, to be removed in 2.0. Use Sonata\Doctrine\Bridge\Symfony\SonataDoctrineBundle instead. */ final class SonataDoctrineBundle extends Bundle { } } class_alias(SonataDoctrineBundle::class, __NAMESPACE__.'\SonataDoctrineBundle');
<?php declare(strict_types=1); /* * This file is part of the Sonata Project package. * * (c) Thomas Rabaix <thomas.rabaix@sonata-project.org> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Sonata\Doctrine\Bridge\Symfony\Bundle; use Sonata\Doctrine\Bridge\Symfony\SonataDoctrineBundle as ForwardCompatibleSonataDoctrineBundle; use Symfony\Component\HttpKernel\Bundle\Bundle; @trigger_error(sprintf( 'The %s\SonataDoctrineBundle class is deprecated since sonata-project/doctrine-extensions 1.9, to be removed in version 2.0. Use %s instead.', __NAMESPACE__, ForwardCompatibleSonataDoctrineBundle::class ), E_USER_DEPRECATED); if (false) { /** * NEXT_MAJOR: remove this class. * * @deprecated Since sonata-project/doctrine-extensions 1.9, to be removed in 2.0. Use Sonata\Doctrine\Bridge\Symfony\SonataDoctrineBundle instead. */ final class SonataDoctrineBundle extends Bundle { } } class_alias(ForwardCompatibleSonataDoctrineBundle::class, __NAMESPACE__.'\SonataDoctrineBundle');
Fix conflict with class names
Fix conflict with class names
PHP
mit
sonata-project/sonata-doctrine-extensions
php
## Code Before: <?php declare(strict_types=1); /* * This file is part of the Sonata Project package. * * (c) Thomas Rabaix <thomas.rabaix@sonata-project.org> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Sonata\Doctrine\Bridge\Symfony\Bundle; use Sonata\Doctrine\Bridge\Symfony\SonataDoctrineBundle; use Symfony\Component\HttpKernel\Bundle\Bundle; @trigger_error(sprintf( 'The %s\SonataDoctrineBundle class is deprecated since sonata-project/doctrine-extensions 1.9, to be removed in version 2.0. Use %s instead.', __NAMESPACE__, SonataDoctrineBundle::class ), E_USER_DEPRECATED); if (false) { /** * NEXT_MAJOR: remove this class. * * @deprecated Since sonata-project/doctrine-extensions 1.9, to be removed in 2.0. Use Sonata\Doctrine\Bridge\Symfony\SonataDoctrineBundle instead. */ final class SonataDoctrineBundle extends Bundle { } } class_alias(SonataDoctrineBundle::class, __NAMESPACE__.'\SonataDoctrineBundle'); ## Instruction: Fix conflict with class names ## Code After: <?php declare(strict_types=1); /* * This file is part of the Sonata Project package. * * (c) Thomas Rabaix <thomas.rabaix@sonata-project.org> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Sonata\Doctrine\Bridge\Symfony\Bundle; use Sonata\Doctrine\Bridge\Symfony\SonataDoctrineBundle as ForwardCompatibleSonataDoctrineBundle; use Symfony\Component\HttpKernel\Bundle\Bundle; @trigger_error(sprintf( 'The %s\SonataDoctrineBundle class is deprecated since sonata-project/doctrine-extensions 1.9, to be removed in version 2.0. Use %s instead.', __NAMESPACE__, ForwardCompatibleSonataDoctrineBundle::class ), E_USER_DEPRECATED); if (false) { /** * NEXT_MAJOR: remove this class. * * @deprecated Since sonata-project/doctrine-extensions 1.9, to be removed in 2.0. Use Sonata\Doctrine\Bridge\Symfony\SonataDoctrineBundle instead. */ final class SonataDoctrineBundle extends Bundle { } } class_alias(ForwardCompatibleSonataDoctrineBundle::class, __NAMESPACE__.'\SonataDoctrineBundle');
<?php declare(strict_types=1); /* * This file is part of the Sonata Project package. * * (c) Thomas Rabaix <thomas.rabaix@sonata-project.org> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Sonata\Doctrine\Bridge\Symfony\Bundle; - use Sonata\Doctrine\Bridge\Symfony\SonataDoctrineBundle; + use Sonata\Doctrine\Bridge\Symfony\SonataDoctrineBundle as ForwardCompatibleSonataDoctrineBundle; use Symfony\Component\HttpKernel\Bundle\Bundle; @trigger_error(sprintf( 'The %s\SonataDoctrineBundle class is deprecated since sonata-project/doctrine-extensions 1.9, to be removed in version 2.0. Use %s instead.', __NAMESPACE__, - SonataDoctrineBundle::class + ForwardCompatibleSonataDoctrineBundle::class ? +++++++++++++++++ ), E_USER_DEPRECATED); if (false) { /** * NEXT_MAJOR: remove this class. * * @deprecated Since sonata-project/doctrine-extensions 1.9, to be removed in 2.0. Use Sonata\Doctrine\Bridge\Symfony\SonataDoctrineBundle instead. */ final class SonataDoctrineBundle extends Bundle { } } - class_alias(SonataDoctrineBundle::class, __NAMESPACE__.'\SonataDoctrineBundle'); + class_alias(ForwardCompatibleSonataDoctrineBundle::class, __NAMESPACE__.'\SonataDoctrineBundle'); ? +++++++++++++++++
6
0.166667
3
3
9468c205582663e040825ebbca5f2baa1a1b973c
mycroft/res/text/ru-ru/phonetic_spellings.txt
mycroft/res/text/ru-ru/phonetic_spellings.txt
ai: эй-ай mycroft: майкрофт mycroftai: майкрофт эй-ай ssh: эс-эс-аш wifi: вай-фай wi-fi: вай-фай
ai: эй-ай duckduckgo: дак-дак-гоу fairytalez: фэйри-тэйлс homeassistant: хоум-ассистант iot: ай-оу-ти lifx: лайф-икс mycroft: май-крафт mycroftai: май-крафт эй-ай myepisodes: май-эпизодс spotify: споти-фай ssh: эс-эс-эйч wifi: вай-фай wi-fi: вай-фай wikiquote: вики-квоут майкрофт: май-крафт майкрофта: май-крафта майкрофте: май-крафте майкрофтом: май-крафтом майкрофту: май-крафту
Add more Russian phonetic spellings
Add more Russian phonetic spellings
Text
apache-2.0
forslund/mycroft-core,forslund/mycroft-core,MycroftAI/mycroft-core,MycroftAI/mycroft-core
text
## Code Before: ai: эй-ай mycroft: майкрофт mycroftai: майкрофт эй-ай ssh: эс-эс-аш wifi: вай-фай wi-fi: вай-фай ## Instruction: Add more Russian phonetic spellings ## Code After: ai: эй-ай duckduckgo: дак-дак-гоу fairytalez: фэйри-тэйлс homeassistant: хоум-ассистант iot: ай-оу-ти lifx: лайф-икс mycroft: май-крафт mycroftai: май-крафт эй-ай myepisodes: май-эпизодс spotify: споти-фай ssh: эс-эс-эйч wifi: вай-фай wi-fi: вай-фай wikiquote: вики-квоут майкрофт: май-крафт майкрофта: май-крафта майкрофте: май-крафте майкрофтом: май-крафтом майкрофту: май-крафту
ai: эй-ай + duckduckgo: дак-дак-гоу + fairytalez: фэйри-тэйлс + homeassistant: хоум-ассистант + iot: ай-оу-ти + lifx: лайф-икс - mycroft: майкрофт ? ^ + mycroft: май-крафт ? + ^ - mycroftai: майкрофт эй-ай ? ^ + mycroftai: май-крафт эй-ай ? + ^ + myepisodes: май-эпизодс + spotify: споти-фай - ssh: эс-эс-аш ? ^^ + ssh: эс-эс-эйч ? ^^^ wifi: вай-фай wi-fi: вай-фай + wikiquote: вики-квоут + майкрофт: май-крафт + майкрофта: май-крафта + майкрофте: май-крафте + майкрофтом: май-крафтом + майкрофту: май-крафту
19
3.166667
16
3
5ae77b4b08c972620da6344f8135c58220fbebfb
email/src/main/resources/io/openex/email/openex_mail.properties
email/src/main/resources/io/openex/email/openex_mail.properties
openex.worker_email_host=xxxx openex.worker_email_user=xxxx openex.worker_email_password=xxxx
openex.worker_email_transport=smtps openex.worker_email_host=xxxx openex.worker_email_user=xxxx openex.worker_email_password=xxxx
Add transport protocol for mail
Add transport protocol for mail
INI
mit
Luatix/OpenEx,Luatix/OpenEx
ini
## Code Before: openex.worker_email_host=xxxx openex.worker_email_user=xxxx openex.worker_email_password=xxxx ## Instruction: Add transport protocol for mail ## Code After: openex.worker_email_transport=smtps openex.worker_email_host=xxxx openex.worker_email_user=xxxx openex.worker_email_password=xxxx
+ openex.worker_email_transport=smtps openex.worker_email_host=xxxx openex.worker_email_user=xxxx openex.worker_email_password=xxxx
1
0.333333
1
0
8aa30dc97b93d032c5279d69af1a642db266368d
app/com/yetu/oauth2provider/views/yetuAuthentication/Registration/resetPasswordPage.scala.html
app/com/yetu/oauth2provider/views/yetuAuthentication/Registration/resetPasswordPage.scala.html
@(resetForm:Form[(String, String)], mailToken: String)(implicit request: RequestHeader, lang: Lang, env: securesocial.core.RuntimeEnvironment[_]) @import helper._ @import securesocial.core.IdentityProvider @implicitFieldConstructor = @{ FieldConstructor(com.yetu.oauth2provider.views.html.yetuAuthentication.inputFieldConstructor.f) } @com.yetu.oauth2provider.views.html.yetuAuthentication.main( Messages("securesocial.password.title") ) { <div class="page-header"> <h1 name="pwreset">@Messages("securesocial.password.title")</h1> </div> @request.flash.get("error").map { msg => <div class="alert alert-error"> @Messages(msg) </div> } <form action="@env.routes.handleStartResetPasswordUrl" class="form-horizontal" autocomplete="off" method="POST" > <fieldset> @helper.inputPassword( resetForm("password.password1"), '_label -> Messages("securesocial.signup.password1"), 'class -> "input-xlarge" ) @helper.inputPassword( resetForm("password.password2"), '_label -> Messages("securesocial.signup.password2"), '_error -> resetForm.error("password"), 'class -> "input-xlarge" ) <div class="form-actions"> <button type="submit" class="btn btn-primary">@Messages("securesocial.password.reset")</button> </div> </fieldset> </form> }
@(resetForm:Form[(String, String)], mailToken: String)(implicit request: RequestHeader, lang: Lang, env: securesocial.core.RuntimeEnvironment[_]) @import helper._ @import securesocial.core.IdentityProvider @implicitFieldConstructor = @{ FieldConstructor(com.yetu.oauth2provider.views.html.yetuAuthentication.inputFieldConstructor.f) } @com.yetu.oauth2provider.views.html.yetuAuthentication.main( Messages("securesocial.password.title") ) { <div class="page-header"> <h1 name="pwreset">@Messages("securesocial.password.title")</h1> </div> @request.flash.get("error").map { msg => <div class="alert alert-error"> @Messages(msg) </div> } <form action="@env.routes.handleResetPasswordUrl(mailToken)" class="form-horizontal" autocomplete="off" method="POST" > <fieldset> @helper.inputPassword( resetForm("password.password1"), '_label -> Messages("securesocial.signup.password1"), 'class -> "input-xlarge" ) @helper.inputPassword( resetForm("password.password2"), '_label -> Messages("securesocial.signup.password2"), '_error -> resetForm.error("password"), 'class -> "input-xlarge" ) <div class="form-actions"> <button type="submit" class="btn btn-primary">@Messages("securesocial.password.reset")</button> </div> </fieldset> </form> }
Fix bug in view URL for password reset.
Fix bug in view URL for password reset.
HTML
mit
yetu/oauth2-provider,yetu/oauth2-provider,yetu/oauth2-provider,yetu/oauth2-provider
html
## Code Before: @(resetForm:Form[(String, String)], mailToken: String)(implicit request: RequestHeader, lang: Lang, env: securesocial.core.RuntimeEnvironment[_]) @import helper._ @import securesocial.core.IdentityProvider @implicitFieldConstructor = @{ FieldConstructor(com.yetu.oauth2provider.views.html.yetuAuthentication.inputFieldConstructor.f) } @com.yetu.oauth2provider.views.html.yetuAuthentication.main( Messages("securesocial.password.title") ) { <div class="page-header"> <h1 name="pwreset">@Messages("securesocial.password.title")</h1> </div> @request.flash.get("error").map { msg => <div class="alert alert-error"> @Messages(msg) </div> } <form action="@env.routes.handleStartResetPasswordUrl" class="form-horizontal" autocomplete="off" method="POST" > <fieldset> @helper.inputPassword( resetForm("password.password1"), '_label -> Messages("securesocial.signup.password1"), 'class -> "input-xlarge" ) @helper.inputPassword( resetForm("password.password2"), '_label -> Messages("securesocial.signup.password2"), '_error -> resetForm.error("password"), 'class -> "input-xlarge" ) <div class="form-actions"> <button type="submit" class="btn btn-primary">@Messages("securesocial.password.reset")</button> </div> </fieldset> </form> } ## Instruction: Fix bug in view URL for password reset. ## Code After: @(resetForm:Form[(String, String)], mailToken: String)(implicit request: RequestHeader, lang: Lang, env: securesocial.core.RuntimeEnvironment[_]) @import helper._ @import securesocial.core.IdentityProvider @implicitFieldConstructor = @{ FieldConstructor(com.yetu.oauth2provider.views.html.yetuAuthentication.inputFieldConstructor.f) } @com.yetu.oauth2provider.views.html.yetuAuthentication.main( Messages("securesocial.password.title") ) { <div class="page-header"> <h1 name="pwreset">@Messages("securesocial.password.title")</h1> </div> @request.flash.get("error").map { msg => <div class="alert alert-error"> @Messages(msg) </div> } <form action="@env.routes.handleResetPasswordUrl(mailToken)" class="form-horizontal" autocomplete="off" method="POST" > <fieldset> @helper.inputPassword( resetForm("password.password1"), '_label -> Messages("securesocial.signup.password1"), 'class -> "input-xlarge" ) @helper.inputPassword( resetForm("password.password2"), '_label -> Messages("securesocial.signup.password2"), '_error -> resetForm.error("password"), 'class -> "input-xlarge" ) <div class="form-actions"> <button type="submit" class="btn btn-primary">@Messages("securesocial.password.reset")</button> </div> </fieldset> </form> }
@(resetForm:Form[(String, String)], mailToken: String)(implicit request: RequestHeader, lang: Lang, env: securesocial.core.RuntimeEnvironment[_]) @import helper._ @import securesocial.core.IdentityProvider @implicitFieldConstructor = @{ FieldConstructor(com.yetu.oauth2provider.views.html.yetuAuthentication.inputFieldConstructor.f) } @com.yetu.oauth2provider.views.html.yetuAuthentication.main( Messages("securesocial.password.title") ) { <div class="page-header"> <h1 name="pwreset">@Messages("securesocial.password.title")</h1> </div> @request.flash.get("error").map { msg => <div class="alert alert-error"> @Messages(msg) </div> } - <form action="@env.routes.handleStartResetPasswordUrl" ? ----- + <form action="@env.routes.handleResetPasswordUrl(mailToken)" ? +++++++++++ class="form-horizontal" autocomplete="off" method="POST" > <fieldset> @helper.inputPassword( resetForm("password.password1"), '_label -> Messages("securesocial.signup.password1"), 'class -> "input-xlarge" ) @helper.inputPassword( resetForm("password.password2"), '_label -> Messages("securesocial.signup.password2"), '_error -> resetForm.error("password"), 'class -> "input-xlarge" ) <div class="form-actions"> <button type="submit" class="btn btn-primary">@Messages("securesocial.password.reset")</button> </div> </fieldset> </form> }
2
0.045455
1
1
25a21fd28feae7989e565537396fefc834ba1901
Build/TradeBuildExternalComponents.txt
Build/TradeBuildExternalComponents.txt
..\Bin\TradeWright.TradeBuild.ExternalComponents\mscomctl.OCX ..\Bin\TradeWright.TradeBuild.ExternalComponents\MSCOMCT2.OCX ..\Bin\TradeWright.TradeBuild.ExternalComponents\COMCT332.OCX ..\Bin\TradeWright.TradeBuild.ExternalComponents\COMDLG32.OCX ..\Bin\TradeWright.TradeBuild.ExternalComponents\MSWINSCK.OCX ..\Bin\TradeWright.TradeBuild.ExternalComponents\MSFLXGRD.OCX ..\Bin\TradeWright.TradeBuild.ExternalComponents\MSDATGRD.OCX ..\Bin\TradeWright.TradeBuild.ExternalComponents\TABCTL32.OCX // needed by TradeBuild.Common ..\Bin\TradeWright.TradeBuild.ExternalComponents\TLBINF32.DLL
..\Bin\TradeWright.TradeBuild.ExternalComponents\mscomctl.OCX ..\Bin\TradeWright.TradeBuild.ExternalComponents\MSCOMCT2.OCX ..\Bin\TradeWright.TradeBuild.ExternalComponents\COMCT332.OCX ..\Bin\TradeWright.TradeBuild.ExternalComponents\COMDLG32.OCX ..\Bin\TradeWright.TradeBuild.ExternalComponents\MSWINSCK.OCX ..\Bin\TradeWright.TradeBuild.ExternalComponents\MSFLXGRD.OCX ..\Bin\TradeWright.TradeBuild.ExternalComponents\MSDATGRD.OCX ..\Bin\TradeWright.TradeBuild.ExternalComponents\TABCTL32.OCX // needed by TradeBuild.Common ..\Bin\TradeWright.TradeBuild.ExternalComponents\DBADAPT.DLL ..\Bin\TradeWright.TradeBuild.ExternalComponents\MSSTDFMT.DLL ..\Bin\TradeWright.TradeBuild.ExternalComponents\TLBINF32.DLL
Add external components for data binding
Add external components for data binding
Text
mit
rlktradewright/tradebuild-platform
text
## Code Before: ..\Bin\TradeWright.TradeBuild.ExternalComponents\mscomctl.OCX ..\Bin\TradeWright.TradeBuild.ExternalComponents\MSCOMCT2.OCX ..\Bin\TradeWright.TradeBuild.ExternalComponents\COMCT332.OCX ..\Bin\TradeWright.TradeBuild.ExternalComponents\COMDLG32.OCX ..\Bin\TradeWright.TradeBuild.ExternalComponents\MSWINSCK.OCX ..\Bin\TradeWright.TradeBuild.ExternalComponents\MSFLXGRD.OCX ..\Bin\TradeWright.TradeBuild.ExternalComponents\MSDATGRD.OCX ..\Bin\TradeWright.TradeBuild.ExternalComponents\TABCTL32.OCX // needed by TradeBuild.Common ..\Bin\TradeWright.TradeBuild.ExternalComponents\TLBINF32.DLL ## Instruction: Add external components for data binding ## Code After: ..\Bin\TradeWright.TradeBuild.ExternalComponents\mscomctl.OCX ..\Bin\TradeWright.TradeBuild.ExternalComponents\MSCOMCT2.OCX ..\Bin\TradeWright.TradeBuild.ExternalComponents\COMCT332.OCX ..\Bin\TradeWright.TradeBuild.ExternalComponents\COMDLG32.OCX ..\Bin\TradeWright.TradeBuild.ExternalComponents\MSWINSCK.OCX ..\Bin\TradeWright.TradeBuild.ExternalComponents\MSFLXGRD.OCX ..\Bin\TradeWright.TradeBuild.ExternalComponents\MSDATGRD.OCX ..\Bin\TradeWright.TradeBuild.ExternalComponents\TABCTL32.OCX // needed by TradeBuild.Common ..\Bin\TradeWright.TradeBuild.ExternalComponents\DBADAPT.DLL ..\Bin\TradeWright.TradeBuild.ExternalComponents\MSSTDFMT.DLL ..\Bin\TradeWright.TradeBuild.ExternalComponents\TLBINF32.DLL
..\Bin\TradeWright.TradeBuild.ExternalComponents\mscomctl.OCX ..\Bin\TradeWright.TradeBuild.ExternalComponents\MSCOMCT2.OCX ..\Bin\TradeWright.TradeBuild.ExternalComponents\COMCT332.OCX ..\Bin\TradeWright.TradeBuild.ExternalComponents\COMDLG32.OCX ..\Bin\TradeWright.TradeBuild.ExternalComponents\MSWINSCK.OCX ..\Bin\TradeWright.TradeBuild.ExternalComponents\MSFLXGRD.OCX ..\Bin\TradeWright.TradeBuild.ExternalComponents\MSDATGRD.OCX ..\Bin\TradeWright.TradeBuild.ExternalComponents\TABCTL32.OCX // needed by TradeBuild.Common + ..\Bin\TradeWright.TradeBuild.ExternalComponents\DBADAPT.DLL + ..\Bin\TradeWright.TradeBuild.ExternalComponents\MSSTDFMT.DLL ..\Bin\TradeWright.TradeBuild.ExternalComponents\TLBINF32.DLL
2
0.181818
2
0
0db4a1f464545c68aa835cb6fe5a164f25033ab1
commands/eval.js
commands/eval.js
const now = require('performance-now'); module.exports = { help: { name: 'eval', desc: 'Runs a JavaScript snippet', usage: '<js snippet>', aliases: ['e'] }, exec: (client, msg, params) => { let time = now(); let input = params.join(' '); try { let message = msg; let output = eval(input.replace(/\r?\n|\r/g, ' ')); if(typeof output != 'string') { output = require('util').inspect(output); } output = output.replace(client.token, '[token redacted]'); msg.edit(`***\`Input\`*** \`\`\`js\n${input}\n\`\`\`\n***\`Output\`*** \`\`\`js\n${output}\n\`\`\``).catch(console.error); } catch (error) { msg.edit(`***\`Input\`*** \`\`\`js\n${input}\n\`\`\`\n***\`Error\`*** \`\`\`js\n${error}\n\`\`\``).catch(console.error); } } }
const now = require('performance-now'); module.exports = { help: { name: 'eval', desc: 'Runs a JavaScript snippet', usage: '<js snippet>', aliases: ['e'] }, exec: (client, msg, params) => { let time = now(); let input = params.join(' '); try { let message = msg, self = client, bot = client; let output = eval(input.replace(/\r?\n|\r/g, ' ')); if(typeof output != 'string') { output = require('util').inspect(output); } output = output.replace(client.token, '[token redacted]').replace(client.user.email, '[email redacted]'); msg.edit(`***\`Input\`*** \`\`\`js\n${input}\n\`\`\`\n***\`Output\`*** \`\`\`js\n${output}\n\`\`\``).catch(console.error); } catch (error) { msg.edit(`***\`Input\`*** \`\`\`js\n${input}\n\`\`\`\n***\`Error\`*** \`\`\`js\n${error}\n\`\`\``).catch(console.error); } } }
Add removal of email address
Add removal of email address
JavaScript
mit
vzwGrey/discord-selfbot
javascript
## Code Before: const now = require('performance-now'); module.exports = { help: { name: 'eval', desc: 'Runs a JavaScript snippet', usage: '<js snippet>', aliases: ['e'] }, exec: (client, msg, params) => { let time = now(); let input = params.join(' '); try { let message = msg; let output = eval(input.replace(/\r?\n|\r/g, ' ')); if(typeof output != 'string') { output = require('util').inspect(output); } output = output.replace(client.token, '[token redacted]'); msg.edit(`***\`Input\`*** \`\`\`js\n${input}\n\`\`\`\n***\`Output\`*** \`\`\`js\n${output}\n\`\`\``).catch(console.error); } catch (error) { msg.edit(`***\`Input\`*** \`\`\`js\n${input}\n\`\`\`\n***\`Error\`*** \`\`\`js\n${error}\n\`\`\``).catch(console.error); } } } ## Instruction: Add removal of email address ## Code After: const now = require('performance-now'); module.exports = { help: { name: 'eval', desc: 'Runs a JavaScript snippet', usage: '<js snippet>', aliases: ['e'] }, exec: (client, msg, params) => { let time = now(); let input = params.join(' '); try { let message = msg, self = client, bot = client; let output = eval(input.replace(/\r?\n|\r/g, ' ')); if(typeof output != 'string') { output = require('util').inspect(output); } output = output.replace(client.token, '[token redacted]').replace(client.user.email, '[email redacted]'); msg.edit(`***\`Input\`*** \`\`\`js\n${input}\n\`\`\`\n***\`Output\`*** \`\`\`js\n${output}\n\`\`\``).catch(console.error); } catch (error) { msg.edit(`***\`Input\`*** \`\`\`js\n${input}\n\`\`\`\n***\`Error\`*** \`\`\`js\n${error}\n\`\`\``).catch(console.error); } } }
const now = require('performance-now'); module.exports = { help: { name: 'eval', desc: 'Runs a JavaScript snippet', usage: '<js snippet>', aliases: ['e'] }, exec: (client, msg, params) => { let time = now(); let input = params.join(' '); try { - let message = msg; + let message = msg, self = client, bot = client; let output = eval(input.replace(/\r?\n|\r/g, ' ')); if(typeof output != 'string') { output = require('util').inspect(output); } - output = output.replace(client.token, '[token redacted]'); + output = output.replace(client.token, '[token redacted]').replace(client.user.email, '[email redacted]'); msg.edit(`***\`Input\`*** \`\`\`js\n${input}\n\`\`\`\n***\`Output\`*** \`\`\`js\n${output}\n\`\`\``).catch(console.error); } catch (error) { msg.edit(`***\`Input\`*** \`\`\`js\n${input}\n\`\`\`\n***\`Error\`*** \`\`\`js\n${error}\n\`\`\``).catch(console.error); } } }
4
0.129032
2
2
42f4d760cf679be88f9fc50936606b81b71e0712
public/app/scripts/controllers/registration.js
public/app/scripts/controllers/registration.js
'use strict'; angular.module('publicApp') .controller('RegistrationCtrl', ['$scope', '$http', '$location','UserService', function ($scope, $http, $location, $user) { $scope.user = null; $scope.registerUser = function () { console.log('about to register user'); console.log('passwords are the same.'); $http.post('/api/v1/users', $scope.user) .success(function(user){ $user.login($scope.user.name, $scope.user.password); }) .error(function(err) { }); } }]);
'use strict'; angular.module('publicApp') .controller('RegistrationCtrl', ['$scope', '$http', '$location','UserService', 'Base64', function ($scope, $http, $location, $user, Base64) { $scope.user = null; $scope.registerUser = function () { var username = $scope.user.name; var password = $scope.user.password; $http.defaults.headers.common['Authorization'] = 'Basic ' + Base64.encode(username+':'+password); $http.post('/api/v1/users', $scope.user) .success(function(user){ $user.login($scope.user.name, $scope.user.password); }) .error(function(err) { }); } }]);
Add basic auth when registering in web client.
[FEATURE] Add basic auth when registering in web client.
JavaScript
isc
Parkjeahwan/awegeeks,xdv/gatewayd,xdv/gatewayd,Parkjeahwan/awegeeks,whotooktwarden/gatewayd,zealord/gatewayd,whotooktwarden/gatewayd,crazyquark/gatewayd,crazyquark/gatewayd,zealord/gatewayd
javascript
## Code Before: 'use strict'; angular.module('publicApp') .controller('RegistrationCtrl', ['$scope', '$http', '$location','UserService', function ($scope, $http, $location, $user) { $scope.user = null; $scope.registerUser = function () { console.log('about to register user'); console.log('passwords are the same.'); $http.post('/api/v1/users', $scope.user) .success(function(user){ $user.login($scope.user.name, $scope.user.password); }) .error(function(err) { }); } }]); ## Instruction: [FEATURE] Add basic auth when registering in web client. ## Code After: 'use strict'; angular.module('publicApp') .controller('RegistrationCtrl', ['$scope', '$http', '$location','UserService', 'Base64', function ($scope, $http, $location, $user, Base64) { $scope.user = null; $scope.registerUser = function () { var username = $scope.user.name; var password = $scope.user.password; $http.defaults.headers.common['Authorization'] = 'Basic ' + Base64.encode(username+':'+password); $http.post('/api/v1/users', $scope.user) .success(function(user){ $user.login($scope.user.name, $scope.user.password); }) .error(function(err) { }); } }]);
'use strict'; angular.module('publicApp') - .controller('RegistrationCtrl', ['$scope', '$http', '$location','UserService', function ($scope, $http, $location, $user) { + .controller('RegistrationCtrl', ['$scope', '$http', '$location','UserService', 'Base64', function ($scope, $http, $location, $user, Base64) { ? ++++++++++ ++++++++ $scope.user = null; $scope.registerUser = function () { - console.log('about to register user'); - console.log('passwords are the same.'); + var username = $scope.user.name; + var password = $scope.user.password; + $http.defaults.headers.common['Authorization'] = 'Basic ' + Base64.encode(username+':'+password); $http.post('/api/v1/users', $scope.user) .success(function(user){ $user.login($scope.user.name, $scope.user.password); }) .error(function(err) { }); } }]);
7
0.388889
4
3
b91c95689928b38c8a9cefd898ebab306e7f6583
myuw/templates/handlebars/card/accounts/tuition_resources.html
myuw/templates/handlebars/card/accounts/tuition_resources.html
{% verbatim %} <div class="links-container"> <h4 class="myuw-card-heading">Related</h4> <ul class="unstyled-list"> <li><a {{#if is_tacoma}}href="http://www.tacoma.uw.edu/uwt/financial-aid"{{else if is_bothell}}href="https://www.uwb.edu/financialaid"{{else}}href="http://www.washington.edu/students/osfa/"{{/if}} target="_blank">Financial Aid and Scholarships</a></li> {{#if is_grad}} <li><a href="http://www.lib.washington.edu/commons/services/gfis" target="_blank">Graduate Funding Information Service (GFIS)</a></li> {{/if}} <li><a href="http://f2.washington.edu/fm/sfs/tuition" target="_blank">About Tuition</a></li> <li><a href="http://f2.washington.edu/fm/sfs/tax" target="_blank">Student Tax Information</a></li> <li><a href="https://sdb.admin.uw.edu/sisStudents/uwnetid/irs1098t.aspx" target="_blank"> Form 1098-T</a></li> </ul> </div> {% endverbatim %}
{% verbatim %} <div class="links-container"> <h4 class="myuw-card-heading">Related</h4> <ul class="unstyled-list"> {{#if is_pce}} <li><a href="http://www.degreereg.uw.edu/payment-procedures" target="_blank">How to pay PCE</a></li> {{/if}} <li><a {{#if is_tacoma}}href="http://www.tacoma.uw.edu/uwt/financial-aid"{{else if is_bothell}}href="https://www.uwb.edu/financialaid"{{else}}href="http://www.washington.edu/students/osfa/"{{/if}} target="_blank">Financial Aid and Scholarships</a></li> {{#if is_grad}} <li><a href="http://www.lib.washington.edu/commons/services/gfis" target="_blank">Graduate Funding Information Service (GFIS)</a></li> {{/if}} {{#unless is_pce}} <li><a href="http://f2.washington.edu/fm/sfs/tuition" target="_blank">About Tuition</a></li> {{/unless}} <li><a href="http://f2.washington.edu/fm/sfs/tax" target="_blank">Student Tax Information</a></li> </ul> </div> {% endverbatim %}
Update the tuition resources link for PCE
Update the tuition resources link for PCE
HTML
apache-2.0
uw-it-aca/myuw,uw-it-aca/myuw,uw-it-aca/myuw,uw-it-aca/myuw
html
## Code Before: {% verbatim %} <div class="links-container"> <h4 class="myuw-card-heading">Related</h4> <ul class="unstyled-list"> <li><a {{#if is_tacoma}}href="http://www.tacoma.uw.edu/uwt/financial-aid"{{else if is_bothell}}href="https://www.uwb.edu/financialaid"{{else}}href="http://www.washington.edu/students/osfa/"{{/if}} target="_blank">Financial Aid and Scholarships</a></li> {{#if is_grad}} <li><a href="http://www.lib.washington.edu/commons/services/gfis" target="_blank">Graduate Funding Information Service (GFIS)</a></li> {{/if}} <li><a href="http://f2.washington.edu/fm/sfs/tuition" target="_blank">About Tuition</a></li> <li><a href="http://f2.washington.edu/fm/sfs/tax" target="_blank">Student Tax Information</a></li> <li><a href="https://sdb.admin.uw.edu/sisStudents/uwnetid/irs1098t.aspx" target="_blank"> Form 1098-T</a></li> </ul> </div> {% endverbatim %} ## Instruction: Update the tuition resources link for PCE ## Code After: {% verbatim %} <div class="links-container"> <h4 class="myuw-card-heading">Related</h4> <ul class="unstyled-list"> {{#if is_pce}} <li><a href="http://www.degreereg.uw.edu/payment-procedures" target="_blank">How to pay PCE</a></li> {{/if}} <li><a {{#if is_tacoma}}href="http://www.tacoma.uw.edu/uwt/financial-aid"{{else if is_bothell}}href="https://www.uwb.edu/financialaid"{{else}}href="http://www.washington.edu/students/osfa/"{{/if}} target="_blank">Financial Aid and Scholarships</a></li> {{#if is_grad}} <li><a href="http://www.lib.washington.edu/commons/services/gfis" target="_blank">Graduate Funding Information Service (GFIS)</a></li> {{/if}} {{#unless is_pce}} <li><a href="http://f2.washington.edu/fm/sfs/tuition" target="_blank">About Tuition</a></li> {{/unless}} <li><a href="http://f2.washington.edu/fm/sfs/tax" target="_blank">Student Tax Information</a></li> </ul> </div> {% endverbatim %}
{% verbatim %} <div class="links-container"> <h4 class="myuw-card-heading">Related</h4> <ul class="unstyled-list"> - + {{#if is_pce}} + <li><a href="http://www.degreereg.uw.edu/payment-procedures" target="_blank">How to pay PCE</a></li> + {{/if}} <li><a {{#if is_tacoma}}href="http://www.tacoma.uw.edu/uwt/financial-aid"{{else if is_bothell}}href="https://www.uwb.edu/financialaid"{{else}}href="http://www.washington.edu/students/osfa/"{{/if}} target="_blank">Financial Aid and Scholarships</a></li> {{#if is_grad}} <li><a href="http://www.lib.washington.edu/commons/services/gfis" target="_blank">Graduate Funding Information Service (GFIS)</a></li> {{/if}} + {{#unless is_pce}} <li><a href="http://f2.washington.edu/fm/sfs/tuition" target="_blank">About Tuition</a></li> + {{/unless}} <li><a href="http://f2.washington.edu/fm/sfs/tax" target="_blank">Student Tax Information</a></li> - <li><a href="https://sdb.admin.uw.edu/sisStudents/uwnetid/irs1098t.aspx" target="_blank"> Form 1098-T</a></li> </ul> </div> {% endverbatim %}
7
0.466667
5
2
57666b8b8028065531f814444d4cdeaeb36a86cb
Resources/Private/Sass/Generic/_T3General.scss
Resources/Private/Sass/Generic/_T3General.scss
/* TYPO3 Styling for typo3 related classes */ /* CSC-Frames */ .csc-frame-rulerBefore:before { content: ''; @extend %horizontal-ruler; } .csc-frame-rulerAfter:after { content: ''; @extend %horizontal-ruler; } .csc-frame-indent { padding: 0 10%; } .csc-frame-indent3366 { padding-left: 33.333%; } .csc-frame-indent6633 { padding-right: 33.333%; } // Extend some typographic utilities for the default TYPO3 RTE. .align-center { @extend %u-alignCenter; } .align-right { @extend %u-alignRight; } .align-left { @extend %u-alignLeft; }
/* TYPO3 Styling for typo3 related classes */ /* CSC-Frames */ .csc-frame-rulerBefore:before { content: ''; @extend %hr; } .csc-frame-rulerAfter:after { content: ''; @extend %hr; } .csc-frame-indent { padding: 0 10%; } .csc-frame-indent3366 { padding-left: 33.333%; } .csc-frame-indent6633 { padding-right: 33.333%; } // Extend some typographic utilities for the default TYPO3 RTE. .align-center { @extend %u-alignCenter; } .align-right { @extend %u-alignRight; } .align-left { @extend %u-alignLeft; }
Fix the %hr @extend on the csc-frame-ruler* rules
[BUGFIX] Fix the %hr @extend on the csc-frame-ruler* rules
SCSS
mit
t3b/t3b_template,t3b/t3b_template,t3b/t3b_template,t3b/t3b_template,t3b/t3b_template
scss
## Code Before: /* TYPO3 Styling for typo3 related classes */ /* CSC-Frames */ .csc-frame-rulerBefore:before { content: ''; @extend %horizontal-ruler; } .csc-frame-rulerAfter:after { content: ''; @extend %horizontal-ruler; } .csc-frame-indent { padding: 0 10%; } .csc-frame-indent3366 { padding-left: 33.333%; } .csc-frame-indent6633 { padding-right: 33.333%; } // Extend some typographic utilities for the default TYPO3 RTE. .align-center { @extend %u-alignCenter; } .align-right { @extend %u-alignRight; } .align-left { @extend %u-alignLeft; } ## Instruction: [BUGFIX] Fix the %hr @extend on the csc-frame-ruler* rules ## Code After: /* TYPO3 Styling for typo3 related classes */ /* CSC-Frames */ .csc-frame-rulerBefore:before { content: ''; @extend %hr; } .csc-frame-rulerAfter:after { content: ''; @extend %hr; } .csc-frame-indent { padding: 0 10%; } .csc-frame-indent3366 { padding-left: 33.333%; } .csc-frame-indent6633 { padding-right: 33.333%; } // Extend some typographic utilities for the default TYPO3 RTE. .align-center { @extend %u-alignCenter; } .align-right { @extend %u-alignRight; } .align-left { @extend %u-alignLeft; }
/* TYPO3 Styling for typo3 related classes */ /* CSC-Frames */ .csc-frame-rulerBefore:before { content: ''; - @extend %horizontal-ruler; + @extend %hr; } .csc-frame-rulerAfter:after { content: ''; - @extend %horizontal-ruler; + @extend %hr; } .csc-frame-indent { padding: 0 10%; } .csc-frame-indent3366 { padding-left: 33.333%; } .csc-frame-indent6633 { padding-right: 33.333%; } // Extend some typographic utilities for the default TYPO3 RTE. .align-center { @extend %u-alignCenter; } .align-right { @extend %u-alignRight; } .align-left { @extend %u-alignLeft; }
4
0.121212
2
2
3e5fa425e535728b5bc331765c2ce1eb3a372046
zuul.d/nodesets.yaml
zuul.d/nodesets.yaml
--- - nodeset: name: multinode-legacy nodes: - name: primary label: ubuntu - name: secondary label: ubuntu groups: - name: primary nodes: - primary - name: subnodes nodes: - secondary
--- - nodeset: name: multinode-legacy nodes: - name: primary label: ubuntu - name: secondary label: ubuntu groups: - name: primary nodes: - primary - name: subnodes nodes: - secondary
Fix indentation in nodeset definition
Fix indentation in nodeset definition Change-Id: Id922f913d98b4c68ebae9d67a2b41f2b845e4b20
YAML
apache-2.0
CiscoSystems/project-config-third-party,CiscoSystems/project-config-third-party
yaml
## Code Before: --- - nodeset: name: multinode-legacy nodes: - name: primary label: ubuntu - name: secondary label: ubuntu groups: - name: primary nodes: - primary - name: subnodes nodes: - secondary ## Instruction: Fix indentation in nodeset definition Change-Id: Id922f913d98b4c68ebae9d67a2b41f2b845e4b20 ## Code After: --- - nodeset: name: multinode-legacy nodes: - name: primary label: ubuntu - name: secondary label: ubuntu groups: - name: primary nodes: - primary - name: subnodes nodes: - secondary
--- - nodeset: name: multinode-legacy nodes: - name: primary - label: ubuntu + label: ubuntu - name: secondary - label: ubuntu + label: ubuntu groups: - name: primary - nodes: - - primary + nodes: + - primary - name: subnodes - nodes: - - secondary + nodes: + - secondary
12
0.8
6
6
05c872b2fa279b13a85d9c2a24696bfe32b1b5ad
README.md
README.md
Doesn't work on 2-2, yet Spree house number ================ Replaces address1 and address2 with address and house number in the address forms. It also add these fields to the address model. On address model save it will update address1 with the values from address and housenumber. Using Spree house number ------------------------ Add spree_house_number to your Gemfile ``` gem 'spree_house_number', :git => 'git@github.com:oxpeck/spree_house_number.git' ``` Todo ---- Write tests
Doesn't work on 2-2, yet Spree house number ================ Replaces address1 and address2 with address and house number in the address forms. It also add these fields to the address model. On address model save it will update address1 with the values from address and housenumber. Using Spree house number ------------------------ Add spree_house_number to your Gemfile ``` gem 'spree_house_number', :github => 'Willianvdv/spree_house_number' ``` Todo ---- Write tests
Update readme. Added right Github account
Update readme. Added right Github account
Markdown
bsd-3-clause
Willianvdv/spree_house_number,Willianvdv/spree_house_number
markdown
## Code Before: Doesn't work on 2-2, yet Spree house number ================ Replaces address1 and address2 with address and house number in the address forms. It also add these fields to the address model. On address model save it will update address1 with the values from address and housenumber. Using Spree house number ------------------------ Add spree_house_number to your Gemfile ``` gem 'spree_house_number', :git => 'git@github.com:oxpeck/spree_house_number.git' ``` Todo ---- Write tests ## Instruction: Update readme. Added right Github account ## Code After: Doesn't work on 2-2, yet Spree house number ================ Replaces address1 and address2 with address and house number in the address forms. It also add these fields to the address model. On address model save it will update address1 with the values from address and housenumber. Using Spree house number ------------------------ Add spree_house_number to your Gemfile ``` gem 'spree_house_number', :github => 'Willianvdv/spree_house_number' ``` Todo ---- Write tests
Doesn't work on 2-2, yet Spree house number ================ Replaces address1 and address2 with address and house number in the address forms. It also add these fields to the address model. On address model save it will update address1 with the values from address and housenumber. Using Spree house number ------------------------ Add spree_house_number to your Gemfile ``` - gem 'spree_house_number', :git => 'git@github.com:oxpeck/spree_house_number.git' ? ^ ^^^ ^^^^^^^^^^^^^^^ ---- + gem 'spree_house_number', :github => 'Willianvdv/spree_house_number' ? +++ ^ ^^ ^^^^^ ``` Todo ---- Write tests
2
0.1
1
1
ce748b705d242d693f3ce6b34e09b436f10299b3
index.js
index.js
'use strict'; /** * @module object-loops */ var dasherize = require('dasherize'); var exists = require('101/exists'); var envIs = require('101/env-is'); var path = require('path'); /** * Extends Object.prototype with all "object-loops" methods * @function module:object-loops * @param {boolean} hideWarnings - Will hide warnings that appear if a method already exists. */ module.exports = extendObjectPrototype; function extendObjectPrototype (hideWarnings) { [ 'forEach', 'map', 'filter', 'reduce' ].forEach(function (methodName) { var filename = dasherize(methodName); var filepath = path.resolve('./'+filename); if (Object.prototype[methodName] && !hideWarnings) { console.log('warn: "Object.prototype.' + methodName + '" already exists.'); } else { var method = require(filepath); Object.defineProperty(Object.prototype, methodName, { value: function () { if (this === global) { throw new TypeError('this is null or not defined for '+method); } var args = Array.prototype.slice.call(arguments); args.unshift(this); // sets first arg as object instance return method.apply(this, args); }, configurable: envIs('test') // hack for tests }); } }); }
'use strict'; /** * @module object-loops */ var dasherize = require('dasherize'); var exists = require('101/exists'); var envIs = require('101/env-is'); var path = require('path'); /** * Extends Object.prototype with all "object-loops" methods * @function module:object-loops * @param {boolean} hideWarnings - Will hide warnings that appear if a method already exists. */ module.exports = extendObjectPrototype; function extendObjectPrototype (hideWarnings) { [ 'forEach', 'map', 'filter', 'reduce' ].forEach(function (methodName) { var filename = dasherize(methodName); var filepath = path.resolve('./'+filename); if (Object.prototype[methodName] && !hideWarnings) { console.log('warn: "Object.prototype.' + methodName + '" already exists.'); } else { var method = require(filepath); Object.defineProperty(Object.prototype, methodName, { value: function () { if (this === global) { throw new TypeError('this is null or not defined for '+method); } var args = Array.prototype.slice.call(arguments); args.unshift(this); // sets first arg as object instance return method.apply(this, args); }, enumerable: false, configurable: envIs('test') // hack for tests }); } }); }
Extend prototype with non-enumerable property
Extend prototype with non-enumerable property This way we don't mess up peoples' code depending on `for..in` or `Object.keys`. Many people rely on Object.prototype having no enumerable properties and do things like: ```js for(key in {a:1, b:2}) foo(key); ``` More info on [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty).
JavaScript
mit
tjmehta/object-loops
javascript
## Code Before: 'use strict'; /** * @module object-loops */ var dasherize = require('dasherize'); var exists = require('101/exists'); var envIs = require('101/env-is'); var path = require('path'); /** * Extends Object.prototype with all "object-loops" methods * @function module:object-loops * @param {boolean} hideWarnings - Will hide warnings that appear if a method already exists. */ module.exports = extendObjectPrototype; function extendObjectPrototype (hideWarnings) { [ 'forEach', 'map', 'filter', 'reduce' ].forEach(function (methodName) { var filename = dasherize(methodName); var filepath = path.resolve('./'+filename); if (Object.prototype[methodName] && !hideWarnings) { console.log('warn: "Object.prototype.' + methodName + '" already exists.'); } else { var method = require(filepath); Object.defineProperty(Object.prototype, methodName, { value: function () { if (this === global) { throw new TypeError('this is null or not defined for '+method); } var args = Array.prototype.slice.call(arguments); args.unshift(this); // sets first arg as object instance return method.apply(this, args); }, configurable: envIs('test') // hack for tests }); } }); } ## Instruction: Extend prototype with non-enumerable property This way we don't mess up peoples' code depending on `for..in` or `Object.keys`. Many people rely on Object.prototype having no enumerable properties and do things like: ```js for(key in {a:1, b:2}) foo(key); ``` More info on [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty). ## Code After: 'use strict'; /** * @module object-loops */ var dasherize = require('dasherize'); var exists = require('101/exists'); var envIs = require('101/env-is'); var path = require('path'); /** * Extends Object.prototype with all "object-loops" methods * @function module:object-loops * @param {boolean} hideWarnings - Will hide warnings that appear if a method already exists. */ module.exports = extendObjectPrototype; function extendObjectPrototype (hideWarnings) { [ 'forEach', 'map', 'filter', 'reduce' ].forEach(function (methodName) { var filename = dasherize(methodName); var filepath = path.resolve('./'+filename); if (Object.prototype[methodName] && !hideWarnings) { console.log('warn: "Object.prototype.' + methodName + '" already exists.'); } else { var method = require(filepath); Object.defineProperty(Object.prototype, methodName, { value: function () { if (this === global) { throw new TypeError('this is null or not defined for '+method); } var args = Array.prototype.slice.call(arguments); args.unshift(this); // sets first arg as object instance return method.apply(this, args); }, enumerable: false, configurable: envIs('test') // hack for tests }); } }); }
'use strict'; /** * @module object-loops */ var dasherize = require('dasherize'); var exists = require('101/exists'); var envIs = require('101/env-is'); var path = require('path'); /** * Extends Object.prototype with all "object-loops" methods * @function module:object-loops * @param {boolean} hideWarnings - Will hide warnings that appear if a method already exists. */ module.exports = extendObjectPrototype; function extendObjectPrototype (hideWarnings) { [ 'forEach', 'map', 'filter', 'reduce' ].forEach(function (methodName) { var filename = dasherize(methodName); var filepath = path.resolve('./'+filename); if (Object.prototype[methodName] && !hideWarnings) { console.log('warn: "Object.prototype.' + methodName + '" already exists.'); } else { var method = require(filepath); Object.defineProperty(Object.prototype, methodName, { value: function () { if (this === global) { throw new TypeError('this is null or not defined for '+method); } var args = Array.prototype.slice.call(arguments); args.unshift(this); // sets first arg as object instance return method.apply(this, args); }, + enumerable: false, configurable: envIs('test') // hack for tests }); } }); }
1
0.022727
1
0
db672fd8e073074017f5a05e9764575c041509a3
src/components/Link/index.js
src/components/Link/index.js
import React, { PropTypes } from 'react'; export default function Link(props) { const { handleClick, href } = props; const fn = (e) => { e.preventDefault(); handleClick(href); }; return ( <a {...props} onClick={fn} /> ); } Link.propTypes = { handleClick: PropTypes.func, href: PropTypes.string, };
import React, { PropTypes } from 'react'; export default function Link(props) { const { handleClick, href } = props; const fn = (e) => { e.preventDefault(); e.stopPropagation(); handleClick(href); }; return ( <a {...props} onClick={fn} /> ); } Link.propTypes = { handleClick: PropTypes.func, href: PropTypes.string, };
Stop link events from bubbling
Stop link events from bubbling
JavaScript
mit
jongold/goldOS,jongold/goldOS
javascript
## Code Before: import React, { PropTypes } from 'react'; export default function Link(props) { const { handleClick, href } = props; const fn = (e) => { e.preventDefault(); handleClick(href); }; return ( <a {...props} onClick={fn} /> ); } Link.propTypes = { handleClick: PropTypes.func, href: PropTypes.string, }; ## Instruction: Stop link events from bubbling ## Code After: import React, { PropTypes } from 'react'; export default function Link(props) { const { handleClick, href } = props; const fn = (e) => { e.preventDefault(); e.stopPropagation(); handleClick(href); }; return ( <a {...props} onClick={fn} /> ); } Link.propTypes = { handleClick: PropTypes.func, href: PropTypes.string, };
import React, { PropTypes } from 'react'; export default function Link(props) { const { handleClick, href } = props; const fn = (e) => { e.preventDefault(); + e.stopPropagation(); handleClick(href); }; return ( <a {...props} onClick={fn} /> ); } Link.propTypes = { handleClick: PropTypes.func, href: PropTypes.string, };
1
0.055556
1
0
e031f543b8a69fd17281c81403f1f49d9238defe
testlib/README.md
testlib/README.md
This directory contains the JUnit and Hamcrest Core jar files for building and running the test suite. ## Populating this directory This can be done using Apache Ivy, using the supplied ivy.xml and the Ant "resolve" task. This task is standalone from the rest of the build targets to avoid a hard dependency on Ivy. Alternatively, copy in the junit-4.x.jar and hamcrest-core-1.x.jar files manually from a local copy you have available.
This directory contains the JUnit and Hamcrest Core jar files for building and running the test suite. ## Populating this directory This can be done using [Apache Ivy][1], using the supplied ivy.xml and the [Ant][2] `resolve` task. This task is standalone from the rest of the build targets to avoid a hard dependency on Ivy. Alternatively, copy in the `junit-4.x.jar` and `hamcrest-core-1.x.jar` files manually from a local copy you have available. [1]: http://ant.apache.org/ivy/ [2]: http://ant.apache.org/
Add links for Ant and Ivy.
Add links for Ant and Ivy.
Markdown
bsd-3-clause
run2000/java-immutable-collections
markdown
## Code Before: This directory contains the JUnit and Hamcrest Core jar files for building and running the test suite. ## Populating this directory This can be done using Apache Ivy, using the supplied ivy.xml and the Ant "resolve" task. This task is standalone from the rest of the build targets to avoid a hard dependency on Ivy. Alternatively, copy in the junit-4.x.jar and hamcrest-core-1.x.jar files manually from a local copy you have available. ## Instruction: Add links for Ant and Ivy. ## Code After: This directory contains the JUnit and Hamcrest Core jar files for building and running the test suite. ## Populating this directory This can be done using [Apache Ivy][1], using the supplied ivy.xml and the [Ant][2] `resolve` task. This task is standalone from the rest of the build targets to avoid a hard dependency on Ivy. Alternatively, copy in the `junit-4.x.jar` and `hamcrest-core-1.x.jar` files manually from a local copy you have available. [1]: http://ant.apache.org/ivy/ [2]: http://ant.apache.org/
This directory contains the JUnit and Hamcrest Core jar files for building and running the test suite. ## Populating this directory - This can be done using Apache Ivy, using the supplied ivy.xml and the + This can be done using [Apache Ivy][1], using the supplied ivy.xml and the ? + ++++ - Ant "resolve" task. This task is standalone from the rest of the build ? ^ ^ + [Ant][2] `resolve` task. This task is standalone from the rest of the build ? + ++++ ^ ^ targets to avoid a hard dependency on Ivy. - Alternatively, copy in the junit-4.x.jar and hamcrest-core-1.x.jar files ? ^^^^^^ + Alternatively, copy in the `junit-4.x.jar` and `hamcrest-core-1.x.jar` ? + + + ^ - manually from a local copy you have available. + files manually from a local copy you have available. ? ++++++ + + + [1]: http://ant.apache.org/ivy/ + [2]: http://ant.apache.org/
12
1
8
4
fb4c264b6b97dac5564e77ee1098bcdb136deb18
delivery.yaml
delivery.yaml
version: "2017-09-20" pipeline: - id: build overlay: ci/python type: script commands: - desc: "setup the environment" cmd: | apt-get update apt-get install -qy python3-dev python-pip python3-pip update-alternatives --install /usr/bin/python python /usr/bin/python3 10 pip install -r python/requirements.txt - desc: "run tests" cmd: | nosetests -w python - desc: "build and push docker images" cmd: | BASE_IMAGE="pierone.stups.zalan.do/machinery/ghe-backup" if [[ "${CDP_TARGET_BRANCH}" == "master" && -z "${CDP_PULL_REQUEST_NUMBER}" ]]; then IMAGE="${BASE_IMAGE}:cdp-${CDP_BUILD_VERSION}" else IMAGE="${BASE_IMAGE}-test:cdp-${CDP_BUILD_VERSION}" fi docker build --cache-from "${BASE_IMAGE}:latest" -t "${IMAGE}" -f Dockerfile . docker push "${IMAGE}" echo "${IMAGE} pushed"
version: "2017-09-20" dependencies: - id: python type: docker ref: registry.opensource.zalan.do/library/python-3.8 pipeline: - id: build overlay: ci/python type: script commands: - desc: "setup the environment" cmd: | apt-get update apt-get install -qy python3-dev python-pip python3-pip update-alternatives --install /usr/bin/python python /usr/bin/python3 10 pip install -r python/requirements.txt - desc: "run tests" cmd: | nosetests -w python - desc: "build and push docker images" cmd: | BASE_IMAGE="pierone.stups.zalan.do/machinery/ghe-backup" if [[ "${CDP_TARGET_BRANCH}" == "master" && -z "${CDP_PULL_REQUEST_NUMBER}" ]]; then IMAGE="${BASE_IMAGE}:cdp-${CDP_BUILD_VERSION}" else IMAGE="${BASE_IMAGE}-test:cdp-${CDP_BUILD_VERSION}" fi docker build --cache-from "${BASE_IMAGE}:latest" -t "${IMAGE}" -f Dockerfile . docker push "${IMAGE}" echo "${IMAGE} pushed"
Add docker base images as CDP dependencies
Add docker base images as CDP dependencies
YAML
apache-2.0
zalando/ghe-backup,zalando/ghe-backup
yaml
## Code Before: version: "2017-09-20" pipeline: - id: build overlay: ci/python type: script commands: - desc: "setup the environment" cmd: | apt-get update apt-get install -qy python3-dev python-pip python3-pip update-alternatives --install /usr/bin/python python /usr/bin/python3 10 pip install -r python/requirements.txt - desc: "run tests" cmd: | nosetests -w python - desc: "build and push docker images" cmd: | BASE_IMAGE="pierone.stups.zalan.do/machinery/ghe-backup" if [[ "${CDP_TARGET_BRANCH}" == "master" && -z "${CDP_PULL_REQUEST_NUMBER}" ]]; then IMAGE="${BASE_IMAGE}:cdp-${CDP_BUILD_VERSION}" else IMAGE="${BASE_IMAGE}-test:cdp-${CDP_BUILD_VERSION}" fi docker build --cache-from "${BASE_IMAGE}:latest" -t "${IMAGE}" -f Dockerfile . docker push "${IMAGE}" echo "${IMAGE} pushed" ## Instruction: Add docker base images as CDP dependencies ## Code After: version: "2017-09-20" dependencies: - id: python type: docker ref: registry.opensource.zalan.do/library/python-3.8 pipeline: - id: build overlay: ci/python type: script commands: - desc: "setup the environment" cmd: | apt-get update apt-get install -qy python3-dev python-pip python3-pip update-alternatives --install /usr/bin/python python /usr/bin/python3 10 pip install -r python/requirements.txt - desc: "run tests" cmd: | nosetests -w python - desc: "build and push docker images" cmd: | BASE_IMAGE="pierone.stups.zalan.do/machinery/ghe-backup" if [[ "${CDP_TARGET_BRANCH}" == "master" && -z "${CDP_PULL_REQUEST_NUMBER}" ]]; then IMAGE="${BASE_IMAGE}:cdp-${CDP_BUILD_VERSION}" else IMAGE="${BASE_IMAGE}-test:cdp-${CDP_BUILD_VERSION}" fi docker build --cache-from "${BASE_IMAGE}:latest" -t "${IMAGE}" -f Dockerfile . docker push "${IMAGE}" echo "${IMAGE} pushed"
version: "2017-09-20" + + dependencies: + - id: python + type: docker + ref: registry.opensource.zalan.do/library/python-3.8 + pipeline: - id: build overlay: ci/python type: script commands: - desc: "setup the environment" cmd: | apt-get update apt-get install -qy python3-dev python-pip python3-pip update-alternatives --install /usr/bin/python python /usr/bin/python3 10 pip install -r python/requirements.txt - desc: "run tests" cmd: | nosetests -w python - desc: "build and push docker images" cmd: | BASE_IMAGE="pierone.stups.zalan.do/machinery/ghe-backup" if [[ "${CDP_TARGET_BRANCH}" == "master" && -z "${CDP_PULL_REQUEST_NUMBER}" ]]; then IMAGE="${BASE_IMAGE}:cdp-${CDP_BUILD_VERSION}" else IMAGE="${BASE_IMAGE}-test:cdp-${CDP_BUILD_VERSION}" fi docker build --cache-from "${BASE_IMAGE}:latest" -t "${IMAGE}" -f Dockerfile . docker push "${IMAGE}" echo "${IMAGE} pushed"
6
0.214286
6
0
65f5695b90054f73d7119f0c50be51f61de777fa
tardis/tests/tests_slow/runner.py
tardis/tests/tests_slow/runner.py
import argparse import json import os import time import requests from tardis import __githash__ as tardis_githash parser = argparse.ArgumentParser(description="Run slow integration tests") parser.add_argument("--yaml", dest="yaml_filepath", help="Path to YAML config file for integration tests.") parser.add_argument("--atomic-dataset", dest="atomic_dataset", help="Path to atomic dataset.") test_command = ( "python setup.py test --test-path=tardis/tests/tests_slow/test_integration.py " "--args=\"-rs --integration-tests={0} --atomic-dataset={1} --remote-data\"" ) if __name__ == "__main__": args = parser.parse_args() while True: gh_request = requests.get( "https://api.github.com/repos/tardis-sn/tardis/branches/master" ) gh_master_head_data = json.loads(gh_request.content) gh_tardis_githash = gh_master_head_data['commit']['sha'] if gh_tardis_githash != tardis_githash: os.system("git pull origin master") os.system(test_command.format(args.yaml_filepath, args.atomic_dataset)) else: time.sleep(600)
import argparse import datetime import json import os import time import requests from tardis import __githash__ as tardis_githash parser = argparse.ArgumentParser(description="Run slow integration tests") parser.add_argument("--yaml", dest="yaml_filepath", help="Path to YAML config file for integration tests.") parser.add_argument("--atomic-dataset", dest="atomic_dataset", help="Path to atomic dataset.") test_command = ( "python setup.py test --test-path=tardis/tests/tests_slow/test_integration.py " "--args=\"-rs --integration-tests={0} --atomic-dataset={1} --remote-data\"" ) if __name__ == "__main__": args = parser.parse_args() while True: gh_request = requests.get( "https://api.github.com/repos/tardis-sn/tardis/branches/master" ) gh_master_head_data = json.loads(gh_request.content) gh_tardis_githash = gh_master_head_data['commit']['sha'] if gh_tardis_githash != tardis_githash: os.system("git pull origin master") os.system(test_command.format(args.yaml_filepath, args.atomic_dataset)) else: checked = datetime.datetime.now() print "Up-to-date. Checked on {0} {1}".format( checked.strftime("%d-%b-%Y"), checked.strftime("%H:%M:%S") ) time.sleep(600)
Print the time of checking status at github.
Print the time of checking status at github.
Python
bsd-3-clause
kaushik94/tardis,orbitfold/tardis,kaushik94/tardis,orbitfold/tardis,orbitfold/tardis,kaushik94/tardis,orbitfold/tardis,kaushik94/tardis
python
## Code Before: import argparse import json import os import time import requests from tardis import __githash__ as tardis_githash parser = argparse.ArgumentParser(description="Run slow integration tests") parser.add_argument("--yaml", dest="yaml_filepath", help="Path to YAML config file for integration tests.") parser.add_argument("--atomic-dataset", dest="atomic_dataset", help="Path to atomic dataset.") test_command = ( "python setup.py test --test-path=tardis/tests/tests_slow/test_integration.py " "--args=\"-rs --integration-tests={0} --atomic-dataset={1} --remote-data\"" ) if __name__ == "__main__": args = parser.parse_args() while True: gh_request = requests.get( "https://api.github.com/repos/tardis-sn/tardis/branches/master" ) gh_master_head_data = json.loads(gh_request.content) gh_tardis_githash = gh_master_head_data['commit']['sha'] if gh_tardis_githash != tardis_githash: os.system("git pull origin master") os.system(test_command.format(args.yaml_filepath, args.atomic_dataset)) else: time.sleep(600) ## Instruction: Print the time of checking status at github. ## Code After: import argparse import datetime import json import os import time import requests from tardis import __githash__ as tardis_githash parser = argparse.ArgumentParser(description="Run slow integration tests") parser.add_argument("--yaml", dest="yaml_filepath", help="Path to YAML config file for integration tests.") parser.add_argument("--atomic-dataset", dest="atomic_dataset", help="Path to atomic dataset.") test_command = ( "python setup.py test --test-path=tardis/tests/tests_slow/test_integration.py " "--args=\"-rs --integration-tests={0} --atomic-dataset={1} --remote-data\"" ) if __name__ == "__main__": args = parser.parse_args() while True: gh_request = requests.get( "https://api.github.com/repos/tardis-sn/tardis/branches/master" ) gh_master_head_data = json.loads(gh_request.content) gh_tardis_githash = gh_master_head_data['commit']['sha'] if gh_tardis_githash != tardis_githash: os.system("git pull origin master") os.system(test_command.format(args.yaml_filepath, args.atomic_dataset)) else: checked = datetime.datetime.now() print "Up-to-date. Checked on {0} {1}".format( checked.strftime("%d-%b-%Y"), checked.strftime("%H:%M:%S") ) time.sleep(600)
import argparse + import datetime import json import os import time import requests from tardis import __githash__ as tardis_githash parser = argparse.ArgumentParser(description="Run slow integration tests") parser.add_argument("--yaml", dest="yaml_filepath", help="Path to YAML config file for integration tests.") parser.add_argument("--atomic-dataset", dest="atomic_dataset", help="Path to atomic dataset.") test_command = ( "python setup.py test --test-path=tardis/tests/tests_slow/test_integration.py " "--args=\"-rs --integration-tests={0} --atomic-dataset={1} --remote-data\"" ) if __name__ == "__main__": args = parser.parse_args() while True: gh_request = requests.get( "https://api.github.com/repos/tardis-sn/tardis/branches/master" ) gh_master_head_data = json.loads(gh_request.content) gh_tardis_githash = gh_master_head_data['commit']['sha'] if gh_tardis_githash != tardis_githash: os.system("git pull origin master") os.system(test_command.format(args.yaml_filepath, args.atomic_dataset)) else: + checked = datetime.datetime.now() + print "Up-to-date. Checked on {0} {1}".format( + checked.strftime("%d-%b-%Y"), checked.strftime("%H:%M:%S") + ) time.sleep(600)
5
0.138889
5
0
c228d733e4a68e9fbfb257dada917d9197c7a46f
env/env.zsh
env/env.zsh
export XDG_CONFIG_HOME=$HOME/.config # # OS Specific Env Variables # # Ensure languages are set export LANG=en_US.UTF-8 export LANGUAGE=en_US.UTF-8 # export LC_ALL=en_US.UTF-8 # Ensure editor is set export EDITOR='emacsclient -a vim -c' export ALTERNATE_EDITOR=vim export VISUAL='emacsclient -a vim -c' # Set browser if [ $OS = 'Linux' ]; then export BROWSER=firefox elif [ $OS = 'FreeBSD' ]; then export BROWSER=firefox fi
export XDG_CONFIG_HOME=$HOME/.config # # OS Specific Env Variables # # Ensure languages are set export LANG=en_US.UTF-8 export LANGUAGE=en_US.UTF-8 # export LC_ALL=en_US.UTF-8 # Ensure editor is set if [ -e /usr/local/bin/vim ] || [ -e /usr/bin/vim ] ; then export EDITOR=vim export ALTERNATE_EDITOR=vim export VISUAL=vim else export EDITOR=vi export ALTERNATE_EDITOR=vi export VISUAL=vi fi # Set browser if [ $OS = 'Linux' ]; then export BROWSER=firefox elif [ $OS = 'FreeBSD' ]; then export BROWSER=firefox fi
Change default editor to vim or vi.
Change default editor to vim or vi.
Shell
mit
alldigital/zsh-files
shell
## Code Before: export XDG_CONFIG_HOME=$HOME/.config # # OS Specific Env Variables # # Ensure languages are set export LANG=en_US.UTF-8 export LANGUAGE=en_US.UTF-8 # export LC_ALL=en_US.UTF-8 # Ensure editor is set export EDITOR='emacsclient -a vim -c' export ALTERNATE_EDITOR=vim export VISUAL='emacsclient -a vim -c' # Set browser if [ $OS = 'Linux' ]; then export BROWSER=firefox elif [ $OS = 'FreeBSD' ]; then export BROWSER=firefox fi ## Instruction: Change default editor to vim or vi. ## Code After: export XDG_CONFIG_HOME=$HOME/.config # # OS Specific Env Variables # # Ensure languages are set export LANG=en_US.UTF-8 export LANGUAGE=en_US.UTF-8 # export LC_ALL=en_US.UTF-8 # Ensure editor is set if [ -e /usr/local/bin/vim ] || [ -e /usr/bin/vim ] ; then export EDITOR=vim export ALTERNATE_EDITOR=vim export VISUAL=vim else export EDITOR=vi export ALTERNATE_EDITOR=vi export VISUAL=vi fi # Set browser if [ $OS = 'Linux' ]; then export BROWSER=firefox elif [ $OS = 'FreeBSD' ]; then export BROWSER=firefox fi
export XDG_CONFIG_HOME=$HOME/.config # # OS Specific Env Variables # # Ensure languages are set export LANG=en_US.UTF-8 export LANGUAGE=en_US.UTF-8 # export LC_ALL=en_US.UTF-8 # Ensure editor is set - export EDITOR='emacsclient -a vim -c' + if [ -e /usr/local/bin/vim ] || [ -e /usr/bin/vim ] ; then + export EDITOR=vim - export ALTERNATE_EDITOR=vim + export ALTERNATE_EDITOR=vim ? ++++ - export VISUAL='emacsclient -a vim -c' + export VISUAL=vim + else + export EDITOR=vi + export ALTERNATE_EDITOR=vi + export VISUAL=vi + fi # Set browser if [ $OS = 'Linux' ]; then export BROWSER=firefox elif [ $OS = 'FreeBSD' ]; then export BROWSER=firefox fi
12
0.521739
9
3
fa55fc61b8ea957f095d15b0dc9a8577c2f2472d
bokehjs/gulp/tasks/default.coffee
bokehjs/gulp/tasks/default.coffee
gulp = require "gulp" runSequence = require "run-sequence" gulp.task "default", (cb) -> console.log('Building BokehJS for developer mode ...') runSequence(["scripts", "styles"], "install", "watch", cb)
gulp = require "gulp" runSequence = require "run-sequence" gulp.task "default", (cb) -> console.log('Building BokehJS for developer mode ...') runSequence("build", "install", "watch", cb)
Switch to simply using build
Switch to simply using build
CoffeeScript
bsd-3-clause
Karel-van-de-Plassche/bokeh,draperjames/bokeh,rhiever/bokeh,bokeh/bokeh,Karel-van-de-Plassche/bokeh,percyfal/bokeh,draperjames/bokeh,muku42/bokeh,ericmjl/bokeh,abele/bokeh,timothydmorton/bokeh,PythonCharmers/bokeh,muku42/bokeh,clairetang6/bokeh,carlvlewis/bokeh,bokeh/bokeh,bokeh/bokeh,eteq/bokeh,azjps/bokeh,eteq/bokeh,schoolie/bokeh,lukebarnard1/bokeh,msarahan/bokeh,eteq/bokeh,daodaoliang/bokeh,awanke/bokeh,caseyclements/bokeh,paultcochrane/bokeh,PythonCharmers/bokeh,saifrahmed/bokeh,rhiever/bokeh,KasperPRasmussen/bokeh,rs2/bokeh,bsipocz/bokeh,carlvlewis/bokeh,DuCorey/bokeh,abele/bokeh,philippjfr/bokeh,caseyclements/bokeh,akloster/bokeh,azjps/bokeh,stuart-knock/bokeh,alan-unravel/bokeh,satishgoda/bokeh,saifrahmed/bokeh,bsipocz/bokeh,justacec/bokeh,birdsarah/bokeh,jakirkham/bokeh,msarahan/bokeh,dennisobrien/bokeh,roxyboy/bokeh,gpfreitas/bokeh,KasperPRasmussen/bokeh,clairetang6/bokeh,rothnic/bokeh,tacaswell/bokeh,canavandl/bokeh,matbra/bokeh,KasperPRasmussen/bokeh,ericdill/bokeh,quasiben/bokeh,jplourenco/bokeh,timothydmorton/bokeh,gpfreitas/bokeh,birdsarah/bokeh,mindriot101/bokeh,htygithub/bokeh,timsnyder/bokeh,akloster/bokeh,philippjfr/bokeh,mutirri/bokeh,phobson/bokeh,saifrahmed/bokeh,awanke/bokeh,timsnyder/bokeh,aavanian/bokeh,justacec/bokeh,percyfal/bokeh,aavanian/bokeh,jakirkham/bokeh,rhiever/bokeh,ChinaQuants/bokeh,mutirri/bokeh,bokeh/bokeh,ahmadia/bokeh,rothnic/bokeh,ericdill/bokeh,DuCorey/bokeh,ChristosChristofidis/bokeh,aiguofer/bokeh,canavandl/bokeh,htygithub/bokeh,srinathv/bokeh,maxalbert/bokeh,phobson/bokeh,aiguofer/bokeh,draperjames/bokeh,draperjames/bokeh,stonebig/bokeh,daodaoliang/bokeh,eteq/bokeh,bokeh/bokeh,DuCorey/bokeh,ptitjano/bokeh,quasiben/bokeh,ptitjano/bokeh,srinathv/bokeh,stuart-knock/bokeh,jakirkham/bokeh,stonebig/bokeh,khkaminska/bokeh,htygithub/bokeh,caseyclements/bokeh,schoolie/bokeh,abele/bokeh,aiguofer/bokeh,ericmjl/bokeh,satishgoda/bokeh,dennisobrien/bokeh,ahmadia/bokeh,tacaswell/bokeh,ChristosChristofidis/bokeh,abele/bokeh,mutirri/bokeh,muku42/bokeh,jplourenco/bokeh,khkaminska/bokeh,ChinaQuants/bokeh,timsnyder/bokeh,laurent-george/bokeh,PythonCharmers/bokeh,tacaswell/bokeh,bsipocz/bokeh,xguse/bokeh,xguse/bokeh,satishgoda/bokeh,azjps/bokeh,philippjfr/bokeh,DuCorey/bokeh,percyfal/bokeh,rothnic/bokeh,rs2/bokeh,aiguofer/bokeh,justacec/bokeh,bsipocz/bokeh,clairetang6/bokeh,paultcochrane/bokeh,khkaminska/bokeh,daodaoliang/bokeh,srinathv/bokeh,caseyclements/bokeh,roxyboy/bokeh,josherick/bokeh,aavanian/bokeh,ChinaQuants/bokeh,ChristosChristofidis/bokeh,azjps/bokeh,mindriot101/bokeh,carlvlewis/bokeh,schoolie/bokeh,lukebarnard1/bokeh,muku42/bokeh,KasperPRasmussen/bokeh,josherick/bokeh,akloster/bokeh,msarahan/bokeh,CrazyGuo/bokeh,paultcochrane/bokeh,ericmjl/bokeh,tacaswell/bokeh,clairetang6/bokeh,matbra/bokeh,laurent-george/bokeh,phobson/bokeh,josherick/bokeh,evidation-health/bokeh,schoolie/bokeh,rs2/bokeh,roxyboy/bokeh,phobson/bokeh,stonebig/bokeh,deeplook/bokeh,draperjames/bokeh,birdsarah/bokeh,gpfreitas/bokeh,rs2/bokeh,satishgoda/bokeh,Karel-van-de-Plassche/bokeh,matbra/bokeh,CrazyGuo/bokeh,xguse/bokeh,awanke/bokeh,timsnyder/bokeh,percyfal/bokeh,rhiever/bokeh,daodaoliang/bokeh,rothnic/bokeh,maxalbert/bokeh,schoolie/bokeh,srinathv/bokeh,carlvlewis/bokeh,evidation-health/bokeh,stuart-knock/bokeh,mutirri/bokeh,maxalbert/bokeh,msarahan/bokeh,ericdill/bokeh,rs2/bokeh,awanke/bokeh,dennisobrien/bokeh,lukebarnard1/bokeh,ptitjano/bokeh,phobson/bokeh,ChristosChristofidis/bokeh,jakirkham/bokeh,PythonCharmers/bokeh,josherick/bokeh,matbra/bokeh,xguse/bokeh,ptitjano/bokeh,ericmjl/bokeh,philippjfr/bokeh,evidation-health/bokeh,khkaminska/bokeh,quasiben/bokeh,saifrahmed/bokeh,jplourenco/bokeh,ChinaQuants/bokeh,alan-unravel/bokeh,evidation-health/bokeh,aiguofer/bokeh,maxalbert/bokeh,DuCorey/bokeh,aavanian/bokeh,laurent-george/bokeh,mindriot101/bokeh,akloster/bokeh,timothydmorton/bokeh,paultcochrane/bokeh,KasperPRasmussen/bokeh,laurent-george/bokeh,jakirkham/bokeh,ericmjl/bokeh,roxyboy/bokeh,alan-unravel/bokeh,gpfreitas/bokeh,alan-unravel/bokeh,philippjfr/bokeh,deeplook/bokeh,CrazyGuo/bokeh,aavanian/bokeh,ahmadia/bokeh,Karel-van-de-Plassche/bokeh,canavandl/bokeh,deeplook/bokeh,justacec/bokeh,mindriot101/bokeh,htygithub/bokeh,timothydmorton/bokeh,ahmadia/bokeh,birdsarah/bokeh,deeplook/bokeh,azjps/bokeh,stuart-knock/bokeh,jplourenco/bokeh,canavandl/bokeh,ericdill/bokeh,stonebig/bokeh,percyfal/bokeh,ptitjano/bokeh,timsnyder/bokeh,CrazyGuo/bokeh,lukebarnard1/bokeh,dennisobrien/bokeh,Karel-van-de-Plassche/bokeh,dennisobrien/bokeh
coffeescript
## Code Before: gulp = require "gulp" runSequence = require "run-sequence" gulp.task "default", (cb) -> console.log('Building BokehJS for developer mode ...') runSequence(["scripts", "styles"], "install", "watch", cb) ## Instruction: Switch to simply using build ## Code After: gulp = require "gulp" runSequence = require "run-sequence" gulp.task "default", (cb) -> console.log('Building BokehJS for developer mode ...') runSequence("build", "install", "watch", cb)
gulp = require "gulp" runSequence = require "run-sequence" gulp.task "default", (cb) -> console.log('Building BokehJS for developer mode ...') - runSequence(["scripts", "styles"], "install", "watch", cb) ? - ^^^ ^^^ ----------- + runSequence("build", "install", "watch", cb) ? ^^ ^^
2
0.285714
1
1
a0fbc6d2a4af04f2a506e4e401b04a70cf2fdf42
server/timer.js
server/timer.js
if (Meteor.isServer) { Meteor.setInterval(function () { var countBefore = Logs.find().count(); var timestamp = Date.now() - 700 * 24 * 3600; Logs.remove({ date: { $lt: timestamp } }); var countAfter = Logs.find().count(); console.log("Logs removed (before/after)", countBefore, countAfter); }, 60 * 1000); }
if (Meteor.isServer) { Meteor.setInterval(function () { var countBefore = Logs.find().count(); var timestamp = Date.now() - 700 * 24 * 3600; Logs.remove({ date: { $lt: timestamp } }); var countAfter = Logs.find().count(); console.log("Logs removed (before/after)", countBefore, countAfter); // update log counts _.each(LogBooks.find().fetch(), function (l) { var count = Logs.find({ LogBookID: l._id }).count(); console.log(l._id, count); LogBooks.update(l._id, { $set: { LogsCount: count } }); }); }, 60 * 1000); }
Fix for logs count when logs are removed in setInterval
Fix for logs count when logs are removed in setInterval
JavaScript
mit
Ermlab/silos,Ermlab/silos,Ermlab/silos,Ermlab/silos,Ermlab/silos
javascript
## Code Before: if (Meteor.isServer) { Meteor.setInterval(function () { var countBefore = Logs.find().count(); var timestamp = Date.now() - 700 * 24 * 3600; Logs.remove({ date: { $lt: timestamp } }); var countAfter = Logs.find().count(); console.log("Logs removed (before/after)", countBefore, countAfter); }, 60 * 1000); } ## Instruction: Fix for logs count when logs are removed in setInterval ## Code After: if (Meteor.isServer) { Meteor.setInterval(function () { var countBefore = Logs.find().count(); var timestamp = Date.now() - 700 * 24 * 3600; Logs.remove({ date: { $lt: timestamp } }); var countAfter = Logs.find().count(); console.log("Logs removed (before/after)", countBefore, countAfter); // update log counts _.each(LogBooks.find().fetch(), function (l) { var count = Logs.find({ LogBookID: l._id }).count(); console.log(l._id, count); LogBooks.update(l._id, { $set: { LogsCount: count } }); }); }, 60 * 1000); }
if (Meteor.isServer) { Meteor.setInterval(function () { var countBefore = Logs.find().count(); var timestamp = Date.now() - 700 * 24 * 3600; Logs.remove({ date: { $lt: timestamp } }); var countAfter = Logs.find().count(); console.log("Logs removed (before/after)", countBefore, countAfter); + // update log counts + _.each(LogBooks.find().fetch(), function (l) { + var count = Logs.find({ + LogBookID: l._id + }).count(); + + console.log(l._id, count); + + LogBooks.update(l._id, { + $set: { + LogsCount: count + } + }); + }); + + }, 60 * 1000); }
16
1.142857
16
0
e42f77d374bab66fb1a90322c3b36c8f75f2499c
pft/errors.py
pft/errors.py
"""Module that contains error handlers.""" from flask import render_template, Blueprint error = Blueprint('error', __name__) @error.app_errorhandler(404) def page_not_found(e): """Return page not found HTML page.""" return render_template('404.html'), 404 @error.app_errorhandler(500) def internal_server_error(e): """Return internal server error HTML page.""" return render_template('500.html'), 500
"""Module that contains error handlers.""" from flask import render_template, Blueprint from .database import db error = Blueprint('error', __name__) @error.app_errorhandler(404) def page_not_found(e): """Return page not found HTML page.""" return render_template('404.html'), 404 @error.app_errorhandler(500) def internal_server_error(e): """Return internal server error HTML page.""" db.session.rollback() return render_template('500.html'), 500
Add database rollback to error handler
Add database rollback to error handler
Python
unknown
gregcowell/PFT,gregcowell/BAM,gregcowell/BAM,gregcowell/PFT
python
## Code Before: """Module that contains error handlers.""" from flask import render_template, Blueprint error = Blueprint('error', __name__) @error.app_errorhandler(404) def page_not_found(e): """Return page not found HTML page.""" return render_template('404.html'), 404 @error.app_errorhandler(500) def internal_server_error(e): """Return internal server error HTML page.""" return render_template('500.html'), 500 ## Instruction: Add database rollback to error handler ## Code After: """Module that contains error handlers.""" from flask import render_template, Blueprint from .database import db error = Blueprint('error', __name__) @error.app_errorhandler(404) def page_not_found(e): """Return page not found HTML page.""" return render_template('404.html'), 404 @error.app_errorhandler(500) def internal_server_error(e): """Return internal server error HTML page.""" db.session.rollback() return render_template('500.html'), 500
"""Module that contains error handlers.""" from flask import render_template, Blueprint + from .database import db error = Blueprint('error', __name__) @error.app_errorhandler(404) def page_not_found(e): """Return page not found HTML page.""" return render_template('404.html'), 404 @error.app_errorhandler(500) def internal_server_error(e): """Return internal server error HTML page.""" + db.session.rollback() return render_template('500.html'), 500
2
0.125
2
0
0c9e32568091a5d4a44ae85e6ed279f63bfc6bb5
src/main/java/com/vaguehope/onosendai/util/SyncMgr.java
src/main/java/com/vaguehope/onosendai/util/SyncMgr.java
package com.vaguehope.onosendai.util; import java.util.HashMap; import java.util.Map; public class SyncMgr { private final Map<String, MutableInt> locks = new HashMap<String, MutableInt>(); public Object getSync (final String key) { synchronized (this.locks) { MutableInt c = this.locks.get(key); if (c == null) { c = new MutableInt(); this.locks.put(key, c); } c.i++; return c; } } public void returnSync (final String key) { synchronized (this.locks) { MutableInt c = this.locks.get(key); if (c != null) { c.i--; if (c.i < 1) this.locks.remove(key); } } } private static class MutableInt { volatile int i = 0; public MutableInt () {} } }
package com.vaguehope.onosendai.util; import java.util.HashMap; import java.util.Map; import java.util.concurrent.atomic.AtomicInteger; public class SyncMgr { private final Map<String, AtomicInteger> locks = new HashMap<String, AtomicInteger>(); public Object getSync (final String key) { synchronized (this.locks) { AtomicInteger c = this.locks.get(key); if (c == null) { c = new AtomicInteger(0); this.locks.put(key, c); } c.incrementAndGet(); return c; } } public void returnSync (final String key) { synchronized (this.locks) { final AtomicInteger c = this.locks.get(key); if (c != null) { c.decrementAndGet(); if (c.intValue() < 1) this.locks.remove(key); } } } }
Use AtomicInteger instead of strange int wrapper class.
Use AtomicInteger instead of strange int wrapper class.
Java
apache-2.0
haku/Onosendai,haku/Onosendai
java
## Code Before: package com.vaguehope.onosendai.util; import java.util.HashMap; import java.util.Map; public class SyncMgr { private final Map<String, MutableInt> locks = new HashMap<String, MutableInt>(); public Object getSync (final String key) { synchronized (this.locks) { MutableInt c = this.locks.get(key); if (c == null) { c = new MutableInt(); this.locks.put(key, c); } c.i++; return c; } } public void returnSync (final String key) { synchronized (this.locks) { MutableInt c = this.locks.get(key); if (c != null) { c.i--; if (c.i < 1) this.locks.remove(key); } } } private static class MutableInt { volatile int i = 0; public MutableInt () {} } } ## Instruction: Use AtomicInteger instead of strange int wrapper class. ## Code After: package com.vaguehope.onosendai.util; import java.util.HashMap; import java.util.Map; import java.util.concurrent.atomic.AtomicInteger; public class SyncMgr { private final Map<String, AtomicInteger> locks = new HashMap<String, AtomicInteger>(); public Object getSync (final String key) { synchronized (this.locks) { AtomicInteger c = this.locks.get(key); if (c == null) { c = new AtomicInteger(0); this.locks.put(key, c); } c.incrementAndGet(); return c; } } public void returnSync (final String key) { synchronized (this.locks) { final AtomicInteger c = this.locks.get(key); if (c != null) { c.decrementAndGet(); if (c.intValue() < 1) this.locks.remove(key); } } } }
package com.vaguehope.onosendai.util; import java.util.HashMap; import java.util.Map; + import java.util.concurrent.atomic.AtomicInteger; public class SyncMgr { - private final Map<String, MutableInt> locks = new HashMap<String, MutableInt>(); ? ^^ ^^^^ ^^ ^^^^ + private final Map<String, AtomicInteger> locks = new HashMap<String, AtomicInteger>(); ? ^ ^^^^ ++++ ^ ^^^^ ++++ public Object getSync (final String key) { synchronized (this.locks) { - MutableInt c = this.locks.get(key); ? ^^ ^^^^ + AtomicInteger c = this.locks.get(key); ? ^ ^^^^ ++++ if (c == null) { - c = new MutableInt(); + c = new AtomicInteger(0); this.locks.put(key, c); } - c.i++; + c.incrementAndGet(); return c; } } public void returnSync (final String key) { synchronized (this.locks) { - MutableInt c = this.locks.get(key); ? ^^ ^^^^ + final AtomicInteger c = this.locks.get(key); ? ^^^^^^^ ^^^^ ++++ if (c != null) { - c.i--; + c.decrementAndGet(); - if (c.i < 1) this.locks.remove(key); + if (c.intValue() < 1) this.locks.remove(key); ? +++++++++ } } } - private static class MutableInt { - - volatile int i = 0; - - public MutableInt () {} - - } - }
23
0.575
8
15
632153908bc36c415fe22e3cb254fd44910bb82b
src/WireMock/Client/JsonValueMatchingStrategy.php
src/WireMock/Client/JsonValueMatchingStrategy.php
<?php namespace WireMock\Client; class JsonValueMatchingStrategy extends ValueMatchingStrategy { const COMPARE_MODE__NON_EXTENSIBLE = "NON_EXTENSIBLE"; const COMPARE_MODE__LENIENT = "LENIENT"; private $_jsonCompareMode; function __construct($matchingValue, $jsonCompareMode) { parent::__construct('equalToJson', $matchingValue); $this->_jsonCompareMode = $jsonCompareMode; } function toArray() { $array = parent::toArray(); $array['jsonCompareMode'] = $this->_jsonCompareMode; return $array; } }
<?php namespace WireMock\Client; class JsonValueMatchingStrategy extends ValueMatchingStrategy { const COMPARE_MODE__NON_EXTENSIBLE = "NON_EXTENSIBLE"; const COMPARE_MODE__LENIENT = "LENIENT"; const COMPARE_MODE__STRICT = "STRICT"; const COMPARE_MODE__STRICT_ORDER = "STRICT_ORDER"; private $_jsonCompareMode; function __construct($matchingValue, $jsonCompareMode) { parent::__construct('equalToJson', $matchingValue); $this->_jsonCompareMode = $jsonCompareMode; } function toArray() { $array = parent::toArray(); $array['jsonCompareMode'] = $this->_jsonCompareMode; return $array; } }
Add strict & strict order JSON compare modes
Add strict & strict order JSON compare modes
PHP
mit
rowanhill/wiremock-php,rowanhill/wiremock-php
php
## Code Before: <?php namespace WireMock\Client; class JsonValueMatchingStrategy extends ValueMatchingStrategy { const COMPARE_MODE__NON_EXTENSIBLE = "NON_EXTENSIBLE"; const COMPARE_MODE__LENIENT = "LENIENT"; private $_jsonCompareMode; function __construct($matchingValue, $jsonCompareMode) { parent::__construct('equalToJson', $matchingValue); $this->_jsonCompareMode = $jsonCompareMode; } function toArray() { $array = parent::toArray(); $array['jsonCompareMode'] = $this->_jsonCompareMode; return $array; } } ## Instruction: Add strict & strict order JSON compare modes ## Code After: <?php namespace WireMock\Client; class JsonValueMatchingStrategy extends ValueMatchingStrategy { const COMPARE_MODE__NON_EXTENSIBLE = "NON_EXTENSIBLE"; const COMPARE_MODE__LENIENT = "LENIENT"; const COMPARE_MODE__STRICT = "STRICT"; const COMPARE_MODE__STRICT_ORDER = "STRICT_ORDER"; private $_jsonCompareMode; function __construct($matchingValue, $jsonCompareMode) { parent::__construct('equalToJson', $matchingValue); $this->_jsonCompareMode = $jsonCompareMode; } function toArray() { $array = parent::toArray(); $array['jsonCompareMode'] = $this->_jsonCompareMode; return $array; } }
<?php namespace WireMock\Client; class JsonValueMatchingStrategy extends ValueMatchingStrategy { const COMPARE_MODE__NON_EXTENSIBLE = "NON_EXTENSIBLE"; const COMPARE_MODE__LENIENT = "LENIENT"; + const COMPARE_MODE__STRICT = "STRICT"; + const COMPARE_MODE__STRICT_ORDER = "STRICT_ORDER"; private $_jsonCompareMode; function __construct($matchingValue, $jsonCompareMode) { parent::__construct('equalToJson', $matchingValue); $this->_jsonCompareMode = $jsonCompareMode; } function toArray() { $array = parent::toArray(); $array['jsonCompareMode'] = $this->_jsonCompareMode; return $array; } }
2
0.083333
2
0
71723cd2f9d0ec2a7e56bf9f4192bc7affd6617c
README.md
README.md
[Docker](https://www.docker.com/) **commands** in Bash. ### Installation $ git clone <repo> <docker_project>/bin
[Bash](https://www.gnu.org/software/bash/) scripts for managing [Docker](https://www.docker.com/) **images** and **containers**. ### Installation $ git clone <repo> <docker_project>/bin
Add link to GNU Project
Add link to GNU Project
Markdown
mit
ericmdev/docker.bin
markdown
## Code Before: [Docker](https://www.docker.com/) **commands** in Bash. ### Installation $ git clone <repo> <docker_project>/bin ## Instruction: Add link to GNU Project ## Code After: [Bash](https://www.gnu.org/software/bash/) scripts for managing [Docker](https://www.docker.com/) **images** and **containers**. ### Installation $ git clone <repo> <docker_project>/bin
- [Docker](https://www.docker.com/) **commands** in Bash. + [Bash](https://www.gnu.org/software/bash/) scripts for managing [Docker](https://www.docker.com/) **images** and **containers**. ### Installation $ git clone <repo> <docker_project>/bin
2
0.285714
1
1
882a4b1de407abe627728b105fb9fc5449055f28
README.md
README.md
dotfiles ======== ``` TMP=/tmp/dotfiles bash -c 'git clone https://github.com/ipopov/dotfiles.git $TMP && make -C $TMP install' ```
dotfiles ======== ``` TMP=$(mktemp -d -t dotfiles.XXXXXXXXX) bash -c 'git clone https://github.com/ipopov/dotfiles.git $TMP && make -C $TMP install' ```
Create a new temporary directory for every invocation.
Create a new temporary directory for every invocation.
Markdown
unlicense
ipopov/dotfiles
markdown
## Code Before: dotfiles ======== ``` TMP=/tmp/dotfiles bash -c 'git clone https://github.com/ipopov/dotfiles.git $TMP && make -C $TMP install' ``` ## Instruction: Create a new temporary directory for every invocation. ## Code After: dotfiles ======== ``` TMP=$(mktemp -d -t dotfiles.XXXXXXXXX) bash -c 'git clone https://github.com/ipopov/dotfiles.git $TMP && make -C $TMP install' ```
dotfiles ======== ``` - TMP=/tmp/dotfiles bash -c 'git clone https://github.com/ipopov/dotfiles.git $TMP && make -C $TMP install' ? ^ ^ + TMP=$(mktemp -d -t dotfiles.XXXXXXXXX) bash -c 'git clone https://github.com/ipopov/dotfiles.git $TMP && make -C $TMP install' ? ^^^^ + ^^^^^^^ +++++++++++ ```
2
0.333333
1
1
133b5fedb75865cf60a493685844b1a4729c3bbf
attributes/default.rb
attributes/default.rb
case node['platform_family'] when 'windows' if ENV['ProgramFiles'] == ENV['ProgramFiles(x86)'] # if user has never logged into an interactive session then ENV['homedrive'] will be nil default['zabbix']['etc_dir'] = ::File.join((ENV['homedrive'] || 'C:'), 'Program Files', 'Zabbix Agent') else default['zabbix']['etc_dir'] = ::File.join(ENV['ProgramFiles'], 'Zabbix Agent') end else default['zabbix']['etc_dir'] = '/etc/zabbix' end default['zabbix']['install_dir'] = '/opt/zabbix' default['zabbix']['web_dir'] = '/opt/zabbix/web' default['zabbix']['external_dir'] = '/opt/zabbix/externalscripts' default['zabbix']['alert_dir'] = '/opt/zabbix/AlertScriptsPath' default['zabbix']['lock_dir'] = '/var/lock/subsys' default['zabbix']['src_dir'] = '/opt' default['zabbix']['log_dir'] = '/var/log/zabbix' default['zabbix']['run_dir'] = '/var/run/zabbix' default['zabbix']['login'] = 'zabbix' default['zabbix']['group'] = 'zabbix' default['zabbix']['uid'] = nil default['zabbix']['gid'] = nil default['zabbix']['home'] = '/opt/zabbix' default['zabbix']['shell'] = '/bin/bash'
case node['platform_family'] when 'windows' default['zabbix']['etc_dir'] = ::File.join('C:', 'ProgramData', 'zabbix') else default['zabbix']['etc_dir'] = '/etc/zabbix' end default['zabbix']['install_dir'] = '/opt/zabbix' default['zabbix']['web_dir'] = '/opt/zabbix/web' default['zabbix']['external_dir'] = '/opt/zabbix/externalscripts' default['zabbix']['alert_dir'] = '/opt/zabbix/AlertScriptsPath' default['zabbix']['lock_dir'] = '/var/lock/subsys' default['zabbix']['src_dir'] = '/opt' default['zabbix']['log_dir'] = '/var/log/zabbix' default['zabbix']['run_dir'] = '/var/run/zabbix' default['zabbix']['login'] = 'zabbix' default['zabbix']['group'] = 'zabbix' default['zabbix']['uid'] = nil default['zabbix']['gid'] = nil default['zabbix']['home'] = '/opt/zabbix' default['zabbix']['shell'] = '/bin/bash'
Correct path to zabbix config on windows
Correct path to zabbix config on windows
Ruby
apache-2.0
jollyrojer/zabbix,jollyrojer/zabbix,jollyrojer/zabbix
ruby
## Code Before: case node['platform_family'] when 'windows' if ENV['ProgramFiles'] == ENV['ProgramFiles(x86)'] # if user has never logged into an interactive session then ENV['homedrive'] will be nil default['zabbix']['etc_dir'] = ::File.join((ENV['homedrive'] || 'C:'), 'Program Files', 'Zabbix Agent') else default['zabbix']['etc_dir'] = ::File.join(ENV['ProgramFiles'], 'Zabbix Agent') end else default['zabbix']['etc_dir'] = '/etc/zabbix' end default['zabbix']['install_dir'] = '/opt/zabbix' default['zabbix']['web_dir'] = '/opt/zabbix/web' default['zabbix']['external_dir'] = '/opt/zabbix/externalscripts' default['zabbix']['alert_dir'] = '/opt/zabbix/AlertScriptsPath' default['zabbix']['lock_dir'] = '/var/lock/subsys' default['zabbix']['src_dir'] = '/opt' default['zabbix']['log_dir'] = '/var/log/zabbix' default['zabbix']['run_dir'] = '/var/run/zabbix' default['zabbix']['login'] = 'zabbix' default['zabbix']['group'] = 'zabbix' default['zabbix']['uid'] = nil default['zabbix']['gid'] = nil default['zabbix']['home'] = '/opt/zabbix' default['zabbix']['shell'] = '/bin/bash' ## Instruction: Correct path to zabbix config on windows ## Code After: case node['platform_family'] when 'windows' default['zabbix']['etc_dir'] = ::File.join('C:', 'ProgramData', 'zabbix') else default['zabbix']['etc_dir'] = '/etc/zabbix' end default['zabbix']['install_dir'] = '/opt/zabbix' default['zabbix']['web_dir'] = '/opt/zabbix/web' default['zabbix']['external_dir'] = '/opt/zabbix/externalscripts' default['zabbix']['alert_dir'] = '/opt/zabbix/AlertScriptsPath' default['zabbix']['lock_dir'] = '/var/lock/subsys' default['zabbix']['src_dir'] = '/opt' default['zabbix']['log_dir'] = '/var/log/zabbix' default['zabbix']['run_dir'] = '/var/run/zabbix' default['zabbix']['login'] = 'zabbix' default['zabbix']['group'] = 'zabbix' default['zabbix']['uid'] = nil default['zabbix']['gid'] = nil default['zabbix']['home'] = '/opt/zabbix' default['zabbix']['shell'] = '/bin/bash'
case node['platform_family'] when 'windows' - if ENV['ProgramFiles'] == ENV['ProgramFiles(x86)'] - # if user has never logged into an interactive session then ENV['homedrive'] will be nil - default['zabbix']['etc_dir'] = ::File.join((ENV['homedrive'] || 'C:'), 'Program Files', 'Zabbix Agent') - else - default['zabbix']['etc_dir'] = ::File.join(ENV['ProgramFiles'], 'Zabbix Agent') ? -- ^^^^ ^^^^^ - ^ ------ + default['zabbix']['etc_dir'] = ::File.join('C:', 'ProgramData', 'zabbix') ? ^^^^^^ ^^^^ ^ - end else default['zabbix']['etc_dir'] = '/etc/zabbix' end default['zabbix']['install_dir'] = '/opt/zabbix' default['zabbix']['web_dir'] = '/opt/zabbix/web' default['zabbix']['external_dir'] = '/opt/zabbix/externalscripts' default['zabbix']['alert_dir'] = '/opt/zabbix/AlertScriptsPath' default['zabbix']['lock_dir'] = '/var/lock/subsys' default['zabbix']['src_dir'] = '/opt' default['zabbix']['log_dir'] = '/var/log/zabbix' default['zabbix']['run_dir'] = '/var/run/zabbix' default['zabbix']['login'] = 'zabbix' default['zabbix']['group'] = 'zabbix' default['zabbix']['uid'] = nil default['zabbix']['gid'] = nil default['zabbix']['home'] = '/opt/zabbix' default['zabbix']['shell'] = '/bin/bash'
7
0.259259
1
6
45ebbc31924b8bda38d9141407bd46581ad8a6a9
SQLite3/Statement.h
SQLite3/Statement.h
namespace SQLite3 { class Statement { friend void notifyUnlock(void* args[], int nArgs); public: static StatementPtr Prepare(sqlite3* sqlite, Platform::String^ sql); ~Statement(); void Bind(const SafeParameterVector& params); void Bind(ParameterMap^ params); void Run(); Platform::String^ One(); Platform::String^ All(); void Each(EachCallback^ callback, Windows::UI::Core::CoreDispatcher^ dispatcher); bool ReadOnly() const; private: Statement(sqlite3_stmt* statement); void BindParameter(int index, Platform::Object^ value); int BindParameterCount(); std::wstring BindParameterName(int index); int BindText(int index, Platform::String^ val); int BindInt(int index, int64 val); int BindDouble(int index, double val); int BindNull(int index); int Step(); void GetRow(std::wostringstream& row); Platform::Object^ GetColumn(int index); int ColumnCount(); int ColumnType(int index); Platform::String^ ColumnName(int index); Platform::String^ ColumnText(int index); int64 ColumnInt(int index); double ColumnDouble(int index); private: HANDLE dbLockMutex; sqlite3_stmt* statement; }; }
namespace SQLite3 { class Statement { public: static StatementPtr Prepare(sqlite3* sqlite, Platform::String^ sql); ~Statement(); void Bind(const SafeParameterVector& params); void Bind(ParameterMap^ params); void Run(); Platform::String^ One(); Platform::String^ All(); void Each(EachCallback^ callback, Windows::UI::Core::CoreDispatcher^ dispatcher); bool ReadOnly() const; private: Statement(sqlite3_stmt* statement); void BindParameter(int index, Platform::Object^ value); int BindParameterCount(); std::wstring BindParameterName(int index); int BindText(int index, Platform::String^ val); int BindInt(int index, int64 val); int BindDouble(int index, double val); int BindNull(int index); int Step(); void GetRow(std::wostringstream& row); Platform::Object^ GetColumn(int index); int ColumnCount(); int ColumnType(int index); Platform::String^ ColumnName(int index); Platform::String^ ColumnText(int index); int64 ColumnInt(int index); double ColumnDouble(int index); private: HANDLE dbLockMutex; sqlite3_stmt* statement; }; }
Remove orphaned notifyUnlock friend function
Remove orphaned notifyUnlock friend function
C
mit
doo/SQLite3-WinRT,roryok/SQLite3-WinRT,roryok/SQLite3-WinRT,doo/SQLite3-WinRT,roryok/SQLite3-WinRT,doo/SQLite3-WinRT,roryok/SQLite3-WinRT
c
## Code Before: namespace SQLite3 { class Statement { friend void notifyUnlock(void* args[], int nArgs); public: static StatementPtr Prepare(sqlite3* sqlite, Platform::String^ sql); ~Statement(); void Bind(const SafeParameterVector& params); void Bind(ParameterMap^ params); void Run(); Platform::String^ One(); Platform::String^ All(); void Each(EachCallback^ callback, Windows::UI::Core::CoreDispatcher^ dispatcher); bool ReadOnly() const; private: Statement(sqlite3_stmt* statement); void BindParameter(int index, Platform::Object^ value); int BindParameterCount(); std::wstring BindParameterName(int index); int BindText(int index, Platform::String^ val); int BindInt(int index, int64 val); int BindDouble(int index, double val); int BindNull(int index); int Step(); void GetRow(std::wostringstream& row); Platform::Object^ GetColumn(int index); int ColumnCount(); int ColumnType(int index); Platform::String^ ColumnName(int index); Platform::String^ ColumnText(int index); int64 ColumnInt(int index); double ColumnDouble(int index); private: HANDLE dbLockMutex; sqlite3_stmt* statement; }; } ## Instruction: Remove orphaned notifyUnlock friend function ## Code After: namespace SQLite3 { class Statement { public: static StatementPtr Prepare(sqlite3* sqlite, Platform::String^ sql); ~Statement(); void Bind(const SafeParameterVector& params); void Bind(ParameterMap^ params); void Run(); Platform::String^ One(); Platform::String^ All(); void Each(EachCallback^ callback, Windows::UI::Core::CoreDispatcher^ dispatcher); bool ReadOnly() const; private: Statement(sqlite3_stmt* statement); void BindParameter(int index, Platform::Object^ value); int BindParameterCount(); std::wstring BindParameterName(int index); int BindText(int index, Platform::String^ val); int BindInt(int index, int64 val); int BindDouble(int index, double val); int BindNull(int index); int Step(); void GetRow(std::wostringstream& row); Platform::Object^ GetColumn(int index); int ColumnCount(); int ColumnType(int index); Platform::String^ ColumnName(int index); Platform::String^ ColumnText(int index); int64 ColumnInt(int index); double ColumnDouble(int index); private: HANDLE dbLockMutex; sqlite3_stmt* statement; }; }
namespace SQLite3 { class Statement { - friend void notifyUnlock(void* args[], int nArgs); - public: static StatementPtr Prepare(sqlite3* sqlite, Platform::String^ sql); ~Statement(); void Bind(const SafeParameterVector& params); void Bind(ParameterMap^ params); void Run(); Platform::String^ One(); Platform::String^ All(); void Each(EachCallback^ callback, Windows::UI::Core::CoreDispatcher^ dispatcher); bool ReadOnly() const; private: Statement(sqlite3_stmt* statement); void BindParameter(int index, Platform::Object^ value); int BindParameterCount(); std::wstring BindParameterName(int index); int BindText(int index, Platform::String^ val); int BindInt(int index, int64 val); int BindDouble(int index, double val); int BindNull(int index); int Step(); void GetRow(std::wostringstream& row); Platform::Object^ GetColumn(int index); int ColumnCount(); int ColumnType(int index); Platform::String^ ColumnName(int index); Platform::String^ ColumnText(int index); int64 ColumnInt(int index); double ColumnDouble(int index); private: HANDLE dbLockMutex; sqlite3_stmt* statement; }; }
2
0.043478
0
2
ed3507977bae62f84b46b8eaf95f37faa68b36ec
services/git-bridge/start.sh
services/git-bridge/start.sh
/opt/envsubst < /envsubst_template.json > /conf/runtime.json exec java -Xms512m -Xmx3072m -jar /git-bridge.jar /conf/runtime.json
/opt/envsubst < /envsubst_template.json > /conf/runtime.json exec java -XX:+UseContainerSupport -XX:MaxRAMPercentage=75.0 -jar /git-bridge.jar /conf/runtime.json
Switch to UseContainerSupport and MaxRAMPercentage
Switch to UseContainerSupport and MaxRAMPercentage
Shell
agpl-3.0
sharelatex/sharelatex
shell
## Code Before: /opt/envsubst < /envsubst_template.json > /conf/runtime.json exec java -Xms512m -Xmx3072m -jar /git-bridge.jar /conf/runtime.json ## Instruction: Switch to UseContainerSupport and MaxRAMPercentage ## Code After: /opt/envsubst < /envsubst_template.json > /conf/runtime.json exec java -XX:+UseContainerSupport -XX:MaxRAMPercentage=75.0 -jar /git-bridge.jar /conf/runtime.json
/opt/envsubst < /envsubst_template.json > /conf/runtime.json - exec java -Xms512m -Xmx3072m -jar /git-bridge.jar /conf/runtime.json + exec java -XX:+UseContainerSupport -XX:MaxRAMPercentage=75.0 -jar /git-bridge.jar /conf/runtime.json
2
1
1
1
9ce6730b72b3efe58b131281f0f4befbd3928e22
emacs/site-lisp/init-rust.el
emacs/site-lisp/init-rust.el
(require 'company) (require 'racer) (require 'rust-mode) (require 'eldoc) (require 'flycheck) (require 'flycheck-rust) (add-to-list 'auto-mode-alist '("\\.rs\\'" . rust-mode)) (add-hook 'rust-mode-hook #'company-mode) (add-hook 'rust-mode-hook #'racer-mode) (add-hook 'racer-mode-hook #'eldoc-mode) (add-hook 'flycheck-mode-hook #'flycheck-rust-setup) (define-key rust-mode-map (kbd "TAB") #'company-indent-or-complete-common) (setq company-tooltip-align-annotations t) (provide 'init-rust)
(require 'cargo) (require 'company) (require 'racer) (require 'rust-mode) (require 'eldoc) (require 'flycheck) (require 'flycheck-rust) (add-to-list 'auto-mode-alist '("\\.rs\\'" . rust-mode)) (add-hook 'rust-mode-hook #'company-mode) (add-hook 'rust-mode-hook #'racer-mode) (add-hook 'racer-mode-hook #'eldoc-mode) (add-hook 'rust-mode-hook 'cargo-minor-mode) (with-eval-after-load 'rust-mode (add-hook 'flycheck-mode-hook #'flycheck-rust-setup)) (define-key rust-mode-map (kbd "TAB") #'company-indent-or-complete-common) (setq company-tooltip-align-annotations t) (provide 'init-rust)
Add cargo mode for rust
Add cargo mode for rust
Emacs Lisp
mit
hongchangwu/dotfiles,hongchangwu/dotfiles
emacs-lisp
## Code Before: (require 'company) (require 'racer) (require 'rust-mode) (require 'eldoc) (require 'flycheck) (require 'flycheck-rust) (add-to-list 'auto-mode-alist '("\\.rs\\'" . rust-mode)) (add-hook 'rust-mode-hook #'company-mode) (add-hook 'rust-mode-hook #'racer-mode) (add-hook 'racer-mode-hook #'eldoc-mode) (add-hook 'flycheck-mode-hook #'flycheck-rust-setup) (define-key rust-mode-map (kbd "TAB") #'company-indent-or-complete-common) (setq company-tooltip-align-annotations t) (provide 'init-rust) ## Instruction: Add cargo mode for rust ## Code After: (require 'cargo) (require 'company) (require 'racer) (require 'rust-mode) (require 'eldoc) (require 'flycheck) (require 'flycheck-rust) (add-to-list 'auto-mode-alist '("\\.rs\\'" . rust-mode)) (add-hook 'rust-mode-hook #'company-mode) (add-hook 'rust-mode-hook #'racer-mode) (add-hook 'racer-mode-hook #'eldoc-mode) (add-hook 'rust-mode-hook 'cargo-minor-mode) (with-eval-after-load 'rust-mode (add-hook 'flycheck-mode-hook #'flycheck-rust-setup)) (define-key rust-mode-map (kbd "TAB") #'company-indent-or-complete-common) (setq company-tooltip-align-annotations t) (provide 'init-rust)
+ (require 'cargo) (require 'company) (require 'racer) (require 'rust-mode) (require 'eldoc) (require 'flycheck) (require 'flycheck-rust) (add-to-list 'auto-mode-alist '("\\.rs\\'" . rust-mode)) (add-hook 'rust-mode-hook #'company-mode) (add-hook 'rust-mode-hook #'racer-mode) (add-hook 'racer-mode-hook #'eldoc-mode) + (add-hook 'rust-mode-hook 'cargo-minor-mode) + (with-eval-after-load 'rust-mode - (add-hook 'flycheck-mode-hook #'flycheck-rust-setup) + (add-hook 'flycheck-mode-hook #'flycheck-rust-setup)) ? ++ + (define-key rust-mode-map (kbd "TAB") #'company-indent-or-complete-common) (setq company-tooltip-align-annotations t) (provide 'init-rust)
5
0.3125
4
1
3c735d18bdcff28bbdd765b131649ba57fb612b0
hy/models/string.py
hy/models/string.py
from hy.models import HyObject import sys if sys.version_info[0] >= 3: str_type = str else: str_type = unicode class HyString(HyObject, str_type): """ Generic Hy String object. Helpful to store string literals from Hy scripts. It's either a ``str`` or a ``unicode``, depending on the Python version. """ def __new__(cls, value): obj = str_type.__new__(cls, value) return obj
from hy.models import HyObject import sys if sys.version_info[0] >= 3: str_type = str else: str_type = unicode class HyString(HyObject, str_type): """ Generic Hy String object. Helpful to store string literals from Hy scripts. It's either a ``str`` or a ``unicode``, depending on the Python version. """ pass
Revert "Revert "Remove useless code""
Revert "Revert "Remove useless code"" This reverts commit 262da59c7790cdadd60ea9612bc9e3c1616863fd. Conflicts: hy/models/string.py
Python
mit
ALSchwalm/hy,aisk/hy,paultag/hy,tianon/hy,hcarvalhoalves/hy,Foxboron/hy,Tritlo/hy,mtmiller/hy,michel-slm/hy,farhaven/hy,freezas/hy,zackmdavis/hy,tianon/hy,gilch/hy,aisk/hy,larme/hy,tuturto/hy,timmartin/hy,farhaven/hy,kirbyfan64/hy,farhaven/hy,algernon/hy,Foxboron/hy,hcarvalhoalves/hy,kirbyfan64/hy,adamfeuer/hy,jakirkham/hy,tianon/hy,larme/hy,larme/hy,kartikm/hy,aisk/hy
python
## Code Before: from hy.models import HyObject import sys if sys.version_info[0] >= 3: str_type = str else: str_type = unicode class HyString(HyObject, str_type): """ Generic Hy String object. Helpful to store string literals from Hy scripts. It's either a ``str`` or a ``unicode``, depending on the Python version. """ def __new__(cls, value): obj = str_type.__new__(cls, value) return obj ## Instruction: Revert "Revert "Remove useless code"" This reverts commit 262da59c7790cdadd60ea9612bc9e3c1616863fd. Conflicts: hy/models/string.py ## Code After: from hy.models import HyObject import sys if sys.version_info[0] >= 3: str_type = str else: str_type = unicode class HyString(HyObject, str_type): """ Generic Hy String object. Helpful to store string literals from Hy scripts. It's either a ``str`` or a ``unicode``, depending on the Python version. """ pass
from hy.models import HyObject import sys if sys.version_info[0] >= 3: str_type = str else: str_type = unicode class HyString(HyObject, str_type): """ Generic Hy String object. Helpful to store string literals from Hy scripts. It's either a ``str`` or a ``unicode``, depending on the Python version. """ + pass - - def __new__(cls, value): - obj = str_type.__new__(cls, value) - return obj
5
0.238095
1
4
7b263b01fb9437880ace445c05444f97c9289346
src/components/form_error_list.js
src/components/form_error_list.js
import React from "react" export default class FormErrorList extends React.Component { displayName = "Frig.FormErrorList" static defaultProps = { // This is the property of `errors` where Frig will look for form-level errors. // Set to "base" by default, for compatibility with Active Record. name: "base", } static contextTypes = { frigForm: React.PropTypes.shape({ errors: React.PropTypes.object.isRequired, }).isRequired, } _errorsArray() { const { errors } = this.context.frigForm const { name } = this.props return errors.hasOwnProperty(name) ? errors.base : [] } render() { const ThemedErrorList = this.context.frigForm.theme.component("errors") return <ThemedErrorList errors={this._errorsArray()} /> } }
import React from "react" export default class FormErrorList extends React.Component { displayName = "Frig.FormErrorList" static defaultProps = { // This is the property of `errors` where Frig will look for form-level errors. // Set to "base" by default, for compatibility with Active Record. name: "base", } static contextTypes = { frigForm: React.PropTypes.shape({ errors: React.PropTypes.object.isRequired, }).isRequired, } _errorsArray() { const { errors } = this.context.frigForm const { name } = this.props return errors[name] || [] } render() { const ThemedErrorList = this.context.frigForm.theme.component("errors") return <ThemedErrorList errors={this._errorsArray()} /> } }
Fix <FormErrorList/> always looking at `base` field
Fix <FormErrorList/> always looking at `base` field
JavaScript
mit
frig-js/frig,TouchBistro/frig,frig-js/frig,TouchBistro/frig
javascript
## Code Before: import React from "react" export default class FormErrorList extends React.Component { displayName = "Frig.FormErrorList" static defaultProps = { // This is the property of `errors` where Frig will look for form-level errors. // Set to "base" by default, for compatibility with Active Record. name: "base", } static contextTypes = { frigForm: React.PropTypes.shape({ errors: React.PropTypes.object.isRequired, }).isRequired, } _errorsArray() { const { errors } = this.context.frigForm const { name } = this.props return errors.hasOwnProperty(name) ? errors.base : [] } render() { const ThemedErrorList = this.context.frigForm.theme.component("errors") return <ThemedErrorList errors={this._errorsArray()} /> } } ## Instruction: Fix <FormErrorList/> always looking at `base` field ## Code After: import React from "react" export default class FormErrorList extends React.Component { displayName = "Frig.FormErrorList" static defaultProps = { // This is the property of `errors` where Frig will look for form-level errors. // Set to "base" by default, for compatibility with Active Record. name: "base", } static contextTypes = { frigForm: React.PropTypes.shape({ errors: React.PropTypes.object.isRequired, }).isRequired, } _errorsArray() { const { errors } = this.context.frigForm const { name } = this.props return errors[name] || [] } render() { const ThemedErrorList = this.context.frigForm.theme.component("errors") return <ThemedErrorList errors={this._errorsArray()} /> } }
import React from "react" export default class FormErrorList extends React.Component { displayName = "Frig.FormErrorList" static defaultProps = { // This is the property of `errors` where Frig will look for form-level errors. // Set to "base" by default, for compatibility with Active Record. name: "base", } static contextTypes = { frigForm: React.PropTypes.shape({ errors: React.PropTypes.object.isRequired, }).isRequired, } _errorsArray() { const { errors } = this.context.frigForm const { name } = this.props + return errors[name] || [] - return errors.hasOwnProperty(name) - ? errors.base - : [] } render() { const ThemedErrorList = this.context.frigForm.theme.component("errors") return <ThemedErrorList errors={this._errorsArray()} /> } }
4
0.133333
1
3
c3de0c71a8392a884f8fd08dbee8f337ba7833c7
src/ggrc/migrations/versions/20130724021606_2bf7c04016c9_person_email_must_be.py
src/ggrc/migrations/versions/20130724021606_2bf7c04016c9_person_email_must_be.py
# revision identifiers, used by Alembic. revision = '2bf7c04016c9' down_revision = '2b709b655bf' from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import mysql def upgrade(): ### commands auto generated by Alembic - please adjust! ### op.create_unique_constraint('uq_people_email', 'people', ['email']) ### end Alembic commands ### def downgrade(): ### commands auto generated by Alembic - please adjust! ### op.drop_constraint('uq_people_email', 'people', type_='unique') ### end Alembic commands ###
# revision identifiers, used by Alembic. revision = '2bf7c04016c9' down_revision = 'd3af6d071ef' from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import mysql def upgrade(): ### commands auto generated by Alembic - please adjust! ### op.create_unique_constraint('uq_people_email', 'people', ['email']) ### end Alembic commands ### def downgrade(): ### commands auto generated by Alembic - please adjust! ### op.drop_constraint('uq_people_email', 'people', type_='unique') ### end Alembic commands ###
Update 'down' version in migration due to merge
Update 'down' version in migration due to merge
Python
apache-2.0
AleksNeStu/ggrc-core,edofic/ggrc-core,plamut/ggrc-core,uskudnik/ggrc-core,josthkko/ggrc-core,edofic/ggrc-core,j0gurt/ggrc-core,uskudnik/ggrc-core,andrei-karalionak/ggrc-core,plamut/ggrc-core,kr41/ggrc-core,vladan-m/ggrc-core,prasannav7/ggrc-core,AleksNeStu/ggrc-core,hyperNURb/ggrc-core,uskudnik/ggrc-core,hasanalom/ggrc-core,jmakov/ggrc-core,VinnieJohns/ggrc-core,hasanalom/ggrc-core,prasannav7/ggrc-core,josthkko/ggrc-core,NejcZupec/ggrc-core,edofic/ggrc-core,selahssea/ggrc-core,VinnieJohns/ggrc-core,uskudnik/ggrc-core,VinnieJohns/ggrc-core,jmakov/ggrc-core,VinnieJohns/ggrc-core,hasanalom/ggrc-core,AleksNeStu/ggrc-core,josthkko/ggrc-core,hyperNURb/ggrc-core,vladan-m/ggrc-core,j0gurt/ggrc-core,hasanalom/ggrc-core,j0gurt/ggrc-core,jmakov/ggrc-core,vladan-m/ggrc-core,vladan-m/ggrc-core,AleksNeStu/ggrc-core,andrei-karalionak/ggrc-core,hyperNURb/ggrc-core,prasannav7/ggrc-core,andrei-karalionak/ggrc-core,kr41/ggrc-core,uskudnik/ggrc-core,edofic/ggrc-core,selahssea/ggrc-core,plamut/ggrc-core,kr41/ggrc-core,NejcZupec/ggrc-core,kr41/ggrc-core,hasanalom/ggrc-core,prasannav7/ggrc-core,selahssea/ggrc-core,hyperNURb/ggrc-core,plamut/ggrc-core,jmakov/ggrc-core,NejcZupec/ggrc-core,selahssea/ggrc-core,j0gurt/ggrc-core,NejcZupec/ggrc-core,jmakov/ggrc-core,josthkko/ggrc-core,hyperNURb/ggrc-core,vladan-m/ggrc-core,andrei-karalionak/ggrc-core
python
## Code Before: # revision identifiers, used by Alembic. revision = '2bf7c04016c9' down_revision = '2b709b655bf' from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import mysql def upgrade(): ### commands auto generated by Alembic - please adjust! ### op.create_unique_constraint('uq_people_email', 'people', ['email']) ### end Alembic commands ### def downgrade(): ### commands auto generated by Alembic - please adjust! ### op.drop_constraint('uq_people_email', 'people', type_='unique') ### end Alembic commands ### ## Instruction: Update 'down' version in migration due to merge ## Code After: # revision identifiers, used by Alembic. revision = '2bf7c04016c9' down_revision = 'd3af6d071ef' from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import mysql def upgrade(): ### commands auto generated by Alembic - please adjust! ### op.create_unique_constraint('uq_people_email', 'people', ['email']) ### end Alembic commands ### def downgrade(): ### commands auto generated by Alembic - please adjust! ### op.drop_constraint('uq_people_email', 'people', type_='unique') ### end Alembic commands ###
# revision identifiers, used by Alembic. revision = '2bf7c04016c9' - down_revision = '2b709b655bf' + down_revision = 'd3af6d071ef' from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import mysql def upgrade(): ### commands auto generated by Alembic - please adjust! ### op.create_unique_constraint('uq_people_email', 'people', ['email']) ### end Alembic commands ### def downgrade(): ### commands auto generated by Alembic - please adjust! ### op.drop_constraint('uq_people_email', 'people', type_='unique') ### end Alembic commands ###
2
0.105263
1
1
89fa15935f8cde75a57e2a3f5fba17d99ca51844
core/spec/controllers/spree/products_controller_spec.rb
core/spec/controllers/spree/products_controller_spec.rb
require 'spec_helper' describe Spree::ProductsController do let!(:product) { create(:product, :available_on => 1.year.from_now) } # Regression test for #1390 it "cannot view non-active products" do spree_get :show, :id => product.to_param response.status.should == 404 end end
require 'spec_helper' describe Spree::ProductsController do let!(:product) { create(:product, :available_on => 1.year.from_now) } # Regression test for #1390 it "allows admins to view non-active products" do controller.stub :current_user => stub(:has_role? => true) get :show, :id => product.to_param response.status.should == 200 end # Regression test for #1390 it "cannot view non-active products" do controller.stub :current_user => stub(:has_role? => false) get :show, :id => product.to_param response.status.should == 404 end end
Use has_role? not admin? to check for user admin ability in ProductsControllerDecorator
Use has_role? not admin? to check for user admin ability in ProductsControllerDecorator Fixes #1562
Ruby
bsd-3-clause
Senjai/solidus,surfdome/spree,siddharth28/spree,LBRapid/spree,zamiang/spree,rakibulislam/spree,pulkit21/spree,camelmasa/spree,imella/spree,mindvolt/spree,abhishekjain16/spree,jasonfb/spree,yomishra/pce,shioyama/spree,grzlus/solidus,tancnle/spree,nooysters/spree,Mayvenn/spree,karlitxo/spree,reinaris/spree,Hates/spree,jordan-brough/solidus,madetech/spree,useiichi/spree,azclick/spree,piousbox/spree,devilcoders/solidus,keatonrow/spree,ahmetabdi/spree,reinaris/spree,moneyspyder/spree,beni55/spree,madetech/spree,sideci-sample/sideci-sample-spree,delphsoft/spree-store-ballchair,joanblake/spree,sliaquat/spree,scottcrawford03/solidus,Hates/spree,xuewenfei/solidus,raow/spree,shaywood2/spree,rajeevriitm/spree,pervino/spree,net2b/spree,dandanwei/spree,DarkoP/spree,dafontaine/spree,mindvolt/spree,cutefrank/spree,trigrass2/spree,delphsoft/spree-store-ballchair,jparr/spree,pervino/spree,miyazawatomoka/spree,urimikhli/spree,tesserakt/clean_spree,RatioClothing/spree,builtbybuffalo/spree,lyzxsc/spree,kewaunited/spree,jspizziri/spree,jsurdilla/solidus,freerunningtech/spree,jhawthorn/spree,Migweld/spree,mleglise/spree,azclick/spree,KMikhaylovCTG/spree,NerdsvilleCEO/spree,joanblake/spree,Machpowersystems/spree_mach,tancnle/spree,maybii/spree,Nevensoft/spree,dafontaine/spree,zaeznet/spree,Arpsara/solidus,dotandbo/spree,scottcrawford03/solidus,Boomkat/spree,lsirivong/solidus,AgilTec/spree,StemboltHQ/spree,progsri/spree,builtbybuffalo/spree,APohio/spree,shekibobo/spree,wolfieorama/spree,siddharth28/spree,alepore/spree,robodisco/spree,Senjai/solidus,AgilTec/spree,Ropeney/spree,HealthWave/spree,SadTreeFriends/spree,Boomkat/spree,abhishekjain16/spree,grzlus/spree,azranel/spree,Kagetsuki/spree,jasonfb/spree,LBRapid/spree,derekluo/spree,JDutil/spree,ayb/spree,welitonfreitas/spree,codesavvy/sandbox,forkata/solidus,ckk-scratch/solidus,CiscoCloud/spree,karlitxo/spree,gregoryrikson/spree-sample,camelmasa/spree,adaddeo/spree,vcavallo/spree,softr8/spree,degica/spree,yiqing95/spree,robodisco/spree,lyzxsc/spree,omarsar/spree,fahidnasir/spree,vinsol/spree,azranel/spree,richardnuno/solidus,freerunningtech/spree,SadTreeFriends/spree,athal7/solidus,welitonfreitas/spree,thogg4/spree,Mayvenn/spree,lsirivong/solidus,bonobos/solidus,thogg4/spree,locomotivapro/spree,lzcabrera/spree-1-3-stable,radarseesradar/spree,SadTreeFriends/spree,miyazawatomoka/spree,sunny2601/spree,maybii/spree,hifly/spree,watg/spree,trigrass2/spree,xuewenfei/solidus,patdec/spree,Lostmyname/spree,ramkumar-kr/spree,net2b/spree,zaeznet/spree,nooysters/spree,project-eutopia/spree,patdec/spree,alejandromangione/spree,StemboltHQ/spree,Ropeney/spree,rakibulislam/spree,pulkit21/spree,fahidnasir/spree,richardnuno/solidus,Mayvenn/spree,woboinc/spree,quentinuys/spree,vinayvinsol/spree,FadliKun/spree,joanblake/spree,gautamsawhney/spree,xuewenfei/solidus,archSeer/spree,ujai/spree,jsurdilla/solidus,pjmj777/spree,miyazawatomoka/spree,mleglise/spree,orenf/spree,PhoenixTeam/spree_phoenix,ayb/spree,athal7/solidus,priyank-gupta/spree,Migweld/spree,Senjai/solidus,watg/spree,zamiang/spree,project-eutopia/spree,gregoryrikson/spree-sample,vinsol/spree,piousbox/spree,calvinl/spree,sliaquat/spree,Antdesk/karpal-spree,keatonrow/spree,judaro13/spree-fork,grzlus/spree,DarkoP/spree,ahmetabdi/spree,pulkit21/spree,Lostmyname/spree,dandanwei/spree,pervino/solidus,richardnuno/solidus,rakibulislam/spree,Migweld/spree,alvinjean/spree,jsurdilla/solidus,CJMrozek/spree,forkata/solidus,yushine/spree,trigrass2/spree,maybii/spree,lsirivong/spree,jordan-brough/spree,calvinl/spree,odk211/spree,archSeer/spree,hoanghiep90/spree,grzlus/solidus,archSeer/spree,tomash/spree,jeffboulet/spree,degica/spree,dafontaine/spree,Machpowersystems/spree_mach,siddharth28/spree,welitonfreitas/spree,firman/spree,Hates/spree,Arpsara/solidus,robodisco/spree,gautamsawhney/spree,edgward/spree,archSeer/spree,APohio/spree,edgward/spree,tesserakt/clean_spree,pjmj777/spree,DarkoP/spree,sunny2601/spree,tomash/spree,knuepwebdev/FloatTubeRodHolders,StemboltHQ/spree,yushine/spree,jhawthorn/spree,PhoenixTeam/spree_phoenix,sliaquat/spree,athal7/solidus,JuandGirald/spree,omarsar/spree,shaywood2/spree,vinsol/spree,watg/spree,derekluo/spree,lyzxsc/spree,ahmetabdi/spree,orenf/spree,tancnle/spree,surfdome/spree,jparr/spree,derekluo/spree,Kagetsuki/spree,zamiang/spree,mindvolt/spree,CiscoCloud/spree,Hawaiideveloper/shoppingcart,vinayvinsol/spree,cutefrank/spree,judaro13/spree-fork,derekluo/spree,vmatekole/spree,piousbox/spree,locomotivapro/spree,FadliKun/spree,rajeevriitm/spree,progsri/spree,njerrywerry/spree,rbngzlv/spree,CiscoCloud/spree,softr8/spree,TimurTarasenko/spree,Ropeney/spree,NerdsvilleCEO/spree,caiqinghua/spree,hifly/spree,richardnuno/solidus,zamiang/spree,raow/spree,urimikhli/spree,kewaunited/spree,hoanghiep90/spree,yushine/spree,kewaunited/spree,tailic/spree,bjornlinder/Spree,AgilTec/spree,berkes/spree,gautamsawhney/spree,JDutil/spree,jordan-brough/spree,wolfieorama/spree,tesserakt/clean_spree,hoanghiep90/spree,yomishra/pce,agient/agientstorefront,kewaunited/spree,Senjai/spree,jparr/spree,adaddeo/spree,useiichi/spree,Arpsara/solidus,berkes/spree,TimurTarasenko/spree,njerrywerry/spree,priyank-gupta/spree,abhishekjain16/spree,carlesjove/spree,reidblomquist/spree,knuepwebdev/FloatTubeRodHolders,jaspreet21anand/spree,volpejoaquin/spree,athal7/solidus,keatonrow/spree,CJMrozek/spree,ahmetabdi/spree,biagidp/spree,ckk-scratch/solidus,edgward/spree,quentinuys/spree,woboinc/spree,ckk-scratch/solidus,njerrywerry/spree,sfcgeorge/spree,vinayvinsol/spree,DynamoMTL/spree,freerunningtech/spree,vulk/spree,keatonrow/spree,yomishra/pce,alepore/spree,quentinuys/spree,joanblake/spree,vcavallo/spree,jeffboulet/spree,reidblomquist/spree,bricesanchez/spree,radarseesradar/spree,AgilTec/spree,shekibobo/spree,bjornlinder/Spree,patdec/spree,shioyama/spree,assembledbrands/spree,yushine/spree,alejandromangione/spree,forkata/solidus,camelmasa/spree,FadliKun/spree,omarsar/spree,vmatekole/spree,sfcgeorge/spree,DynamoMTL/spree,wolfieorama/spree,useiichi/spree,orenf/spree,sfcgeorge/spree,alvinjean/spree,Engeltj/spree,Arpsara/solidus,odk211/spree,pervino/spree,tailic/spree,karlitxo/spree,jsurdilla/solidus,FadliKun/spree,Machpowersystems/spree_mach,reinaris/spree,tailic/spree,lzcabrera/spree-1-3-stable,gautamsawhney/spree,beni55/spree,nooysters/spree,jimblesm/spree,DynamoMTL/spree,edgward/spree,Lostmyname/spree,ramkumar-kr/spree,radarseesradar/spree,nooysters/spree,agient/agientstorefront,KMikhaylovCTG/spree,agient/agientstorefront,ramkumar-kr/spree,thogg4/spree,degica/spree,zaeznet/spree,DynamoMTL/spree,rbngzlv/spree,carlesjove/spree,jspizziri/spree,rajeevriitm/spree,rbngzlv/spree,patdec/spree,tancnle/spree,DarkoP/spree,SadTreeFriends/spree,biagidp/spree,JuandGirald/spree,builtbybuffalo/spree,woboinc/spree,fahidnasir/spree,groundctrl/spree,dotandbo/spree,jimblesm/spree,JDutil/spree,mleglise/spree,orenf/spree,lsirivong/spree,PhoenixTeam/spree_phoenix,moneyspyder/spree,ckk-scratch/solidus,kitwalker12/spree,caiqinghua/spree,shaywood2/spree,imella/spree,TimurTarasenko/spree,TimurTarasenko/spree,dotandbo/spree,NerdsvilleCEO/spree,imella/spree,Hawaiideveloper/shoppingcart,jordan-brough/spree,robodisco/spree,sfcgeorge/spree,wolfieorama/spree,bonobos/solidus,azranel/spree,odk211/spree,jhawthorn/spree,Nevensoft/spree,siddharth28/spree,cutefrank/spree,TrialGuides/spree,Kagetsuki/spree,hifly/spree,reinaris/spree,Hates/spree,Engeltj/spree,hifly/spree,firman/spree,bricesanchez/spree,volpejoaquin/spree,biagidp/spree,devilcoders/solidus,lsirivong/spree,jordan-brough/solidus,welitonfreitas/spree,priyank-gupta/spree,softr8/spree,miyazawatomoka/spree,knuepwebdev/FloatTubeRodHolders,calvinl/spree,urimikhli/spree,sunny2601/spree,Kagetsuki/spree,Senjai/spree,jasonfb/spree,APohio/spree,JDutil/spree,firman/spree,locomotivapro/spree,CJMrozek/spree,camelmasa/spree,bjornlinder/Spree,tomash/spree,moneyspyder/spree,ayb/spree,tesserakt/clean_spree,shekibobo/spree,KMikhaylovCTG/spree,odk211/spree,PhoenixTeam/spree_phoenix,rajeevriitm/spree,Engeltj/spree,Mayvenn/spree,jimblesm/spree,bonobos/solidus,TrialGuides/spree,thogg4/spree,lsirivong/solidus,builtbybuffalo/spree,NerdsvilleCEO/spree,JuandGirald/spree,progsri/spree,pulkit21/spree,radarseesradar/spree,volpejoaquin/spree,jaspreet21anand/spree,forkata/solidus,carlesjove/spree,scottcrawford03/solidus,assembledbrands/spree,jaspreet21anand/spree,xuewenfei/solidus,KMikhaylovCTG/spree,grzlus/spree,Senjai/spree,grzlus/spree,LBRapid/spree,brchristian/spree,HealthWave/spree,hoanghiep90/spree,omarsar/spree,madetech/spree,raow/spree,caiqinghua/spree,vulk/spree,vulk/spree,jasonfb/spree,CJMrozek/spree,quentinuys/spree,shioyama/spree,beni55/spree,lyzxsc/spree,ujai/spree,dandanwei/spree,caiqinghua/spree,grzlus/solidus,Antdesk/karpal-spree,volpejoaquin/spree,fahidnasir/spree,project-eutopia/spree,rbngzlv/spree,sunny2601/spree,delphsoft/spree-store-ballchair,jspizziri/spree,groundctrl/spree,pervino/solidus,jordan-brough/solidus,groundctrl/spree,moneyspyder/spree,RatioClothing/spree,lzcabrera/spree-1-3-stable,njerrywerry/spree,lsirivong/spree,grzlus/solidus,beni55/spree,agient/agientstorefront,firman/spree,judaro13/spree-fork,karlitxo/spree,alvinjean/spree,net2b/spree,surfdome/spree,useiichi/spree,raow/spree,berkes/spree,brchristian/spree,ramkumar-kr/spree,carlesjove/spree,brchristian/spree,jimblesm/spree,lsirivong/solidus,CiscoCloud/spree,gregoryrikson/spree-sample,Hawaiideveloper/shoppingcart,Nevensoft/spree,vcavallo/spree,vinayvinsol/spree,Boomkat/spree,cutefrank/spree,piousbox/spree,net2b/spree,surfdome/spree,tomash/spree,jordan-brough/solidus,alejandromangione/spree,reidblomquist/spree,vmatekole/spree,assembledbrands/spree,devilcoders/solidus,pervino/solidus,jaspreet21anand/spree,TrialGuides/spree,reidblomquist/spree,vmatekole/spree,alepore/spree,bonobos/solidus,vinsol/spree,Migweld/spree,Ropeney/spree,jeffboulet/spree,jeffboulet/spree,pervino/spree,mindvolt/spree,Senjai/solidus,Antdesk/karpal-spree,HealthWave/spree,pervino/solidus,abhishekjain16/spree,dandanwei/spree,shaywood2/spree,delphsoft/spree-store-ballchair,sideci-sample/sideci-sample-spree,project-eutopia/spree,pjmj777/spree,dotandbo/spree,codesavvy/sandbox,softr8/spree,jparr/spree,devilcoders/solidus,jspizziri/spree,bricesanchez/spree,vulk/spree,brchristian/spree,dafontaine/spree,progsri/spree,sideci-sample/sideci-sample-spree,kitwalker12/spree,Boomkat/spree,trigrass2/spree,JuandGirald/spree,Hawaiideveloper/shoppingcart,codesavvy/sandbox,azclick/spree,calvinl/spree,scottcrawford03/solidus,ayb/spree,mleglise/spree,azclick/spree,sliaquat/spree,maybii/spree,madetech/spree,vcavallo/spree,azranel/spree,yiqing95/spree,groundctrl/spree,Nevensoft/spree,Lostmyname/spree,rakibulislam/spree,Engeltj/spree,zaeznet/spree,locomotivapro/spree,ujai/spree,adaddeo/spree,gregoryrikson/spree-sample,kitwalker12/spree,TrialGuides/spree,yiqing95/spree,codesavvy/sandbox,adaddeo/spree,berkes/spree,yiqing95/spree,alejandromangione/spree,shekibobo/spree,RatioClothing/spree,alvinjean/spree,APohio/spree,priyank-gupta/spree
ruby
## Code Before: require 'spec_helper' describe Spree::ProductsController do let!(:product) { create(:product, :available_on => 1.year.from_now) } # Regression test for #1390 it "cannot view non-active products" do spree_get :show, :id => product.to_param response.status.should == 404 end end ## Instruction: Use has_role? not admin? to check for user admin ability in ProductsControllerDecorator Fixes #1562 ## Code After: require 'spec_helper' describe Spree::ProductsController do let!(:product) { create(:product, :available_on => 1.year.from_now) } # Regression test for #1390 it "allows admins to view non-active products" do controller.stub :current_user => stub(:has_role? => true) get :show, :id => product.to_param response.status.should == 200 end # Regression test for #1390 it "cannot view non-active products" do controller.stub :current_user => stub(:has_role? => false) get :show, :id => product.to_param response.status.should == 404 end end
require 'spec_helper' describe Spree::ProductsController do let!(:product) { create(:product, :available_on => 1.year.from_now) } + # Regression test for #1390 + it "allows admins to view non-active products" do + controller.stub :current_user => stub(:has_role? => true) + get :show, :id => product.to_param + response.status.should == 200 + end # Regression test for #1390 it "cannot view non-active products" do + controller.stub :current_user => stub(:has_role? => false) - spree_get :show, :id => product.to_param ? ------ + get :show, :id => product.to_param response.status.should == 404 end end
9
0.818182
8
1
1d03959e9fdb26b0764cac567cf85b34d1b23db2
tutorials/customProjectors/customProjectors.js
tutorials/customProjectors/customProjectors.js
window.onload = function() { var xScale = new Plottable.LinearScale(); var yScale = new Plottable.LinearScale(); var xAxis = new Plottable.XAxis(xScale, "bottom"); var yAxis = new Plottable.YAxis(yScale, "left"); var renderer = new Plottable.LineRenderer(gitData, xScale, yScale); function getXDataValue(d) { return d.day; } renderer.project("x", getXDataValue, xScale); function getYDataValue(d) { return d.total_commits; } renderer.project("y", getYDataValue, yScale); var chart = new Plottable.Table([ [yAxis, renderer], [null, xAxis ] ]); chart.renderTo("#chart"); }
window.onload = function() { var xScale = new Plottable.LinearScale(); var yScale = new Plottable.LinearScale(); var xAxis = new Plottable.XAxis(xScale, "bottom"); var yAxis = new Plottable.YAxis(yScale, "left"); var renderer = new Plottable.LineRenderer(gitData, xScale, yScale); // A DataSource is a Plottable object that maintains data and metadata, and updates dependents when it changes // In the previous example, we implicitly created a DataSource by putting the data directly into the Renderer constructor var gitDataSource = new Plottable.DataSource(gitData); var renderer = new Plottable.CircleRenderer(gitDataSource, xScale, yScale); // We define an accessor function that the renderer will use to access a "Perspective" into the DataSource function dayAccessor(d) { return d.day; } renderer.project("x", getXDataValue, xScale); // Make a LogScale. Since the range doesn't correspond to the layout of a renderer, we set the range manually. var radiusScale = new Plottable.LinearScale().range([1, 10]); function linesChangedAccessor(d) { return Math.sqrt(Math.max(d.additions - d.deletions, 1)); } renderer.project("r", linesChangedAccessor, radiusScale) function ratioAdditionsToDeletions(d) { if (d.deletions + d.additions === 0) { return 0; } return d.deletions / (d.deletions + d.additions); } // The InterpolatedColorScale will interpolate between blue for low values and red for high values var colorScale = new Plottable.InterpolatedColorScale("posneg"); renderer.project("fill", ratioAdditionsToDeletions, colorScale); var chart = new Plottable.Table([ [yAxis, renderer], [null, xAxis ] ]); chart.renderTo("#chart"); }
Make the customProjector tutorial show off more stuff
Make the customProjector tutorial show off more stuff
JavaScript
mit
alyssaq/plottable,gdseller/plottable,softwords/plottable,onaio/plottable,onaio/plottable,palantir/plottable,NextTuesday/plottable,palantir/plottable,jacqt/plottable,danmane/plottable,gdseller/plottable,softwords/plottable,NextTuesday/plottable,danmane/plottable,softwords/plottable,RobertoMalatesta/plottable,NextTuesday/plottable,gdseller/plottable,iobeam/plottable,danmane/plottable,iobeam/plottable,RobertoMalatesta/plottable,iobeam/plottable,onaio/plottable,jacqt/plottable,alyssaq/plottable,RobertoMalatesta/plottable,alyssaq/plottable,palantir/plottable,jacqt/plottable,palantir/plottable
javascript
## Code Before: window.onload = function() { var xScale = new Plottable.LinearScale(); var yScale = new Plottable.LinearScale(); var xAxis = new Plottable.XAxis(xScale, "bottom"); var yAxis = new Plottable.YAxis(yScale, "left"); var renderer = new Plottable.LineRenderer(gitData, xScale, yScale); function getXDataValue(d) { return d.day; } renderer.project("x", getXDataValue, xScale); function getYDataValue(d) { return d.total_commits; } renderer.project("y", getYDataValue, yScale); var chart = new Plottable.Table([ [yAxis, renderer], [null, xAxis ] ]); chart.renderTo("#chart"); } ## Instruction: Make the customProjector tutorial show off more stuff ## Code After: window.onload = function() { var xScale = new Plottable.LinearScale(); var yScale = new Plottable.LinearScale(); var xAxis = new Plottable.XAxis(xScale, "bottom"); var yAxis = new Plottable.YAxis(yScale, "left"); var renderer = new Plottable.LineRenderer(gitData, xScale, yScale); // A DataSource is a Plottable object that maintains data and metadata, and updates dependents when it changes // In the previous example, we implicitly created a DataSource by putting the data directly into the Renderer constructor var gitDataSource = new Plottable.DataSource(gitData); var renderer = new Plottable.CircleRenderer(gitDataSource, xScale, yScale); // We define an accessor function that the renderer will use to access a "Perspective" into the DataSource function dayAccessor(d) { return d.day; } renderer.project("x", getXDataValue, xScale); // Make a LogScale. Since the range doesn't correspond to the layout of a renderer, we set the range manually. var radiusScale = new Plottable.LinearScale().range([1, 10]); function linesChangedAccessor(d) { return Math.sqrt(Math.max(d.additions - d.deletions, 1)); } renderer.project("r", linesChangedAccessor, radiusScale) function ratioAdditionsToDeletions(d) { if (d.deletions + d.additions === 0) { return 0; } return d.deletions / (d.deletions + d.additions); } // The InterpolatedColorScale will interpolate between blue for low values and red for high values var colorScale = new Plottable.InterpolatedColorScale("posneg"); renderer.project("fill", ratioAdditionsToDeletions, colorScale); var chart = new Plottable.Table([ [yAxis, renderer], [null, xAxis ] ]); chart.renderTo("#chart"); }
window.onload = function() { var xScale = new Plottable.LinearScale(); var yScale = new Plottable.LinearScale(); var xAxis = new Plottable.XAxis(xScale, "bottom"); var yAxis = new Plottable.YAxis(yScale, "left"); var renderer = new Plottable.LineRenderer(gitData, xScale, yScale); - function getXDataValue(d) { + // A DataSource is a Plottable object that maintains data and metadata, and updates dependents when it changes + // In the previous example, we implicitly created a DataSource by putting the data directly into the Renderer constructor + var gitDataSource = new Plottable.DataSource(gitData); + var renderer = new Plottable.CircleRenderer(gitDataSource, xScale, yScale); + + // We define an accessor function that the renderer will use to access a "Perspective" into the DataSource + function dayAccessor(d) { return d.day; } renderer.project("x", getXDataValue, xScale); - function getYDataValue(d) { - return d.total_commits; + // Make a LogScale. Since the range doesn't correspond to the layout of a renderer, we set the range manually. + var radiusScale = new Plottable.LinearScale().range([1, 10]); + + function linesChangedAccessor(d) { + return Math.sqrt(Math.max(d.additions - d.deletions, 1)); } - renderer.project("y", getYDataValue, yScale); + + renderer.project("r", linesChangedAccessor, radiusScale) + + function ratioAdditionsToDeletions(d) { + if (d.deletions + d.additions === 0) { + return 0; + } + return d.deletions / (d.deletions + d.additions); + } + // The InterpolatedColorScale will interpolate between blue for low values and red for high values + var colorScale = new Plottable.InterpolatedColorScale("posneg"); + renderer.project("fill", ratioAdditionsToDeletions, colorScale); var chart = new Plottable.Table([ [yAxis, renderer], [null, xAxis ] ]); chart.renderTo("#chart"); }
28
1.12
24
4
e9471bfcc1fe5439cf289a4cca2608a4ce81bca1
spec/rails_app/config/initializers/secret_token.rb
spec/rails_app/config/initializers/secret_token.rb
RailsApp::Application.config.secret_token = 'fcc06e5fc19cdbf0f0db6fd634aa5160a9f28ad692528f227e14975da33b0dbd92bb8a9f15e0ef44f0664415a0f6eba003cbb088300865f0058965c104e5abd6'
secret = 'fcc06e5fc19cdbf0f0db6fd634aa5160a9f28ad692528f227e14975da33b0dbd92bb8a9f15e0ef44f0664415a0f6eba003cbb088300865f0058965c104e5abd6' if Rails.version < '5.2.0' RailsApp::Application.config.secret_token = secret else RailsApp::Application.config.secret_key_base = secret end
Address Rails 5.2 deprecation warning in specs
Address Rails 5.2 deprecation warning in specs
Ruby
mit
magnusvk/counter_culture,magnusvk/counter_culture
ruby
## Code Before: RailsApp::Application.config.secret_token = 'fcc06e5fc19cdbf0f0db6fd634aa5160a9f28ad692528f227e14975da33b0dbd92bb8a9f15e0ef44f0664415a0f6eba003cbb088300865f0058965c104e5abd6' ## Instruction: Address Rails 5.2 deprecation warning in specs ## Code After: secret = 'fcc06e5fc19cdbf0f0db6fd634aa5160a9f28ad692528f227e14975da33b0dbd92bb8a9f15e0ef44f0664415a0f6eba003cbb088300865f0058965c104e5abd6' if Rails.version < '5.2.0' RailsApp::Application.config.secret_token = secret else RailsApp::Application.config.secret_key_base = secret end
- RailsApp::Application.config.secret_token = 'fcc06e5fc19cdbf0f0db6fd634aa5160a9f28ad692528f227e14975da33b0dbd92bb8a9f15e0ef44f0664415a0f6eba003cbb088300865f0058965c104e5abd6' ? ----------------------------- ------ + secret = 'fcc06e5fc19cdbf0f0db6fd634aa5160a9f28ad692528f227e14975da33b0dbd92bb8a9f15e0ef44f0664415a0f6eba003cbb088300865f0058965c104e5abd6' + if Rails.version < '5.2.0' + RailsApp::Application.config.secret_token = secret + else + RailsApp::Application.config.secret_key_base = secret + end
7
7
6
1
30a696a9e4266f4a579cc46e930c0902372a22b4
tests/QafooLabs/Profiler/SqlAnonymizerTest.php
tests/QafooLabs/Profiler/SqlAnonymizerTest.php
<?php namespace QafooLabs\Profiler; class SqlAnonymizerTest extends \PHPUnit_Framework_TestCase { static public function dataSqlQuotes() { return array( array('SELECT 1', 'SELECT ?'), array('select * from foo', 'select * from foo'), array('SELECT "foo" FROM bar', 'SELECT ? FROM bar'), array('SELECT "foo", "bar", "baz" FROM bar', 'SELECT ?, ?, ? FROM bar'), array('SELECT "foo", \'bar\', 1234, 17.45 FROM baz', 'SELECT ?, ?, ?, ? FROM baz'), array('SELECT "foo" FROM bar WHERE "baz" = 1', 'SELECT ? FROM bar WHERE ? = ?'), ); } /** * @dataProvider dataSqlQuotes * @test */ public function it_anonymizes_sql_replacing_quotes_with_question_marks($sql, $anonymizedSql) { $this->assertEquals($anonymizedSql, SqlAnonymizer::anonymize($sql)); } }
<?php namespace QafooLabs\Profiler; class SqlAnonymizerTest extends \PHPUnit_Framework_TestCase { static public function dataSqlQuotes() { return array( array('SELECT 1', 'SELECT ?'), array('select * from foo', 'select * from foo'), array('SELECT "foo" FROM bar', 'SELECT ? FROM bar'), array('SELECT "foo", "bar", "baz" FROM bar', 'SELECT ?, ?, ? FROM bar'), array('SELECT "foo", \'bar\', 1234, 17.45 FROM baz', 'SELECT ?, ?, ?, ? FROM baz'), array('SELECT "foo" FROM bar WHERE "baz" = 1', 'SELECT ? FROM bar WHERE ? = ?'), array('No route found for "GET /bundles/.../exception.css" (from "https://example.com/error")', 'No route found for ? (from ?)'), ); } /** * @dataProvider dataSqlQuotes * @test */ public function it_anonymizes_sql_replacing_quotes_with_question_marks($sql, $anonymizedSql) { $this->assertEquals($anonymizedSql, SqlAnonymizer::anonymize($sql)); } }
Test for anonymizing error messages.
Implemented: Test for anonymizing error messages.
PHP
apache-2.0
tideways/profiler
php
## Code Before: <?php namespace QafooLabs\Profiler; class SqlAnonymizerTest extends \PHPUnit_Framework_TestCase { static public function dataSqlQuotes() { return array( array('SELECT 1', 'SELECT ?'), array('select * from foo', 'select * from foo'), array('SELECT "foo" FROM bar', 'SELECT ? FROM bar'), array('SELECT "foo", "bar", "baz" FROM bar', 'SELECT ?, ?, ? FROM bar'), array('SELECT "foo", \'bar\', 1234, 17.45 FROM baz', 'SELECT ?, ?, ?, ? FROM baz'), array('SELECT "foo" FROM bar WHERE "baz" = 1', 'SELECT ? FROM bar WHERE ? = ?'), ); } /** * @dataProvider dataSqlQuotes * @test */ public function it_anonymizes_sql_replacing_quotes_with_question_marks($sql, $anonymizedSql) { $this->assertEquals($anonymizedSql, SqlAnonymizer::anonymize($sql)); } } ## Instruction: Implemented: Test for anonymizing error messages. ## Code After: <?php namespace QafooLabs\Profiler; class SqlAnonymizerTest extends \PHPUnit_Framework_TestCase { static public function dataSqlQuotes() { return array( array('SELECT 1', 'SELECT ?'), array('select * from foo', 'select * from foo'), array('SELECT "foo" FROM bar', 'SELECT ? FROM bar'), array('SELECT "foo", "bar", "baz" FROM bar', 'SELECT ?, ?, ? FROM bar'), array('SELECT "foo", \'bar\', 1234, 17.45 FROM baz', 'SELECT ?, ?, ?, ? FROM baz'), array('SELECT "foo" FROM bar WHERE "baz" = 1', 'SELECT ? FROM bar WHERE ? = ?'), array('No route found for "GET /bundles/.../exception.css" (from "https://example.com/error")', 'No route found for ? (from ?)'), ); } /** * @dataProvider dataSqlQuotes * @test */ public function it_anonymizes_sql_replacing_quotes_with_question_marks($sql, $anonymizedSql) { $this->assertEquals($anonymizedSql, SqlAnonymizer::anonymize($sql)); } }
<?php namespace QafooLabs\Profiler; class SqlAnonymizerTest extends \PHPUnit_Framework_TestCase { static public function dataSqlQuotes() { return array( array('SELECT 1', 'SELECT ?'), array('select * from foo', 'select * from foo'), array('SELECT "foo" FROM bar', 'SELECT ? FROM bar'), array('SELECT "foo", "bar", "baz" FROM bar', 'SELECT ?, ?, ? FROM bar'), array('SELECT "foo", \'bar\', 1234, 17.45 FROM baz', 'SELECT ?, ?, ?, ? FROM baz'), array('SELECT "foo" FROM bar WHERE "baz" = 1', 'SELECT ? FROM bar WHERE ? = ?'), + array('No route found for "GET /bundles/.../exception.css" (from "https://example.com/error")', 'No route found for ? (from ?)'), ); } /** * @dataProvider dataSqlQuotes * @test */ public function it_anonymizes_sql_replacing_quotes_with_question_marks($sql, $anonymizedSql) { $this->assertEquals($anonymizedSql, SqlAnonymizer::anonymize($sql)); } }
1
0.037037
1
0
330aa5cd76328048abec3dc3250235689a709e78
package.json
package.json
{ "name": "concava", "version": "0.1.0", "description": "Convert, calibrate, and validate weather data before sending it to the Orion Context Broker.", "private": true, "scripts": { "start": "babel-node src/server.js", "test": "babel-node spec/run.js" }, "author": "Maurits van Mastrigt <maurits@nerdieworks.nl>", "repository": { "type": "git", "url": "https://github.com/kukua/concava.git" }, "license": "MIT", "dependencies": { "babel-cli": "^6.1.4", "babel-preset-es2015": "^6.1.4", "connect": "^3.4.0", "raw-body": "^2.1.4", "request": "^2.65.0", "vm2": "^0.2.3" }, "devDependencies": { "jasmine": "^2.3.2" } }
{ "name": "concava", "version": "0.1.0", "description": "Convert, calibrate, and validate weather data before sending it to the Orion Context Broker.", "private": true, "scripts": { "start": "babel-node src/server.js", "test": "babel-node spec/run.js" }, "pre-commit": ["test"], "author": "Maurits van Mastrigt <maurits@nerdieworks.nl>", "repository": { "type": "git", "url": "https://github.com/kukua/concava.git" }, "license": "MIT", "dependencies": { "babel-cli": "^6.1.4", "babel-preset-es2015": "^6.1.4", "connect": "^3.4.0", "raw-body": "^2.1.4", "request": "^2.65.0", "vm2": "^0.2.3" }, "devDependencies": { "jasmine": "^2.3.2", "pre-commit": "^1.1.2" } }
Add 'npm test' as Git pre-commit hook.
Add 'npm test' as Git pre-commit hook.
JSON
mit
kukua/concava
json
## Code Before: { "name": "concava", "version": "0.1.0", "description": "Convert, calibrate, and validate weather data before sending it to the Orion Context Broker.", "private": true, "scripts": { "start": "babel-node src/server.js", "test": "babel-node spec/run.js" }, "author": "Maurits van Mastrigt <maurits@nerdieworks.nl>", "repository": { "type": "git", "url": "https://github.com/kukua/concava.git" }, "license": "MIT", "dependencies": { "babel-cli": "^6.1.4", "babel-preset-es2015": "^6.1.4", "connect": "^3.4.0", "raw-body": "^2.1.4", "request": "^2.65.0", "vm2": "^0.2.3" }, "devDependencies": { "jasmine": "^2.3.2" } } ## Instruction: Add 'npm test' as Git pre-commit hook. ## Code After: { "name": "concava", "version": "0.1.0", "description": "Convert, calibrate, and validate weather data before sending it to the Orion Context Broker.", "private": true, "scripts": { "start": "babel-node src/server.js", "test": "babel-node spec/run.js" }, "pre-commit": ["test"], "author": "Maurits van Mastrigt <maurits@nerdieworks.nl>", "repository": { "type": "git", "url": "https://github.com/kukua/concava.git" }, "license": "MIT", "dependencies": { "babel-cli": "^6.1.4", "babel-preset-es2015": "^6.1.4", "connect": "^3.4.0", "raw-body": "^2.1.4", "request": "^2.65.0", "vm2": "^0.2.3" }, "devDependencies": { "jasmine": "^2.3.2", "pre-commit": "^1.1.2" } }
{ "name": "concava", "version": "0.1.0", "description": "Convert, calibrate, and validate weather data before sending it to the Orion Context Broker.", "private": true, "scripts": { "start": "babel-node src/server.js", "test": "babel-node spec/run.js" }, + "pre-commit": ["test"], "author": "Maurits van Mastrigt <maurits@nerdieworks.nl>", "repository": { "type": "git", "url": "https://github.com/kukua/concava.git" }, "license": "MIT", "dependencies": { "babel-cli": "^6.1.4", "babel-preset-es2015": "^6.1.4", "connect": "^3.4.0", "raw-body": "^2.1.4", "request": "^2.65.0", "vm2": "^0.2.3" }, "devDependencies": { - "jasmine": "^2.3.2" + "jasmine": "^2.3.2", ? + + "pre-commit": "^1.1.2" } }
4
0.148148
3
1
b6f07d0180e7524b5631e730c5a8c30a1850b866
.travis.yml
.travis.yml
matrix: include: - os: linux env: NODE_VERSION=0.10 - os: linux env: NODE_VERSION=0.12 script: - tools/test-travis.sh sudo: false addons: apt: packages: - wget - tar - bzip2 - flvtool2
matrix: include: - os: linux env: NODE_VERSION=0.10 - os: linux env: NODE_VERSION=0.12 - os: linux env: NODE_VERSION=4 - os: linux env: NODE_VERSION=5 script: - tools/test-travis.sh sudo: false addons: apt: packages: - wget - tar - bzip2 - flvtool2
Test on recent node versions
Test on recent node versions
YAML
mit
njoyard/node-fluent-ffmpeg,njoyard/node-fluent-ffmpeg,fluent-ffmpeg/node-fluent-ffmpeg,rhodgkins/node-fluent-ffmpeg,streamablevideo/node-fluent-ffmpeg,streamablevideo/node-fluent-ffmpeg,fluent-ffmpeg/node-fluent-ffmpeg,fluent-ffmpeg/node-fluent-ffmpeg,streamablevideo/node-fluent-ffmpeg,rhodgkins/node-fluent-ffmpeg
yaml
## Code Before: matrix: include: - os: linux env: NODE_VERSION=0.10 - os: linux env: NODE_VERSION=0.12 script: - tools/test-travis.sh sudo: false addons: apt: packages: - wget - tar - bzip2 - flvtool2 ## Instruction: Test on recent node versions ## Code After: matrix: include: - os: linux env: NODE_VERSION=0.10 - os: linux env: NODE_VERSION=0.12 - os: linux env: NODE_VERSION=4 - os: linux env: NODE_VERSION=5 script: - tools/test-travis.sh sudo: false addons: apt: packages: - wget - tar - bzip2 - flvtool2
matrix: include: - os: linux env: NODE_VERSION=0.10 - os: linux env: NODE_VERSION=0.12 + - os: linux + env: NODE_VERSION=4 + - os: linux + env: NODE_VERSION=5 script: - tools/test-travis.sh sudo: false addons: apt: packages: - wget - tar - bzip2 - flvtool2
4
0.25
4
0
fe273fa094ee7240d42157cd4048df777ed3035c
Clojure/src/snake/board_view.clj
Clojure/src/snake/board_view.clj
(ns snake.board-view (:use snake.terminal) (:require [clojure.contrib.string :as string])) (defn draw-boarder "Draws the surrounding border of the board." [{width :width height :height}] (set-cursor 0 0) (put "/") (put (string/repeat width "-")) (put "\\") (dotimes [i height] (set-cursor 0 (+ i 1)) (put "|") (set-cursor (+ width 1) (+ i 1)) (put "|")) (put "\n") (put "\\") (put (string/repeat width "-")) (put "/")) (defn add-apple [{x :x y :y}] (set-cursor (+ x 1) (+ y 1)) (put "o")) (defn add-snake [{x :x y :y}] (set-cursor (+ x 1) (+ y 1)) (put "#")) (defn remove [{x :x y :y}] (set-cursor (+ x 1) (+ y 1)) (put " ")) (defn show-board [{width :width height :height board :board}] (doseq [[row] board] (doseq [[elem] row] (add elem)))) ; REM: add the add function which will call add-apple or add-snake
(ns snake.board-view (:use snake.terminal) (:require [clojure.contrib.string :as string])) (defn create-view "Create a new board view" [board] :not-yet-implemented) (defn draw-borders "Draws the surrounding border of the board." [{width :width height :height}] (set-cursor 0 0) (put "/") (put (string/repeat width "-")) (put "\\") (dotimes [i height] (set-cursor 0 (+ i 1)) (put "|") (set-cursor (+ width 1) (+ i 1)) (put "|")) (put "\n") (put "\\") (put (string/repeat width "-")) (put "/")) (defmulti add-element :type) (defmethod add-element :apple [{x :x y :y}] (set-cursor (+ x 1) (+ y 1)) (put "o")) (defmethod add-element :snake [{x :x y :y}] (set-cursor (+ x 1) (+ y 1)) (put "#")) (defn remove-element [{x :x y :y}] (set-cursor (+ x 1) (+ y 1)) (put " ")) (defn show-board [{width :width height :height board :board}] (doseq [[row] board] (doseq [[elem] row] (add-element elem)))) ; REM: add the add function which will call add-apple or add-snake
Use a multimethod to do the add-apple, add-snake
Use a multimethod to do the add-apple, add-snake Signed-off-by: Stefan Marr <46f1a0bd5592a2f9244ca321b129902a06b53e03@stefan-marr.de>
Clojure
mit
smarr/Snake,smarr/Snake,smarr/Snake,smarr/Snake,smarr/Snake,smarr/Snake,smarr/Snake,smarr/Snake
clojure
## Code Before: (ns snake.board-view (:use snake.terminal) (:require [clojure.contrib.string :as string])) (defn draw-boarder "Draws the surrounding border of the board." [{width :width height :height}] (set-cursor 0 0) (put "/") (put (string/repeat width "-")) (put "\\") (dotimes [i height] (set-cursor 0 (+ i 1)) (put "|") (set-cursor (+ width 1) (+ i 1)) (put "|")) (put "\n") (put "\\") (put (string/repeat width "-")) (put "/")) (defn add-apple [{x :x y :y}] (set-cursor (+ x 1) (+ y 1)) (put "o")) (defn add-snake [{x :x y :y}] (set-cursor (+ x 1) (+ y 1)) (put "#")) (defn remove [{x :x y :y}] (set-cursor (+ x 1) (+ y 1)) (put " ")) (defn show-board [{width :width height :height board :board}] (doseq [[row] board] (doseq [[elem] row] (add elem)))) ; REM: add the add function which will call add-apple or add-snake ## Instruction: Use a multimethod to do the add-apple, add-snake Signed-off-by: Stefan Marr <46f1a0bd5592a2f9244ca321b129902a06b53e03@stefan-marr.de> ## Code After: (ns snake.board-view (:use snake.terminal) (:require [clojure.contrib.string :as string])) (defn create-view "Create a new board view" [board] :not-yet-implemented) (defn draw-borders "Draws the surrounding border of the board." [{width :width height :height}] (set-cursor 0 0) (put "/") (put (string/repeat width "-")) (put "\\") (dotimes [i height] (set-cursor 0 (+ i 1)) (put "|") (set-cursor (+ width 1) (+ i 1)) (put "|")) (put "\n") (put "\\") (put (string/repeat width "-")) (put "/")) (defmulti add-element :type) (defmethod add-element :apple [{x :x y :y}] (set-cursor (+ x 1) (+ y 1)) (put "o")) (defmethod add-element :snake [{x :x y :y}] (set-cursor (+ x 1) (+ y 1)) (put "#")) (defn remove-element [{x :x y :y}] (set-cursor (+ x 1) (+ y 1)) (put " ")) (defn show-board [{width :width height :height board :board}] (doseq [[row] board] (doseq [[elem] row] (add-element elem)))) ; REM: add the add function which will call add-apple or add-snake
(ns snake.board-view (:use snake.terminal) (:require [clojure.contrib.string :as string])) + (defn create-view + "Create a new board view" + [board] + :not-yet-implemented) + - (defn draw-boarder ? - + (defn draw-borders ? + "Draws the surrounding border of the board." [{width :width height :height}] (set-cursor 0 0) (put "/") (put (string/repeat width "-")) (put "\\") (dotimes [i height] (set-cursor 0 (+ i 1)) (put "|") (set-cursor (+ width 1) (+ i 1)) (put "|")) (put "\n") (put "\\") (put (string/repeat width "-")) (put "/")) + (defmulti add-element :type) + (defmethod add-element :apple + [{x :x y :y}] + + (set-cursor (+ x 1) (+ y 1)) + (put "o")) + (defmethod add-element :snake + [{x :x y :y}] + + (set-cursor (+ x 1) (+ y 1)) + (put "#")) - (defn add-apple - [{x :x y :y}] - - (set-cursor (+ x 1) (+ y 1)) - (put "o")) - - (defn add-snake - [{x :x y :y}] - - (set-cursor (+ x 1) (+ y 1)) - (put "#")) - - (defn remove + (defn remove-element ? ++++++++ [{x :x y :y}] (set-cursor (+ x 1) (+ y 1)) (put " ")) (defn show-board [{width :width height :height board :board}] (doseq [[row] board] (doseq [[elem] row] - (add elem)))) + (add-element elem)))) ? ++++++++ ; REM: add the add function which will call add-apple or add-snake
34
0.62963
19
15
8da134823a56567e09a09aefc44837a837644912
ddcz/urls.py
ddcz/urls.py
from django.urls import path from . import views app_name='ddcz' urlpatterns = [ path('', views.index, name='news'), path('rubriky/<creative_page_slug>/', views.common_articles, name='common-article-list'), path('rubriky/<creative_page_slug>/<int:article_id>-<article_slug>/', views.common_article_detail, name='common-article-detail'), path('seznamka/', views.dating, name='dating'), path('nastaveni/zmena-skinu/', views.change_skin, name='change-skin'), ]
from django.urls import path from django.views.generic.base import RedirectView from . import views app_name='ddcz' urlpatterns = [ path('', RedirectView.as_view(url='aktuality/', permanent=True)), path('aktuality/', views.index, name='news'), path('rubriky/<creative_page_slug>/', views.common_articles, name='common-article-list'), path('rubriky/<creative_page_slug>/<int:article_id>-<article_slug>/', views.common_article_detail, name='common-article-detail'), path('seznamka/', views.dating, name='dating'), path('nastaveni/zmena-skinu/', views.change_skin, name='change-skin'), ]
Put news on non-root path for clarity
Put news on non-root path for clarity
Python
mit
dracidoupe/graveyard,dracidoupe/graveyard,dracidoupe/graveyard,dracidoupe/graveyard
python
## Code Before: from django.urls import path from . import views app_name='ddcz' urlpatterns = [ path('', views.index, name='news'), path('rubriky/<creative_page_slug>/', views.common_articles, name='common-article-list'), path('rubriky/<creative_page_slug>/<int:article_id>-<article_slug>/', views.common_article_detail, name='common-article-detail'), path('seznamka/', views.dating, name='dating'), path('nastaveni/zmena-skinu/', views.change_skin, name='change-skin'), ] ## Instruction: Put news on non-root path for clarity ## Code After: from django.urls import path from django.views.generic.base import RedirectView from . import views app_name='ddcz' urlpatterns = [ path('', RedirectView.as_view(url='aktuality/', permanent=True)), path('aktuality/', views.index, name='news'), path('rubriky/<creative_page_slug>/', views.common_articles, name='common-article-list'), path('rubriky/<creative_page_slug>/<int:article_id>-<article_slug>/', views.common_article_detail, name='common-article-detail'), path('seznamka/', views.dating, name='dating'), path('nastaveni/zmena-skinu/', views.change_skin, name='change-skin'), ]
from django.urls import path + from django.views.generic.base import RedirectView from . import views app_name='ddcz' urlpatterns = [ + path('', RedirectView.as_view(url='aktuality/', permanent=True)), - path('', views.index, name='news'), + path('aktuality/', views.index, name='news'), ? ++++++++++ path('rubriky/<creative_page_slug>/', views.common_articles, name='common-article-list'), path('rubriky/<creative_page_slug>/<int:article_id>-<article_slug>/', views.common_article_detail, name='common-article-detail'), path('seznamka/', views.dating, name='dating'), path('nastaveni/zmena-skinu/', views.change_skin, name='change-skin'), ]
4
0.25
3
1
6836e6e353274e1809742ecb9fd362215d542521
platform/pc/src/main/java/com/intuso/housemate/platform/pc/Logback.java
platform/pc/src/main/java/com/intuso/housemate/platform/pc/Logback.java
package com.intuso.housemate.platform.pc; import ch.qos.logback.classic.LoggerContext; import ch.qos.logback.classic.joran.JoranConfigurator; import ch.qos.logback.core.joran.spi.JoranException; import ch.qos.logback.core.util.StatusPrinter; import com.google.common.base.Preconditions; import org.slf4j.LoggerFactory; import java.io.File; /** * Created by tomc on 03/03/16. */ public class Logback { private static final String LOGBACK_FILE = "logback.xml"; static { Runtime.getRuntime().addShutdownHook(new Thread() { @Override public void run() { cleanup(); } }); } public static void configure(File configDir) { File logbackFile = new File(configDir, LOGBACK_FILE); Preconditions.checkState(logbackFile.exists(), "Could not find logback configuration at %s", logbackFile.getAbsoluteFile()); final LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory(); final JoranConfigurator joranConfigurator = new JoranConfigurator(); joranConfigurator.setContext(context); context.reset(); try { joranConfigurator.doConfigure(logbackFile); } catch (JoranException ignored) {} StatusPrinter.printInCaseOfErrorsOrWarnings(context); } public static void cleanup() { ((LoggerContext) LoggerFactory.getILoggerFactory()).stop(); } }
package com.intuso.housemate.platform.pc; import ch.qos.logback.classic.LoggerContext; import ch.qos.logback.classic.joran.JoranConfigurator; import ch.qos.logback.core.joran.spi.JoranException; import ch.qos.logback.core.util.StatusPrinter; import com.intuso.housemate.client.v1_0.api.HousemateException; import org.slf4j.LoggerFactory; import java.io.File; /** * Created by tomc on 03/03/16. */ public class Logback { private static final String LOGBACK_FILE = "logback.xml"; static { Runtime.getRuntime().addShutdownHook(new Thread() { @Override public void run() { cleanup(); } }); } public static void configure(File configDir) { File logbackFile = new File(configDir, LOGBACK_FILE); if(!logbackFile.exists()) throw new HousemateException("Could not find logback configuration at " + logbackFile.getAbsoluteFile()); final LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory(); final JoranConfigurator joranConfigurator = new JoranConfigurator(); joranConfigurator.setContext(context); context.reset(); try { joranConfigurator.doConfigure(logbackFile); } catch (JoranException ignored) {} StatusPrinter.printInCaseOfErrorsOrWarnings(context); } public static void cleanup() { ((LoggerContext) LoggerFactory.getILoggerFactory()).stop(); } }
Fix issue with guava preconditions check in logback setup
Fix issue with guava preconditions check in logback setup
Java
apache-2.0
Intuso/housemate,Intuso/housemate,Intuso/housemate
java
## Code Before: package com.intuso.housemate.platform.pc; import ch.qos.logback.classic.LoggerContext; import ch.qos.logback.classic.joran.JoranConfigurator; import ch.qos.logback.core.joran.spi.JoranException; import ch.qos.logback.core.util.StatusPrinter; import com.google.common.base.Preconditions; import org.slf4j.LoggerFactory; import java.io.File; /** * Created by tomc on 03/03/16. */ public class Logback { private static final String LOGBACK_FILE = "logback.xml"; static { Runtime.getRuntime().addShutdownHook(new Thread() { @Override public void run() { cleanup(); } }); } public static void configure(File configDir) { File logbackFile = new File(configDir, LOGBACK_FILE); Preconditions.checkState(logbackFile.exists(), "Could not find logback configuration at %s", logbackFile.getAbsoluteFile()); final LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory(); final JoranConfigurator joranConfigurator = new JoranConfigurator(); joranConfigurator.setContext(context); context.reset(); try { joranConfigurator.doConfigure(logbackFile); } catch (JoranException ignored) {} StatusPrinter.printInCaseOfErrorsOrWarnings(context); } public static void cleanup() { ((LoggerContext) LoggerFactory.getILoggerFactory()).stop(); } } ## Instruction: Fix issue with guava preconditions check in logback setup ## Code After: package com.intuso.housemate.platform.pc; import ch.qos.logback.classic.LoggerContext; import ch.qos.logback.classic.joran.JoranConfigurator; import ch.qos.logback.core.joran.spi.JoranException; import ch.qos.logback.core.util.StatusPrinter; import com.intuso.housemate.client.v1_0.api.HousemateException; import org.slf4j.LoggerFactory; import java.io.File; /** * Created by tomc on 03/03/16. */ public class Logback { private static final String LOGBACK_FILE = "logback.xml"; static { Runtime.getRuntime().addShutdownHook(new Thread() { @Override public void run() { cleanup(); } }); } public static void configure(File configDir) { File logbackFile = new File(configDir, LOGBACK_FILE); if(!logbackFile.exists()) throw new HousemateException("Could not find logback configuration at " + logbackFile.getAbsoluteFile()); final LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory(); final JoranConfigurator joranConfigurator = new JoranConfigurator(); joranConfigurator.setContext(context); context.reset(); try { joranConfigurator.doConfigure(logbackFile); } catch (JoranException ignored) {} StatusPrinter.printInCaseOfErrorsOrWarnings(context); } public static void cleanup() { ((LoggerContext) LoggerFactory.getILoggerFactory()).stop(); } }
package com.intuso.housemate.platform.pc; import ch.qos.logback.classic.LoggerContext; import ch.qos.logback.classic.joran.JoranConfigurator; import ch.qos.logback.core.joran.spi.JoranException; import ch.qos.logback.core.util.StatusPrinter; - import com.google.common.base.Preconditions; + import com.intuso.housemate.client.v1_0.api.HousemateException; import org.slf4j.LoggerFactory; import java.io.File; /** * Created by tomc on 03/03/16. */ public class Logback { private static final String LOGBACK_FILE = "logback.xml"; static { Runtime.getRuntime().addShutdownHook(new Thread() { @Override public void run() { cleanup(); } }); } public static void configure(File configDir) { File logbackFile = new File(configDir, LOGBACK_FILE); - Preconditions.checkState(logbackFile.exists(), "Could not find logback configuration at %s", logbackFile.getAbsoluteFile()); + if(!logbackFile.exists()) + throw new HousemateException("Could not find logback configuration at " + logbackFile.getAbsoluteFile()); final LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory(); final JoranConfigurator joranConfigurator = new JoranConfigurator(); joranConfigurator.setContext(context); context.reset(); try { joranConfigurator.doConfigure(logbackFile); } catch (JoranException ignored) {} StatusPrinter.printInCaseOfErrorsOrWarnings(context); } public static void cleanup() { ((LoggerContext) LoggerFactory.getILoggerFactory()).stop(); } }
5
0.113636
3
2
e9a8702b3995781cb5ed6b8c2e746c360e36b812
src/js/directive/contacts.js
src/js/directive/contacts.js
'use strict'; var ngModule = angular.module('woDirectives'); ngModule.directive('keyfileInput', function() { return function(scope, elm) { elm.on('change', function(e) { for (var i = 0; i < e.target.files.length; i++) { importKey(e.target.files.item(i)); } }); function importKey(file) { var reader = new FileReader(); reader.onload = function(e) { scope.importKey(e.target.result); }; reader.readAsText(file); } }; });
'use strict'; var ngModule = angular.module('woDirectives'); ngModule.directive('keyfileInput', function() { return function(scope, elm) { elm.on('change', function(e) { for (var i = 0; i < e.target.files.length; i++) { importKey(e.target.files.item(i)); } elm.val(null); // clear input }); function importKey(file) { var reader = new FileReader(); reader.onload = function(e) { scope.importKey(e.target.result); }; reader.readAsText(file); } }; });
Clear file input after key import
[WO-927] Clear file input after key import
JavaScript
mit
whiteout-io/mail,dopry/mail-html5,sheafferusa/mail-html5,dopry/mail-html5,tanx/hoodiecrow,clochix/mail-html5,b-deng/mail-html5,dopry/mail-html5,tanx/hoodiecrow,dopry/mail-html5,whiteout-io/mail-html5,whiteout-io/mail-html5,clochix/mail-html5,whiteout-io/mail,whiteout-io/mail,sheafferusa/mail-html5,kalatestimine/mail-html5,b-deng/mail-html5,whiteout-io/mail-html5,clochix/mail-html5,kalatestimine/mail-html5,tanx/hoodiecrow,b-deng/mail-html5,whiteout-io/mail,b-deng/mail-html5,kalatestimine/mail-html5,sheafferusa/mail-html5,whiteout-io/mail-html5,sheafferusa/mail-html5,clochix/mail-html5,kalatestimine/mail-html5
javascript
## Code Before: 'use strict'; var ngModule = angular.module('woDirectives'); ngModule.directive('keyfileInput', function() { return function(scope, elm) { elm.on('change', function(e) { for (var i = 0; i < e.target.files.length; i++) { importKey(e.target.files.item(i)); } }); function importKey(file) { var reader = new FileReader(); reader.onload = function(e) { scope.importKey(e.target.result); }; reader.readAsText(file); } }; }); ## Instruction: [WO-927] Clear file input after key import ## Code After: 'use strict'; var ngModule = angular.module('woDirectives'); ngModule.directive('keyfileInput', function() { return function(scope, elm) { elm.on('change', function(e) { for (var i = 0; i < e.target.files.length; i++) { importKey(e.target.files.item(i)); } elm.val(null); // clear input }); function importKey(file) { var reader = new FileReader(); reader.onload = function(e) { scope.importKey(e.target.result); }; reader.readAsText(file); } }; });
'use strict'; var ngModule = angular.module('woDirectives'); ngModule.directive('keyfileInput', function() { return function(scope, elm) { elm.on('change', function(e) { for (var i = 0; i < e.target.files.length; i++) { importKey(e.target.files.item(i)); } + elm.val(null); // clear input }); function importKey(file) { var reader = new FileReader(); reader.onload = function(e) { scope.importKey(e.target.result); }; reader.readAsText(file); } }; });
1
0.047619
1
0
d916b396d2b6fa8ef5843628acfe9a700ab44c5e
README.md
README.md
RxJS-flavored version of HTTP fetch API for node.js
RxJS-flavored version of HTTP fetch API for node.js Built on top of [isomorphic-fetch](https://github.com/matthew-andrews/isomorphic-fetch). ## Warnings - This adds `fetch` as a global so that its API is consistent between client and server. - You must bring your own ES6 Promise compatible polyfill, I suggest [es6-promise](https://github.com/jakearchibald/es6-promise). ## Installation ### NPM ```sh npm install --save rx-fetch ``` ## Usage ```js require('rx-fetch'); rx-fetch('//offline-news-api.herokuapp.com/stories') .subscribe( function (response) { if (response.status >= 400) { throw new Error("Bad response from server"); } return response.text(); }, function (err) { console.log("Something went wrong: ", err); }); ``` ## License MIT
Add a little bit of documentation.
Add a little bit of documentation.
Markdown
mit
tangledfruit/rx-fetch,tangledfruit/rxjs-fetch
markdown
## Code Before: RxJS-flavored version of HTTP fetch API for node.js ## Instruction: Add a little bit of documentation. ## Code After: RxJS-flavored version of HTTP fetch API for node.js Built on top of [isomorphic-fetch](https://github.com/matthew-andrews/isomorphic-fetch). ## Warnings - This adds `fetch` as a global so that its API is consistent between client and server. - You must bring your own ES6 Promise compatible polyfill, I suggest [es6-promise](https://github.com/jakearchibald/es6-promise). ## Installation ### NPM ```sh npm install --save rx-fetch ``` ## Usage ```js require('rx-fetch'); rx-fetch('//offline-news-api.herokuapp.com/stories') .subscribe( function (response) { if (response.status >= 400) { throw new Error("Bad response from server"); } return response.text(); }, function (err) { console.log("Something went wrong: ", err); }); ``` ## License MIT
RxJS-flavored version of HTTP fetch API for node.js + + Built on top of [isomorphic-fetch](https://github.com/matthew-andrews/isomorphic-fetch). + + ## Warnings + + - This adds `fetch` as a global so that its API is consistent between client and server. + - You must bring your own ES6 Promise compatible polyfill, I suggest [es6-promise](https://github.com/jakearchibald/es6-promise). + + ## Installation + + ### NPM + + ```sh + npm install --save rx-fetch + ``` + + ## Usage + + ```js + require('rx-fetch'); + + rx-fetch('//offline-news-api.herokuapp.com/stories') + .subscribe( + function (response) { + if (response.status >= 400) { + throw new Error("Bad response from server"); + } + return response.text(); + }, + function (err) { + console.log("Something went wrong: ", err); + }); + ``` + + ## License + + MIT
37
37
37
0
22cafa82d5871197f23bc1209c50fd6e98971bbe
src/Http/Requests/Frontend/PhoneVerificationSendRequest.php
src/Http/Requests/Frontend/PhoneVerificationSendRequest.php
<?php /* * NOTICE OF LICENSE * * Part of the Rinvex Fort Package. * * This source file is subject to The MIT License (MIT) * that is bundled with this package in the LICENSE file. * * Package: Rinvex Fort Package * License: The MIT License (MIT) * Link: https://rinvex.com */ namespace Rinvex\Fort\Http\Requests\Frontend; use Illuminate\Support\Facades\Auth; class PhoneVerificationSendRequest extends PhoneVerificationRequest { /** * Get the validation rules that apply to the request. * * @return array */ public function rules() { $user = Auth::guard()->user() ?: Auth::guard()->attemptUser(); return $this->isMethod('post') ? [ 'phone' => 'required|numeric|exists:'.config('rinvex.fort.tables.users').',phone,id,'.$user->id.',phone_verified,1', 'method' => 'required', ] : []; } }
<?php /* * NOTICE OF LICENSE * * Part of the Rinvex Fort Package. * * This source file is subject to The MIT License (MIT) * that is bundled with this package in the LICENSE file. * * Package: Rinvex Fort Package * License: The MIT License (MIT) * Link: https://rinvex.com */ namespace Rinvex\Fort\Http\Requests\Frontend; class PhoneVerificationSendRequest extends PhoneVerificationRequest { /** * Get the validation rules that apply to the request. * * @return array */ public function rules() { return $this->isMethod('post') ? [ 'phone' => 'required|numeric|exists:'.config('rinvex.fort.tables.users').',phone', 'method' => 'required', ] : []; } }
Fix wrong phone validation rule
Fix wrong phone validation rule
PHP
mit
rinvex/fort
php
## Code Before: <?php /* * NOTICE OF LICENSE * * Part of the Rinvex Fort Package. * * This source file is subject to The MIT License (MIT) * that is bundled with this package in the LICENSE file. * * Package: Rinvex Fort Package * License: The MIT License (MIT) * Link: https://rinvex.com */ namespace Rinvex\Fort\Http\Requests\Frontend; use Illuminate\Support\Facades\Auth; class PhoneVerificationSendRequest extends PhoneVerificationRequest { /** * Get the validation rules that apply to the request. * * @return array */ public function rules() { $user = Auth::guard()->user() ?: Auth::guard()->attemptUser(); return $this->isMethod('post') ? [ 'phone' => 'required|numeric|exists:'.config('rinvex.fort.tables.users').',phone,id,'.$user->id.',phone_verified,1', 'method' => 'required', ] : []; } } ## Instruction: Fix wrong phone validation rule ## Code After: <?php /* * NOTICE OF LICENSE * * Part of the Rinvex Fort Package. * * This source file is subject to The MIT License (MIT) * that is bundled with this package in the LICENSE file. * * Package: Rinvex Fort Package * License: The MIT License (MIT) * Link: https://rinvex.com */ namespace Rinvex\Fort\Http\Requests\Frontend; class PhoneVerificationSendRequest extends PhoneVerificationRequest { /** * Get the validation rules that apply to the request. * * @return array */ public function rules() { return $this->isMethod('post') ? [ 'phone' => 'required|numeric|exists:'.config('rinvex.fort.tables.users').',phone', 'method' => 'required', ] : []; } }
<?php /* * NOTICE OF LICENSE * * Part of the Rinvex Fort Package. * * This source file is subject to The MIT License (MIT) * that is bundled with this package in the LICENSE file. * * Package: Rinvex Fort Package * License: The MIT License (MIT) * Link: https://rinvex.com */ namespace Rinvex\Fort\Http\Requests\Frontend; - use Illuminate\Support\Facades\Auth; - class PhoneVerificationSendRequest extends PhoneVerificationRequest { /** * Get the validation rules that apply to the request. * * @return array */ public function rules() { - $user = Auth::guard()->user() ?: Auth::guard()->attemptUser(); - return $this->isMethod('post') ? [ - 'phone' => 'required|numeric|exists:'.config('rinvex.fort.tables.users').',phone,id,'.$user->id.',phone_verified,1', ? ---------------- ------------------ + 'phone' => 'required|numeric|exists:'.config('rinvex.fort.tables.users').',phone', 'method' => 'required', ] : []; } }
6
0.166667
1
5
414f6e9174b8c7b88866319af19a5e36fcec643d
kk/admin/__init__.py
kk/admin/__init__.py
from django.contrib import admin from kk.models import Hearing, Label, Introduction, Scenario, Comment admin.site.register(Label) admin.site.register(Hearing) admin.site.register(Introduction) admin.site.register(Scenario) admin.site.register(Comment)
from django.contrib import admin from kk import models ### Inlines class IntroductionInline(admin.StackedInline): model = models.Introduction extra = 0 exclude = ["id"] class ScenarioInline(admin.StackedInline): model = models.Scenario extra = 0 exclude = ["id"] class HearingImageInline(admin.StackedInline): model = models.HearingImage extra = 0 class IntroductionImageInline(admin.StackedInline): model = models.IntroductionImage extra = 0 class ScenarioImageInline(admin.StackedInline): model = models.ScenarioImage extra = 0 ### Admins class HearingAdmin(admin.ModelAdmin): inlines = [HearingImageInline, IntroductionInline, ScenarioInline] class IntroductionAdmin(admin.ModelAdmin): inlines = [IntroductionImageInline] class ScenarioAdmin(admin.ModelAdmin): inlines = [ScenarioImageInline] ### Wire it up! admin.site.register(models.Label) admin.site.register(models.Hearing, HearingAdmin) admin.site.register(models.Introduction, IntroductionAdmin) admin.site.register(models.Scenario, ScenarioAdmin)
Make the admin a little bit more palatable
Make the admin a little bit more palatable Refs #25
Python
mit
stephawe/kerrokantasi,City-of-Helsinki/kerrokantasi,City-of-Helsinki/kerrokantasi,vikoivun/kerrokantasi,City-of-Helsinki/kerrokantasi,stephawe/kerrokantasi,vikoivun/kerrokantasi,vikoivun/kerrokantasi,stephawe/kerrokantasi,City-of-Helsinki/kerrokantasi
python
## Code Before: from django.contrib import admin from kk.models import Hearing, Label, Introduction, Scenario, Comment admin.site.register(Label) admin.site.register(Hearing) admin.site.register(Introduction) admin.site.register(Scenario) admin.site.register(Comment) ## Instruction: Make the admin a little bit more palatable Refs #25 ## Code After: from django.contrib import admin from kk import models ### Inlines class IntroductionInline(admin.StackedInline): model = models.Introduction extra = 0 exclude = ["id"] class ScenarioInline(admin.StackedInline): model = models.Scenario extra = 0 exclude = ["id"] class HearingImageInline(admin.StackedInline): model = models.HearingImage extra = 0 class IntroductionImageInline(admin.StackedInline): model = models.IntroductionImage extra = 0 class ScenarioImageInline(admin.StackedInline): model = models.ScenarioImage extra = 0 ### Admins class HearingAdmin(admin.ModelAdmin): inlines = [HearingImageInline, IntroductionInline, ScenarioInline] class IntroductionAdmin(admin.ModelAdmin): inlines = [IntroductionImageInline] class ScenarioAdmin(admin.ModelAdmin): inlines = [ScenarioImageInline] ### Wire it up! admin.site.register(models.Label) admin.site.register(models.Hearing, HearingAdmin) admin.site.register(models.Introduction, IntroductionAdmin) admin.site.register(models.Scenario, ScenarioAdmin)
from django.contrib import admin + from kk import models - from kk.models import Hearing, Label, Introduction, Scenario, Comment + ### Inlines + + class IntroductionInline(admin.StackedInline): + model = models.Introduction + extra = 0 + exclude = ["id"] + + + class ScenarioInline(admin.StackedInline): + model = models.Scenario + extra = 0 + exclude = ["id"] + + + class HearingImageInline(admin.StackedInline): + model = models.HearingImage + extra = 0 + + + class IntroductionImageInline(admin.StackedInline): + model = models.IntroductionImage + extra = 0 + + + class ScenarioImageInline(admin.StackedInline): + model = models.ScenarioImage + extra = 0 + + + ### Admins + + + class HearingAdmin(admin.ModelAdmin): + inlines = [HearingImageInline, IntroductionInline, ScenarioInline] + + + class IntroductionAdmin(admin.ModelAdmin): + inlines = [IntroductionImageInline] + + + class ScenarioAdmin(admin.ModelAdmin): + inlines = [ScenarioImageInline] + + + ### Wire it up! + + - admin.site.register(Label) + admin.site.register(models.Label) ? +++++++ + admin.site.register(models.Hearing, HearingAdmin) + admin.site.register(models.Introduction, IntroductionAdmin) + admin.site.register(models.Scenario, ScenarioAdmin) - admin.site.register(Hearing) - admin.site.register(Introduction) - admin.site.register(Scenario) - admin.site.register(Comment)
58
6.444444
52
6
9a57656c946e138a0eb805aad47724bcfc9ca7c7
src/test/java/org/jboss/loom/migrators/_ext/ExternalMigratorsTestEnv.java
src/test/java/org/jboss/loom/migrators/_ext/ExternalMigratorsTestEnv.java
package org.jboss.loom.migrators._ext; import java.io.File; import java.io.IOException; import org.apache.commons.io.FileUtils; import org.jboss.loom.utils.ClassUtils; import org.junit.AfterClass; import org.junit.BeforeClass; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * Base class to prepare external migrators test environment (copies files etc.). * * @author Ondrej Zizka, ozizka at redhat.com */ public class ExternalMigratorsTestEnv { private static final Logger log = LoggerFactory.getLogger( ExternalMigratorsTestEnv.class ); protected static File workDir; @BeforeClass public static void copyTestExtMigratorFiles() throws IOException { workDir = new File("target/extMigrators/"); FileUtils.forceMkdir( workDir ); ClassUtils.copyResourceToDir( ExternalMigratorsLoader.class, "TestMigrator.mig.xml", workDir ); ClassUtils.copyResourceToDir( ExternalMigratorsLoader.class, "TestJaxbBean.groovy", workDir ); } @AfterClass public static void deleteTestExtMigratorFiles() throws IOException { FileUtils.forceDelete( workDir ); } }// class
package org.jboss.loom.migrators._ext; import java.io.File; import java.io.IOException; import org.apache.commons.io.FileUtils; import org.jboss.loom.utils.ClassUtils; import org.junit.AfterClass; import org.junit.BeforeClass; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * Base class to prepare external migrators test environment (copies files etc.). * * @author Ondrej Zizka, ozizka at redhat.com */ public class ExternalMigratorsTestEnv { private static final Logger log = LoggerFactory.getLogger( ExternalMigratorsTestEnv.class ); protected static File workDir; @BeforeClass public static void copyTestExtMigratorFiles() throws IOException { workDir = new File("target/extMigrators/"); FileUtils.forceMkdir( workDir ); ClassUtils.copyResourceToDir( ExternalMigratorsTestEnv.class, "res/TestMigrator.mig.xml", workDir ); ClassUtils.copyResourceToDir( ExternalMigratorsTestEnv.class, "res/TestJaxbBean.groovy", workDir ); } @AfterClass public static void deleteTestExtMigratorFiles() throws IOException { FileUtils.forceDelete( workDir ); } }// class
Move test to test src
Move test to test src
Java
apache-2.0
OndraZizka/jboss-migration,OndraZizka/jboss-migration,OndraZizka/jboss-migration
java
## Code Before: package org.jboss.loom.migrators._ext; import java.io.File; import java.io.IOException; import org.apache.commons.io.FileUtils; import org.jboss.loom.utils.ClassUtils; import org.junit.AfterClass; import org.junit.BeforeClass; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * Base class to prepare external migrators test environment (copies files etc.). * * @author Ondrej Zizka, ozizka at redhat.com */ public class ExternalMigratorsTestEnv { private static final Logger log = LoggerFactory.getLogger( ExternalMigratorsTestEnv.class ); protected static File workDir; @BeforeClass public static void copyTestExtMigratorFiles() throws IOException { workDir = new File("target/extMigrators/"); FileUtils.forceMkdir( workDir ); ClassUtils.copyResourceToDir( ExternalMigratorsLoader.class, "TestMigrator.mig.xml", workDir ); ClassUtils.copyResourceToDir( ExternalMigratorsLoader.class, "TestJaxbBean.groovy", workDir ); } @AfterClass public static void deleteTestExtMigratorFiles() throws IOException { FileUtils.forceDelete( workDir ); } }// class ## Instruction: Move test to test src ## Code After: package org.jboss.loom.migrators._ext; import java.io.File; import java.io.IOException; import org.apache.commons.io.FileUtils; import org.jboss.loom.utils.ClassUtils; import org.junit.AfterClass; import org.junit.BeforeClass; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * Base class to prepare external migrators test environment (copies files etc.). * * @author Ondrej Zizka, ozizka at redhat.com */ public class ExternalMigratorsTestEnv { private static final Logger log = LoggerFactory.getLogger( ExternalMigratorsTestEnv.class ); protected static File workDir; @BeforeClass public static void copyTestExtMigratorFiles() throws IOException { workDir = new File("target/extMigrators/"); FileUtils.forceMkdir( workDir ); ClassUtils.copyResourceToDir( ExternalMigratorsTestEnv.class, "res/TestMigrator.mig.xml", workDir ); ClassUtils.copyResourceToDir( ExternalMigratorsTestEnv.class, "res/TestJaxbBean.groovy", workDir ); } @AfterClass public static void deleteTestExtMigratorFiles() throws IOException { FileUtils.forceDelete( workDir ); } }// class
package org.jboss.loom.migrators._ext; import java.io.File; import java.io.IOException; import org.apache.commons.io.FileUtils; import org.jboss.loom.utils.ClassUtils; import org.junit.AfterClass; import org.junit.BeforeClass; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * Base class to prepare external migrators test environment (copies files etc.). * * @author Ondrej Zizka, ozizka at redhat.com */ public class ExternalMigratorsTestEnv { private static final Logger log = LoggerFactory.getLogger( ExternalMigratorsTestEnv.class ); protected static File workDir; @BeforeClass public static void copyTestExtMigratorFiles() throws IOException { workDir = new File("target/extMigrators/"); FileUtils.forceMkdir( workDir ); - ClassUtils.copyResourceToDir( ExternalMigratorsLoader.class, "TestMigrator.mig.xml", workDir ); ? ^^^^ ^ + ClassUtils.copyResourceToDir( ExternalMigratorsTestEnv.class, "res/TestMigrator.mig.xml", workDir ); ? ^ ^^^^^ ++++ - ClassUtils.copyResourceToDir( ExternalMigratorsLoader.class, "TestJaxbBean.groovy", workDir ); ? ^^^^ ^ + ClassUtils.copyResourceToDir( ExternalMigratorsTestEnv.class, "res/TestJaxbBean.groovy", workDir ); ? ^ ^^^^^ ++++ } @AfterClass public static void deleteTestExtMigratorFiles() throws IOException { FileUtils.forceDelete( workDir ); } }// class
4
0.114286
2
2
d958e4b5ce43f53c44fe7bd335626bd627893c84
src/routers/DefaultRouter.js
src/routers/DefaultRouter.js
'use strict'; import VueRouter from 'vue-router'; import TaskListView from '../views/TaskListView'; import IndexView from '../views/IndexView'; export default new VueRouter({ mode: 'history', routes: [ { path: '/', // name: 'Index', component: IndexView }, { path: '/hello/:name', // name: 'HelloWorld', component: IndexView }, { path: '/task-list', // name: 'TaskList', component: TaskListView }, { path: '/async', // name: 'Async', component: function(resolve) { // Webpack creates a seperate bundle with code splitting require(['../views/AsyncView.vue'], resolve); } }, { path: '*', name: '404', component: IndexView } ] });
'use strict'; import VueRouter from 'vue-router'; import TaskListView from '../views/TaskListView'; import IndexView from '../views/IndexView'; export default new VueRouter({ mode: 'history', routes: [ { path: '/', name: 'Index', component: IndexView }, { path: '/hello/:name', name: 'HelloWorld', component: IndexView }, { path: '/task-list', name: 'TaskList', component: TaskListView }, { path: '/async', name: 'Async', component: function(resolve) { // Webpack creates a seperate bundle with code splitting // and handles the async loading via JSONP for us require(['../views/AsyncView.vue'], resolve); } }, { path: '*', name: '404', component: IndexView } ] });
Update comment and add named routes
Update comment and add named routes
JavaScript
mit
tomeightyeight/vue-todo,tomeightyeight/vue-todo
javascript
## Code Before: 'use strict'; import VueRouter from 'vue-router'; import TaskListView from '../views/TaskListView'; import IndexView from '../views/IndexView'; export default new VueRouter({ mode: 'history', routes: [ { path: '/', // name: 'Index', component: IndexView }, { path: '/hello/:name', // name: 'HelloWorld', component: IndexView }, { path: '/task-list', // name: 'TaskList', component: TaskListView }, { path: '/async', // name: 'Async', component: function(resolve) { // Webpack creates a seperate bundle with code splitting require(['../views/AsyncView.vue'], resolve); } }, { path: '*', name: '404', component: IndexView } ] }); ## Instruction: Update comment and add named routes ## Code After: 'use strict'; import VueRouter from 'vue-router'; import TaskListView from '../views/TaskListView'; import IndexView from '../views/IndexView'; export default new VueRouter({ mode: 'history', routes: [ { path: '/', name: 'Index', component: IndexView }, { path: '/hello/:name', name: 'HelloWorld', component: IndexView }, { path: '/task-list', name: 'TaskList', component: TaskListView }, { path: '/async', name: 'Async', component: function(resolve) { // Webpack creates a seperate bundle with code splitting // and handles the async loading via JSONP for us require(['../views/AsyncView.vue'], resolve); } }, { path: '*', name: '404', component: IndexView } ] });
'use strict'; import VueRouter from 'vue-router'; import TaskListView from '../views/TaskListView'; import IndexView from '../views/IndexView'; export default new VueRouter({ mode: 'history', routes: [ { path: '/', - // name: 'Index', ? --- + name: 'Index', component: IndexView }, { path: '/hello/:name', - // name: 'HelloWorld', ? --- + name: 'HelloWorld', component: IndexView }, { path: '/task-list', - // name: 'TaskList', ? --- + name: 'TaskList', component: TaskListView }, { path: '/async', - // name: 'Async', ? --- + name: 'Async', component: function(resolve) { // Webpack creates a seperate bundle with code splitting + // and handles the async loading via JSONP for us require(['../views/AsyncView.vue'], resolve); } }, { path: '*', name: '404', component: IndexView } ] });
9
0.2
5
4
c711856a4c5728490179ffcb15157c8d0a34f345
extension/js/backboneAgent/patches/patchDefine.js
extension/js/backboneAgent/patches/patchDefine.js
// @private // Calls the callback passing to it the Backbone object every time it's detected. // The function uses multiple methods of detection. var patchDefine = function(callback) { // AMD patchFunctionLater(window, "define", function(originalFunction) { return function() { // function arguments: (id? : String, dependencies? : Array, factory : Function) // make arguments editable var argumentsArray = Array.prototype.slice.call(arguments); // find the factory function to patch it for (var i=0,l=argumentsArray.length; i<l; i++) { if (typeof argumentsArray[i] == "function") { // factory function found, patch it. // NOTE: in the patcher function, specify the parameters for the // default modules, or in case of a module with no dependencies but // that uses the default modules internally, the original define would see a 0-arity // function and would call it without them (see define() in the AMD API) patchFunction(argumentsArray, i, function(originalFunction) { return function(require, exports, modules) { var module = originalFunction.apply(this, arguments); // check if Backbone has been defined by the factory fuction // (some factories set "this" to Backbone) var BackboneCandidate = module || this; callback(BackboneCandidate); return module; }}); break; } } return originalFunction.apply(this, argumentsArray); }}); };
// @private // Calls the callback passing to it the Backbone object every time it's detected. // The function uses multiple methods of detection. var patchDefine = function(callback) { // AMD patchFunctionLater(window, "define", function(originalFunction) { return function() { // function arguments: (id? : String, dependencies? : Array, factory : Function) // make arguments editable var argumentsArray = Array.prototype.slice.call(arguments); // find the factory function to patch it for (var i=0,l=argumentsArray.length; i<l; i++) { if (typeof argumentsArray[i] == "function") { // factory function found, patch it. // NOTE: in the patcher function, specify the parameters for the // default modules, or in case of a module with no dependencies but // that uses the default modules internally, the original define would see a 0-arity // function and would call it without them (see define() in the AMD API) patchFunction(argumentsArray, i, function(originalFunction) { return function(require, exports, modules) { var module = originalFunction.apply(this, arguments); // check if Backbone has been defined by the factory fuction // (some factories set "this" to Backbone) var BackboneCandidate = module || this;// var isBackbone = isObject(BackboneCandidate) && typeof BackboneCandidate.View == "function" && typeof BackboneCandidate.Model == "function" && typeof BackboneCandidate.Collection == "function" && typeof BackboneCandidate.Router == "function"; if (isBackbone) { callback(BackboneCandidate); } return module; }}); break; } } return originalFunction.apply(this, argumentsArray); }}); };
Fix amdDefine patch to check for backboneCandidate
Fix amdDefine patch to check for backboneCandidate
JavaScript
mit
marionettejs/marionette.inspector,marionettejs/marionette.inspector,onelovelyname/marionette.inspector,marionettejs/marionette.inspector,onelovelyname/marionette.inspector,onelovelyname/marionette.inspector
javascript
## Code Before: // @private // Calls the callback passing to it the Backbone object every time it's detected. // The function uses multiple methods of detection. var patchDefine = function(callback) { // AMD patchFunctionLater(window, "define", function(originalFunction) { return function() { // function arguments: (id? : String, dependencies? : Array, factory : Function) // make arguments editable var argumentsArray = Array.prototype.slice.call(arguments); // find the factory function to patch it for (var i=0,l=argumentsArray.length; i<l; i++) { if (typeof argumentsArray[i] == "function") { // factory function found, patch it. // NOTE: in the patcher function, specify the parameters for the // default modules, or in case of a module with no dependencies but // that uses the default modules internally, the original define would see a 0-arity // function and would call it without them (see define() in the AMD API) patchFunction(argumentsArray, i, function(originalFunction) { return function(require, exports, modules) { var module = originalFunction.apply(this, arguments); // check if Backbone has been defined by the factory fuction // (some factories set "this" to Backbone) var BackboneCandidate = module || this; callback(BackboneCandidate); return module; }}); break; } } return originalFunction.apply(this, argumentsArray); }}); }; ## Instruction: Fix amdDefine patch to check for backboneCandidate ## Code After: // @private // Calls the callback passing to it the Backbone object every time it's detected. // The function uses multiple methods of detection. var patchDefine = function(callback) { // AMD patchFunctionLater(window, "define", function(originalFunction) { return function() { // function arguments: (id? : String, dependencies? : Array, factory : Function) // make arguments editable var argumentsArray = Array.prototype.slice.call(arguments); // find the factory function to patch it for (var i=0,l=argumentsArray.length; i<l; i++) { if (typeof argumentsArray[i] == "function") { // factory function found, patch it. // NOTE: in the patcher function, specify the parameters for the // default modules, or in case of a module with no dependencies but // that uses the default modules internally, the original define would see a 0-arity // function and would call it without them (see define() in the AMD API) patchFunction(argumentsArray, i, function(originalFunction) { return function(require, exports, modules) { var module = originalFunction.apply(this, arguments); // check if Backbone has been defined by the factory fuction // (some factories set "this" to Backbone) var BackboneCandidate = module || this;// var isBackbone = isObject(BackboneCandidate) && typeof BackboneCandidate.View == "function" && typeof BackboneCandidate.Model == "function" && typeof BackboneCandidate.Collection == "function" && typeof BackboneCandidate.Router == "function"; if (isBackbone) { callback(BackboneCandidate); } return module; }}); break; } } return originalFunction.apply(this, argumentsArray); }}); };
// @private // Calls the callback passing to it the Backbone object every time it's detected. // The function uses multiple methods of detection. var patchDefine = function(callback) { // AMD patchFunctionLater(window, "define", function(originalFunction) { return function() { // function arguments: (id? : String, dependencies? : Array, factory : Function) // make arguments editable var argumentsArray = Array.prototype.slice.call(arguments); // find the factory function to patch it for (var i=0,l=argumentsArray.length; i<l; i++) { if (typeof argumentsArray[i] == "function") { // factory function found, patch it. // NOTE: in the patcher function, specify the parameters for the // default modules, or in case of a module with no dependencies but // that uses the default modules internally, the original define would see a 0-arity // function and would call it without them (see define() in the AMD API) patchFunction(argumentsArray, i, function(originalFunction) { return function(require, exports, modules) { var module = originalFunction.apply(this, arguments); // check if Backbone has been defined by the factory fuction // (some factories set "this" to Backbone) - var BackboneCandidate = module || this; + var BackboneCandidate = module || this;// ? ++ + + + var isBackbone = isObject(BackboneCandidate) && + typeof BackboneCandidate.View == "function" && + typeof BackboneCandidate.Model == "function" && + typeof BackboneCandidate.Collection == "function" && + typeof BackboneCandidate.Router == "function"; + if (isBackbone) { - callback(BackboneCandidate); + callback(BackboneCandidate); ? ++++ + } + return module; }}); break; } } return originalFunction.apply(this, argumentsArray); }}); };
14
0.388889
12
2
00297b35c0c433e7caf3502c5402343e2812482b
main.go
main.go
package main import ( "log" "net/http" ) func main() { router := NewRouter() log.Fatal(http.ListenAndServe(":80", router)) }
package main import ( "flag" "fmt" "log" "net/http" "strconv" ) func main() { router := NewRouter() port := flag.Int("port", 8080, "Port to run on") flag.Parse() if *port < 1 || *port > 65536 { log.Fatal(string(*port) + " is not a valid port number. Exiting.") } portString := ":" + strconv.Itoa(*port) fmt.Printf("Starting server on port %s", portString) log.Fatal(http.ListenAndServe(portString, router)) }
Support specifying port as command-line flag on startup
Support specifying port as command-line flag on startup
Go
mit
bjschafer/easy-notifier
go
## Code Before: package main import ( "log" "net/http" ) func main() { router := NewRouter() log.Fatal(http.ListenAndServe(":80", router)) } ## Instruction: Support specifying port as command-line flag on startup ## Code After: package main import ( "flag" "fmt" "log" "net/http" "strconv" ) func main() { router := NewRouter() port := flag.Int("port", 8080, "Port to run on") flag.Parse() if *port < 1 || *port > 65536 { log.Fatal(string(*port) + " is not a valid port number. Exiting.") } portString := ":" + strconv.Itoa(*port) fmt.Printf("Starting server on port %s", portString) log.Fatal(http.ListenAndServe(portString, router)) }
package main import ( + "flag" + "fmt" "log" "net/http" + "strconv" ) func main() { router := NewRouter() + port := flag.Int("port", 8080, "Port to run on") + flag.Parse() + + if *port < 1 || *port > 65536 { + log.Fatal(string(*port) + " is not a valid port number. Exiting.") + } + + portString := ":" + strconv.Itoa(*port) + + fmt.Printf("Starting server on port %s", portString) + - log.Fatal(http.ListenAndServe(":80", router)) ? ^^^^^ + log.Fatal(http.ListenAndServe(portString, router)) ? ^^^^^^^^^^ }
16
1.333333
15
1
f4d025f885f474f13d0d9594830b3a1b9ebabbc8
FilbertSteps/DeviceIdentifier.swift
FilbertSteps/DeviceIdentifier.swift
import Foundation import UIKit struct DeviceIdentifier { private var device = UIDevice.currentDevice() func deviceColor() { var selector:Selector = "deviceInfoForKey:" if (!device.respondsToSelector(selector)) { selector = "_deviceInfoForKey:" } if (!device.respondsToSelector(selector)) { return } print(device.modelName) // See https://docs.google.com/spreadsheets/d/1yFjZvtNaV7cYOB_hRDjgPiNgQDZtMzaLAUhfxv449ZA/edit#gid=0 print(device.performSelector("_deviceInfoForKey:", withObject: "DeviceColor")) print(device.performSelector("_deviceInfoForKey:", withObject: "DeviceEnclosureColor")) } }
import Foundation import UIKit struct DeviceIdentifier { private var device = UIDevice.currentDevice() func deviceColor() { var selector:Selector = "deviceInfoForKey:" if (!device.respondsToSelector(selector)) { selector = "_deviceInfoForKey:" } if (!device.respondsToSelector(selector)) { return } print("Model name: \(device.modelName)") // See https://docs.google.com/spreadsheets/d/1yFjZvtNaV7cYOB_hRDjgPiNgQDZtMzaLAUhfxv449ZA/edit#gid=0 print("Color:", device.performSelector("_deviceInfoForKey:", withObject: "DeviceColor")) print("Enclosure color:", device.performSelector("_deviceInfoForKey:", withObject: "DeviceEnclosureColor")) } }
Clean up logging in deviceIdentifier
Clean up logging in deviceIdentifier
Swift
mit
lazerwalker/storyboard-iOS,lazerwalker/storyboard-iOS,lazerwalker/storyboard-iOS
swift
## Code Before: import Foundation import UIKit struct DeviceIdentifier { private var device = UIDevice.currentDevice() func deviceColor() { var selector:Selector = "deviceInfoForKey:" if (!device.respondsToSelector(selector)) { selector = "_deviceInfoForKey:" } if (!device.respondsToSelector(selector)) { return } print(device.modelName) // See https://docs.google.com/spreadsheets/d/1yFjZvtNaV7cYOB_hRDjgPiNgQDZtMzaLAUhfxv449ZA/edit#gid=0 print(device.performSelector("_deviceInfoForKey:", withObject: "DeviceColor")) print(device.performSelector("_deviceInfoForKey:", withObject: "DeviceEnclosureColor")) } } ## Instruction: Clean up logging in deviceIdentifier ## Code After: import Foundation import UIKit struct DeviceIdentifier { private var device = UIDevice.currentDevice() func deviceColor() { var selector:Selector = "deviceInfoForKey:" if (!device.respondsToSelector(selector)) { selector = "_deviceInfoForKey:" } if (!device.respondsToSelector(selector)) { return } print("Model name: \(device.modelName)") // See https://docs.google.com/spreadsheets/d/1yFjZvtNaV7cYOB_hRDjgPiNgQDZtMzaLAUhfxv449ZA/edit#gid=0 print("Color:", device.performSelector("_deviceInfoForKey:", withObject: "DeviceColor")) print("Enclosure color:", device.performSelector("_deviceInfoForKey:", withObject: "DeviceEnclosureColor")) } }
import Foundation import UIKit struct DeviceIdentifier { private var device = UIDevice.currentDevice() func deviceColor() { var selector:Selector = "deviceInfoForKey:" if (!device.respondsToSelector(selector)) { selector = "_deviceInfoForKey:" } if (!device.respondsToSelector(selector)) { return } - print(device.modelName) + print("Model name: \(device.modelName)") ? +++++++++++++++ ++ // See https://docs.google.com/spreadsheets/d/1yFjZvtNaV7cYOB_hRDjgPiNgQDZtMzaLAUhfxv449ZA/edit#gid=0 - print(device.performSelector("_deviceInfoForKey:", withObject: "DeviceColor")) + print("Color:", device.performSelector("_deviceInfoForKey:", withObject: "DeviceColor")) ? ++++++++++ - print(device.performSelector("_deviceInfoForKey:", withObject: "DeviceEnclosureColor")) + print("Enclosure color:", device.performSelector("_deviceInfoForKey:", withObject: "DeviceEnclosureColor")) ? ++++++++++++++++++++ } }
6
0.26087
3
3
91ff8f445adda97d1481c8397b21f08165ae5269
PowerShell/IisManagement/SwicthPhysicalDirectory.ps1
PowerShell/IisManagement/SwicthPhysicalDirectory.ps1
<# .DESCRIPTION Swirch the physal director of an IIS Website. #> $WebAdministrationModule = 'WebAdministration' If ( ! (Get-module $WebAdministrationModule )) { Write-Host "Loading module $WebAdministrationModule" Import-Module $WebAdministrationModule }
<# .DESCRIPTION Switch the physical directory of an IIS Website. #> param ( $physicalPath = "S:\w3schools\Pairs" ) $WebAdministrationModule = 'WebAdministration' If ( ! (Get-module $WebAdministrationModule )) { Write-Host "Loading module $WebAdministrationModule" Import-Module $WebAdministrationModule } <# List all sites. #> Set-Location IIS: Get-ChildItem . $site = Get-ChildItem Sites | Where-Object { $_.Name -eq "Default Web Site" } Set-ItemProperty 'IIS:\Sites\Default Web Site\' -Name physicalPath -Value $physicalPath
Switch the physical directory of an IIS web site.
Switch the physical directory of an IIS web site.
PowerShell
agpl-3.0
JasonCozens/Ejc.Training
powershell
## Code Before: <# .DESCRIPTION Swirch the physal director of an IIS Website. #> $WebAdministrationModule = 'WebAdministration' If ( ! (Get-module $WebAdministrationModule )) { Write-Host "Loading module $WebAdministrationModule" Import-Module $WebAdministrationModule } ## Instruction: Switch the physical directory of an IIS web site. ## Code After: <# .DESCRIPTION Switch the physical directory of an IIS Website. #> param ( $physicalPath = "S:\w3schools\Pairs" ) $WebAdministrationModule = 'WebAdministration' If ( ! (Get-module $WebAdministrationModule )) { Write-Host "Loading module $WebAdministrationModule" Import-Module $WebAdministrationModule } <# List all sites. #> Set-Location IIS: Get-ChildItem . $site = Get-ChildItem Sites | Where-Object { $_.Name -eq "Default Web Site" } Set-ItemProperty 'IIS:\Sites\Default Web Site\' -Name physicalPath -Value $physicalPath
<# .DESCRIPTION - Swirch the physal director of an IIS Website. ? ^ + Switch the physical directory of an IIS Website. ? ^ ++ + #> + param ( + $physicalPath = "S:\w3schools\Pairs" + ) + $WebAdministrationModule = 'WebAdministration' If ( ! (Get-module $WebAdministrationModule )) { Write-Host "Loading module $WebAdministrationModule" Import-Module $WebAdministrationModule } + + <# + List all sites. + #> + Set-Location IIS: + + Get-ChildItem . + + $site = Get-ChildItem Sites | Where-Object { $_.Name -eq "Default Web Site" } + + Set-ItemProperty 'IIS:\Sites\Default Web Site\' -Name physicalPath -Value $physicalPath
17
1.7
16
1
533559e20e377ce042591709e53d7dc7031d6205
tests/test_directives.py
tests/test_directives.py
import hug def test_timer(): timer = hug.directives.timer() assert isinstance(timer.taken(), float) assert isinstance(timer.start, float) timer = hug.directives.timer('Time: {0}') assert isinstance(timer.taken(), str) assert isinstance(timer.start, float)
import sys import hug api = sys.modules[__name__] def test_timer(): timer = hug.directives.timer() assert isinstance(timer.taken(), float) assert isinstance(timer.start, float) timer = hug.directives.timer('Time: {0}') assert isinstance(timer.taken(), str) assert isinstance(timer.start, float) @hug.get() def timer_tester(timer): return timer.taken() assert isinstance(hug.test.get(api, 'timer_tester').data, float)
Add test for timer automatically inserted due to directive
Add test for timer automatically inserted due to directive
Python
mit
giserh/hug,STANAPO/hug,MuhammadAlkarouri/hug,janusnic/hug,MuhammadAlkarouri/hug,janusnic/hug,gbn972/hug,MuhammadAlkarouri/hug,STANAPO/hug,shaunstanislaus/hug,yasoob/hug,jean/hug,philiptzou/hug,philiptzou/hug,jean/hug,shaunstanislaus/hug,origingod/hug,giserh/hug,yasoob/hug,timothycrosley/hug,alisaifee/hug,timothycrosley/hug,alisaifee/hug,timothycrosley/hug,gbn972/hug,origingod/hug
python
## Code Before: import hug def test_timer(): timer = hug.directives.timer() assert isinstance(timer.taken(), float) assert isinstance(timer.start, float) timer = hug.directives.timer('Time: {0}') assert isinstance(timer.taken(), str) assert isinstance(timer.start, float) ## Instruction: Add test for timer automatically inserted due to directive ## Code After: import sys import hug api = sys.modules[__name__] def test_timer(): timer = hug.directives.timer() assert isinstance(timer.taken(), float) assert isinstance(timer.start, float) timer = hug.directives.timer('Time: {0}') assert isinstance(timer.taken(), str) assert isinstance(timer.start, float) @hug.get() def timer_tester(timer): return timer.taken() assert isinstance(hug.test.get(api, 'timer_tester').data, float)
+ import sys import hug + + api = sys.modules[__name__] def test_timer(): timer = hug.directives.timer() assert isinstance(timer.taken(), float) assert isinstance(timer.start, float) timer = hug.directives.timer('Time: {0}') assert isinstance(timer.taken(), str) assert isinstance(timer.start, float) + + @hug.get() + def timer_tester(timer): + return timer.taken() + + assert isinstance(hug.test.get(api, 'timer_tester').data, float)
9
0.818182
9
0
049455a20501d7799e9e526ed6e5e45b89468d95
.travis.yml
.travis.yml
sudo: required dist: trusty language: generic compiler: - gcc install: - export CI_ROS_DISTRO=indigo - echo $CI_ROS_DISTRO - sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu trusty main" > /etc/apt/sources.list.d/ros-latest.list' - wget http://packages.ros.org/ros.key -O - | sudo apt-key add - - sudo apt-get update - sudo apt-get install python-rosdep -y - sudo `which rosdep` init - rosdep update - rosdep install --default-yes --from-paths ./ --rosdistro $CI_ROS_DISTRO script: - source /opt/ros/$CI_ROS_DISTRO/setup.bash - mkdir build - cd build - cmake .. -DCMAKE_INSTALL_PREFIX=./install - make -j1 - make -j1 tests - make -j1 run_tests - catkin_test_results . - make -j1 install notifications: email: false
sudo: required dist: trusty language: generic compiler: - gcc install: - export CI_ROS_DISTRO=indigo - sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu trusty main" > /etc/apt/sources.list.d/ros-latest.list' - wget http://packages.ros.org/ros.key -O - | sudo apt-key add - - sudo apt-get update - sudo apt-get install python-rosdep -y - sudo `which rosdep` init - rosdep update - rosdep install --default-yes --from-paths ./ --rosdistro $CI_ROS_DISTRO script: - source /opt/ros/$CI_ROS_DISTRO/setup.bash - mkdir ../build && cd ../build - cmake $TRAVIS_BUILD_DIR -DCMAKE_INSTALL_PREFIX=../install - make -j1 - make -j1 tests - make -j1 run_tests - catkin_test_results . - make -j1 install notifications: email: false
Move build dir out of source dir to fix roslint.
Move build dir out of source dir to fix roslint.
YAML
bsd-3-clause
tonybaltovski-forks/teleop_twist_joy,tonybaltovski-forks/teleop_twist_joy
yaml
## Code Before: sudo: required dist: trusty language: generic compiler: - gcc install: - export CI_ROS_DISTRO=indigo - echo $CI_ROS_DISTRO - sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu trusty main" > /etc/apt/sources.list.d/ros-latest.list' - wget http://packages.ros.org/ros.key -O - | sudo apt-key add - - sudo apt-get update - sudo apt-get install python-rosdep -y - sudo `which rosdep` init - rosdep update - rosdep install --default-yes --from-paths ./ --rosdistro $CI_ROS_DISTRO script: - source /opt/ros/$CI_ROS_DISTRO/setup.bash - mkdir build - cd build - cmake .. -DCMAKE_INSTALL_PREFIX=./install - make -j1 - make -j1 tests - make -j1 run_tests - catkin_test_results . - make -j1 install notifications: email: false ## Instruction: Move build dir out of source dir to fix roslint. ## Code After: sudo: required dist: trusty language: generic compiler: - gcc install: - export CI_ROS_DISTRO=indigo - sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu trusty main" > /etc/apt/sources.list.d/ros-latest.list' - wget http://packages.ros.org/ros.key -O - | sudo apt-key add - - sudo apt-get update - sudo apt-get install python-rosdep -y - sudo `which rosdep` init - rosdep update - rosdep install --default-yes --from-paths ./ --rosdistro $CI_ROS_DISTRO script: - source /opt/ros/$CI_ROS_DISTRO/setup.bash - mkdir ../build && cd ../build - cmake $TRAVIS_BUILD_DIR -DCMAKE_INSTALL_PREFIX=../install - make -j1 - make -j1 tests - make -j1 run_tests - catkin_test_results . - make -j1 install notifications: email: false
sudo: required dist: trusty language: generic compiler: - gcc install: - export CI_ROS_DISTRO=indigo - - echo $CI_ROS_DISTRO - sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu trusty main" > /etc/apt/sources.list.d/ros-latest.list' - wget http://packages.ros.org/ros.key -O - | sudo apt-key add - - sudo apt-get update - sudo apt-get install python-rosdep -y - sudo `which rosdep` init - rosdep update - rosdep install --default-yes --from-paths ./ --rosdistro $CI_ROS_DISTRO script: - source /opt/ros/$CI_ROS_DISTRO/setup.bash + - mkdir ../build && cd ../build - - mkdir build - - cd build - - cmake .. -DCMAKE_INSTALL_PREFIX=./install ? ^^ + - cmake $TRAVIS_BUILD_DIR -DCMAKE_INSTALL_PREFIX=../install ? ^^^^^^^^^^^^^^^^^ + - make -j1 - make -j1 tests - make -j1 run_tests - catkin_test_results . - make -j1 install notifications: email: false
6
0.222222
2
4
76695aee5de66b4db45d7fc2c04d81f6b283c536
public/locales/sn/send.ftl
public/locales/sn/send.ftl
title = Firefox Send siteFeedback = Zvirikutaurwa importingFile = Kutora faira enableJavascript = Ndinokumbira mubvumidze JavaScript moedza zvekare # A short representation of a countdown timer containing the number of hours and minutes remaining as digits, example "13h 47m" expiresHoursMinutes = { $hours }maawa { $minutes }mineti # A short representation of a countdown timer containing the number of minutes remaining as digits, example "56m" expiresMinutes = { $minutes }mineti # A short status message shown when the user enters a long password maxPasswordLength = Pasiwedhi haipfuuri mavara:{ $length } # A short status message shown when there was an error setting the password passwordSetError = Pasiwedhi haina kuita ## Send version 2 strings
title = Firefox Send siteFeedback = Zvirikutaurwa importingFile = Kutora faira encryptingFile = Kuinikiriputa enableJavascript = Ndinokumbira mubvumidze JavaScript moedza zvekare # A short representation of a countdown timer containing the number of hours and minutes remaining as digits, example "13h 47m" expiresHoursMinutes = { $hours }maawa { $minutes }mineti # A short representation of a countdown timer containing the number of minutes remaining as digits, example "56m" expiresMinutes = { $minutes }mineti # A short status message shown when the user enters a long password maxPasswordLength = Pasiwedhi haipfuuri mavara:{ $length } # A short status message shown when there was an error setting the password passwordSetError = Pasiwedhi haina kuita ## Send version 2 strings
Update Shona (sn) localization of Firefox Send
Pontoon: Update Shona (sn) localization of Firefox Send Localization authors: - Anesu Chiodza <anesuchiodza@gmail.com>
FreeMarker
mpl-2.0
mozilla/send,mozilla/send,mozilla/send,mozilla/send,mozilla/send
freemarker
## Code Before: title = Firefox Send siteFeedback = Zvirikutaurwa importingFile = Kutora faira enableJavascript = Ndinokumbira mubvumidze JavaScript moedza zvekare # A short representation of a countdown timer containing the number of hours and minutes remaining as digits, example "13h 47m" expiresHoursMinutes = { $hours }maawa { $minutes }mineti # A short representation of a countdown timer containing the number of minutes remaining as digits, example "56m" expiresMinutes = { $minutes }mineti # A short status message shown when the user enters a long password maxPasswordLength = Pasiwedhi haipfuuri mavara:{ $length } # A short status message shown when there was an error setting the password passwordSetError = Pasiwedhi haina kuita ## Send version 2 strings ## Instruction: Pontoon: Update Shona (sn) localization of Firefox Send Localization authors: - Anesu Chiodza <anesuchiodza@gmail.com> ## Code After: title = Firefox Send siteFeedback = Zvirikutaurwa importingFile = Kutora faira encryptingFile = Kuinikiriputa enableJavascript = Ndinokumbira mubvumidze JavaScript moedza zvekare # A short representation of a countdown timer containing the number of hours and minutes remaining as digits, example "13h 47m" expiresHoursMinutes = { $hours }maawa { $minutes }mineti # A short representation of a countdown timer containing the number of minutes remaining as digits, example "56m" expiresMinutes = { $minutes }mineti # A short status message shown when the user enters a long password maxPasswordLength = Pasiwedhi haipfuuri mavara:{ $length } # A short status message shown when there was an error setting the password passwordSetError = Pasiwedhi haina kuita ## Send version 2 strings
title = Firefox Send siteFeedback = Zvirikutaurwa importingFile = Kutora faira + encryptingFile = Kuinikiriputa enableJavascript = Ndinokumbira mubvumidze JavaScript moedza zvekare # A short representation of a countdown timer containing the number of hours and minutes remaining as digits, example "13h 47m" expiresHoursMinutes = { $hours }maawa { $minutes }mineti # A short representation of a countdown timer containing the number of minutes remaining as digits, example "56m" expiresMinutes = { $minutes }mineti # A short status message shown when the user enters a long password maxPasswordLength = Pasiwedhi haipfuuri mavara:{ $length } # A short status message shown when there was an error setting the password passwordSetError = Pasiwedhi haina kuita ## Send version 2 strings
1
0.066667
1
0
121c1c3cb0edd037d37ec72f0c007331c003a833
navigation.yml
navigation.yml
- "company/all" - "tech" - "progress/2014" - "progress/2013" - "company/2014" - "company/2013"
- "company/all" - "company/2015" - "company/2014" - "company/2013" - "tech" - "progress/2014" - "progress/2013"
Add 2015 company board to nav
Add 2015 company board to nav It's all correct and checked
YAML
mit
theodi/dashboards,theodi/dashboards,theodi/dashboards
yaml
## Code Before: - "company/all" - "tech" - "progress/2014" - "progress/2013" - "company/2014" - "company/2013" ## Instruction: Add 2015 company board to nav It's all correct and checked ## Code After: - "company/all" - "company/2015" - "company/2014" - "company/2013" - "tech" - "progress/2014" - "progress/2013"
- "company/all" + - "company/2015" + - "company/2014" + - "company/2013" - "tech" - "progress/2014" - "progress/2013" - - "company/2014" - - "company/2013"
5
0.833333
3
2
d37f7a8680663a6b7320f2eb94b012f089b18941
README.md
README.md
sdn_nfv_business_plan ===================== Emerging SDN &amp; NFV business model. Example of a business plan.
Emerging SDN &amp; NFV business model. Example of a business plan. This is base on <a href="http://leanstack.com/">Lean Canvas</a> model.
Use different style of markdown
Use different style of markdown
Markdown
cc0-1.0
lvsl/sdn_nfv_business_plan
markdown
## Code Before: sdn_nfv_business_plan ===================== Emerging SDN &amp; NFV business model. Example of a business plan. ## Instruction: Use different style of markdown ## Code After: Emerging SDN &amp; NFV business model. Example of a business plan. This is base on <a href="http://leanstack.com/">Lean Canvas</a> model.
- sdn_nfv_business_plan - ===================== Emerging SDN &amp; NFV business model. Example of a business plan. + + This is base on <a href="http://leanstack.com/">Lean Canvas</a> model.
4
1
2
2
ababd9d8e6a4063f00bcdd4f8bb1042875f31ec4
.travis.yml
.travis.yml
language: c env: - EnableNuGetPackageRestore=true before_install: # add future ubuntu repo for mono 3.0 and fsharp - sudo add-apt-repository -y "deb http://archive.ubuntu.com/ubuntu/ trusty main universe" - sudo apt-get update -qq > /dev/null # Make sure mono is installed, # pipe stdout to dev/null because qq is still too chatty - sudo apt-get install -qq mono-complete > /dev/null - sudo apt-get install -qq fsharp > /dev/null - mozroots --import --sync script: - ./build.fsx
language: objective-c env: global: - EnableNuGetPackageRestore=true matrix: - MONO_VERSION="3.2.6" before_install: - wget "http://download.xamarin.com/MonoFrameworkMDK/Macx86/MonoFramework-MDK-${MONO_VERSION}.macos10.xamarin.x86.pkg" - sudo installer -pkg "MonoFramework-MDK-${MONO_VERSION}.macos10.xamarin.x86.pkg" -target / script: - ./build.fsx
Switch Travis to osx, trusty ubuntu unstable
Switch Travis to osx, trusty ubuntu unstable
YAML
apache-2.0
jbtule/ComposableExtensions,jbtule/FSharp.Interop.Compose,jbtule/ComposableExtensions,jbtule/FSharp.Interop.Compose,jbtule/FSharp.Interop.Compose
yaml
## Code Before: language: c env: - EnableNuGetPackageRestore=true before_install: # add future ubuntu repo for mono 3.0 and fsharp - sudo add-apt-repository -y "deb http://archive.ubuntu.com/ubuntu/ trusty main universe" - sudo apt-get update -qq > /dev/null # Make sure mono is installed, # pipe stdout to dev/null because qq is still too chatty - sudo apt-get install -qq mono-complete > /dev/null - sudo apt-get install -qq fsharp > /dev/null - mozroots --import --sync script: - ./build.fsx ## Instruction: Switch Travis to osx, trusty ubuntu unstable ## Code After: language: objective-c env: global: - EnableNuGetPackageRestore=true matrix: - MONO_VERSION="3.2.6" before_install: - wget "http://download.xamarin.com/MonoFrameworkMDK/Macx86/MonoFramework-MDK-${MONO_VERSION}.macos10.xamarin.x86.pkg" - sudo installer -pkg "MonoFramework-MDK-${MONO_VERSION}.macos10.xamarin.x86.pkg" -target / script: - ./build.fsx
- language: c + language: objective-c env: + global: - - EnableNuGetPackageRestore=true + - EnableNuGetPackageRestore=true ? + + matrix: + - MONO_VERSION="3.2.6" before_install: + - wget "http://download.xamarin.com/MonoFrameworkMDK/Macx86/MonoFramework-MDK-${MONO_VERSION}.macos10.xamarin.x86.pkg" + - sudo installer -pkg "MonoFramework-MDK-${MONO_VERSION}.macos10.xamarin.x86.pkg" -target / + - # add future ubuntu repo for mono 3.0 and fsharp - - sudo add-apt-repository -y "deb http://archive.ubuntu.com/ubuntu/ trusty main universe" - - sudo apt-get update -qq > /dev/null - # Make sure mono is installed, - # pipe stdout to dev/null because qq is still too chatty - - sudo apt-get install -qq mono-complete > /dev/null - - sudo apt-get install -qq fsharp > /dev/null - - mozroots --import --sync - script: - - ./build.fsx ? --- + - ./build.fsx
21
1.235294
9
12
9d0798904160f86d7f580dde3bfba8cc28b5a23f
troposphere/ram.py
troposphere/ram.py
from troposphere import Tags from . import AWSObject from .validators import boolean class ResourceShare(AWSObject): resource_type = "AWS::RAM::ResourceShare" props = { "AllowExternalPrincipals": (boolean, False), "Name": (str, True), "Principals": ([str], False), "ResourceArns": ([str], False), "Tags": (Tags, False), }
from troposphere import Tags from . import AWSObject from .validators import boolean class ResourceShare(AWSObject): resource_type = "AWS::RAM::ResourceShare" props = { "AllowExternalPrincipals": (boolean, False), "Name": (str, True), "PermissionArns": ([str], False), "Principals": ([str], False), "ResourceArns": ([str], False), "Tags": (Tags, False), }
Update RAM per 2021-06-10 changes
Update RAM per 2021-06-10 changes
Python
bsd-2-clause
cloudtools/troposphere,cloudtools/troposphere
python
## Code Before: from troposphere import Tags from . import AWSObject from .validators import boolean class ResourceShare(AWSObject): resource_type = "AWS::RAM::ResourceShare" props = { "AllowExternalPrincipals": (boolean, False), "Name": (str, True), "Principals": ([str], False), "ResourceArns": ([str], False), "Tags": (Tags, False), } ## Instruction: Update RAM per 2021-06-10 changes ## Code After: from troposphere import Tags from . import AWSObject from .validators import boolean class ResourceShare(AWSObject): resource_type = "AWS::RAM::ResourceShare" props = { "AllowExternalPrincipals": (boolean, False), "Name": (str, True), "PermissionArns": ([str], False), "Principals": ([str], False), "ResourceArns": ([str], False), "Tags": (Tags, False), }
+ from troposphere import Tags from . import AWSObject from .validators import boolean class ResourceShare(AWSObject): resource_type = "AWS::RAM::ResourceShare" props = { "AllowExternalPrincipals": (boolean, False), "Name": (str, True), + "PermissionArns": ([str], False), "Principals": ([str], False), "ResourceArns": ([str], False), "Tags": (Tags, False), }
2
0.117647
2
0
3fe15537bf6bbc52d0991fbfea349dfab2e257be
scripts/publish-site-starter.sh
scripts/publish-site-starter.sh
./gradlew -q currentVersion | awk '{ print $3 }' | tr -d '\n' > site-starter/templates/whistlepost-site/VERSION ./gradlew :site-starter:packageAllTemplates :site-starter:publishAllTemplates
./gradlew -q currentVersion | awk '{ print $3 }' | tr -d '\n' > site-starter/templates/whistlepost-site/VERSION ./gradlew :site-starter:wrapper :site-starter:packageAllTemplates :site-starter:publishAllTemplates
Include gradle wrapper in generated site
Include gradle wrapper in generated site
Shell
apache-2.0
micronode/whistlepost,micronode/whistlepost,micronode/whistlepost,micronode/whistlepost
shell
## Code Before: ./gradlew -q currentVersion | awk '{ print $3 }' | tr -d '\n' > site-starter/templates/whistlepost-site/VERSION ./gradlew :site-starter:packageAllTemplates :site-starter:publishAllTemplates ## Instruction: Include gradle wrapper in generated site ## Code After: ./gradlew -q currentVersion | awk '{ print $3 }' | tr -d '\n' > site-starter/templates/whistlepost-site/VERSION ./gradlew :site-starter:wrapper :site-starter:packageAllTemplates :site-starter:publishAllTemplates
./gradlew -q currentVersion | awk '{ print $3 }' | tr -d '\n' > site-starter/templates/whistlepost-site/VERSION - ./gradlew :site-starter:packageAllTemplates :site-starter:publishAllTemplates + ./gradlew :site-starter:wrapper :site-starter:packageAllTemplates :site-starter:publishAllTemplates ? ++++++++++++++++++++++
2
1
1
1
f049910d9154bd7ad7a8a31e5712d75f4ee75fa3
src/main/java/net/glowstone/scoreboard/GlowScore.java
src/main/java/net/glowstone/scoreboard/GlowScore.java
package net.glowstone.scoreboard; import lombok.Getter; import lombok.RequiredArgsConstructor; import lombok.Setter; import net.glowstone.net.message.play.scoreboard.ScoreboardScoreMessage; import org.bukkit.Bukkit; import org.bukkit.OfflinePlayer; import org.bukkit.scoreboard.Objective; import org.bukkit.scoreboard.Score; import org.bukkit.scoreboard.Scoreboard; /** * Implementation/data holder for Scores. */ @RequiredArgsConstructor public final class GlowScore implements Score { @Getter private final GlowObjective objective; @Getter private final String entry; private int score; @Getter @Setter private boolean locked; @Override public Scoreboard getScoreboard() { return objective.getScoreboard(); } @Override @Deprecated public OfflinePlayer getPlayer() { return Bukkit.getOfflinePlayer(entry); } @Override public int getScore() throws IllegalStateException { objective.checkValid(); return score; } /** * Sets this score's value. * @param score the new value * @throws IllegalStateException if the objective is not registered on a scoreboard */ @Override public void setScore(int score) throws IllegalStateException { objective.checkValid(); this.score = score; objective.getScoreboard() .broadcast(new ScoreboardScoreMessage(entry, objective.getName(), score)); } @Override public boolean isScoreSet() throws IllegalStateException { objective.checkValid(); return objective.getScoreboard().getScores(entry).contains(this); } }
package net.glowstone.scoreboard; import lombok.Getter; import lombok.RequiredArgsConstructor; import lombok.Setter; import net.glowstone.net.message.play.scoreboard.ScoreboardScoreMessage; import org.bukkit.Bukkit; import org.bukkit.OfflinePlayer; import org.bukkit.scoreboard.Objective; import org.bukkit.scoreboard.Score; import org.bukkit.scoreboard.Scoreboard; /** * Implementation/data holder for Scores. */ @RequiredArgsConstructor public final class GlowScore implements Score { @Getter private final GlowObjective objective; @Getter private final String entry; private int score; @Setter private boolean locked; @Override public Scoreboard getScoreboard() { return objective.getScoreboard(); } @Override @Deprecated public OfflinePlayer getPlayer() { return Bukkit.getOfflinePlayer(entry); } @Override public int getScore() throws IllegalStateException { objective.checkValid(); return score; } /** * Sets this score's value. * @param score the new value * @throws IllegalStateException if the objective is not registered on a scoreboard */ @Override public void setScore(int score) throws IllegalStateException { objective.checkValid(); this.score = score; objective.getScoreboard() .broadcast(new ScoreboardScoreMessage(entry, objective.getName(), score)); } @Override public boolean isScoreSet() throws IllegalStateException { objective.checkValid(); return objective.getScoreboard().getScores(entry).contains(this); } public boolean getLocked() { return locked; } }
Revert getLocked (Lombokified name was isLocked)
Revert getLocked (Lombokified name was isLocked)
Java
mit
GlowstonePlusPlus/GlowstonePlusPlus,GlowstonePlusPlus/GlowstonePlusPlus,GlowstoneMC/GlowstonePlusPlus,GlowstonePlusPlus/GlowstonePlusPlus,GlowstonePlusPlus/GlowstonePlusPlus,GlowstoneMC/GlowstonePlusPlus,GlowstoneMC/GlowstonePlusPlus,GlowstoneMC/GlowstonePlusPlus
java
## Code Before: package net.glowstone.scoreboard; import lombok.Getter; import lombok.RequiredArgsConstructor; import lombok.Setter; import net.glowstone.net.message.play.scoreboard.ScoreboardScoreMessage; import org.bukkit.Bukkit; import org.bukkit.OfflinePlayer; import org.bukkit.scoreboard.Objective; import org.bukkit.scoreboard.Score; import org.bukkit.scoreboard.Scoreboard; /** * Implementation/data holder for Scores. */ @RequiredArgsConstructor public final class GlowScore implements Score { @Getter private final GlowObjective objective; @Getter private final String entry; private int score; @Getter @Setter private boolean locked; @Override public Scoreboard getScoreboard() { return objective.getScoreboard(); } @Override @Deprecated public OfflinePlayer getPlayer() { return Bukkit.getOfflinePlayer(entry); } @Override public int getScore() throws IllegalStateException { objective.checkValid(); return score; } /** * Sets this score's value. * @param score the new value * @throws IllegalStateException if the objective is not registered on a scoreboard */ @Override public void setScore(int score) throws IllegalStateException { objective.checkValid(); this.score = score; objective.getScoreboard() .broadcast(new ScoreboardScoreMessage(entry, objective.getName(), score)); } @Override public boolean isScoreSet() throws IllegalStateException { objective.checkValid(); return objective.getScoreboard().getScores(entry).contains(this); } } ## Instruction: Revert getLocked (Lombokified name was isLocked) ## Code After: package net.glowstone.scoreboard; import lombok.Getter; import lombok.RequiredArgsConstructor; import lombok.Setter; import net.glowstone.net.message.play.scoreboard.ScoreboardScoreMessage; import org.bukkit.Bukkit; import org.bukkit.OfflinePlayer; import org.bukkit.scoreboard.Objective; import org.bukkit.scoreboard.Score; import org.bukkit.scoreboard.Scoreboard; /** * Implementation/data holder for Scores. */ @RequiredArgsConstructor public final class GlowScore implements Score { @Getter private final GlowObjective objective; @Getter private final String entry; private int score; @Setter private boolean locked; @Override public Scoreboard getScoreboard() { return objective.getScoreboard(); } @Override @Deprecated public OfflinePlayer getPlayer() { return Bukkit.getOfflinePlayer(entry); } @Override public int getScore() throws IllegalStateException { objective.checkValid(); return score; } /** * Sets this score's value. * @param score the new value * @throws IllegalStateException if the objective is not registered on a scoreboard */ @Override public void setScore(int score) throws IllegalStateException { objective.checkValid(); this.score = score; objective.getScoreboard() .broadcast(new ScoreboardScoreMessage(entry, objective.getName(), score)); } @Override public boolean isScoreSet() throws IllegalStateException { objective.checkValid(); return objective.getScoreboard().getScores(entry).contains(this); } public boolean getLocked() { return locked; } }
package net.glowstone.scoreboard; import lombok.Getter; import lombok.RequiredArgsConstructor; import lombok.Setter; import net.glowstone.net.message.play.scoreboard.ScoreboardScoreMessage; import org.bukkit.Bukkit; import org.bukkit.OfflinePlayer; import org.bukkit.scoreboard.Objective; import org.bukkit.scoreboard.Score; import org.bukkit.scoreboard.Scoreboard; /** * Implementation/data holder for Scores. */ @RequiredArgsConstructor public final class GlowScore implements Score { @Getter private final GlowObjective objective; @Getter private final String entry; private int score; - @Getter @Setter private boolean locked; @Override public Scoreboard getScoreboard() { return objective.getScoreboard(); } @Override @Deprecated public OfflinePlayer getPlayer() { return Bukkit.getOfflinePlayer(entry); } @Override public int getScore() throws IllegalStateException { objective.checkValid(); return score; } /** * Sets this score's value. * @param score the new value * @throws IllegalStateException if the objective is not registered on a scoreboard */ @Override public void setScore(int score) throws IllegalStateException { objective.checkValid(); this.score = score; objective.getScoreboard() .broadcast(new ScoreboardScoreMessage(entry, objective.getName(), score)); } @Override public boolean isScoreSet() throws IllegalStateException { objective.checkValid(); return objective.getScoreboard().getScores(entry).contains(this); } + + public boolean getLocked() { + return locked; + } }
5
0.079365
4
1
151e666dab10269ffdb21fcffa6cccd501a790a6
.bumpversion.cfg
.bumpversion.cfg
[bumpversion] name = Rx project = RxPY current_version = 3.0.0-beta2 description = Reactive Extensions (Rx) for Python author = Dag Brattli author_email = dag@brattli.net copyright = Copyright 2013-2019, Dag Brattli, Microsoft Corp., and Contributors license = MIT License url = http://reactivex.io download_url = https://github.com/ReactiveX/RxPY files = rx/__init__.py parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(-?)(?P<release>.*) serialize = {major}.{minor}.{patch}-{release} {major}.{minor}.{patch} [bumpversion:part:release] optional_value = gamma values = alpha beta1 beta2 gamma
[bumpversion] name = Rx project = RxPY current_version = 3.0.0-beta2 description = Reactive Extensions (Rx) for Python author = Dag Brattli author_email = dag@brattli.net copyright = Copyright 2013-2019, Dag Brattli, Microsoft Corp., and Contributors license = MIT License url = http://reactivex.io download_url = https://github.com/ReactiveX/RxPY files = rx/__init__.py parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(-?)(?P<release>.*) serialize = {major}.{minor}.{patch}-{release} {major}.{minor}.{patch} [bumpversion:part:release] optional_value = beta3 values = alpha beta1 beta2 beta3
Use beta3 instad of gamma
Use beta3 instad of gamma
INI
mit
ReactiveX/RxPY,ReactiveX/RxPY
ini
## Code Before: [bumpversion] name = Rx project = RxPY current_version = 3.0.0-beta2 description = Reactive Extensions (Rx) for Python author = Dag Brattli author_email = dag@brattli.net copyright = Copyright 2013-2019, Dag Brattli, Microsoft Corp., and Contributors license = MIT License url = http://reactivex.io download_url = https://github.com/ReactiveX/RxPY files = rx/__init__.py parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(-?)(?P<release>.*) serialize = {major}.{minor}.{patch}-{release} {major}.{minor}.{patch} [bumpversion:part:release] optional_value = gamma values = alpha beta1 beta2 gamma ## Instruction: Use beta3 instad of gamma ## Code After: [bumpversion] name = Rx project = RxPY current_version = 3.0.0-beta2 description = Reactive Extensions (Rx) for Python author = Dag Brattli author_email = dag@brattli.net copyright = Copyright 2013-2019, Dag Brattli, Microsoft Corp., and Contributors license = MIT License url = http://reactivex.io download_url = https://github.com/ReactiveX/RxPY files = rx/__init__.py parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(-?)(?P<release>.*) serialize = {major}.{minor}.{patch}-{release} {major}.{minor}.{patch} [bumpversion:part:release] optional_value = beta3 values = alpha beta1 beta2 beta3
[bumpversion] name = Rx project = RxPY current_version = 3.0.0-beta2 description = Reactive Extensions (Rx) for Python author = Dag Brattli author_email = dag@brattli.net copyright = Copyright 2013-2019, Dag Brattli, Microsoft Corp., and Contributors license = MIT License url = http://reactivex.io download_url = https://github.com/ReactiveX/RxPY files = rx/__init__.py parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(-?)(?P<release>.*) - serialize = ? - + serialize = {major}.{minor}.{patch}-{release} {major}.{minor}.{patch} [bumpversion:part:release] - optional_value = gamma ? ^ ^^^ + optional_value = beta3 ? ^^^ ^ - values = ? - + values = alpha beta1 beta2 - gamma + beta3
8
0.32
4
4
cfabd5d5920011863504fece4081f6fc6eb68cf9
model/src/main/java/org/jboss/pnc/model/BuildStatus.java
model/src/main/java/org/jboss/pnc/model/BuildStatus.java
/** * JBoss, Home of Professional Open Source. * Copyright 2014 Red Hat, Inc., and individual contributors * as indicated by the @author tags. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.jboss.pnc.model; /** * Statuses of build process. * * @author Jakub Bartecek &lt;jbartece@redhat.com&gt; * */ public enum BuildStatus { SUCCESS, FAILED, UNSTABLE, BUILDING, REJECTED, CANCELLED, SYSTEM_ERROR, UNKNOWN }
/** * JBoss, Home of Professional Open Source. * Copyright 2014 Red Hat, Inc., and individual contributors * as indicated by the @author tags. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.jboss.pnc.model; /** * Status of a running or completed build. * * @author Jakub Bartecek &lt;jbartece@redhat.com&gt; * */ public enum BuildStatus { /** * Build completed successfully */ SUCCESS, /** * Build failed */ FAILED, /** * Build completed with test failures */ UNSTABLE, /** * Build currently running */ BUILDING, /** * Build rejected due to conflict with another build, or failed dependency build */ REJECTED, /** * User cancelled the build */ CANCELLED, /** * A system error prevented the build from completing */ SYSTEM_ERROR, /** * It is not known what the build status is at this time */ UNKNOWN }
Add comments describing the build status enum
Add comments describing the build status enum
Java
apache-2.0
jbartece/pnc,ruhan1/pnc,dans123456/pnc,ruhan1/pnc,alexcreasy/pnc,thauser/pnc,jdcasey/pnc,matedo1/pnc,matejonnet/pnc,matedo1/pnc,project-ncl/pnc,thauser/pnc,jbartece/pnc,jsenko/pnc,jdcasey/pnc,jbartece/pnc,jsenko/pnc,alexcreasy/pnc,thauser/pnc,pkocandr/pnc,thescouser89/pnc,dans123456/pnc,jsenko/pnc,matedo1/pnc,ruhan1/pnc,alexcreasy/pnc,rnc/pnc,jdcasey/pnc,dans123456/pnc
java
## Code Before: /** * JBoss, Home of Professional Open Source. * Copyright 2014 Red Hat, Inc., and individual contributors * as indicated by the @author tags. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.jboss.pnc.model; /** * Statuses of build process. * * @author Jakub Bartecek &lt;jbartece@redhat.com&gt; * */ public enum BuildStatus { SUCCESS, FAILED, UNSTABLE, BUILDING, REJECTED, CANCELLED, SYSTEM_ERROR, UNKNOWN } ## Instruction: Add comments describing the build status enum ## Code After: /** * JBoss, Home of Professional Open Source. * Copyright 2014 Red Hat, Inc., and individual contributors * as indicated by the @author tags. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.jboss.pnc.model; /** * Status of a running or completed build. * * @author Jakub Bartecek &lt;jbartece@redhat.com&gt; * */ public enum BuildStatus { /** * Build completed successfully */ SUCCESS, /** * Build failed */ FAILED, /** * Build completed with test failures */ UNSTABLE, /** * Build currently running */ BUILDING, /** * Build rejected due to conflict with another build, or failed dependency build */ REJECTED, /** * User cancelled the build */ CANCELLED, /** * A system error prevented the build from completing */ SYSTEM_ERROR, /** * It is not known what the build status is at this time */ UNKNOWN }
/** * JBoss, Home of Professional Open Source. * Copyright 2014 Red Hat, Inc., and individual contributors * as indicated by the @author tags. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.jboss.pnc.model; /** - * Statuses of build process. + * Status of a running or completed build. * * @author Jakub Bartecek &lt;jbartece@redhat.com&gt; * */ public enum BuildStatus { - SUCCESS, FAILED, UNSTABLE, BUILDING, REJECTED, CANCELLED, SYSTEM_ERROR, UNKNOWN + /** + * Build completed successfully + */ + SUCCESS, + + /** + * Build failed + */ + FAILED, + + /** + * Build completed with test failures + */ + UNSTABLE, + + /** + * Build currently running + */ + BUILDING, + + /** + * Build rejected due to conflict with another build, or failed dependency build + */ + REJECTED, + + /** + * User cancelled the build + */ + CANCELLED, + + /** + * A system error prevented the build from completing + */ + SYSTEM_ERROR, + + /** + * It is not known what the build status is at this time + */ + UNKNOWN }
42
1.5
40
2
891e85d0f675baa9d1c2e4cbe91d36d51b9b7dc8
config/database.yml
config/database.yml
development: adapter: mysql2 database: racing_on_rails_development_3 username: ror_development host: localhost encoding: utf8 acceptance: adapter: mysql2 database: racing_on_rails_test_3 username: ror_test host: localhost encoding: utf8 test: adapter: mysql2 database: racing_on_rails_test_3 username: ror_test host: localhost encoding: utf8 production: adapter: mysql2 database: racing_on_rails_production_3 username: root encoding: utf8 host: localhost
development: adapter: mysql2 database: racing_on_rails_development_3 username: ror_development host: localhost encoding: utf8 reconnect: false pool: 5 acceptance: adapter: mysql2 database: racing_on_rails_test_3 username: ror_test host: localhost encoding: utf8 reconnect: false pool: 5 test: adapter: mysql2 database: racing_on_rails_test_3 username: ror_test host: localhost encoding: utf8 reconnect: false pool: 5 production: adapter: mysql2 database: racing_on_rails_production_3 username: root encoding: utf8 host: localhost reconnect: false pool: 5
Add default DB options to try and fix some test errors
Add default DB options to try and fix some test errors
YAML
mit
scottwillson/racing_on_rails,scottwillson/racing_on_rails,scottwillson/racing_on_rails,scottwillson/racing_on_rails
yaml
## Code Before: development: adapter: mysql2 database: racing_on_rails_development_3 username: ror_development host: localhost encoding: utf8 acceptance: adapter: mysql2 database: racing_on_rails_test_3 username: ror_test host: localhost encoding: utf8 test: adapter: mysql2 database: racing_on_rails_test_3 username: ror_test host: localhost encoding: utf8 production: adapter: mysql2 database: racing_on_rails_production_3 username: root encoding: utf8 host: localhost ## Instruction: Add default DB options to try and fix some test errors ## Code After: development: adapter: mysql2 database: racing_on_rails_development_3 username: ror_development host: localhost encoding: utf8 reconnect: false pool: 5 acceptance: adapter: mysql2 database: racing_on_rails_test_3 username: ror_test host: localhost encoding: utf8 reconnect: false pool: 5 test: adapter: mysql2 database: racing_on_rails_test_3 username: ror_test host: localhost encoding: utf8 reconnect: false pool: 5 production: adapter: mysql2 database: racing_on_rails_production_3 username: root encoding: utf8 host: localhost reconnect: false pool: 5
development: adapter: mysql2 database: racing_on_rails_development_3 username: ror_development host: localhost encoding: utf8 + reconnect: false + pool: 5 acceptance: adapter: mysql2 database: racing_on_rails_test_3 username: ror_test host: localhost encoding: utf8 + reconnect: false + pool: 5 test: adapter: mysql2 database: racing_on_rails_test_3 username: ror_test host: localhost encoding: utf8 + reconnect: false + pool: 5 production: adapter: mysql2 database: racing_on_rails_production_3 username: root encoding: utf8 host: localhost + reconnect: false + pool: 5
8
0.296296
8
0
fb2187aa75b7b14853ad071145ac608a6aecdcef
src/Beautifier.hs
src/Beautifier.hs
module Beautifier(beautify) where import Datatypes beautify :: Program -> Program beautify (Program statements) = Program (map beautifyStatement statements) beautifyStatement :: Statement -> Statement beautifyStatement statement@(AssignmentStatement (Assignment lefthand assignmentOperator oldExpression)) = let expression = beautifyExpression oldExpression in case assignmentOperator of AssignmentStraightUp -> statement AssignmentBinaryOp binaryOperation -> -- Handle all other operators AssignmentStatement (Assignment lefthand AssignmentStraightUp (BinaryExpression binaryOperation (ExpressionItem lefthand) expression)) beautifyStatement other = other beautifyExpression :: Expression -> Expression beautifyExpression (IsInList lefthand [expression]) = (BinaryExpression EqualTo lefthand expression) beautifyExpression (IsInList lefthand (expression:expressions)) = BinaryExpression Or (beautifyExpression (IsInList lefthand expressions)) (BinaryExpression EqualTo lefthand expression) -- Ensure recursion over nested expressions beautifyExpression (BinaryExpression op e1 e2) = BinaryExpression op (beautifyExpression e1) (beautifyExpression e2) beautifyExpression (TernaryExpression e1 e2 e3) = TernaryExpression (beautifyExpression e1) (beautifyExpression e2) (beautifyExpression e3) beautifyExpression others = others
module Beautifier(beautify) where import Datatypes beautify :: Program -> Program beautify (Program statements) = Program (map beautifyStatement statements) beautifyStatement :: Statement -> Statement beautifyStatement (AssignmentStatement (Assignment lefthand assignmentOperator oldExpression)) = case assignmentOperator of AssignmentStraightUp -> AssignmentStatement (Assignment lefthand assignmentOperator expression) AssignmentBinaryOp binaryOperation -> -- Handle all other operators AssignmentStatement (Assignment lefthand AssignmentStraightUp (BinaryExpression binaryOperation (ExpressionItem lefthand) expression)) where expression = beautifyExpression oldExpression beautifyStatement other = other beautifyExpression :: Expression -> Expression beautifyExpression (IsInList lefthand [expression]) = (BinaryExpression EqualTo lefthand (beautifyExpression expression)) beautifyExpression (IsInList lefthand (expression:expressions)) = BinaryExpression Or (beautifyExpression (IsInList lefthand expressions)) (BinaryExpression EqualTo lefthand (beautifyExpression expression)) -- Ensure recursion over nested expressions beautifyExpression (BinaryExpression op e1 e2) = BinaryExpression op (beautifyExpression e1) (beautifyExpression e2) beautifyExpression (TernaryExpression e1 e2 e3) = TernaryExpression (beautifyExpression e1) (beautifyExpression e2) (beautifyExpression e3) beautifyExpression others = others
Handle nested "In", revert beautifyStatement method
Handle nested "In", revert beautifyStatement method
Haskell
mit
aleksanb/hdc
haskell
## Code Before: module Beautifier(beautify) where import Datatypes beautify :: Program -> Program beautify (Program statements) = Program (map beautifyStatement statements) beautifyStatement :: Statement -> Statement beautifyStatement statement@(AssignmentStatement (Assignment lefthand assignmentOperator oldExpression)) = let expression = beautifyExpression oldExpression in case assignmentOperator of AssignmentStraightUp -> statement AssignmentBinaryOp binaryOperation -> -- Handle all other operators AssignmentStatement (Assignment lefthand AssignmentStraightUp (BinaryExpression binaryOperation (ExpressionItem lefthand) expression)) beautifyStatement other = other beautifyExpression :: Expression -> Expression beautifyExpression (IsInList lefthand [expression]) = (BinaryExpression EqualTo lefthand expression) beautifyExpression (IsInList lefthand (expression:expressions)) = BinaryExpression Or (beautifyExpression (IsInList lefthand expressions)) (BinaryExpression EqualTo lefthand expression) -- Ensure recursion over nested expressions beautifyExpression (BinaryExpression op e1 e2) = BinaryExpression op (beautifyExpression e1) (beautifyExpression e2) beautifyExpression (TernaryExpression e1 e2 e3) = TernaryExpression (beautifyExpression e1) (beautifyExpression e2) (beautifyExpression e3) beautifyExpression others = others ## Instruction: Handle nested "In", revert beautifyStatement method ## Code After: module Beautifier(beautify) where import Datatypes beautify :: Program -> Program beautify (Program statements) = Program (map beautifyStatement statements) beautifyStatement :: Statement -> Statement beautifyStatement (AssignmentStatement (Assignment lefthand assignmentOperator oldExpression)) = case assignmentOperator of AssignmentStraightUp -> AssignmentStatement (Assignment lefthand assignmentOperator expression) AssignmentBinaryOp binaryOperation -> -- Handle all other operators AssignmentStatement (Assignment lefthand AssignmentStraightUp (BinaryExpression binaryOperation (ExpressionItem lefthand) expression)) where expression = beautifyExpression oldExpression beautifyStatement other = other beautifyExpression :: Expression -> Expression beautifyExpression (IsInList lefthand [expression]) = (BinaryExpression EqualTo lefthand (beautifyExpression expression)) beautifyExpression (IsInList lefthand (expression:expressions)) = BinaryExpression Or (beautifyExpression (IsInList lefthand expressions)) (BinaryExpression EqualTo lefthand (beautifyExpression expression)) -- Ensure recursion over nested expressions beautifyExpression (BinaryExpression op e1 e2) = BinaryExpression op (beautifyExpression e1) (beautifyExpression e2) beautifyExpression (TernaryExpression e1 e2 e3) = TernaryExpression (beautifyExpression e1) (beautifyExpression e2) (beautifyExpression e3) beautifyExpression others = others
module Beautifier(beautify) where import Datatypes beautify :: Program -> Program beautify (Program statements) = Program (map beautifyStatement statements) beautifyStatement :: Statement -> Statement - beautifyStatement statement@(AssignmentStatement (Assignment lefthand assignmentOperator oldExpression)) = ? ---------- + beautifyStatement (AssignmentStatement (Assignment lefthand assignmentOperator oldExpression)) = - let expression = beautifyExpression oldExpression in case assignmentOperator of AssignmentStraightUp -> - statement + AssignmentStatement ? + +++++++++ + (Assignment + lefthand + assignmentOperator + expression) AssignmentBinaryOp binaryOperation -> -- Handle all other operators AssignmentStatement (Assignment lefthand AssignmentStraightUp (BinaryExpression binaryOperation (ExpressionItem lefthand) expression)) + where expression = beautifyExpression oldExpression beautifyStatement other = other beautifyExpression :: Expression -> Expression beautifyExpression (IsInList lefthand [expression]) = (BinaryExpression EqualTo lefthand - expression) + (beautifyExpression expression)) beautifyExpression (IsInList lefthand (expression:expressions)) = BinaryExpression Or (beautifyExpression (IsInList lefthand expressions)) (BinaryExpression EqualTo lefthand - expression) + (beautifyExpression expression)) -- Ensure recursion over nested expressions beautifyExpression (BinaryExpression op e1 e2) = BinaryExpression op (beautifyExpression e1) (beautifyExpression e2) beautifyExpression (TernaryExpression e1 e2 e3) = TernaryExpression (beautifyExpression e1) (beautifyExpression e2) (beautifyExpression e3) beautifyExpression others = others
14
0.233333
9
5
23fec0d220ef87027657cc9009797028f29b8df3
everify.sh
everify.sh
USERNAME='your_envato_username' APIKEY='your_envato_api_key' # read variable from the stdin if needed, first argument is used if not empty if [ -z "$1" ] then read -p 'Enter purchase code: ' purchase_code else purchase_code="$1" fi # main part, here we get the response from the Envato APIs using curl library response=`curl --user-agent 'everify.sh by ProteusThemes' -s http://marketplace.envato.com/api/edge/$USERNAME/$APIKEY/verify-purchase:$purchase_code.json` # pipelining to the python tool is just to prettify the output. You can remove the pipeline | and # everything after it if you don't need the prettyfied format echo $response | python -mjson.tool exit 0
USERNAME0='your_envato_username' APIKEY0='your_envato_api_key' # USERNAME1='your_second_envato_username' # APIKEY1='your_second_envato_api_key' # read variable from the stdin if needed, first argument is used if not empty if [ -z "$1" ] then read -p 'Enter purchase code: ' purchase_code else purchase_code="$1" fi # allow checking in multiple accounts if [[ -z "$2" ]]; then ACCNO=0 else ACCNO=$2 fi # prepare variables USERNAME="USERNAME$ACCNO" APIKEY="APIKEY$ACCNO" # main part, here we get the response from the Envato APIs using curl library response=`curl --user-agent 'everify.sh by ProteusThemes' -s http://marketplace.envato.com/api/edge/${!USERNAME}/${!APIKEY}/verify-purchase:$purchase_code.json` # pipelining to the python tool is just to prettify the output. You can remove the pipeline | and # everything after it if you don't need the prettyfied format echo $response | python -mjson.tool exit 0
Add support for multiple Envato accounts
Add support for multiple Envato accounts The second positional argument is the account number you want to choose. By default it's the first one but you can now add any number of accounts to this script.
Shell
mit
primozcigler/everify.sh
shell
## Code Before: USERNAME='your_envato_username' APIKEY='your_envato_api_key' # read variable from the stdin if needed, first argument is used if not empty if [ -z "$1" ] then read -p 'Enter purchase code: ' purchase_code else purchase_code="$1" fi # main part, here we get the response from the Envato APIs using curl library response=`curl --user-agent 'everify.sh by ProteusThemes' -s http://marketplace.envato.com/api/edge/$USERNAME/$APIKEY/verify-purchase:$purchase_code.json` # pipelining to the python tool is just to prettify the output. You can remove the pipeline | and # everything after it if you don't need the prettyfied format echo $response | python -mjson.tool exit 0 ## Instruction: Add support for multiple Envato accounts The second positional argument is the account number you want to choose. By default it's the first one but you can now add any number of accounts to this script. ## Code After: USERNAME0='your_envato_username' APIKEY0='your_envato_api_key' # USERNAME1='your_second_envato_username' # APIKEY1='your_second_envato_api_key' # read variable from the stdin if needed, first argument is used if not empty if [ -z "$1" ] then read -p 'Enter purchase code: ' purchase_code else purchase_code="$1" fi # allow checking in multiple accounts if [[ -z "$2" ]]; then ACCNO=0 else ACCNO=$2 fi # prepare variables USERNAME="USERNAME$ACCNO" APIKEY="APIKEY$ACCNO" # main part, here we get the response from the Envato APIs using curl library response=`curl --user-agent 'everify.sh by ProteusThemes' -s http://marketplace.envato.com/api/edge/${!USERNAME}/${!APIKEY}/verify-purchase:$purchase_code.json` # pipelining to the python tool is just to prettify the output. You can remove the pipeline | and # everything after it if you don't need the prettyfied format echo $response | python -mjson.tool exit 0
- USERNAME='your_envato_username' + USERNAME0='your_envato_username' ? + - APIKEY='your_envato_api_key' + APIKEY0='your_envato_api_key' ? + + # USERNAME1='your_second_envato_username' + # APIKEY1='your_second_envato_api_key' # read variable from the stdin if needed, first argument is used if not empty if [ -z "$1" ] then read -p 'Enter purchase code: ' purchase_code else purchase_code="$1" fi + # allow checking in multiple accounts + if [[ -z "$2" ]]; then + ACCNO=0 + else + ACCNO=$2 + fi + + # prepare variables + USERNAME="USERNAME$ACCNO" + APIKEY="APIKEY$ACCNO" + # main part, here we get the response from the Envato APIs using curl library - response=`curl --user-agent 'everify.sh by ProteusThemes' -s http://marketplace.envato.com/api/edge/$USERNAME/$APIKEY/verify-purchase:$purchase_code.json` + response=`curl --user-agent 'everify.sh by ProteusThemes' -s http://marketplace.envato.com/api/edge/${!USERNAME}/${!APIKEY}/verify-purchase:$purchase_code.json` ? ++ + ++ + # pipelining to the python tool is just to prettify the output. You can remove the pipeline | and # everything after it if you don't need the prettyfied format echo $response | python -mjson.tool exit 0
19
0.95
16
3
6a82d28fc88a472edb44601e30185dfccc1913a9
app/controllers/application_controller.rb
app/controllers/application_controller.rb
class ApplicationController < ActionController::Base protect_from_forgery before_action :set_locale def authenticate_admin! return if current_profile && current_profile.admin? redirect_to profiles_url, notice: I18n.t('flash.profiles.no_permission') end def after_sign_in_path_for(resource) profile_url(resource) || root_path end def render_footer? false end helper_method(:render_footer?) private def build_missing_translations(object) I18n.available_locales.each do |locale| object.translations.build(locale: locale) unless object.translated_locales.include?(locale) end end def set_locale desired_locale = request.headers['HTTP_ACCEPT_LANGUAGE'].to_s[0..1] == 'de' ? 'de' : 'en' I18n.locale = params[:locale] || desired_locale end def default_url_options options = super options.update(locale: I18n.locale) options end end
class ApplicationController < ActionController::Base protect_from_forgery rescue_from ActionController::RoutingError, with: :not_found before_action :set_locale def authenticate_admin! return if current_profile && current_profile.admin? redirect_to profiles_url, notice: I18n.t('flash.profiles.no_permission') end def after_sign_in_path_for(resource) profile_url(resource) || root_path end def render_footer? false end helper_method(:render_footer?) private def build_missing_translations(object) I18n.available_locales.each do |locale| object.translations.build(locale: locale) unless object.translated_locales.include?(locale) end end def set_locale desired_locale = request.headers['HTTP_ACCEPT_LANGUAGE'].to_s[0..1] == 'de' ? 'de' : 'en' I18n.locale = params[:locale] || desired_locale end def default_url_options options = super options.update(locale: I18n.locale) options end def not_found render plain: "404 Not Found", status: 404 end end
Add a 404 not found error message so the logs are more clean
Add a 404 not found error message so the logs are more clean
Ruby
mit
1000miles/speakerinnen_liste,1000miles/speakerinnen_liste,1000miles/speakerinnen_liste,rubymonsters/speakerinnen_liste,rubymonsters/speakerinnen_liste,rubymonsters/speakerinnen_liste
ruby
## Code Before: class ApplicationController < ActionController::Base protect_from_forgery before_action :set_locale def authenticate_admin! return if current_profile && current_profile.admin? redirect_to profiles_url, notice: I18n.t('flash.profiles.no_permission') end def after_sign_in_path_for(resource) profile_url(resource) || root_path end def render_footer? false end helper_method(:render_footer?) private def build_missing_translations(object) I18n.available_locales.each do |locale| object.translations.build(locale: locale) unless object.translated_locales.include?(locale) end end def set_locale desired_locale = request.headers['HTTP_ACCEPT_LANGUAGE'].to_s[0..1] == 'de' ? 'de' : 'en' I18n.locale = params[:locale] || desired_locale end def default_url_options options = super options.update(locale: I18n.locale) options end end ## Instruction: Add a 404 not found error message so the logs are more clean ## Code After: class ApplicationController < ActionController::Base protect_from_forgery rescue_from ActionController::RoutingError, with: :not_found before_action :set_locale def authenticate_admin! return if current_profile && current_profile.admin? redirect_to profiles_url, notice: I18n.t('flash.profiles.no_permission') end def after_sign_in_path_for(resource) profile_url(resource) || root_path end def render_footer? false end helper_method(:render_footer?) private def build_missing_translations(object) I18n.available_locales.each do |locale| object.translations.build(locale: locale) unless object.translated_locales.include?(locale) end end def set_locale desired_locale = request.headers['HTTP_ACCEPT_LANGUAGE'].to_s[0..1] == 'de' ? 'de' : 'en' I18n.locale = params[:locale] || desired_locale end def default_url_options options = super options.update(locale: I18n.locale) options end def not_found render plain: "404 Not Found", status: 404 end end
class ApplicationController < ActionController::Base protect_from_forgery + rescue_from ActionController::RoutingError, with: :not_found before_action :set_locale def authenticate_admin! return if current_profile && current_profile.admin? redirect_to profiles_url, notice: I18n.t('flash.profiles.no_permission') end def after_sign_in_path_for(resource) profile_url(resource) || root_path end def render_footer? false end helper_method(:render_footer?) private def build_missing_translations(object) I18n.available_locales.each do |locale| object.translations.build(locale: locale) unless object.translated_locales.include?(locale) end end def set_locale desired_locale = request.headers['HTTP_ACCEPT_LANGUAGE'].to_s[0..1] == 'de' ? 'de' : 'en' I18n.locale = params[:locale] || desired_locale end def default_url_options options = super options.update(locale: I18n.locale) options end + + def not_found + render plain: "404 Not Found", status: 404 + end end
5
0.125
5
0
071f8a407e86e3bb95b5497fe99f12d7cced4396
install.sh
install.sh
add-apt-repository -y ppa:fkrull/deadsnakes apt-get update apt-get install -y libxml2 libxml2-dev libxslt1.1 libxslt1-dev libffi-dev libssl-dev libpq-dev #!/bin/bash for file in /u12pytpls/version/*; do $file done
add-apt-repository -y ppa:fkrull/deadsnakes apt-get update apt-get install -y libxml2 libxml2-dev libxslt1.1 libxslt1-dev libffi-dev libssl-dev libpq-dev libmysqlclient-dev #!/bin/bash for file in /u12pytpls/version/*; do $file done
Add libmysqlclient-dev to get mysql_config
Add libmysqlclient-dev to get mysql_config
Shell
mit
balavignesh-s/u12pytpls,dry-dock/u12pytpls
shell
## Code Before: add-apt-repository -y ppa:fkrull/deadsnakes apt-get update apt-get install -y libxml2 libxml2-dev libxslt1.1 libxslt1-dev libffi-dev libssl-dev libpq-dev #!/bin/bash for file in /u12pytpls/version/*; do $file done ## Instruction: Add libmysqlclient-dev to get mysql_config ## Code After: add-apt-repository -y ppa:fkrull/deadsnakes apt-get update apt-get install -y libxml2 libxml2-dev libxslt1.1 libxslt1-dev libffi-dev libssl-dev libpq-dev libmysqlclient-dev #!/bin/bash for file in /u12pytpls/version/*; do $file done
add-apt-repository -y ppa:fkrull/deadsnakes apt-get update - apt-get install -y libxml2 libxml2-dev libxslt1.1 libxslt1-dev libffi-dev libssl-dev libpq-dev + apt-get install -y libxml2 libxml2-dev libxslt1.1 libxslt1-dev libffi-dev libssl-dev libpq-dev libmysqlclient-dev ? +++++++++++++++++++ #!/bin/bash for file in /u12pytpls/version/*; do $file done
2
0.222222
1
1
72e9ad0b18e9c4fe0ce0799be31b9ab001c40d75
src/core/configuration.zsh
src/core/configuration.zsh
: ${TSM_LEGACY_HOME=$HOME/.tmux/tmux-sessions} : ${TSM_LEGACY_SESSIONS_DIR:=$TSM_LEGACY_HOME/sessions} : ${TSM_HOME:=${XDG_DATA_HOME:-$HOME/.local/share}/tmux-sessions} : ${TSM_SESSIONS_DIR:=$TSM_HOME/sessions} : ${TSM_BACKUPS_DIR:=$TSM_HOME/backups} : ${TSM_DEFAULT_SESSION_FILE:=$TSM_HOME/default-session.txt} : ${TSM_BACKUPS_COUNT:=20} command mkdir -p -m 700 \ "$TSM_HOME" \ "$TSM_SESSIONS_DIR" \ "$TSM_BACKUPS_DIR" &>/dev/null # -------------------------------------------------------------------------- }}}
: ${TSM_HOME:=${XDG_DATA_HOME:-$HOME/.local/share}/tmux-sessions} : ${TSM_SESSIONS_DIR:=$TSM_HOME/sessions} : ${TSM_BACKUPS_DIR:=$TSM_HOME/backups} : ${TSM_DEFAULT_SESSION_FILE:=$TSM_HOME/default-session.txt} : ${TSM_BACKUPS_COUNT:=20} command mkdir -p -m 700 \ "$TSM_HOME" \ "$TSM_SESSIONS_DIR" \ "$TSM_BACKUPS_DIR" &>/dev/null # -------------------------------------------------------------------------- }}}
Remove the legacy environment variables
Remove the legacy environment variables
Shell
mit
RobertAudi/tsm
shell
## Code Before: : ${TSM_LEGACY_HOME=$HOME/.tmux/tmux-sessions} : ${TSM_LEGACY_SESSIONS_DIR:=$TSM_LEGACY_HOME/sessions} : ${TSM_HOME:=${XDG_DATA_HOME:-$HOME/.local/share}/tmux-sessions} : ${TSM_SESSIONS_DIR:=$TSM_HOME/sessions} : ${TSM_BACKUPS_DIR:=$TSM_HOME/backups} : ${TSM_DEFAULT_SESSION_FILE:=$TSM_HOME/default-session.txt} : ${TSM_BACKUPS_COUNT:=20} command mkdir -p -m 700 \ "$TSM_HOME" \ "$TSM_SESSIONS_DIR" \ "$TSM_BACKUPS_DIR" &>/dev/null # -------------------------------------------------------------------------- }}} ## Instruction: Remove the legacy environment variables ## Code After: : ${TSM_HOME:=${XDG_DATA_HOME:-$HOME/.local/share}/tmux-sessions} : ${TSM_SESSIONS_DIR:=$TSM_HOME/sessions} : ${TSM_BACKUPS_DIR:=$TSM_HOME/backups} : ${TSM_DEFAULT_SESSION_FILE:=$TSM_HOME/default-session.txt} : ${TSM_BACKUPS_COUNT:=20} command mkdir -p -m 700 \ "$TSM_HOME" \ "$TSM_SESSIONS_DIR" \ "$TSM_BACKUPS_DIR" &>/dev/null # -------------------------------------------------------------------------- }}}
- - : ${TSM_LEGACY_HOME=$HOME/.tmux/tmux-sessions} - : ${TSM_LEGACY_SESSIONS_DIR:=$TSM_LEGACY_HOME/sessions} : ${TSM_HOME:=${XDG_DATA_HOME:-$HOME/.local/share}/tmux-sessions} : ${TSM_SESSIONS_DIR:=$TSM_HOME/sessions} : ${TSM_BACKUPS_DIR:=$TSM_HOME/backups} : ${TSM_DEFAULT_SESSION_FILE:=$TSM_HOME/default-session.txt} : ${TSM_BACKUPS_COUNT:=20} command mkdir -p -m 700 \ "$TSM_HOME" \ "$TSM_SESSIONS_DIR" \ "$TSM_BACKUPS_DIR" &>/dev/null # -------------------------------------------------------------------------- }}}
3
0.1875
0
3
5acd9a1aa41e24f9cb229dc881de79aa131eaae0
app/templates/components/tabbed-navigation.hbs
app/templates/components/tabbed-navigation.hbs
{{#if device.isMobile}} <div role="button" class="ui segment center aligned" {{action 'toggleMenu'}}> {{currentRoute}} </div> {{/if}} <div class="mobile hidden ui fluid stackable {{unless isNonPointing 'pointing'}} {{unless device.isMobile (if isVertical 'vertical' 'secondary')}} menu"> {{yield}} </div>
{{#if device.isMobile}} <div role="button" class="ui segment center aligned" {{action 'toggleMenu'}}> {{currentRoute}} </div> {{/if}} <div class="mobile hidden ui fluid stackable {{unless isNonPointing 'pointing'}} {{unless device.isMobile (if isTabbed 'tabular' (if isVertical 'vertical' 'secondary'))}} menu"> {{yield}} </div>
Modify tabbed navigation to include tabular menu
Modify tabbed navigation to include tabular menu
Handlebars
apache-2.0
utkarshnath/open-event-frontend,CosmicCoder96/open-event-frontend,geekyd/open-event-frontend,anu-007/open-event-frontend,anu-007/open-event-frontend,sumedh123/open-event-frontend,ritikamotwani/open-event-frontend,sumedh123/open-event-frontend,utkarshnath/open-event-frontend,geekyd/open-event-frontend,harshitagupta30/open-event-frontend,harshitagupta30/open-event-frontend,ritikamotwani/open-event-frontend,utkarshnath/open-event-frontend,CosmicCoder96/open-event-frontend,CosmicCoder96/open-event-frontend,ritikamotwani/open-event-frontend,harshitagupta30/open-event-frontend,sumedh123/open-event-frontend,geekyd/open-event-frontend,anu-007/open-event-frontend
handlebars
## Code Before: {{#if device.isMobile}} <div role="button" class="ui segment center aligned" {{action 'toggleMenu'}}> {{currentRoute}} </div> {{/if}} <div class="mobile hidden ui fluid stackable {{unless isNonPointing 'pointing'}} {{unless device.isMobile (if isVertical 'vertical' 'secondary')}} menu"> {{yield}} </div> ## Instruction: Modify tabbed navigation to include tabular menu ## Code After: {{#if device.isMobile}} <div role="button" class="ui segment center aligned" {{action 'toggleMenu'}}> {{currentRoute}} </div> {{/if}} <div class="mobile hidden ui fluid stackable {{unless isNonPointing 'pointing'}} {{unless device.isMobile (if isTabbed 'tabular' (if isVertical 'vertical' 'secondary'))}} menu"> {{yield}} </div>
{{#if device.isMobile}} <div role="button" class="ui segment center aligned" {{action 'toggleMenu'}}> {{currentRoute}} </div> {{/if}} - <div class="mobile hidden ui fluid stackable {{unless isNonPointing 'pointing'}} {{unless device.isMobile (if isVertical 'vertical' 'secondary')}} menu"> + <div class="mobile hidden ui fluid stackable {{unless isNonPointing 'pointing'}} {{unless device.isMobile (if isTabbed 'tabular' (if isVertical 'vertical' 'secondary'))}} menu"> ? +++++++++++++++++++++++ + {{yield}} </div>
2
0.25
1
1
bb27d997c728542dd3ec883ba44a3fefb126c42e
scraperwiki/__init__.py
scraperwiki/__init__.py
''' Local version of ScraperWiki Utils, documentation here: https://scraperwiki.com/docs/python/python_help_documentation/ ''' from .utils import scrape, pdftoxml, status import utils import sql # Compatibility sqlite = sql
''' Local version of ScraperWiki Utils, documentation here: https://scraperwiki.com/docs/python/python_help_documentation/ ''' from .utils import scrape, pdftoxml, status import utils import sql # Compatibility sqlite = sql class Error(Exception): """All ScraperWiki exceptions are instances of this class (usually via a subclass).""" pass class CPUTimeExceededError(Error): """CPU time limit exceeded.""" pass
Add exceptions scraperwiki.CPUTimeExceededError and scraperwiki.Error. This bring the library closer to the classic API, which provided both these exceptions.
Add exceptions scraperwiki.CPUTimeExceededError and scraperwiki.Error. This bring the library closer to the classic API, which provided both these exceptions.
Python
bsd-2-clause
hudsonkeithl/scraperwiki-python,tlevine/scraperwiki-python,scraperwiki/scraperwiki-python,tlevine/scraperwiki-python,scraperwiki/scraperwiki-python,hudsonkeithl/scraperwiki-python
python
## Code Before: ''' Local version of ScraperWiki Utils, documentation here: https://scraperwiki.com/docs/python/python_help_documentation/ ''' from .utils import scrape, pdftoxml, status import utils import sql # Compatibility sqlite = sql ## Instruction: Add exceptions scraperwiki.CPUTimeExceededError and scraperwiki.Error. This bring the library closer to the classic API, which provided both these exceptions. ## Code After: ''' Local version of ScraperWiki Utils, documentation here: https://scraperwiki.com/docs/python/python_help_documentation/ ''' from .utils import scrape, pdftoxml, status import utils import sql # Compatibility sqlite = sql class Error(Exception): """All ScraperWiki exceptions are instances of this class (usually via a subclass).""" pass class CPUTimeExceededError(Error): """CPU time limit exceeded.""" pass
''' Local version of ScraperWiki Utils, documentation here: https://scraperwiki.com/docs/python/python_help_documentation/ ''' from .utils import scrape, pdftoxml, status import utils import sql # Compatibility sqlite = sql + + class Error(Exception): + """All ScraperWiki exceptions are instances of this class + (usually via a subclass).""" + pass + + class CPUTimeExceededError(Error): + """CPU time limit exceeded.""" + pass
9
0.75
9
0
94d6df9ddfa11dec285d637dce156137fadaaf3d
README.rst
README.rst
eventstreamd ============ .. image:: https://img.shields.io/github/release/srittau/eventstreamd/all.svg :target: https://github.com/srittau/eventstreamd/releases/ .. image:: https://travis-ci.org/srittau/eventstreamd.svg?branch=master :target: https://travis-ci.org/srittau/eventstreamd A simple event stream server. Events are sent on a Unix socket and then distributed to all interested listeners via HTTP event streams. Docker image available: ``` docker pull srittau/eventstreamd ```
eventstreamd ============ .. image:: https://img.shields.io/pypi/l/eventstreamd.svg :target: https://pypi.python.org/pypi/eventstreamd/ .. image:: https://img.shields.io/github/release/srittau/eventstreamd/all.svg :target: https://github.com/srittau/eventstreamd/releases/ .. image:: https://img.shields.io/pypi/v/eventstreamd.svg :target: https://pypi.python.org/pypi/eventstreamd/ .. image:: https://travis-ci.org/srittau/eventstreamd.svg?branch=master :target: https://travis-ci.org/srittau/eventstreamd A simple event stream server. Events are sent on a Unix socket and then distributed to all interested listeners via HTTP event streams. Docker image available: ``` docker pull srittau/eventstreamd ```
Add license and pypi shields
[readme] Add license and pypi shields
reStructuredText
mit
srittau/eventstreamd,srittau/eventstreamd
restructuredtext
## Code Before: eventstreamd ============ .. image:: https://img.shields.io/github/release/srittau/eventstreamd/all.svg :target: https://github.com/srittau/eventstreamd/releases/ .. image:: https://travis-ci.org/srittau/eventstreamd.svg?branch=master :target: https://travis-ci.org/srittau/eventstreamd A simple event stream server. Events are sent on a Unix socket and then distributed to all interested listeners via HTTP event streams. Docker image available: ``` docker pull srittau/eventstreamd ``` ## Instruction: [readme] Add license and pypi shields ## Code After: eventstreamd ============ .. image:: https://img.shields.io/pypi/l/eventstreamd.svg :target: https://pypi.python.org/pypi/eventstreamd/ .. image:: https://img.shields.io/github/release/srittau/eventstreamd/all.svg :target: https://github.com/srittau/eventstreamd/releases/ .. image:: https://img.shields.io/pypi/v/eventstreamd.svg :target: https://pypi.python.org/pypi/eventstreamd/ .. image:: https://travis-ci.org/srittau/eventstreamd.svg?branch=master :target: https://travis-ci.org/srittau/eventstreamd A simple event stream server. Events are sent on a Unix socket and then distributed to all interested listeners via HTTP event streams. Docker image available: ``` docker pull srittau/eventstreamd ```
eventstreamd ============ + .. image:: https://img.shields.io/pypi/l/eventstreamd.svg + :target: https://pypi.python.org/pypi/eventstreamd/ .. image:: https://img.shields.io/github/release/srittau/eventstreamd/all.svg :target: https://github.com/srittau/eventstreamd/releases/ + .. image:: https://img.shields.io/pypi/v/eventstreamd.svg + :target: https://pypi.python.org/pypi/eventstreamd/ .. image:: https://travis-ci.org/srittau/eventstreamd.svg?branch=master :target: https://travis-ci.org/srittau/eventstreamd A simple event stream server. Events are sent on a Unix socket and then distributed to all interested listeners via HTTP event streams. Docker image available: ``` docker pull srittau/eventstreamd ```
4
0.25
4
0
95e5f5b677a372e09560e5e8645dbe56bcc23a2e
vendor/assets/javascripts/partystreusel/translations.js.coffee
vendor/assets/javascripts/partystreusel/translations.js.coffee
I18n.translations ||= en: readmore: button_text: open: 'Read more' close: 'Read less' de: readmore: button_text: open: 'Open' close: 'Close'
I18n.translations ||= en: readmore: button_text: open: 'Read more' close: 'Read less' de: readmore: button_text: open: 'Mehr lesen' close: 'Weniger lesen' fr: readmore: button_text: open: 'Lire la suite' close: 'Afficher moins'
Add de and fr translations.
Add de and fr translations.
CoffeeScript
mit
brandleadership/partystreusel,brandleadership/partystreusel
coffeescript
## Code Before: I18n.translations ||= en: readmore: button_text: open: 'Read more' close: 'Read less' de: readmore: button_text: open: 'Open' close: 'Close' ## Instruction: Add de and fr translations. ## Code After: I18n.translations ||= en: readmore: button_text: open: 'Read more' close: 'Read less' de: readmore: button_text: open: 'Mehr lesen' close: 'Weniger lesen' fr: readmore: button_text: open: 'Lire la suite' close: 'Afficher moins'
I18n.translations ||= en: readmore: button_text: open: 'Read more' close: 'Read less' de: readmore: button_text: - open: 'Open' ? ^^ + open: 'Mehr lesen' ? ^^^^^^^^ - close: 'Close' ? ^ ^ + close: 'Weniger lesen' ? ^^^^^^^^ ^ + + + fr: + readmore: + button_text: + open: 'Lire la suite' + close: 'Afficher moins'
10
0.833333
8
2
0e85cffe47bf79b03e6e941c93effa39c1005710
moebot_bot/bot/commands/timer.go
moebot_bot/bot/commands/timer.go
package commands import ( "fmt" "github.com/camd67/moebot/moebot_bot/bot/permissions" "github.com/camd67/moebot/moebot_bot/util/db" ) type TimerCommand struct { ComPrefix string Checker permissions.PermissionChecker } func (tc *TimerCommand) GetPermLevel() db.Permission { return db.PermAll } func (tc *TimerCommand) GetCommandKeys() []string { return []string{"TIMER"} } func (tc *TimerCommand) GetCommandHelp(commPrefix string) string { return fmt.Sprintf("`%[1]s timer` - Checks the timestamp. Moderators may provide the `--start` option to begin start or restart the timer.", commPrefix) }
package commands import ( "fmt" "github.com/camd67/moebot/moebot_bot/util/db" ) type TimerCommand struct { } func (tc *TimerCommand) Execute(pack *CommPackage) { } func (tc *TimerCommand) GetPermLevel() db.Permission { return db.PermAll } func (tc *TimerCommand) GetCommandKeys() []string { return []string{"TIMER"} } func (tc *TimerCommand) GetCommandHelp(commPrefix string) string { return fmt.Sprintf("`%[1]s timer` - Checks the timestamp. Moderators may provide the `--start` option to begin start or restart the timer.", commPrefix) }
Add Execute func and remove unused struct fields (for now)
Add Execute func and remove unused struct fields (for now)
Go
mit
camd67/moebot,camd67/moebot
go
## Code Before: package commands import ( "fmt" "github.com/camd67/moebot/moebot_bot/bot/permissions" "github.com/camd67/moebot/moebot_bot/util/db" ) type TimerCommand struct { ComPrefix string Checker permissions.PermissionChecker } func (tc *TimerCommand) GetPermLevel() db.Permission { return db.PermAll } func (tc *TimerCommand) GetCommandKeys() []string { return []string{"TIMER"} } func (tc *TimerCommand) GetCommandHelp(commPrefix string) string { return fmt.Sprintf("`%[1]s timer` - Checks the timestamp. Moderators may provide the `--start` option to begin start or restart the timer.", commPrefix) } ## Instruction: Add Execute func and remove unused struct fields (for now) ## Code After: package commands import ( "fmt" "github.com/camd67/moebot/moebot_bot/util/db" ) type TimerCommand struct { } func (tc *TimerCommand) Execute(pack *CommPackage) { } func (tc *TimerCommand) GetPermLevel() db.Permission { return db.PermAll } func (tc *TimerCommand) GetCommandKeys() []string { return []string{"TIMER"} } func (tc *TimerCommand) GetCommandHelp(commPrefix string) string { return fmt.Sprintf("`%[1]s timer` - Checks the timestamp. Moderators may provide the `--start` option to begin start or restart the timer.", commPrefix) }
package commands import ( "fmt" - "github.com/camd67/moebot/moebot_bot/bot/permissions" - "github.com/camd67/moebot/moebot_bot/util/db" ) type TimerCommand struct { - ComPrefix string - Checker permissions.PermissionChecker + } + + func (tc *TimerCommand) Execute(pack *CommPackage) { } func (tc *TimerCommand) GetPermLevel() db.Permission { return db.PermAll } func (tc *TimerCommand) GetCommandKeys() []string { return []string{"TIMER"} } func (tc *TimerCommand) GetCommandHelp(commPrefix string) string { return fmt.Sprintf("`%[1]s timer` - Checks the timestamp. Moderators may provide the `--start` option to begin start or restart the timer.", commPrefix) }
7
0.269231
3
4
5255577a9f4dc921a615bb56b83d082a9a448d8d
environment/alien/unix.lisp
environment/alien/unix.lisp
;;;; TRE environment ;;;; Copyright (c) 2008 Sven Klose <pixel@copei.de> ;;;; ;;;; UN*X shell commands (defun unix-sh-rm (file) (exec "/bin/rm" (list file))) (defun unix-sh-mv (from to) (exec "/bin/mv" (list from to))) (defun unix-sh-cp (from to &key (recursively? nil)) (exec "/bin/cp" (append (when recursively? (list "-r")) (list from to)))) (defun unix-sh-mkdir (path &key (parents nil)) (exec "/bin/mkdir" (append (when parents (list "-p")) (list path)))) (defun unix-sh-chmod (flags path &key (recursively nil)) (exec "/bin/chmod" (append (when recursively (list "-R")) (list flags path)))) (defun unix-sh-chown (user group path &key (recursively nil)) (exec "/usr/sbin/chown" (append (when recursively (list "-R")) (list (string-concat user ":" group) path))))
;;;; TRE environment ;;;; Copyright (c) 2008 Sven Klose <pixel@copei.de> ;;;; ;;;; UN*X shell commands (defun unix-sh-rm (file &key (recursively? nil) (force? nil)) (exec "/bin/rm" (append (when recursively? (list "-r")) (when force? (list "-f")) (list file)))) (defun unix-sh-mv (from to) (exec "/bin/mv" (list from to))) (defun unix-sh-cp (from to &key (recursively? nil)) (exec "/bin/cp" (append (when recursively? (list "-r")) (list from to)))) (defun unix-sh-mkdir (path &key (parents nil)) (exec "/bin/mkdir" (append (when parents (list "-p")) (list path)))) (defun unix-sh-chmod (flags path &key (recursively nil)) (exec "/bin/chmod" (append (when recursively (list "-R")) (list flags path)))) (defun unix-sh-chown (user group path &key (recursively nil)) (exec "/usr/sbin/chown" (append (when recursively (list "-R")) (list (string-concat user ":" group) path))))
Allow flags -r and -f.
UNIX-SH-RM: Allow flags -r and -f.
Common Lisp
mit
SvenMichaelKlose/tre,SvenMichaelKlose/tre,SvenMichaelKlose/tre
common-lisp
## Code Before: ;;;; TRE environment ;;;; Copyright (c) 2008 Sven Klose <pixel@copei.de> ;;;; ;;;; UN*X shell commands (defun unix-sh-rm (file) (exec "/bin/rm" (list file))) (defun unix-sh-mv (from to) (exec "/bin/mv" (list from to))) (defun unix-sh-cp (from to &key (recursively? nil)) (exec "/bin/cp" (append (when recursively? (list "-r")) (list from to)))) (defun unix-sh-mkdir (path &key (parents nil)) (exec "/bin/mkdir" (append (when parents (list "-p")) (list path)))) (defun unix-sh-chmod (flags path &key (recursively nil)) (exec "/bin/chmod" (append (when recursively (list "-R")) (list flags path)))) (defun unix-sh-chown (user group path &key (recursively nil)) (exec "/usr/sbin/chown" (append (when recursively (list "-R")) (list (string-concat user ":" group) path)))) ## Instruction: UNIX-SH-RM: Allow flags -r and -f. ## Code After: ;;;; TRE environment ;;;; Copyright (c) 2008 Sven Klose <pixel@copei.de> ;;;; ;;;; UN*X shell commands (defun unix-sh-rm (file &key (recursively? nil) (force? nil)) (exec "/bin/rm" (append (when recursively? (list "-r")) (when force? (list "-f")) (list file)))) (defun unix-sh-mv (from to) (exec "/bin/mv" (list from to))) (defun unix-sh-cp (from to &key (recursively? nil)) (exec "/bin/cp" (append (when recursively? (list "-r")) (list from to)))) (defun unix-sh-mkdir (path &key (parents nil)) (exec "/bin/mkdir" (append (when parents (list "-p")) (list path)))) (defun unix-sh-chmod (flags path &key (recursively nil)) (exec "/bin/chmod" (append (when recursively (list "-R")) (list flags path)))) (defun unix-sh-chown (user group path &key (recursively nil)) (exec "/usr/sbin/chown" (append (when recursively (list "-R")) (list (string-concat user ":" group) path))))
;;;; TRE environment ;;;; Copyright (c) 2008 Sven Klose <pixel@copei.de> ;;;; ;;;; UN*X shell commands - (defun unix-sh-rm (file) - (exec "/bin/rm" (list file))) + (defun unix-sh-rm (file &key (recursively? nil) (force? nil)) + (exec "/bin/rm" (append (when recursively? + (list "-r")) + (when force? + (list "-f")) + (list file)))) (defun unix-sh-mv (from to) (exec "/bin/mv" (list from to))) (defun unix-sh-cp (from to &key (recursively? nil)) (exec "/bin/cp" (append (when recursively? (list "-r")) (list from to)))) (defun unix-sh-mkdir (path &key (parents nil)) (exec "/bin/mkdir" (append (when parents (list "-p")) (list path)))) (defun unix-sh-chmod (flags path &key (recursively nil)) (exec "/bin/chmod" (append (when recursively (list "-R")) (list flags path)))) (defun unix-sh-chown (user group path &key (recursively nil)) (exec "/usr/sbin/chown" (append (when recursively (list "-R")) (list (string-concat user ":" group) path))))
8
0.258065
6
2
466b7bba46ad070b29f903184ba922b9f922f6f1
src/renderToString.js
src/renderToString.js
import builder from 'xmlbuilder'; import kebabCase from 'lodash/kebabCase'; // custom stringify options for xml builder // just kebab-cases all attributes and tag names const customStringifyOptions = { eleName(val = '') { return this.assertLegalChar(kebabCase(val)); }, attName(val = '') { return kebabCase(val); }, }; /** * Recursively turns jsx children into xml nodes * @param {Array} children * @param {XMLNode} node */ function renderNode(node, children = []) { Array.from(children).forEach(child => { if (child && child.tag) { node.ele(child.tag, child.props); renderNode(child.children, node); node.end(); } else { node.text(child); } }); } /** * Nested JSON to pretty string * @param {Object} data * @return {String} */ export default function renderToString({ tag, children }, options = {}) { if (tag !== 'speak') { throw new Error(`SSML must start with a 'speak' tag, currently '${tag}'`); } const xml = builder.create(tag, { stringify: customStringifyOptions, headless: true, }); renderNode(xml, children); return xml.end(options); }
import builder from 'xmlbuilder'; import kebabCase from 'lodash/kebabCase'; // custom stringify options for xml builder // just kebab-cases all attributes and tag names const customStringifyOptions = { eleName(val = '') { return this.assertLegalChar(kebabCase(val)); }, attName(val = '') { return kebabCase(val); }, }; /** * Recursively turns jsx children into xml nodes * @param {Array} children * @param {XMLNode} node */ function renderNode(node, children = []) { [...children].forEach(child => { if (child && child.tag) { node.ele(child.tag, child.props); renderNode(child.children, node); node.end(); } else { node.text(child); } }); } /** * Nested JSON to pretty string * @param {Object} data * @return {String} */ export default function renderToString({ tag, children }, options = {}) { if (tag !== 'speak') { throw new Error(`SSML must start with a 'speak' tag, currently '${tag}'`); } const xml = builder.create(tag, { stringify: customStringifyOptions, headless: true, }); renderNode(xml, children); return xml.end(options); }
Use a spread instead of Array.from
Use a spread instead of Array.from
JavaScript
mit
nickclaw/alexa-ssml
javascript
## Code Before: import builder from 'xmlbuilder'; import kebabCase from 'lodash/kebabCase'; // custom stringify options for xml builder // just kebab-cases all attributes and tag names const customStringifyOptions = { eleName(val = '') { return this.assertLegalChar(kebabCase(val)); }, attName(val = '') { return kebabCase(val); }, }; /** * Recursively turns jsx children into xml nodes * @param {Array} children * @param {XMLNode} node */ function renderNode(node, children = []) { Array.from(children).forEach(child => { if (child && child.tag) { node.ele(child.tag, child.props); renderNode(child.children, node); node.end(); } else { node.text(child); } }); } /** * Nested JSON to pretty string * @param {Object} data * @return {String} */ export default function renderToString({ tag, children }, options = {}) { if (tag !== 'speak') { throw new Error(`SSML must start with a 'speak' tag, currently '${tag}'`); } const xml = builder.create(tag, { stringify: customStringifyOptions, headless: true, }); renderNode(xml, children); return xml.end(options); } ## Instruction: Use a spread instead of Array.from ## Code After: import builder from 'xmlbuilder'; import kebabCase from 'lodash/kebabCase'; // custom stringify options for xml builder // just kebab-cases all attributes and tag names const customStringifyOptions = { eleName(val = '') { return this.assertLegalChar(kebabCase(val)); }, attName(val = '') { return kebabCase(val); }, }; /** * Recursively turns jsx children into xml nodes * @param {Array} children * @param {XMLNode} node */ function renderNode(node, children = []) { [...children].forEach(child => { if (child && child.tag) { node.ele(child.tag, child.props); renderNode(child.children, node); node.end(); } else { node.text(child); } }); } /** * Nested JSON to pretty string * @param {Object} data * @return {String} */ export default function renderToString({ tag, children }, options = {}) { if (tag !== 'speak') { throw new Error(`SSML must start with a 'speak' tag, currently '${tag}'`); } const xml = builder.create(tag, { stringify: customStringifyOptions, headless: true, }); renderNode(xml, children); return xml.end(options); }
import builder from 'xmlbuilder'; import kebabCase from 'lodash/kebabCase'; // custom stringify options for xml builder // just kebab-cases all attributes and tag names const customStringifyOptions = { eleName(val = '') { return this.assertLegalChar(kebabCase(val)); }, attName(val = '') { return kebabCase(val); }, }; /** * Recursively turns jsx children into xml nodes * @param {Array} children * @param {XMLNode} node */ function renderNode(node, children = []) { - Array.from(children).forEach(child => { ? ^^^^^ ^^^^^ ^ + [...children].forEach(child => { ? ^ ^^ ^ if (child && child.tag) { node.ele(child.tag, child.props); renderNode(child.children, node); node.end(); } else { node.text(child); } }); } /** * Nested JSON to pretty string * @param {Object} data * @return {String} */ export default function renderToString({ tag, children }, options = {}) { if (tag !== 'speak') { throw new Error(`SSML must start with a 'speak' tag, currently '${tag}'`); } const xml = builder.create(tag, { stringify: customStringifyOptions, headless: true, }); renderNode(xml, children); return xml.end(options); }
2
0.039216
1
1
8a9675c7eb7ec3d0f5485fc9d171a73807d7d9fd
keymaps/vertical-align.cson
keymaps/vertical-align.cson
'.editor': 'ctrl-cmd-/': 'vertical-align:align'
'.platform-darwin .editor': 'ctrl-cmd-/': 'vertical-align:align' '.platform-win32 .editor, .platform-linux .editor': 'ctrl-alt-/': 'vertical-align:align'
Add keybindings for win32 and linux
Add keybindings for win32 and linux
CoffeeScript
mit
adrianlee44/atom-aligner
coffeescript
## Code Before: '.editor': 'ctrl-cmd-/': 'vertical-align:align' ## Instruction: Add keybindings for win32 and linux ## Code After: '.platform-darwin .editor': 'ctrl-cmd-/': 'vertical-align:align' '.platform-win32 .editor, .platform-linux .editor': 'ctrl-alt-/': 'vertical-align:align'
- '.editor': + '.platform-darwin .editor': 'ctrl-cmd-/': 'vertical-align:align' + '.platform-win32 .editor, .platform-linux .editor': + 'ctrl-alt-/': 'vertical-align:align'
4
2
3
1
ec6d38b82c8d59fea1fee24c6bf28f6d572c7861
doc/dclass-ebnf.md
doc/dclass-ebnf.md
DistributedClass Language Specification --------------------------------------- **Author:** Kevin "Kestred" Stenerson **Version:** 2013, November 2nd ### Introduction ### This is a reference manual for the DistributedClass protocol-specification language. The dc language provides a syntax for specifying a networked protocol based on object-oriented design principles. In essence, a distributed class specifies an "interface" for an object that is "shared" between multiple processes or "exposed" in a remote process. The object satisfying this interface is referred to as a "distributed object". ### Notation ### The syntax is specified using Extended Backus-Naur Form (EBNF): ``` Production = production_name "=" [ Expression ] "." . Expression = Alternative { "|" Alternative } . Alternative = Term { Term } . Term = production_name | token [ "…" token ] | Group | Option | Repetition . Group = "(" Expression ")" . Option = "[" Expression "]" . Repetition = "{" Expression "}" . ``` Productions are expressions constructed from terms and the following operators, in increasing precedence: ``` | alternation () grouping [] option (0 or 1 times) {} repetition (0 to n times) ``` Lower-case production names are used to identify lexical tokens. Non-terminals are in CamelCase. Lexical tokens are enclosed in double quotes "" or back quotes ``. The form a … b represents the set of characters from a through b as alternatives. ### Lexical Elements ### ### Grammer ###
DistributedClass Language Specification --------------------------------------- **Author:** Kevin "Kestred" Stenerson **Version:** 2013, November 2nd ### Introduction ### This is a reference manual for the DistributedClass protocol-specification language. The dc language provides a syntax for specifying a networked protocol based on object-oriented design principles. In essence, a distributed class specifies an "interface" for an object that is "shared" between multiple processes or "exposed" in a remote process. The object satisfying this interface is referred to as a "distributed object". ### Notation ### The syntax is specified using Extended Backus-Naur Form (EBNF): ``` Production ::= production_name "::=" [ Expression ] Expression ::= Alternative { "|" Alternative } Alternative ::= Term { Term } Term ::= production_name | token [ "…" token ] | Group | Option | Repetition Group ::= "(" Expression ")" Option ::= "[" Expression "]" Repetition ::= "{" Expression "}" ``` Productions are expressions constructed from terms and the following operators, in increasing precedence: ``` | alternation () grouping [] option (0 or 1 times) {} repetition (0 to n times) ``` Lower-case production names are used to identify lexical tokens. Non-terminals are in CamelCase. Lexical tokens are enclosed in double quotes "" or back quotes ``. The form a … b represents the set of characters from a through b as alternatives. ### Lexical Elements ### ### Grammer ###
Use more classical notation for dclass EBNF.
Docs: Use more classical notation for dclass EBNF.
Markdown
bsd-3-clause
ketoo/Astron,blindsighttf2/Astron,pizcogirl/Astron,ketoo/Astron,pizcogirl/Astron,pizcogirl/Astron,ketoo/Astron,blindsighttf2/Astron,blindsighttf2/Astron,pizcogirl/Astron,blindsighttf2/Astron,ketoo/Astron
markdown
## Code Before: DistributedClass Language Specification --------------------------------------- **Author:** Kevin "Kestred" Stenerson **Version:** 2013, November 2nd ### Introduction ### This is a reference manual for the DistributedClass protocol-specification language. The dc language provides a syntax for specifying a networked protocol based on object-oriented design principles. In essence, a distributed class specifies an "interface" for an object that is "shared" between multiple processes or "exposed" in a remote process. The object satisfying this interface is referred to as a "distributed object". ### Notation ### The syntax is specified using Extended Backus-Naur Form (EBNF): ``` Production = production_name "=" [ Expression ] "." . Expression = Alternative { "|" Alternative } . Alternative = Term { Term } . Term = production_name | token [ "…" token ] | Group | Option | Repetition . Group = "(" Expression ")" . Option = "[" Expression "]" . Repetition = "{" Expression "}" . ``` Productions are expressions constructed from terms and the following operators, in increasing precedence: ``` | alternation () grouping [] option (0 or 1 times) {} repetition (0 to n times) ``` Lower-case production names are used to identify lexical tokens. Non-terminals are in CamelCase. Lexical tokens are enclosed in double quotes "" or back quotes ``. The form a … b represents the set of characters from a through b as alternatives. ### Lexical Elements ### ### Grammer ### ## Instruction: Docs: Use more classical notation for dclass EBNF. ## Code After: DistributedClass Language Specification --------------------------------------- **Author:** Kevin "Kestred" Stenerson **Version:** 2013, November 2nd ### Introduction ### This is a reference manual for the DistributedClass protocol-specification language. The dc language provides a syntax for specifying a networked protocol based on object-oriented design principles. In essence, a distributed class specifies an "interface" for an object that is "shared" between multiple processes or "exposed" in a remote process. The object satisfying this interface is referred to as a "distributed object". ### Notation ### The syntax is specified using Extended Backus-Naur Form (EBNF): ``` Production ::= production_name "::=" [ Expression ] Expression ::= Alternative { "|" Alternative } Alternative ::= Term { Term } Term ::= production_name | token [ "…" token ] | Group | Option | Repetition Group ::= "(" Expression ")" Option ::= "[" Expression "]" Repetition ::= "{" Expression "}" ``` Productions are expressions constructed from terms and the following operators, in increasing precedence: ``` | alternation () grouping [] option (0 or 1 times) {} repetition (0 to n times) ``` Lower-case production names are used to identify lexical tokens. Non-terminals are in CamelCase. Lexical tokens are enclosed in double quotes "" or back quotes ``. The form a … b represents the set of characters from a through b as alternatives. ### Lexical Elements ### ### Grammer ###
DistributedClass Language Specification --------------------------------------- - **Author:** Kevin "Kestred" Stenerson + **Author:** Kevin "Kestred" Stenerson ? ++ **Version:** 2013, November 2nd ### Introduction ### This is a reference manual for the DistributedClass protocol-specification language. The dc language provides a syntax for specifying a networked protocol based on object-oriented design principles. In essence, a distributed class specifies an "interface" for an object that is "shared" between multiple processes or "exposed" in a remote process. The object satisfying this interface is referred to as a "distributed object". ### Notation ### The syntax is specified using Extended Backus-Naur Form (EBNF): ``` - Production = production_name "=" [ Expression ] "." . ? ------ + Production ::= production_name "::=" [ Expression ] ? ++ ++ - Expression = Alternative { "|" Alternative } . ? -- + Expression ::= Alternative { "|" Alternative } ? ++ - Alternative = Term { Term } . ? -- + Alternative ::= Term { Term } ? ++ - Term = production_name | token [ "…" token ] | Group | Option | Repetition . ? -- + Term ::= production_name | token [ "…" token ] | Group | Option | Repetition ? ++ - Group = "(" Expression ")" . ? -- + Group ::= "(" Expression ")" ? ++ - Option = "[" Expression "]" . ? -- + Option ::= "[" Expression "]" ? ++ - Repetition = "{" Expression "}" . ? -- + Repetition ::= "{" Expression "}" ? ++ ``` Productions are expressions constructed from terms and the following operators, in increasing precedence: ``` | alternation () grouping [] option (0 or 1 times) {} repetition (0 to n times) ``` Lower-case production names are used to identify lexical tokens. Non-terminals are in CamelCase. Lexical tokens are enclosed in double quotes "" or back quotes ``. The form a … b represents the set of characters from a through b as alternatives. ### Lexical Elements ### ### Grammer ###
16
0.355556
8
8
b6ef2581e5fd1328f97403b2fca7b2afd6b07aaa
source/index.md
source/index.md
--- title: Ibercheck API language_tabs: - http - shell toc_footers: - <a href="playground">API Playground</a> includes: - introduction - authentication - making-requests - errors - versioning - hypermedia - tutorial search: true ---
--- title: Ibercheck API language_tabs: - http - shell toc_footers: - <a href="https://www.ibercheck.com/docs/api/playground/">API Playground</a> includes: - introduction - authentication - making-requests - errors - versioning - hypermedia - tutorial search: true ---
Replace relative URI with absolute one for playground
Replace relative URI with absolute one for playground
Markdown
mit
Ibercheck/api-docs,Ibercheck/api-docs,Ibercheck/api-docs
markdown
## Code Before: --- title: Ibercheck API language_tabs: - http - shell toc_footers: - <a href="playground">API Playground</a> includes: - introduction - authentication - making-requests - errors - versioning - hypermedia - tutorial search: true --- ## Instruction: Replace relative URI with absolute one for playground ## Code After: --- title: Ibercheck API language_tabs: - http - shell toc_footers: - <a href="https://www.ibercheck.com/docs/api/playground/">API Playground</a> includes: - introduction - authentication - making-requests - errors - versioning - hypermedia - tutorial search: true ---
--- title: Ibercheck API language_tabs: - http - shell toc_footers: - - <a href="playground">API Playground</a> + - <a href="https://www.ibercheck.com/docs/api/playground/">API Playground</a> includes: - introduction - authentication - making-requests - errors - versioning - hypermedia - tutorial search: true ---
2
0.095238
1
1
fb016ebffb5747b8cb0d6e79ea99ec2d71c689e1
README.md
README.md
Vicarious Pig Latin Microservice
This is a microservice built on the Flask Python microframework. This microservice can be used to translate requested strings into [Pig Latin](https://en.wikipedia.org/wiki/Pig_Latin), with the following specifications: - Listens on port 80, accepts a string that contains at least one word, but potentially entire paragraphs. - Convert the words to Pig Latin and return the results in the HTTP message body. - Preserve all of the punctuation in the original string. ## Dependencies - [Python](https://www.python.org/) 3.5 - [Flask](http://flask.pocoo.org/) 0.12 - [Requests](http://docs.python-requests.org/en/master/) 2.13.0 - [Setuptools](https://pypi.python.org/pypi/setuptools) 20.10.1 ## Setup ### Install all dependencies To install all the dependencies required to run this microservice, use the command `make install`. ### Launching the server To run the server, use the command `make launch` (troubleshooting: because we are running on a protected port, `sudo` permissions must be used, either use `sudo -s` to activate `sudo` permissions for your current Terminal session, or execute the command using `sudo make launch`). This launches a `virtualenv` with the dependencies installed previously. ### Running tests To run the included unit tests, use the command `make test` (note that this must be run after the server has been launched). ### Shutdown and cleanup To shutdown the microservice, use the command `make shutdown`. If you want to clean up all the build files and virtual environment files created, use the command `make clean`. ## Using the API The API can be interacted with at the `127.0.0.1/api/translate` endpoint. For example, we can [cURL](https://curl.haxx.se/) this resource with the following command: `curl -d "Query string here" -i -X POST 127.0.0.1/api/translate` The API accepts `Content-Type: text/plain` and returns `Content-Type: text/plain`. ## Resources - Requirements generated using [pipreqs](https://github.com/bndr/pipreqs) - Setup structure inspired by umermansoor's [microservices](https://github.com/umermansoor/microservices)
Add documentation and setup instructions
Add documentation and setup instructions
Markdown
mit
chrswt/vicarious-microservice
markdown
## Code Before: Vicarious Pig Latin Microservice ## Instruction: Add documentation and setup instructions ## Code After: This is a microservice built on the Flask Python microframework. This microservice can be used to translate requested strings into [Pig Latin](https://en.wikipedia.org/wiki/Pig_Latin), with the following specifications: - Listens on port 80, accepts a string that contains at least one word, but potentially entire paragraphs. - Convert the words to Pig Latin and return the results in the HTTP message body. - Preserve all of the punctuation in the original string. ## Dependencies - [Python](https://www.python.org/) 3.5 - [Flask](http://flask.pocoo.org/) 0.12 - [Requests](http://docs.python-requests.org/en/master/) 2.13.0 - [Setuptools](https://pypi.python.org/pypi/setuptools) 20.10.1 ## Setup ### Install all dependencies To install all the dependencies required to run this microservice, use the command `make install`. ### Launching the server To run the server, use the command `make launch` (troubleshooting: because we are running on a protected port, `sudo` permissions must be used, either use `sudo -s` to activate `sudo` permissions for your current Terminal session, or execute the command using `sudo make launch`). This launches a `virtualenv` with the dependencies installed previously. ### Running tests To run the included unit tests, use the command `make test` (note that this must be run after the server has been launched). ### Shutdown and cleanup To shutdown the microservice, use the command `make shutdown`. If you want to clean up all the build files and virtual environment files created, use the command `make clean`. ## Using the API The API can be interacted with at the `127.0.0.1/api/translate` endpoint. For example, we can [cURL](https://curl.haxx.se/) this resource with the following command: `curl -d "Query string here" -i -X POST 127.0.0.1/api/translate` The API accepts `Content-Type: text/plain` and returns `Content-Type: text/plain`. ## Resources - Requirements generated using [pipreqs](https://github.com/bndr/pipreqs) - Setup structure inspired by umermansoor's [microservices](https://github.com/umermansoor/microservices)
- Vicarious Pig Latin Microservice + This is a microservice built on the Flask Python microframework. This microservice can be used to translate requested strings into [Pig Latin](https://en.wikipedia.org/wiki/Pig_Latin), with the following specifications: + - Listens on port 80, accepts a string that contains at least one word, but potentially entire paragraphs. + - Convert the words to Pig Latin and return the results in the HTTP message body. + - Preserve all of the punctuation in the original string. + + ## Dependencies + - [Python](https://www.python.org/) 3.5 + - [Flask](http://flask.pocoo.org/) 0.12 + - [Requests](http://docs.python-requests.org/en/master/) 2.13.0 + - [Setuptools](https://pypi.python.org/pypi/setuptools) 20.10.1 + + ## Setup + + ### Install all dependencies + To install all the dependencies required to run this microservice, use the command `make install`. + + ### Launching the server + To run the server, use the command `make launch` (troubleshooting: because we are running on a protected port, `sudo` permissions must be used, either use `sudo -s` to activate `sudo` permissions for your current Terminal session, or execute the command using `sudo make launch`). This launches a `virtualenv` with the dependencies installed previously. + + ### Running tests + To run the included unit tests, use the command `make test` (note that this must be run after the server has been launched). + + ### Shutdown and cleanup + To shutdown the microservice, use the command `make shutdown`. If you want to clean up all the build files and virtual environment files created, use the command `make clean`. + + ## Using the API + The API can be interacted with at the `127.0.0.1/api/translate` endpoint. For example, we can [cURL](https://curl.haxx.se/) this resource with the following command: + + `curl -d "Query string here" -i -X POST 127.0.0.1/api/translate` + + The API accepts `Content-Type: text/plain` and returns `Content-Type: text/plain`. + + ## Resources + - Requirements generated using [pipreqs](https://github.com/bndr/pipreqs) + - Setup structure inspired by umermansoor's [microservices](https://github.com/umermansoor/microservices)
36
36
35
1
d74885ad881c0acfe59e16bace2e7c4b594721e3
bower.json
bower.json
{ "name": "trelloblog", "version": "0.0.0", "homepage": "https://github.com/fabien0102/trelloblog", "authors": [ "fabien0102 <fabien0102@planee.fr>", "nicoespeon <nicolascarlo.espeon@gmail.com>" ], "description": "Use Trello as a database and back-office for a blogging system.", "main": "index.html", "keywords": [ "trello", "blog", "cms" ], "license": "MIT", "dependencies": { "jQuery": "~2.1.0", "angular": "~1.2.16", "bootstrap": "~3.1.1", "angular-markdown-directive": "~0.2.0" }, "resolutions": { "angular": "~1.2.16" } }
{ "name": "trelloblog", "version": "0.0.0", "homepage": "https://github.com/fabien0102/trelloblog", "authors": [ "fabien0102 <fabien0102@planee.fr>", "nicoespeon <nicolascarlo.espeon@gmail.com>", "fmonniot <francoismonniot@gmail.com>" ], "description": "Use Trello as a database and back-office for a blogging system.", "main": "index.html", "keywords": [ "trello", "blog", "cms" ], "license": "MIT", "dependencies": { "jQuery": "~2.1.0", "angular": "~1.2.16", "bootstrap": "~3.1.1", "angular-markdown-directive": "~0.2.0" }, "resolutions": { "angular": "~1.2.16" } }
Add François MONNIOT in authors
Add François MONNIOT in authors
JSON
mit
fabien0102/trelloblog
json
## Code Before: { "name": "trelloblog", "version": "0.0.0", "homepage": "https://github.com/fabien0102/trelloblog", "authors": [ "fabien0102 <fabien0102@planee.fr>", "nicoespeon <nicolascarlo.espeon@gmail.com>" ], "description": "Use Trello as a database and back-office for a blogging system.", "main": "index.html", "keywords": [ "trello", "blog", "cms" ], "license": "MIT", "dependencies": { "jQuery": "~2.1.0", "angular": "~1.2.16", "bootstrap": "~3.1.1", "angular-markdown-directive": "~0.2.0" }, "resolutions": { "angular": "~1.2.16" } } ## Instruction: Add François MONNIOT in authors ## Code After: { "name": "trelloblog", "version": "0.0.0", "homepage": "https://github.com/fabien0102/trelloblog", "authors": [ "fabien0102 <fabien0102@planee.fr>", "nicoespeon <nicolascarlo.espeon@gmail.com>", "fmonniot <francoismonniot@gmail.com>" ], "description": "Use Trello as a database and back-office for a blogging system.", "main": "index.html", "keywords": [ "trello", "blog", "cms" ], "license": "MIT", "dependencies": { "jQuery": "~2.1.0", "angular": "~1.2.16", "bootstrap": "~3.1.1", "angular-markdown-directive": "~0.2.0" }, "resolutions": { "angular": "~1.2.16" } }
{ - "name": "trelloblog", ? -- + "name": "trelloblog", - "version": "0.0.0", ? -- + "version": "0.0.0", - "homepage": "https://github.com/fabien0102/trelloblog", ? -- + "homepage": "https://github.com/fabien0102/trelloblog", - "authors": [ ? -- + "authors": [ - "fabien0102 <fabien0102@planee.fr>", ? ---- + "fabien0102 <fabien0102@planee.fr>", - "nicoespeon <nicolascarlo.espeon@gmail.com>" ? ---- + "nicoespeon <nicolascarlo.espeon@gmail.com>", ? + + "fmonniot <francoismonniot@gmail.com>" - ], ? -- + ], - "description": "Use Trello as a database and back-office for a blogging system.", ? -- + "description": "Use Trello as a database and back-office for a blogging system.", - "main": "index.html", ? -- + "main": "index.html", - "keywords": [ ? -- + "keywords": [ - "trello", ? ---- + "trello", - "blog", ? ---- + "blog", - "cms" ? ---- + "cms" - ], ? -- + ], - "license": "MIT", ? -- + "license": "MIT", - "dependencies": { ? -- + "dependencies": { - "jQuery": "~2.1.0", ? ---- + "jQuery": "~2.1.0", - "angular": "~1.2.16", ? ---- + "angular": "~1.2.16", - "bootstrap": "~3.1.1", ? ---- + "bootstrap": "~3.1.1", - "angular-markdown-directive": "~0.2.0" ? ---- + "angular-markdown-directive": "~0.2.0" - }, ? -- + }, - "resolutions": { ? -- + "resolutions": { - "angular": "~1.2.16" ? ---- + "angular": "~1.2.16" - } ? -- + } }
49
1.884615
25
24
f55dd38f22e8b2586ef8ec8263c0803d655487a3
_config.php
_config.php
<?php // make links sortable //SortableDataObject::add_sortable_class('Link'); // enabled the extension, need the FooterLinksFolder method to be available Object::add_extension('SiteTree', 'LinksExtension'); ?>
<?php // make links sortable //SortableDataObject::add_sortable_class('Link'); // enabled the extension, need the FooterLinksFolder method to be available Object::add_extension('SiteTree', 'LinksExtension'); //define global path to Components' root folder if(!defined('LINK_EDIT_TOOLS_PATH')) { define('LINK_EDIT_TOOLS_PATH', rtrim(basename(dirname(__FILE__)))); } ?>
Add edit tools path so that no hardcoding is required
ENHANCEMENT: Add edit tools path so that no hardcoding is required
PHP
bsd-3-clause
gordonbanderson/Silverstripe-Links-Module,gordonbanderson/Silverstripe-Links-Module
php
## Code Before: <?php // make links sortable //SortableDataObject::add_sortable_class('Link'); // enabled the extension, need the FooterLinksFolder method to be available Object::add_extension('SiteTree', 'LinksExtension'); ?> ## Instruction: ENHANCEMENT: Add edit tools path so that no hardcoding is required ## Code After: <?php // make links sortable //SortableDataObject::add_sortable_class('Link'); // enabled the extension, need the FooterLinksFolder method to be available Object::add_extension('SiteTree', 'LinksExtension'); //define global path to Components' root folder if(!defined('LINK_EDIT_TOOLS_PATH')) { define('LINK_EDIT_TOOLS_PATH', rtrim(basename(dirname(__FILE__)))); } ?>
<?php // make links sortable //SortableDataObject::add_sortable_class('Link'); // enabled the extension, need the FooterLinksFolder method to be available Object::add_extension('SiteTree', 'LinksExtension'); + + //define global path to Components' root folder + if(!defined('LINK_EDIT_TOOLS_PATH')) + { + define('LINK_EDIT_TOOLS_PATH', rtrim(basename(dirname(__FILE__)))); + } ?>
6
0.857143
6
0
5caa22112a11f2cabdacd8302536580012a2bf98
setup.py
setup.py
from distutils.core import setup from pexpect import __version__ setup (name='pexpect', version=__version__, py_modules=['pxssh', 'fdpexpect', 'FSM', 'screen', 'ANSI'], packages=['pexpect'], description='Pexpect allows easy control of interactive console applications.', author='Noah Spurrier; Thomas Kluyver; Jeff Quast', author_email='noah@noah.org; thomas@kluyver.me.uk; contact@jeffquast.com', url='http://pexpect.readthedocs.org/', license='ISC license', platforms='UNIX', classifiers = [ 'Development Status :: 5 - Production/Stable', 'Environment :: Console', 'Intended Audience :: Developers', 'Intended Audience :: System Administrators', 'Intended Audience :: Quality Engineers', 'License :: OSI Approved :: ISC License (ISCL)', 'Operating System :: POSIX', 'Operating System :: MacOS :: MacOS X', 'Programming Language :: Python', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Topic :: Software Development', 'Topic :: Software Development :: Libraries :: Python Modules', 'Topic :: Software Development :: Quality Assurance', 'Topic :: Software Development :: Testing', 'Topic :: System, System :: Archiving :: Packaging, System :: Installation/Setup', 'Topic :: System :: Shells', 'Topic :: System :: Software Distribution', 'Topic :: Terminals', ], )
from distutils.core import setup from pexpect import __version__ setup (name='pexpect', version=__version__, py_modules=['pxssh', 'fdpexpect', 'FSM', 'screen', 'ANSI'], packages=['pexpect'], description='Pexpect allows easy control of interactive console applications.', author='Noah Spurrier; Thomas Kluyver; Jeff Quast', author_email='noah@noah.org; thomas@kluyver.me.uk; contact@jeffquast.com', url='http://pexpect.readthedocs.org/', license='ISC license', platforms='UNIX', classifiers = [ 'Development Status :: 5 - Production/Stable', 'Environment :: Console', 'Intended Audience :: Developers', 'Intended Audience :: System Administrators', 'License :: OSI Approved :: ISC License (ISCL)', 'Operating System :: POSIX', 'Operating System :: MacOS :: MacOS X', 'Programming Language :: Python', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Topic :: Software Development', 'Topic :: Software Development :: Libraries :: Python Modules', 'Topic :: Software Development :: Quality Assurance', 'Topic :: Software Development :: Testing', 'Topic :: System', 'Topic :: System :: Archiving :: Packaging', 'Topic :: System :: Installation/Setup', 'Topic :: System :: Shells', 'Topic :: System :: Software Distribution', 'Topic :: Terminals', ], )
Fix Trove classifiers to allow PyPI upload
Fix Trove classifiers to allow PyPI upload
Python
isc
dongguangming/pexpect,crdoconnor/pexpect,nodish/pexpect,dongguangming/pexpect,blink1073/pexpect,Depado/pexpect,quatanium/pexpect,nodish/pexpect,bangi123/pexpect,bangi123/pexpect,Wakeupbuddy/pexpect,Wakeupbuddy/pexpect,nodish/pexpect,crdoconnor/pexpect,bangi123/pexpect,quatanium/pexpect,Depado/pexpect,crdoconnor/pexpect,Depado/pexpect,dongguangming/pexpect,Depado/pexpect,dongguangming/pexpect,bangi123/pexpect,quatanium/pexpect,Wakeupbuddy/pexpect,blink1073/pexpect,Wakeupbuddy/pexpect,blink1073/pexpect
python
## Code Before: from distutils.core import setup from pexpect import __version__ setup (name='pexpect', version=__version__, py_modules=['pxssh', 'fdpexpect', 'FSM', 'screen', 'ANSI'], packages=['pexpect'], description='Pexpect allows easy control of interactive console applications.', author='Noah Spurrier; Thomas Kluyver; Jeff Quast', author_email='noah@noah.org; thomas@kluyver.me.uk; contact@jeffquast.com', url='http://pexpect.readthedocs.org/', license='ISC license', platforms='UNIX', classifiers = [ 'Development Status :: 5 - Production/Stable', 'Environment :: Console', 'Intended Audience :: Developers', 'Intended Audience :: System Administrators', 'Intended Audience :: Quality Engineers', 'License :: OSI Approved :: ISC License (ISCL)', 'Operating System :: POSIX', 'Operating System :: MacOS :: MacOS X', 'Programming Language :: Python', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Topic :: Software Development', 'Topic :: Software Development :: Libraries :: Python Modules', 'Topic :: Software Development :: Quality Assurance', 'Topic :: Software Development :: Testing', 'Topic :: System, System :: Archiving :: Packaging, System :: Installation/Setup', 'Topic :: System :: Shells', 'Topic :: System :: Software Distribution', 'Topic :: Terminals', ], ) ## Instruction: Fix Trove classifiers to allow PyPI upload ## Code After: from distutils.core import setup from pexpect import __version__ setup (name='pexpect', version=__version__, py_modules=['pxssh', 'fdpexpect', 'FSM', 'screen', 'ANSI'], packages=['pexpect'], description='Pexpect allows easy control of interactive console applications.', author='Noah Spurrier; Thomas Kluyver; Jeff Quast', author_email='noah@noah.org; thomas@kluyver.me.uk; contact@jeffquast.com', url='http://pexpect.readthedocs.org/', license='ISC license', platforms='UNIX', classifiers = [ 'Development Status :: 5 - Production/Stable', 'Environment :: Console', 'Intended Audience :: Developers', 'Intended Audience :: System Administrators', 'License :: OSI Approved :: ISC License (ISCL)', 'Operating System :: POSIX', 'Operating System :: MacOS :: MacOS X', 'Programming Language :: Python', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Topic :: Software Development', 'Topic :: Software Development :: Libraries :: Python Modules', 'Topic :: Software Development :: Quality Assurance', 'Topic :: Software Development :: Testing', 'Topic :: System', 'Topic :: System :: Archiving :: Packaging', 'Topic :: System :: Installation/Setup', 'Topic :: System :: Shells', 'Topic :: System :: Software Distribution', 'Topic :: Terminals', ], )
from distutils.core import setup from pexpect import __version__ setup (name='pexpect', version=__version__, py_modules=['pxssh', 'fdpexpect', 'FSM', 'screen', 'ANSI'], packages=['pexpect'], description='Pexpect allows easy control of interactive console applications.', author='Noah Spurrier; Thomas Kluyver; Jeff Quast', author_email='noah@noah.org; thomas@kluyver.me.uk; contact@jeffquast.com', url='http://pexpect.readthedocs.org/', license='ISC license', platforms='UNIX', classifiers = [ 'Development Status :: 5 - Production/Stable', 'Environment :: Console', 'Intended Audience :: Developers', 'Intended Audience :: System Administrators', - 'Intended Audience :: Quality Engineers', 'License :: OSI Approved :: ISC License (ISCL)', 'Operating System :: POSIX', 'Operating System :: MacOS :: MacOS X', 'Programming Language :: Python', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Topic :: Software Development', 'Topic :: Software Development :: Libraries :: Python Modules', 'Topic :: Software Development :: Quality Assurance', 'Topic :: Software Development :: Testing', - 'Topic :: System, System :: Archiving :: Packaging, System :: Installation/Setup', + 'Topic :: System', + 'Topic :: System :: Archiving :: Packaging', + 'Topic :: System :: Installation/Setup', 'Topic :: System :: Shells', 'Topic :: System :: Software Distribution', 'Topic :: Terminals', ], )
5
0.135135
3
2
3c7c4f3447b5810250167f51af98e7b275c14a03
docs/source/reference/iterators.rst
docs/source/reference/iterators.rst
.. module:: chainer.iterators .. _iterators: Iterator ======== Chainer provides some iterators that implement typical strategies to create mini-batches by iterating over datasets. :class:`SerialIterator` is the simplest one, which extract mini-batches in the main thread. :class:`MultiprocessIterator` and :class:`MultithreadIterator` are a parallelized version of :class:`SerialIterator`. It maintains worker subprocesses and subthreads to load the next mini-batch in parallel. .. autosummary:: :toctree: generated/ :nosignatures: chainer.iterators.SerialIterator chainer.iterators.MultiprocessIterator chainer.iterators.MultithreadIterator Order sampler examples ====================== An Iterator iterates over a dataset according to an order represented by a 1-D array of indices. Order samplers are callables that are used by those iterators to generate this array. .. autosummary:: :toctree: generated/ :nosignatures: chainer.iterators.OrderSampler chainer.iterators.ShuffleOrderSampler
.. module:: chainer.iterators .. _iterators: Iterator ======== Chainer provides some iterators that implement typical strategies to create mini-batches by iterating over datasets. :class:`SerialIterator` is the simplest one, which extract mini-batches in the main thread. :class:`MultiprocessIterator` and :class:`MultithreadIterator` are a parallelized version of :class:`SerialIterator`. It maintains worker subprocesses and subthreads to load the next mini-batch in parallel. .. autosummary:: :toctree: generated/ :nosignatures: chainer.iterators.SerialIterator chainer.iterators.MultiprocessIterator chainer.iterators.MultithreadIterator Order sampler examples ---------------------- An Iterator iterates over a dataset according to an order represented by a 1-D array of indices. Order samplers are callables that are used by those iterators to generate this array. .. autosummary:: :toctree: generated/ :nosignatures: chainer.iterators.OrderSampler chainer.iterators.ShuffleOrderSampler
Fix toc level of Order sampler examples
Fix toc level of Order sampler examples
reStructuredText
mit
hvy/chainer,okuta/chainer,hvy/chainer,wkentaro/chainer,ktnyt/chainer,keisuke-umezawa/chainer,jnishi/chainer,wkentaro/chainer,keisuke-umezawa/chainer,okuta/chainer,ktnyt/chainer,tkerola/chainer,chainer/chainer,niboshi/chainer,niboshi/chainer,niboshi/chainer,chainer/chainer,keisuke-umezawa/chainer,niboshi/chainer,wkentaro/chainer,okuta/chainer,keisuke-umezawa/chainer,chainer/chainer,wkentaro/chainer,ktnyt/chainer,hvy/chainer,jnishi/chainer,ktnyt/chainer,hvy/chainer,okuta/chainer,jnishi/chainer,rezoo/chainer,chainer/chainer,jnishi/chainer,pfnet/chainer
restructuredtext
## Code Before: .. module:: chainer.iterators .. _iterators: Iterator ======== Chainer provides some iterators that implement typical strategies to create mini-batches by iterating over datasets. :class:`SerialIterator` is the simplest one, which extract mini-batches in the main thread. :class:`MultiprocessIterator` and :class:`MultithreadIterator` are a parallelized version of :class:`SerialIterator`. It maintains worker subprocesses and subthreads to load the next mini-batch in parallel. .. autosummary:: :toctree: generated/ :nosignatures: chainer.iterators.SerialIterator chainer.iterators.MultiprocessIterator chainer.iterators.MultithreadIterator Order sampler examples ====================== An Iterator iterates over a dataset according to an order represented by a 1-D array of indices. Order samplers are callables that are used by those iterators to generate this array. .. autosummary:: :toctree: generated/ :nosignatures: chainer.iterators.OrderSampler chainer.iterators.ShuffleOrderSampler ## Instruction: Fix toc level of Order sampler examples ## Code After: .. module:: chainer.iterators .. _iterators: Iterator ======== Chainer provides some iterators that implement typical strategies to create mini-batches by iterating over datasets. :class:`SerialIterator` is the simplest one, which extract mini-batches in the main thread. :class:`MultiprocessIterator` and :class:`MultithreadIterator` are a parallelized version of :class:`SerialIterator`. It maintains worker subprocesses and subthreads to load the next mini-batch in parallel. .. autosummary:: :toctree: generated/ :nosignatures: chainer.iterators.SerialIterator chainer.iterators.MultiprocessIterator chainer.iterators.MultithreadIterator Order sampler examples ---------------------- An Iterator iterates over a dataset according to an order represented by a 1-D array of indices. Order samplers are callables that are used by those iterators to generate this array. .. autosummary:: :toctree: generated/ :nosignatures: chainer.iterators.OrderSampler chainer.iterators.ShuffleOrderSampler
.. module:: chainer.iterators .. _iterators: Iterator ======== Chainer provides some iterators that implement typical strategies to create mini-batches by iterating over datasets. :class:`SerialIterator` is the simplest one, which extract mini-batches in the main thread. :class:`MultiprocessIterator` and :class:`MultithreadIterator` are a parallelized version of :class:`SerialIterator`. It maintains worker subprocesses and subthreads to load the next mini-batch in parallel. .. autosummary:: :toctree: generated/ :nosignatures: chainer.iterators.SerialIterator chainer.iterators.MultiprocessIterator chainer.iterators.MultithreadIterator Order sampler examples - ====================== + ---------------------- An Iterator iterates over a dataset according to an order represented by a 1-D array of indices. Order samplers are callables that are used by those iterators to generate this array. .. autosummary:: :toctree: generated/ :nosignatures: chainer.iterators.OrderSampler chainer.iterators.ShuffleOrderSampler
2
0.058824
1
1
185d08b772055c1e718c32d107e00366350657e5
MangoPay/Libraries/Error.php
MangoPay/Libraries/Error.php
<?php namespace MangoPay\Libraries; /** * Class represents error object */ class Error { /** * Error message * @var string * @access public */ public $Message; /** * Array with errors information * @var array * @access public */ public $Errors; /** * An identifer for this API response * @var string * @access public */ public $Id; /** * The timestamp of this API response * @var timestamp * @access public */ public $Date; /** * The type of error * @var string * @access public */ public $Type; /** * Return the stdClass error serialized as string * @access public */ public function __toString() { return serialize($this->Errors); } }
<?php namespace MangoPay\Libraries; /** * Class represents error object */ class Error { /** * Error message * @var string * @access public */ public $Message; /** * Array with errors information * @var object * @access public */ public $Errors; /** * An identifer for this API response * @var string * @access public */ public $Id; /** * The timestamp of this API response * @var int * @access public */ public $Date; /** * The type of error * @var string * @access public */ public $Type; /** * Return the stdClass error serialized as string * @access public */ public function __toString() { return serialize($this->Errors); } }
Fix wrong array typehint for errors
Fix wrong array typehint for errors
PHP
mit
Mangopay/mangopay2-php-sdk,Mangopay/mangopay2-php-sdk
php
## Code Before: <?php namespace MangoPay\Libraries; /** * Class represents error object */ class Error { /** * Error message * @var string * @access public */ public $Message; /** * Array with errors information * @var array * @access public */ public $Errors; /** * An identifer for this API response * @var string * @access public */ public $Id; /** * The timestamp of this API response * @var timestamp * @access public */ public $Date; /** * The type of error * @var string * @access public */ public $Type; /** * Return the stdClass error serialized as string * @access public */ public function __toString() { return serialize($this->Errors); } } ## Instruction: Fix wrong array typehint for errors ## Code After: <?php namespace MangoPay\Libraries; /** * Class represents error object */ class Error { /** * Error message * @var string * @access public */ public $Message; /** * Array with errors information * @var object * @access public */ public $Errors; /** * An identifer for this API response * @var string * @access public */ public $Id; /** * The timestamp of this API response * @var int * @access public */ public $Date; /** * The type of error * @var string * @access public */ public $Type; /** * Return the stdClass error serialized as string * @access public */ public function __toString() { return serialize($this->Errors); } }
<?php namespace MangoPay\Libraries; /** * Class represents error object */ class Error { /** * Error message * @var string * @access public */ public $Message; /** * Array with errors information - * @var array + * @var object * @access public */ public $Errors; /** * An identifer for this API response * @var string * @access public */ public $Id; /** * The timestamp of this API response - * @var timestamp + * @var int * @access public */ public $Date; /** * The type of error * @var string * @access public */ public $Type; /** * Return the stdClass error serialized as string * @access public */ public function __toString() { return serialize($this->Errors); } }
4
0.075472
2
2
2e63ebe847f7be9348039f1f6e5d996e89340cfb
.travis.yml
.travis.yml
language: node_js node_js: - 0.8 before_script: - npm install -g grunt-cli branches: only: - master - 1.3-stable notifications: irc: channels: - "irc.freenode.org#jquerymobile-dev"
language: node_js node_js: - 0.8 before_script: - npm install -g grunt-cli branches: only: - master - 1.3-stable matrix: env: - JQUERIES=1.7.2 - JQUERIES=1.8.3 - JQUERIES=1.9.1 - JQUERIES=git notifications: irc: channels: - "irc.freenode.org#jquerymobile-dev"
Set build matrix to test against different versions of jQuery
CI: Set build matrix to test against different versions of jQuery
YAML
mit
startxfr/jquery-mobile,arschmitz/uglymongrel-jquery-mobile,hinaloe/jqm-demo-ja,arschmitz/uglymongrel-jquery-mobile,startxfr/jquery-mobile,arschmitz/jquery-mobile,startxfr/jquery-mobile,hinaloe/jqm-demo-ja,arschmitz/jquery-mobile,arschmitz/jquery-mobile,arschmitz/uglymongrel-jquery-mobile,hinaloe/jqm-demo-ja
yaml
## Code Before: language: node_js node_js: - 0.8 before_script: - npm install -g grunt-cli branches: only: - master - 1.3-stable notifications: irc: channels: - "irc.freenode.org#jquerymobile-dev" ## Instruction: CI: Set build matrix to test against different versions of jQuery ## Code After: language: node_js node_js: - 0.8 before_script: - npm install -g grunt-cli branches: only: - master - 1.3-stable matrix: env: - JQUERIES=1.7.2 - JQUERIES=1.8.3 - JQUERIES=1.9.1 - JQUERIES=git notifications: irc: channels: - "irc.freenode.org#jquerymobile-dev"
language: node_js node_js: - 0.8 before_script: - npm install -g grunt-cli branches: only: - master - 1.3-stable + matrix: + env: + - JQUERIES=1.7.2 + - JQUERIES=1.8.3 + - JQUERIES=1.9.1 + - JQUERIES=git notifications: irc: channels: - "irc.freenode.org#jquerymobile-dev"
6
0.461538
6
0