commit
stringlengths
40
40
old_file
stringlengths
4
237
new_file
stringlengths
4
237
old_contents
stringlengths
1
4.24k
new_contents
stringlengths
5
4.84k
subject
stringlengths
15
778
message
stringlengths
16
6.86k
lang
stringlengths
1
30
license
stringclasses
13 values
repos
stringlengths
5
116k
config
stringlengths
1
30
content
stringlengths
105
8.72k
0fdfcb6bca2d40d418095316317a93876d798fab
change/@azure-msal-node-2020-09-24-14-45-33-msal-node-alpha-7-release.json
change/@azure-msal-node-2020-09-24-14-45-33-msal-node-alpha-7-release.json
{ "type": "none", "comment": "Update changelog versions for msal-node and extensions (#2336)", "packageName": "@azure/msal-node", "email": "[email protected]", "dependentChangeType": "none", "date": "2020-09-24T21:45:14.001Z" }
{ "type": "none", "comment": "Update changelog versions for msal-node and extensions (#2336)", "packageName": "@azure/msal-node", "email": "[email protected]", "dependentChangeType": "none", "date": "2020-09-24T21:45:14.001Z" }
Update beachball change file e-mail
Update beachball change file e-mail
JSON
mit
AzureAD/microsoft-authentication-library-for-js,AzureAD/microsoft-authentication-library-for-js,AzureAD/microsoft-authentication-library-for-js,AzureAD/microsoft-authentication-library-for-js,AzureAD/microsoft-authentication-library-for-js,AzureAD/microsoft-authentication-library-for-js,AzureAD/microsoft-authentication-library-for-js,AzureAD/microsoft-authentication-library-for-js
json
## Code Before: { "type": "none", "comment": "Update changelog versions for msal-node and extensions (#2336)", "packageName": "@azure/msal-node", "email": "[email protected]", "dependentChangeType": "none", "date": "2020-09-24T21:45:14.001Z" } ## Instruction: Update beachball change file e-mail ## Code After: { "type": "none", "comment": "Update changelog versions for msal-node and extensions (#2336)", "packageName": "@azure/msal-node", "email": "[email protected]", "dependentChangeType": "none", "date": "2020-09-24T21:45:14.001Z" }
79aa9c335619f39e9acb7c744705a6631cf18def
spec/controllers/queues_controller_spec.rb
spec/controllers/queues_controller_spec.rb
require 'spec_helper' describe QueuesController, :type => :controller do before do # TODO shouldn't this use the actual output of the json rendering? repository = { 'id' => 8, 'slug' => 'svenfuchs/gem-release' } build_3 = { 'id' => 1, 'number' => '3', 'commit' => 'b0a1b69', 'config' => {} } build_31 = { 'id' => 2, 'number' => '3.1', 'commit' => 'b0a1b69', 'config' => {} } end subject do get :index, :format => :json ActiveSupport::JSON.decode(response.body) end it 'index lists all jobs on the queue' do pending should == [ { 'id' => 1, 'number' => '3', 'commit' => 'b0a1b69', 'repository' => { 'id' => 8, 'slug' => 'svenfuchs/gem-release' } }, { 'id' => 2, 'number' => '3.1', 'commit' => 'b0a1b69', 'repository' => { 'id' => 8, 'slug' => 'svenfuchs/gem-release' } }, ] end end
require 'spec_helper' describe QueuesController, :type => :controller do let(:jobs) { [Factory.create(:test, :number => '3'), Factory.create(:test, :number => '3.1') ] } it 'index lists all jobs on the queue' do get :index, :format => :json json = ActiveSupport::JSON.decode(response.body) json.should include({ 'id' => jobs.first.id, 'number' => '3', 'commit' => '62aae5f70ceee39123ef', 'repository' => { 'id' => jobs.first.repository.id, 'slug' => 'svenfuchs/repository-1' } }) json.should include({ 'id' => jobs.second.id, 'number' => '3.1', 'commit' => '62aae5f70ceee39123ef', 'repository' => { 'id' => jobs.second.repository.id, 'slug' => 'svenfuchs/repository-2' } }) end end
Use state :created instead of :started for selecting queued jobs
Use state :created instead of :started for selecting queued jobs
Ruby
mit
0xCCD/travis-ci,0xCCD/travis-ci
ruby
## Code Before: require 'spec_helper' describe QueuesController, :type => :controller do before do # TODO shouldn't this use the actual output of the json rendering? repository = { 'id' => 8, 'slug' => 'svenfuchs/gem-release' } build_3 = { 'id' => 1, 'number' => '3', 'commit' => 'b0a1b69', 'config' => {} } build_31 = { 'id' => 2, 'number' => '3.1', 'commit' => 'b0a1b69', 'config' => {} } end subject do get :index, :format => :json ActiveSupport::JSON.decode(response.body) end it 'index lists all jobs on the queue' do pending should == [ { 'id' => 1, 'number' => '3', 'commit' => 'b0a1b69', 'repository' => { 'id' => 8, 'slug' => 'svenfuchs/gem-release' } }, { 'id' => 2, 'number' => '3.1', 'commit' => 'b0a1b69', 'repository' => { 'id' => 8, 'slug' => 'svenfuchs/gem-release' } }, ] end end ## Instruction: Use state :created instead of :started for selecting queued jobs ## Code After: require 'spec_helper' describe QueuesController, :type => :controller do let(:jobs) { [Factory.create(:test, :number => '3'), Factory.create(:test, :number => '3.1') ] } it 'index lists all jobs on the queue' do get :index, :format => :json json = ActiveSupport::JSON.decode(response.body) json.should include({ 'id' => jobs.first.id, 'number' => '3', 'commit' => '62aae5f70ceee39123ef', 'repository' => { 'id' => jobs.first.repository.id, 'slug' => 'svenfuchs/repository-1' } }) json.should include({ 'id' => jobs.second.id, 'number' => '3.1', 'commit' => '62aae5f70ceee39123ef', 'repository' => { 'id' => jobs.second.repository.id, 'slug' => 'svenfuchs/repository-2' } }) end end
e9d988c8eaab222a1123279f88e1b89bd4200a25
repo.yml
repo.yml
type: 'node' upstream: - repo: 'balena-auth' url: 'https://github.com/balena-io-modules/balena-auth' - repo: 'balena-pine' url: 'https://github.com/balena-io-modules/balena-pine' - repo: 'balena-register-device' url: 'https://github.com/balena-io-modules/balena-register-device' - repo: 'balena-request' url: 'https://github.com/balena-io-modules/balena-request'
type: 'node' upstream: - repo: 'balena-auth' url: 'https://github.com/balena-io-modules/balena-auth' - repo: 'balena-hup-action-utils' url: 'https://github.com/balena-io-modules/balena-hup-action-utils' - repo: 'balena-pine' url: 'https://github.com/balena-io-modules/balena-pine' - repo: 'balena-register-device' url: 'https://github.com/balena-io-modules/balena-register-device' - repo: 'balena-request' url: 'https://github.com/balena-io-modules/balena-request'
Enable nested changelogs for balena-hup-action-utils
Enable nested changelogs for balena-hup-action-utils Change-type: patch Signed-off-by: Thodoris Greasidis <[email protected]>
YAML
apache-2.0
resin-io/resin-sdk
yaml
## Code Before: type: 'node' upstream: - repo: 'balena-auth' url: 'https://github.com/balena-io-modules/balena-auth' - repo: 'balena-pine' url: 'https://github.com/balena-io-modules/balena-pine' - repo: 'balena-register-device' url: 'https://github.com/balena-io-modules/balena-register-device' - repo: 'balena-request' url: 'https://github.com/balena-io-modules/balena-request' ## Instruction: Enable nested changelogs for balena-hup-action-utils Change-type: patch Signed-off-by: Thodoris Greasidis <[email protected]> ## Code After: type: 'node' upstream: - repo: 'balena-auth' url: 'https://github.com/balena-io-modules/balena-auth' - repo: 'balena-hup-action-utils' url: 'https://github.com/balena-io-modules/balena-hup-action-utils' - repo: 'balena-pine' url: 'https://github.com/balena-io-modules/balena-pine' - repo: 'balena-register-device' url: 'https://github.com/balena-io-modules/balena-register-device' - repo: 'balena-request' url: 'https://github.com/balena-io-modules/balena-request'
8f02cf51d0271361f1406a93234ce3eef8cc185b
ut/mocha.js
ut/mocha.js
var assert = require('assert'); describe('Angularjs', function() { describe('test', function() { it('always true', function() { assert(1) }); }); });
var assert = require('assert'); describe('Angularjs', function() { describe('main', function() { it('always true', function() { assert(1) }); }); }); describe('Angularjs', function() { describe('fpga', function() { it('always true', function() { assert(1) }); }); }); describe('Angularjs', function() { describe('db', function() { it('always true', function() { assert(1) }); }); });
Add test for fpga main db
Add test for fpga main db
JavaScript
agpl-3.0
OpenFPGAduino/Arduinojs,OpenFPGAduino/Arduinojs,OpenFPGAduino/Arduinojs,OpenFPGAduino/Arduinojs,OpenFPGAduino/Arduinojs
javascript
## Code Before: var assert = require('assert'); describe('Angularjs', function() { describe('test', function() { it('always true', function() { assert(1) }); }); }); ## Instruction: Add test for fpga main db ## Code After: var assert = require('assert'); describe('Angularjs', function() { describe('main', function() { it('always true', function() { assert(1) }); }); }); describe('Angularjs', function() { describe('fpga', function() { it('always true', function() { assert(1) }); }); }); describe('Angularjs', function() { describe('db', function() { it('always true', function() { assert(1) }); }); });
cf554b46362b3290256323cbb86473909b90ccdd
run.sh
run.sh
if [ -z "$LOGGLY_AUTH_TOKEN" ]; then echo "Missing \$LOGGLY_AUTH_TOKEN" exit 1 fi # Fail if LOGGLY_TAG is not set if [ -z "$LOGGLY_TAG" ]; then echo "Missing \$LOGGLY_TAG" exit 1 fi # Create spool directory mkdir -p /var/spool/rsyslog # Replace variables sed -i "s/LOGGLY_AUTH_TOKEN/$LOGGLY_AUTH_TOKEN/" /etc/rsyslog.conf sed -i "s/LOGGLY_TAG/$LOGGLY_TAG/" /etc/rsyslog.conf # Run RSyslog daemon exec /usr/sbin/rsyslogd -n
if [ -z "$LOGGLY_AUTH_TOKEN" ]; then echo "Missing \$LOGGLY_AUTH_TOKEN" exit 1 fi # Fail if LOGGLY_TAG is not set if [ -z "$LOGGLY_TAG" ]; then echo "Missing \$LOGGLY_TAG" exit 1 fi # Create spool directory mkdir -p /var/spool/rsyslog # Expand multiple tags, in the format of tag1:tag2:tag3, into several tag arguments LOGGLY_TAG=$(echo $LOGGLY_TAG | sed 's/:/\\\\" tag=\\\\"/g') # Replace variables sed -i "s/LOGGLY_AUTH_TOKEN/$LOGGLY_AUTH_TOKEN/" /etc/rsyslog.conf sed -i "s/LOGGLY_TAG/$LOGGLY_TAG/" /etc/rsyslog.conf # Run RSyslog daemon exec /usr/sbin/rsyslogd -n
Add support for multiple tags.
Add support for multiple tags.
Shell
mit
vladgh/loggly-docker,aalness/loggly-docker,sendgridlabs/loggly-docker
shell
## Code Before: if [ -z "$LOGGLY_AUTH_TOKEN" ]; then echo "Missing \$LOGGLY_AUTH_TOKEN" exit 1 fi # Fail if LOGGLY_TAG is not set if [ -z "$LOGGLY_TAG" ]; then echo "Missing \$LOGGLY_TAG" exit 1 fi # Create spool directory mkdir -p /var/spool/rsyslog # Replace variables sed -i "s/LOGGLY_AUTH_TOKEN/$LOGGLY_AUTH_TOKEN/" /etc/rsyslog.conf sed -i "s/LOGGLY_TAG/$LOGGLY_TAG/" /etc/rsyslog.conf # Run RSyslog daemon exec /usr/sbin/rsyslogd -n ## Instruction: Add support for multiple tags. ## Code After: if [ -z "$LOGGLY_AUTH_TOKEN" ]; then echo "Missing \$LOGGLY_AUTH_TOKEN" exit 1 fi # Fail if LOGGLY_TAG is not set if [ -z "$LOGGLY_TAG" ]; then echo "Missing \$LOGGLY_TAG" exit 1 fi # Create spool directory mkdir -p /var/spool/rsyslog # Expand multiple tags, in the format of tag1:tag2:tag3, into several tag arguments LOGGLY_TAG=$(echo $LOGGLY_TAG | sed 's/:/\\\\" tag=\\\\"/g') # Replace variables sed -i "s/LOGGLY_AUTH_TOKEN/$LOGGLY_AUTH_TOKEN/" /etc/rsyslog.conf sed -i "s/LOGGLY_TAG/$LOGGLY_TAG/" /etc/rsyslog.conf # Run RSyslog daemon exec /usr/sbin/rsyslogd -n
1f33deed0101f2118bbdebf4a62cee10f39bddd7
assets/text-light.css
assets/text-light.css
body{font-family:Helvetica,arial,sans-serif;font-size:12px;line-height:1.4;background-color:#F7F7F9;color:#48484C;padding-left:3px;padding-right:3px}.change{background-color:#9ea1a1}.add{background-color:#DFD}.remove{background-color:#FDD}
body{font-family:Helvetica,arial,sans-serif;font-size:12px;line-height:1.4;background-color:#F7F7F9;color:#48484C;padding-left:3px;padding-right:3px}.change{background-color:#9ea1a1;color:#eee}.add{background-color:#DFD}.remove{background-color:#FDD}
Adjust foreground color of change headers in light theme.
Adjust foreground color of change headers in light theme.
CSS
apache-2.0
shineM/gh4a,DeLaSalleUniversity-Manila/octodroid-ToastyKrabstix,shineM/gh4a,AKiniyalocts/gh4a,shekibobo/gh4a,slapperwan/gh4a,slapperwan/gh4a,edyesed/gh4a,shekibobo/gh4a,edyesed/gh4a,Bloody-Badboy/gh4a,DeLaSalleUniversity-Manila/octodroid-ToastyKrabstix,sauloaguiar/gh4a,Bloody-Badboy/gh4a,sauloaguiar/gh4a,AKiniyalocts/gh4a
css
## Code Before: body{font-family:Helvetica,arial,sans-serif;font-size:12px;line-height:1.4;background-color:#F7F7F9;color:#48484C;padding-left:3px;padding-right:3px}.change{background-color:#9ea1a1}.add{background-color:#DFD}.remove{background-color:#FDD} ## Instruction: Adjust foreground color of change headers in light theme. ## Code After: body{font-family:Helvetica,arial,sans-serif;font-size:12px;line-height:1.4;background-color:#F7F7F9;color:#48484C;padding-left:3px;padding-right:3px}.change{background-color:#9ea1a1;color:#eee}.add{background-color:#DFD}.remove{background-color:#FDD}
45cbdceb805f89578a455fd1f8acb9e88a7705d5
src/main/scala/api/GeocodeApi.scala
src/main/scala/api/GeocodeApi.scala
package api import akka.actor.{ ActorRef, ActorSystem } import akka.pattern.ask import akka.util.Timeout import feature.Feature import geojson.FeatureJsonProtocol.FeatureFormat import model.{ TotalHits, Hits, AddressSearchResult } import scala.concurrent.duration._ import spray.routing.{ Directives, Route } import scala.concurrent.ExecutionContext.Implicits.global import spray.json._ trait GeocodeApi extends Directives { implicit val timeout = Timeout(10 seconds) def geocodeRoute(addressSearch: ActorRef)(implicit system: ActorSystem): Route = { path("") { getFromResource("web/index.html") } ~ { getFromResourceDirectory("web") } ~ path("test") { get { complete { "OK" } } } ~ path("address" / "point" / "suggest") { import core.AddressSearch._ parameter('queryString.as[String]) { term => get { complete { (addressSearch ? Query("address", "point", term)).collect { case s: String => s case _ => "Failure" } } } } } } }
package api import akka.actor.{ ActorRef, ActorSystem } import akka.pattern.ask import akka.util.Timeout import feature.Feature import geojson.FeatureJsonProtocol.FeatureFormat import model.{ TotalHits, Hits, AddressSearchResult } import scala.concurrent.duration._ import spray.routing.{ Directives, Route } import scala.concurrent.ExecutionContext.Implicits.global import spray.json._ import spray.http.MediaTypes._ trait GeocodeApi extends Directives { implicit val timeout = Timeout(10 seconds) def geocodeRoute(addressSearch: ActorRef)(implicit system: ActorSystem): Route = { path("") { getFromResource("web/index.html") } ~ { getFromResourceDirectory("web") } ~ path("test") { get { complete { "OK" } } } ~ path("address" / "point") { post { complete { "Batch Geocoding" } } } ~ path("address" / "point" / "suggest") { import core.AddressSearch._ parameter('queryString.as[String]) { term => get { respondWithMediaType(`application/json`) { compressResponseIfRequested() { complete { (addressSearch ? Query("address", "point", term)).collect { case s: String => s case _ => "Failure" } } } } } } } } }
Add json return and compression
Add json return and compression
Scala
apache-2.0
jmarin/scale-geocode,jmarin/scale-geocode
scala
## Code Before: package api import akka.actor.{ ActorRef, ActorSystem } import akka.pattern.ask import akka.util.Timeout import feature.Feature import geojson.FeatureJsonProtocol.FeatureFormat import model.{ TotalHits, Hits, AddressSearchResult } import scala.concurrent.duration._ import spray.routing.{ Directives, Route } import scala.concurrent.ExecutionContext.Implicits.global import spray.json._ trait GeocodeApi extends Directives { implicit val timeout = Timeout(10 seconds) def geocodeRoute(addressSearch: ActorRef)(implicit system: ActorSystem): Route = { path("") { getFromResource("web/index.html") } ~ { getFromResourceDirectory("web") } ~ path("test") { get { complete { "OK" } } } ~ path("address" / "point" / "suggest") { import core.AddressSearch._ parameter('queryString.as[String]) { term => get { complete { (addressSearch ? Query("address", "point", term)).collect { case s: String => s case _ => "Failure" } } } } } } } ## Instruction: Add json return and compression ## Code After: package api import akka.actor.{ ActorRef, ActorSystem } import akka.pattern.ask import akka.util.Timeout import feature.Feature import geojson.FeatureJsonProtocol.FeatureFormat import model.{ TotalHits, Hits, AddressSearchResult } import scala.concurrent.duration._ import spray.routing.{ Directives, Route } import scala.concurrent.ExecutionContext.Implicits.global import spray.json._ import spray.http.MediaTypes._ trait GeocodeApi extends Directives { implicit val timeout = Timeout(10 seconds) def geocodeRoute(addressSearch: ActorRef)(implicit system: ActorSystem): Route = { path("") { getFromResource("web/index.html") } ~ { getFromResourceDirectory("web") } ~ path("test") { get { complete { "OK" } } } ~ path("address" / "point") { post { complete { "Batch Geocoding" } } } ~ path("address" / "point" / "suggest") { import core.AddressSearch._ parameter('queryString.as[String]) { term => get { respondWithMediaType(`application/json`) { compressResponseIfRequested() { complete { (addressSearch ? Query("address", "point", term)).collect { case s: String => s case _ => "Failure" } } } } } } } } }
17e5b5492e6e128459fc20fc3e9df41c6095b6e1
.travis.yml
.travis.yml
language: "ruby" rvm: - "1.8" - "1.9" - "2.0" - "2.1" - "jruby" - "rbx" install: - bundle install --retry=3 matrix: include: - rvm: "2.1" gemfile: "gemfiles/Gemfile.multi_json.x" - rvm: "2.1" gemfile: "gemfiles/Gemfile.yajl-ruby.x" - rvm: "2.1" gemfile: "gemfiles/Gemfile.uuidtools.x" allow_failures: - rvm: "1.8"
language: "ruby" rvm: - "1.8" - "1.9" - "2.0" - "2.1" - "jruby" - "rbx" sudo:false install: - bundle install --retry=3 matrix: include: - rvm: "2.1" gemfile: "gemfiles/Gemfile.multi_json.x" - rvm: "2.1" gemfile: "gemfiles/Gemfile.yajl-ruby.x" - rvm: "2.1" gemfile: "gemfiles/Gemfile.uuidtools.x" allow_failures: - rvm: "1.8"
Use the new build env on Travis
Use the new build env on Travis more ram, more cpu, improved network and vm boot times http://docs.travis-ci.com/user/workers/container-based-infrastructure/ more docs coming soon
YAML
mit
iainbeeston/json-schema,openc/json-schema,RST-J/json-schema,openc/json-schema,ruby-json-schema/json-schema,ganeshkumar/json-schema
yaml
## Code Before: language: "ruby" rvm: - "1.8" - "1.9" - "2.0" - "2.1" - "jruby" - "rbx" install: - bundle install --retry=3 matrix: include: - rvm: "2.1" gemfile: "gemfiles/Gemfile.multi_json.x" - rvm: "2.1" gemfile: "gemfiles/Gemfile.yajl-ruby.x" - rvm: "2.1" gemfile: "gemfiles/Gemfile.uuidtools.x" allow_failures: - rvm: "1.8" ## Instruction: Use the new build env on Travis more ram, more cpu, improved network and vm boot times http://docs.travis-ci.com/user/workers/container-based-infrastructure/ more docs coming soon ## Code After: language: "ruby" rvm: - "1.8" - "1.9" - "2.0" - "2.1" - "jruby" - "rbx" sudo:false install: - bundle install --retry=3 matrix: include: - rvm: "2.1" gemfile: "gemfiles/Gemfile.multi_json.x" - rvm: "2.1" gemfile: "gemfiles/Gemfile.yajl-ruby.x" - rvm: "2.1" gemfile: "gemfiles/Gemfile.uuidtools.x" allow_failures: - rvm: "1.8"
cbe5c63a1850ed816f5f51576bb8e516c50a76f7
recipes/vidyo.rb
recipes/vidyo.rb
deb_name = 'VidyoDesktopInstaller-ubuntu64-TAG_VD_3_6_3_017.deb' deb_path = "#{Chef::Config[:file_cache_path]}/#{deb_name}" remote_file deb_path do source "https://demo.vidyo.com/upload/#{deb_name}" checksum '9d2455dc29bfa7db5cf3ec535ffd2a8c86c5a71f78d7d89c40dbd744b2c15707' end package 'libqt4-gui' dpkg_package deb_path
deb_name = 'VidyoDesktopInstaller-ubuntu64-TAG_VD_3_6_3_017.deb' deb_path = "#{Chef::Config[:file_cache_path]}/#{deb_name}" remote_file deb_path do source "https://demo.vidyo.com/upload/#{deb_name}" checksum '9d2455dc29bfa7db5cf3ec535ffd2a8c86c5a71f78d7d89c40dbd744b2c15707' end package [ 'libqt4-designer', 'libqt4-opengl', 'libqt4-svg', 'libqtgui4' ] do action :upgrade end dpkg_package deb_path
Use modern package names instead of deprecated 'libqt4-gui'
Use modern package names instead of deprecated 'libqt4-gui'
Ruby
apache-2.0
http-418/chef-desktop,http-418/chef-desktop,http-418/chef-desktop,http-418/chef-desktop
ruby
## Code Before: deb_name = 'VidyoDesktopInstaller-ubuntu64-TAG_VD_3_6_3_017.deb' deb_path = "#{Chef::Config[:file_cache_path]}/#{deb_name}" remote_file deb_path do source "https://demo.vidyo.com/upload/#{deb_name}" checksum '9d2455dc29bfa7db5cf3ec535ffd2a8c86c5a71f78d7d89c40dbd744b2c15707' end package 'libqt4-gui' dpkg_package deb_path ## Instruction: Use modern package names instead of deprecated 'libqt4-gui' ## Code After: deb_name = 'VidyoDesktopInstaller-ubuntu64-TAG_VD_3_6_3_017.deb' deb_path = "#{Chef::Config[:file_cache_path]}/#{deb_name}" remote_file deb_path do source "https://demo.vidyo.com/upload/#{deb_name}" checksum '9d2455dc29bfa7db5cf3ec535ffd2a8c86c5a71f78d7d89c40dbd744b2c15707' end package [ 'libqt4-designer', 'libqt4-opengl', 'libqt4-svg', 'libqtgui4' ] do action :upgrade end dpkg_package deb_path
4ecf978642e0db86bf47aa75a00b658ee93f4119
Specs/Core/AnimationControllerSpec.js
Specs/Core/AnimationControllerSpec.js
/*global defineSuite*/ defineSuite([ 'Core/Clock', 'Core/AnimationController' ], function( Clock, AnimationController) { "use strict"; /*global it,expect*/ it('construct with default clock', function() { var clock = new Clock(); var animationController = new AnimationController(clock); expect(animationController.clock).toEqual(clock); }); it('play, pause, playReverse, and reset affect isAnimating', function() { var clock = new Clock(); var animationController = new AnimationController(clock); expect(animationController.isAnimating()).toEqual(true); animationController.pause(); expect(animationController.isAnimating()).toEqual(false); animationController.play(); expect(animationController.isAnimating()).toEqual(true); animationController.playReverse(); expect(animationController.isAnimating()).toEqual(true); animationController.reset(); expect(animationController.isAnimating()).toEqual(false); }); });
/*global defineSuite*/ defineSuite([ 'Core/AnimationController', 'Core/Clock' ], function( AnimationController, Clock) { "use strict"; /*global it,expect*/ it('construct with default clock', function() { var clock = new Clock(); var animationController = new AnimationController(clock); expect(animationController.clock).toEqual(clock); }); it('play, pause, playReverse, and reset affect isAnimating', function() { var clock = new Clock(); var animationController = new AnimationController(clock); expect(animationController.isAnimating()).toEqual(true); animationController.pause(); expect(animationController.isAnimating()).toEqual(false); animationController.play(); expect(animationController.isAnimating()).toEqual(true); animationController.playReverse(); expect(animationController.isAnimating()).toEqual(true); animationController.reset(); expect(animationController.isAnimating()).toEqual(false); }); });
Fix name of AnimationController unit test.
Fix name of AnimationController unit test.
JavaScript
apache-2.0
wallw-bits/cesium,YonatanKra/cesium,aelatgt/cesium,jasonbeverage/cesium,NaderCHASER/cesium,esraerik/cesium,jason-crow/cesium,esraerik/cesium,hodbauer/cesium,soceur/cesium,jason-crow/cesium,AnimatedRNG/cesium,likangning93/cesium,emackey/cesium,wallw-bits/cesium,esraerik/cesium,AnalyticalGraphicsInc/cesium,likangning93/cesium,omh1280/cesium,josh-bernstein/cesium,omh1280/cesium,progsung/cesium,jason-crow/cesium,aelatgt/cesium,oterral/cesium,emackey/cesium,denverpierce/cesium,ggetz/cesium,emackey/cesium,kiselev-dv/cesium,YonatanKra/cesium,omh1280/cesium,hodbauer/cesium,likangning93/cesium,CesiumGS/cesium,AnimatedRNG/cesium,CesiumGS/cesium,ggetz/cesium,ggetz/cesium,kaktus40/cesium,denverpierce/cesium,aelatgt/cesium,aelatgt/cesium,AnalyticalGraphicsInc/cesium,kaktus40/cesium,AnimatedRNG/cesium,emackey/cesium,denverpierce/cesium,AnimatedRNG/cesium,NaderCHASER/cesium,CesiumGS/cesium,soceur/cesium,wallw-bits/cesium,geoscan/cesium,omh1280/cesium,denverpierce/cesium,NaderCHASER/cesium,likangning93/cesium,wallw-bits/cesium,likangning93/cesium,esraerik/cesium,CesiumGS/cesium,CesiumGS/cesium,jasonbeverage/cesium,kiselev-dv/cesium,kiselev-dv/cesium,YonatanKra/cesium,jason-crow/cesium,hodbauer/cesium,josh-bernstein/cesium,ggetz/cesium,geoscan/cesium,progsung/cesium,oterral/cesium,kiselev-dv/cesium,YonatanKra/cesium,oterral/cesium,soceur/cesium
javascript
## Code Before: /*global defineSuite*/ defineSuite([ 'Core/Clock', 'Core/AnimationController' ], function( Clock, AnimationController) { "use strict"; /*global it,expect*/ it('construct with default clock', function() { var clock = new Clock(); var animationController = new AnimationController(clock); expect(animationController.clock).toEqual(clock); }); it('play, pause, playReverse, and reset affect isAnimating', function() { var clock = new Clock(); var animationController = new AnimationController(clock); expect(animationController.isAnimating()).toEqual(true); animationController.pause(); expect(animationController.isAnimating()).toEqual(false); animationController.play(); expect(animationController.isAnimating()).toEqual(true); animationController.playReverse(); expect(animationController.isAnimating()).toEqual(true); animationController.reset(); expect(animationController.isAnimating()).toEqual(false); }); }); ## Instruction: Fix name of AnimationController unit test. ## Code After: /*global defineSuite*/ defineSuite([ 'Core/AnimationController', 'Core/Clock' ], function( AnimationController, Clock) { "use strict"; /*global it,expect*/ it('construct with default clock', function() { var clock = new Clock(); var animationController = new AnimationController(clock); expect(animationController.clock).toEqual(clock); }); it('play, pause, playReverse, and reset affect isAnimating', function() { var clock = new Clock(); var animationController = new AnimationController(clock); expect(animationController.isAnimating()).toEqual(true); animationController.pause(); expect(animationController.isAnimating()).toEqual(false); animationController.play(); expect(animationController.isAnimating()).toEqual(true); animationController.playReverse(); expect(animationController.isAnimating()).toEqual(true); animationController.reset(); expect(animationController.isAnimating()).toEqual(false); }); });
59a6faf391b43dfb85616c8e9ede24a7b4e27551
angular_components/lib/material_tab/material_tab.scss
angular_components/lib/material_tab/material_tab.scss
// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. @import 'package:angular_components/css/material/material'; @import 'package:angular_components/css/material/shadow'; :host { display: flex; } :host:focus { outline: none; } :host(.material-tab) { padding: $mat-grid * 2; @include shadow-elevation(); } .tab-content { display: flex; flex: 0 0 100%; }
// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. @import 'package:angular_components/css/material/material'; @import 'package:angular_components/css/material/shadow'; :host { display: flex; } :host:focus { outline: none; } :host(.material-tab) { padding: $mat-grid * 2; @include shadow-elevation(); } .tab-content { display: flex; flex: 0 0 100%; width: 100%; }
Set default width of tab-content to 100%.
Set default width of tab-content to 100%. PiperOrigin-RevId: 222349162
SCSS
bsd-3-clause
angulardart/angular_components,angulardart/angular_components,angulardart/angular_components
scss
## Code Before: // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. @import 'package:angular_components/css/material/material'; @import 'package:angular_components/css/material/shadow'; :host { display: flex; } :host:focus { outline: none; } :host(.material-tab) { padding: $mat-grid * 2; @include shadow-elevation(); } .tab-content { display: flex; flex: 0 0 100%; } ## Instruction: Set default width of tab-content to 100%. PiperOrigin-RevId: 222349162 ## Code After: // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. @import 'package:angular_components/css/material/material'; @import 'package:angular_components/css/material/shadow'; :host { display: flex; } :host:focus { outline: none; } :host(.material-tab) { padding: $mat-grid * 2; @include shadow-elevation(); } .tab-content { display: flex; flex: 0 0 100%; width: 100%; }
4f880375b2539cf1a56e9a1fd816d4aa039e939e
upload/library/SV/OptimizedListQueries/XenForo/Model/Post.php
upload/library/SV/OptimizedListQueries/XenForo/Model/Post.php
<?php class SV_OptimizedListQueries_XenForo_Model_Post extends XFCP_SV_OptimizedListQueries_XenForo_Model_Post { public function preparePostJoinOptions(array $fetchOptions) { if (SV_OptimizedListQueries_Globals::$slimPostFetchForSearch) { $fetchOptions['skip_wordcount'] = true; if (!empty($fetchOptions['join']) && class_exists('Sidane_Threadmarks_Model_Post', false)) { $fetchOptions['join'] &= ~Sidane_Threadmarks_Model_Post::FETCH_THREADMARKS; } } $sqlOptions = parent::preparePostJoinOptions($fetchOptions); if (SV_OptimizedListQueries_Globals::$slimPostFetchForSearch) { $sqlOptions['selectFields'] .= ", '' as message "; } return $sqlOptions; } } // ******************** FOR IDE AUTO COMPLETE ******************** if (false) { class XFCP_SV_OptimizedListQueries_XenForo_Model_Post extends XenForo_Model_Post {} }
<?php class SV_OptimizedListQueries_XenForo_Model_Post extends XFCP_SV_OptimizedListQueries_XenForo_Model_Post { public function preparePostJoinOptions(array $fetchOptions) { if (SV_OptimizedListQueries_Globals::$slimPostFetchForSearch) { $fetchOptions['skip_wordcount'] = true; if (class_exists('Sidane_Threadmarks_XenForo_Model_Post', false)) { $fetchOptions['includeThreadmark'] = false; } else if (!empty($fetchOptions['join']) && class_exists('Sidane_Threadmarks_Model_Post', false)) { /** @noinspection PhpUndefinedClassInspection */ $fetchOptions['join'] &= ~Sidane_Threadmarks_Model_Post::FETCH_THREADMARKS; } } $sqlOptions = parent::preparePostJoinOptions($fetchOptions); if (SV_OptimizedListQueries_Globals::$slimPostFetchForSearch) { $sqlOptions['selectFields'] .= ", '' as message "; } return $sqlOptions; } } // ******************** FOR IDE AUTO COMPLETE ******************** if (false) { class XFCP_SV_OptimizedListQueries_XenForo_Model_Post extends XenForo_Model_Post {} }
Fix threadmark slim search results
Fix threadmark slim search results
PHP
mit
Xon/XenForo-OptimizedListQueries
php
## Code Before: <?php class SV_OptimizedListQueries_XenForo_Model_Post extends XFCP_SV_OptimizedListQueries_XenForo_Model_Post { public function preparePostJoinOptions(array $fetchOptions) { if (SV_OptimizedListQueries_Globals::$slimPostFetchForSearch) { $fetchOptions['skip_wordcount'] = true; if (!empty($fetchOptions['join']) && class_exists('Sidane_Threadmarks_Model_Post', false)) { $fetchOptions['join'] &= ~Sidane_Threadmarks_Model_Post::FETCH_THREADMARKS; } } $sqlOptions = parent::preparePostJoinOptions($fetchOptions); if (SV_OptimizedListQueries_Globals::$slimPostFetchForSearch) { $sqlOptions['selectFields'] .= ", '' as message "; } return $sqlOptions; } } // ******************** FOR IDE AUTO COMPLETE ******************** if (false) { class XFCP_SV_OptimizedListQueries_XenForo_Model_Post extends XenForo_Model_Post {} } ## Instruction: Fix threadmark slim search results ## Code After: <?php class SV_OptimizedListQueries_XenForo_Model_Post extends XFCP_SV_OptimizedListQueries_XenForo_Model_Post { public function preparePostJoinOptions(array $fetchOptions) { if (SV_OptimizedListQueries_Globals::$slimPostFetchForSearch) { $fetchOptions['skip_wordcount'] = true; if (class_exists('Sidane_Threadmarks_XenForo_Model_Post', false)) { $fetchOptions['includeThreadmark'] = false; } else if (!empty($fetchOptions['join']) && class_exists('Sidane_Threadmarks_Model_Post', false)) { /** @noinspection PhpUndefinedClassInspection */ $fetchOptions['join'] &= ~Sidane_Threadmarks_Model_Post::FETCH_THREADMARKS; } } $sqlOptions = parent::preparePostJoinOptions($fetchOptions); if (SV_OptimizedListQueries_Globals::$slimPostFetchForSearch) { $sqlOptions['selectFields'] .= ", '' as message "; } return $sqlOptions; } } // ******************** FOR IDE AUTO COMPLETE ******************** if (false) { class XFCP_SV_OptimizedListQueries_XenForo_Model_Post extends XenForo_Model_Post {} }
1294ca2cfed003235e1b20fa79fb6d99212a7bff
lib/create.js
lib/create.js
'use strict'; var NET = require('net'); var PORTS = {}; function CreateServer( port, callback ){ if( (typeof port === 'number') ){ port = parseFloat(port); if( (PORTS[port.toString()]) ){ process.nextTick(CreateServer,port,callback); return; } PORTS[port.toString()] = true; NET.createServer() .on('error',function CreateServerError(error){ delete PORTS[port.toString()]; if(error.code === 'EADDRINUSE'){ callback(null,false,port); } else{ callback(true,error,port); } }) .listen(port,function CreateServerListening(){ this.close(function CreateServerClose(){ delete PORTS[port.toString()]; callback(null,true,port); }); }); } else if(typeof callback === 'function') callback(null,false); } module.exports = CreateServer;
'use strict'; var NET = require('net'); var PORTS = {}; function CreateServer( port, callback ){ if( (typeof port === 'number') ){ port = parseFloat(port); if( (PORTS[port.toString()]) ){ process.nextTick(CreateServer,port,callback); return; } PORTS[port.toString()] = true; NET.createServer() .on('error',function CreateServerError(error){ delete PORTS[port.toString()]; /* Older versions of Node.js throw hard // errors when .closing an error'd server. */ try{ this.close(); } catch(error){ /* Ignore the error, simply try and close // the server if for whatever reason it // is somehow listening. */ } if(error.code === 'EADDRINUSE') callback(null,false,port); else callback(true,error,port); }) .on('listening',function CreateServerListening(){ this.close(function CreateServerClose(){ delete PORTS[port.toString()]; callback(null,true,port); }); }) .listen(port); } else if(typeof callback === 'function') callback(null,false); } module.exports = CreateServer;
Add a 'try' block for current versions of Node.js to try and '.close' the server.
Add a 'try' block for current versions of Node.js to try and '.close' the server.
JavaScript
mit
METACEO/nodejs.chasm
javascript
## Code Before: 'use strict'; var NET = require('net'); var PORTS = {}; function CreateServer( port, callback ){ if( (typeof port === 'number') ){ port = parseFloat(port); if( (PORTS[port.toString()]) ){ process.nextTick(CreateServer,port,callback); return; } PORTS[port.toString()] = true; NET.createServer() .on('error',function CreateServerError(error){ delete PORTS[port.toString()]; if(error.code === 'EADDRINUSE'){ callback(null,false,port); } else{ callback(true,error,port); } }) .listen(port,function CreateServerListening(){ this.close(function CreateServerClose(){ delete PORTS[port.toString()]; callback(null,true,port); }); }); } else if(typeof callback === 'function') callback(null,false); } module.exports = CreateServer; ## Instruction: Add a 'try' block for current versions of Node.js to try and '.close' the server. ## Code After: 'use strict'; var NET = require('net'); var PORTS = {}; function CreateServer( port, callback ){ if( (typeof port === 'number') ){ port = parseFloat(port); if( (PORTS[port.toString()]) ){ process.nextTick(CreateServer,port,callback); return; } PORTS[port.toString()] = true; NET.createServer() .on('error',function CreateServerError(error){ delete PORTS[port.toString()]; /* Older versions of Node.js throw hard // errors when .closing an error'd server. */ try{ this.close(); } catch(error){ /* Ignore the error, simply try and close // the server if for whatever reason it // is somehow listening. */ } if(error.code === 'EADDRINUSE') callback(null,false,port); else callback(true,error,port); }) .on('listening',function CreateServerListening(){ this.close(function CreateServerClose(){ delete PORTS[port.toString()]; callback(null,true,port); }); }) .listen(port); } else if(typeof callback === 'function') callback(null,false); } module.exports = CreateServer;
305969cedb966d1e5cd340d531727bb984ac35a8
whitenoise/generators/sqlalchemy.py
whitenoise/generators/sqlalchemy.py
import random from whitenoise.generators import BaseGenerator class SelectGenerator(BaseGenerator): ''' Creates a value by selecting from another SQLAlchemy table Depends on SQLAlchemy, and receiving a session object from the Fixture runner the SQLAlchemy fixture runner handles this for us Receives the name of another class to lookup. If the query returns more than one option, either random or the 1st is selected (default is random) ''' def __init__(self, model, random=True, *args, **kwargs): super().__init__(*args, **kwargs) self.session = None self.model = model self.random = random def generate(self): if(self.session is None): raise ValueError('You must set the session property before using this generator') _query = self.session.query(self.model).all() if self.random: return random.SystemRandom().choice(_query) else: return _query[0]
import random from whitenoise.generators import BaseGenerator class SelectGenerator(BaseGenerator): ''' Creates a value by selecting from another SQLAlchemy table Depends on SQLAlchemy, and receiving a session object from the Fixture runner the SQLAlchemy fixture runner handles this for us Receives the name of another class to lookup. If the query returns more than one option, either random or the 1st is selected (default is random) ''' def __init__(self, model, random=True, *args, **kwargs): super().__init__(*args, **kwargs) self.session = None self.model = model self.random = random def generate(self): if(self.session is None): raise ValueError('You must set the session property before using this generator') _query = self.session.query(self.model).all() if self.random: return random.SystemRandom().choice(_query) else: return _query[0] class LinkGenerator(BaseGenerator): ''' Creates a list for secondary relationships using link tables by selecting from another SQLAlchemy table Depends on SQLAlchemy, and receiving a session object from the Fixture runner the SQLAlchemy fixture runner handles this for us Receives the name of another class to lookup. If the query returns more than one option, either random or the 1st is selected (default is random) ''' def __init__(self, model, max_map, random=True, *args, **kwargs): super().__init__(*args, **kwargs) self.session = None self.model = model self.random = random self.max_map = max_map def generate(self): if(self.session is None): raise ValueError('You must set the session property before using this generator') _query = self.session.query(self.model).all() if self.random: return random.SystemRandom().sample(_query,random.randint(1, max_map)) else: return [_query[0]]
Add a generator for association tables
Add a generator for association tables
Python
mit
James1345/white-noise
python
## Code Before: import random from whitenoise.generators import BaseGenerator class SelectGenerator(BaseGenerator): ''' Creates a value by selecting from another SQLAlchemy table Depends on SQLAlchemy, and receiving a session object from the Fixture runner the SQLAlchemy fixture runner handles this for us Receives the name of another class to lookup. If the query returns more than one option, either random or the 1st is selected (default is random) ''' def __init__(self, model, random=True, *args, **kwargs): super().__init__(*args, **kwargs) self.session = None self.model = model self.random = random def generate(self): if(self.session is None): raise ValueError('You must set the session property before using this generator') _query = self.session.query(self.model).all() if self.random: return random.SystemRandom().choice(_query) else: return _query[0] ## Instruction: Add a generator for association tables ## Code After: import random from whitenoise.generators import BaseGenerator class SelectGenerator(BaseGenerator): ''' Creates a value by selecting from another SQLAlchemy table Depends on SQLAlchemy, and receiving a session object from the Fixture runner the SQLAlchemy fixture runner handles this for us Receives the name of another class to lookup. If the query returns more than one option, either random or the 1st is selected (default is random) ''' def __init__(self, model, random=True, *args, **kwargs): super().__init__(*args, **kwargs) self.session = None self.model = model self.random = random def generate(self): if(self.session is None): raise ValueError('You must set the session property before using this generator') _query = self.session.query(self.model).all() if self.random: return random.SystemRandom().choice(_query) else: return _query[0] class LinkGenerator(BaseGenerator): ''' Creates a list for secondary relationships using link tables by selecting from another SQLAlchemy table Depends on SQLAlchemy, and receiving a session object from the Fixture runner the SQLAlchemy fixture runner handles this for us Receives the name of another class to lookup. If the query returns more than one option, either random or the 1st is selected (default is random) ''' def __init__(self, model, max_map, random=True, *args, **kwargs): super().__init__(*args, **kwargs) self.session = None self.model = model self.random = random self.max_map = max_map def generate(self): if(self.session is None): raise ValueError('You must set the session property before using this generator') _query = self.session.query(self.model).all() if self.random: return random.SystemRandom().sample(_query,random.randint(1, max_map)) else: return [_query[0]]
645f0750f3f8a087e57d41fbfeb181e9ffa5766f
src/test/resources/variantConfiguration.properties
src/test/resources/variantConfiguration.properties
input=/small20.vcf.gz fileId=5 aggregated=NONE studyType=COLLECTION studyName=studyName studyId=7 outputDir=/tmp pedigree= dbCollectionVariantsName=variants dbCollectionFilesName=files dbName=variantJob storageEngine=mongodb compressGenotypes=true compressExtension=.gz includeSrc=FIRST_8_COLUMNS opencga.app.home= skipLoad=false #VEP vepInput=/tmp/preannot_TEST.tsv vepOutput=/tmp/variants.annot.tsv.gz vepPath= vepCacheDirectory=/path/to/cache vepCacheVersion=79 vepSpecies=homo_sapiens vepFasta=/path/to/file.fa vepNumForks=4 # Repeat steps # true: The already COMPLETEd steps will be rerun. This is restarting the job from the beginning # false(default): if the job was aborted and is relaunched, COMPLETEd steps will NOT be done again allowStartIfComplete=false readPreference=primary
input=/small20.vcf.gz fileId=5 aggregated=NONE studyType=COLLECTION studyName=studyName studyId=7 outputDir=/tmp pedigree= dbCollectionVariantsName=variants dbCollectionFilesName=files dbName=variantJob storageEngine=mongodb compressGenotypes=true compressExtension=.gz includeSrc=FIRST_8_COLUMNS opencga.app.home=/opt/opencga skipLoad=false #VEP vepInput=/tmp/preannot_TEST.tsv vepOutput=/tmp/variants.annot.tsv.gz vepPath= vepCacheDirectory=/path/to/cache vepCacheVersion=79 vepSpecies=homo_sapiens vepFasta=/path/to/file.fa vepNumForks=4 # Repeat steps # true: The already COMPLETEd steps will be rerun. This is restarting the job from the beginning # false(default): if the job was aborted and is relaunched, COMPLETEd steps will NOT be done again allowStartIfComplete=false readPreference=primary
Set opencga value to /opt/opencga
Set opencga value to /opt/opencga
INI
apache-2.0
jmmut/eva-pipeline,jmmut/eva-pipeline,jmmut/eva-pipeline,cyenyxe/eva-pipeline,EBIvariation/eva-pipeline,EBIvariation/eva-pipeline,cyenyxe/eva-pipeline,cyenyxe/eva-pipeline
ini
## Code Before: input=/small20.vcf.gz fileId=5 aggregated=NONE studyType=COLLECTION studyName=studyName studyId=7 outputDir=/tmp pedigree= dbCollectionVariantsName=variants dbCollectionFilesName=files dbName=variantJob storageEngine=mongodb compressGenotypes=true compressExtension=.gz includeSrc=FIRST_8_COLUMNS opencga.app.home= skipLoad=false #VEP vepInput=/tmp/preannot_TEST.tsv vepOutput=/tmp/variants.annot.tsv.gz vepPath= vepCacheDirectory=/path/to/cache vepCacheVersion=79 vepSpecies=homo_sapiens vepFasta=/path/to/file.fa vepNumForks=4 # Repeat steps # true: The already COMPLETEd steps will be rerun. This is restarting the job from the beginning # false(default): if the job was aborted and is relaunched, COMPLETEd steps will NOT be done again allowStartIfComplete=false readPreference=primary ## Instruction: Set opencga value to /opt/opencga ## Code After: input=/small20.vcf.gz fileId=5 aggregated=NONE studyType=COLLECTION studyName=studyName studyId=7 outputDir=/tmp pedigree= dbCollectionVariantsName=variants dbCollectionFilesName=files dbName=variantJob storageEngine=mongodb compressGenotypes=true compressExtension=.gz includeSrc=FIRST_8_COLUMNS opencga.app.home=/opt/opencga skipLoad=false #VEP vepInput=/tmp/preannot_TEST.tsv vepOutput=/tmp/variants.annot.tsv.gz vepPath= vepCacheDirectory=/path/to/cache vepCacheVersion=79 vepSpecies=homo_sapiens vepFasta=/path/to/file.fa vepNumForks=4 # Repeat steps # true: The already COMPLETEd steps will be rerun. This is restarting the job from the beginning # false(default): if the job was aborted and is relaunched, COMPLETEd steps will NOT be done again allowStartIfComplete=false readPreference=primary
aa743318f6142fe387c5e6d390cf6d0cfcab0603
frontend/app/map/views/manage-views.html
frontend/app/map/views/manage-views.html
<div class="modal-header"> <button type="button" class="close" ng-click="$dismiss()"><span aria-hidden="true">&times;</span></button> <h3 class="modal-title">Manage Views</h3> </div> <div class="modal-body"> <div uib-alert class="alert-danger" ng-if="error">{{error.message || error}}</div> <table class="table table-striped"> <tbody> <tr ng-class="{success: view.id == padData.defaultView.id}" ng-repeat="view in client.views"> <td><a href="javascript:" ng-click="display(view)">{{view.name}}</a></td> <td class="td-buttons"> <button type="button" ng-hide="view.id == padData.defaultView.id" ng-click="makeDefault(view)" class="btn btn-default">Make default</button> <button type="button" ng-click="confirm('Do you really want to delete the view “' + view.name + '”?') && delete(view)" class="btn btn-default">Delete</button> </td> </tr> </tbody> </table> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" ng-click="$dismiss()">Close</button> </div>
<div class="modal-header"> <button type="button" class="close" ng-click="$dismiss()"><span aria-hidden="true">&times;</span></button> <h3 class="modal-title">Manage Views</h3> </div> <div class="modal-body"> <div uib-alert class="alert-danger" ng-if="error">{{error.message || error}}</div> <table class="table table-striped"> <tbody> <tr ng-class="{success: view.id == client.padData.defaultView.id}" ng-repeat="view in client.views"> <td><a href="javascript:" ng-click="display(view)">{{view.name}}</a></td> <td class="td-buttons"> <button type="button" ng-hide="view.id == client.padData.defaultView.id" ng-click="makeDefault(view)" class="btn btn-default">Make default</button> <button type="button" ng-click="confirm('Do you really want to delete the view “' + view.name + '”?') && delete(view)" class="btn btn-default">Delete</button> </td> </tr> </tbody> </table> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" ng-click="$dismiss()">Close</button> </div>
Fix highlighting of default view
Fix highlighting of default view
HTML
agpl-3.0
FacilMap/facilmap2,FacilMap/facilmap,FacilMap/facilmap,FacilMap/facilmap,FacilMap/facilmap2
html
## Code Before: <div class="modal-header"> <button type="button" class="close" ng-click="$dismiss()"><span aria-hidden="true">&times;</span></button> <h3 class="modal-title">Manage Views</h3> </div> <div class="modal-body"> <div uib-alert class="alert-danger" ng-if="error">{{error.message || error}}</div> <table class="table table-striped"> <tbody> <tr ng-class="{success: view.id == padData.defaultView.id}" ng-repeat="view in client.views"> <td><a href="javascript:" ng-click="display(view)">{{view.name}}</a></td> <td class="td-buttons"> <button type="button" ng-hide="view.id == padData.defaultView.id" ng-click="makeDefault(view)" class="btn btn-default">Make default</button> <button type="button" ng-click="confirm('Do you really want to delete the view “' + view.name + '”?') && delete(view)" class="btn btn-default">Delete</button> </td> </tr> </tbody> </table> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" ng-click="$dismiss()">Close</button> </div> ## Instruction: Fix highlighting of default view ## Code After: <div class="modal-header"> <button type="button" class="close" ng-click="$dismiss()"><span aria-hidden="true">&times;</span></button> <h3 class="modal-title">Manage Views</h3> </div> <div class="modal-body"> <div uib-alert class="alert-danger" ng-if="error">{{error.message || error}}</div> <table class="table table-striped"> <tbody> <tr ng-class="{success: view.id == client.padData.defaultView.id}" ng-repeat="view in client.views"> <td><a href="javascript:" ng-click="display(view)">{{view.name}}</a></td> <td class="td-buttons"> <button type="button" ng-hide="view.id == client.padData.defaultView.id" ng-click="makeDefault(view)" class="btn btn-default">Make default</button> <button type="button" ng-click="confirm('Do you really want to delete the view “' + view.name + '”?') && delete(view)" class="btn btn-default">Delete</button> </td> </tr> </tbody> </table> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" ng-click="$dismiss()">Close</button> </div>
b1fac7942cab29109c0cdbc194a44a56fc134992
README.md
README.md
This is the demo application seen in the Realm Mobile Platform [launch video][1], a real-time collaborative drawing program available for Android, iOS and Xamarin. Any number of users may draw on a single shared canvas in any given moment. ## Prerequisites The Realm-Draw demo application requires the Realm Mobile Platform Developer Edition. This can be downloaded free of charge for macOS and several popular Linux distributions, and takes just a few minutes to install. Download links and installation instructions: * [Realm Mobile Platform for macOS][2] * [Realm Mobile Platform for Linux][3] ## Building and Running Follow the README files in the platform-specific subdirectory of this repository. # Known Issues The Android and iOS versions of the app will interoperate; the Xamarin version currently can only share drawings with other copies of itself (compiled for either iOS or Android). This is due to a difference in the way the Xamarin platform handles its drawing canvas compared to the native iOS and Android code bases. * [Android][4] * [iOS][5] * [Xamarin][6] [1]: https://realm.io/news/introducing-realm-mobile-platform/ [2]: https://realm.io/docs/get-started/installation/mac/ [3]: https://realm.io/docs/get-started/installation/linux/ [4]: https://github.com/realm-demos/realm-draw/tree/master/Android [5]: https://github.com/realm-demos/realm-draw/tree/master/Xamarin/iOS [6]: https://github.com/realm-demos/realm-draw/tree/master/Xamarin
This is the demo application seen in the Realm Mobile Platform [launch video][1], a real-time collaborative drawing program available for Android, iOS and Xamarin. Any number of users may draw on a single shared canvas in any given moment. ## Prerequisites The Realm-Draw demo application requires the Realm Mobile Platform Developer Edition. This can be downloaded free of charge for macOS and several popular Linux distributions, and takes just a few minutes to install. Download links and installation instructions: * [Realm Mobile Platform for macOS][2] * [Realm Mobile Platform for Linux][3] ## Building and Running Follow the README files in the platform-specific subdirectory of this repository. * [Android][4] * [iOS][5] * [Xamarin][6] # Known Issues The Android and iOS versions of the app will interoperate; the Xamarin version currently can only share drawings with other copies of itself (compiled for either iOS or Android). This is due to a difference in the way the Xamarin platform handles its drawing canvas compared to the native iOS and Android code bases. [1]: https://realm.io/news/introducing-realm-mobile-platform/ [2]: https://realm.io/docs/get-started/installation/mac/ [3]: https://realm.io/docs/get-started/installation/linux/ [4]: https://github.com/realm-demos/realm-draw/tree/master/Android [5]: https://github.com/realm-demos/realm-draw/tree/master/Xamarin/iOS [6]: https://github.com/realm-demos/realm-draw/tree/master/Xamarin
Move the known issues section to the bottom
Move the known issues section to the bottom Copy was in hte wrong place.
Markdown
apache-2.0
realm-demos/realm-draw,realm-demos/realm-draw,realm-demos/realm-draw
markdown
## Code Before: This is the demo application seen in the Realm Mobile Platform [launch video][1], a real-time collaborative drawing program available for Android, iOS and Xamarin. Any number of users may draw on a single shared canvas in any given moment. ## Prerequisites The Realm-Draw demo application requires the Realm Mobile Platform Developer Edition. This can be downloaded free of charge for macOS and several popular Linux distributions, and takes just a few minutes to install. Download links and installation instructions: * [Realm Mobile Platform for macOS][2] * [Realm Mobile Platform for Linux][3] ## Building and Running Follow the README files in the platform-specific subdirectory of this repository. # Known Issues The Android and iOS versions of the app will interoperate; the Xamarin version currently can only share drawings with other copies of itself (compiled for either iOS or Android). This is due to a difference in the way the Xamarin platform handles its drawing canvas compared to the native iOS and Android code bases. * [Android][4] * [iOS][5] * [Xamarin][6] [1]: https://realm.io/news/introducing-realm-mobile-platform/ [2]: https://realm.io/docs/get-started/installation/mac/ [3]: https://realm.io/docs/get-started/installation/linux/ [4]: https://github.com/realm-demos/realm-draw/tree/master/Android [5]: https://github.com/realm-demos/realm-draw/tree/master/Xamarin/iOS [6]: https://github.com/realm-demos/realm-draw/tree/master/Xamarin ## Instruction: Move the known issues section to the bottom Copy was in hte wrong place. ## Code After: This is the demo application seen in the Realm Mobile Platform [launch video][1], a real-time collaborative drawing program available for Android, iOS and Xamarin. Any number of users may draw on a single shared canvas in any given moment. ## Prerequisites The Realm-Draw demo application requires the Realm Mobile Platform Developer Edition. This can be downloaded free of charge for macOS and several popular Linux distributions, and takes just a few minutes to install. Download links and installation instructions: * [Realm Mobile Platform for macOS][2] * [Realm Mobile Platform for Linux][3] ## Building and Running Follow the README files in the platform-specific subdirectory of this repository. * [Android][4] * [iOS][5] * [Xamarin][6] # Known Issues The Android and iOS versions of the app will interoperate; the Xamarin version currently can only share drawings with other copies of itself (compiled for either iOS or Android). This is due to a difference in the way the Xamarin platform handles its drawing canvas compared to the native iOS and Android code bases. [1]: https://realm.io/news/introducing-realm-mobile-platform/ [2]: https://realm.io/docs/get-started/installation/mac/ [3]: https://realm.io/docs/get-started/installation/linux/ [4]: https://github.com/realm-demos/realm-draw/tree/master/Android [5]: https://github.com/realm-demos/realm-draw/tree/master/Xamarin/iOS [6]: https://github.com/realm-demos/realm-draw/tree/master/Xamarin
bdebc528f74144ee6ab60b7f4cf996074de145e8
SwiftTask/_RecursiveLock.swift
SwiftTask/_RecursiveLock.swift
// // _RecursiveLock.swift // SwiftTask // // Created by Yasuhiro Inami on 2015/05/18. // Copyright (c) 2015年 Yasuhiro Inami. All rights reserved. // import Darwin internal final class _RecursiveLock { private let mutex: UnsafeMutablePointer<pthread_mutex_t> private let attribute: UnsafeMutablePointer<pthread_mutexattr_t> internal init() { self.mutex = UnsafeMutablePointer<pthread_mutex_t>(allocatingCapacity: 1) self.attribute = UnsafeMutablePointer<pthread_mutexattr_t>(allocatingCapacity: 1) pthread_mutexattr_init(self.attribute) pthread_mutexattr_settype(self.attribute, PTHREAD_MUTEX_RECURSIVE) pthread_mutex_init(self.mutex, self.attribute) } deinit { pthread_mutexattr_destroy(self.attribute) pthread_mutex_destroy(self.mutex) self.attribute.deallocateCapacity(1) self.mutex.deallocateCapacity(1) } internal func lock() { pthread_mutex_lock(self.mutex) } internal func unlock() { pthread_mutex_unlock(self.mutex) } }
// // _RecursiveLock.swift // SwiftTask // // Created by Yasuhiro Inami on 2015/05/18. // Copyright (c) 2015年 Yasuhiro Inami. All rights reserved. // import Darwin internal final class _RecursiveLock { private let mutex: UnsafeMutablePointer<pthread_mutex_t> private let attribute: UnsafeMutablePointer<pthread_mutexattr_t> internal init() { self.mutex = UnsafeMutablePointer<pthread_mutex_t>.allocate(capacity: 1) self.attribute = UnsafeMutablePointer<pthread_mutexattr_t>.allocate(capacity: 1) pthread_mutexattr_init(self.attribute) pthread_mutexattr_settype(self.attribute, PTHREAD_MUTEX_RECURSIVE) pthread_mutex_init(self.mutex, self.attribute) } deinit { pthread_mutexattr_destroy(self.attribute) pthread_mutex_destroy(self.mutex) self.attribute.deallocate(capacity: 1) self.mutex.deallocate(capacity: 1) } internal func lock() { pthread_mutex_lock(self.mutex) } internal func unlock() { pthread_mutex_unlock(self.mutex) } }
Update for Xcode 8 beta 4
Update for Xcode 8 beta 4
Swift
mit
ReactKit/SwiftTask,ReactKit/SwiftTask,ReactKit/SwiftTask
swift
## Code Before: // // _RecursiveLock.swift // SwiftTask // // Created by Yasuhiro Inami on 2015/05/18. // Copyright (c) 2015年 Yasuhiro Inami. All rights reserved. // import Darwin internal final class _RecursiveLock { private let mutex: UnsafeMutablePointer<pthread_mutex_t> private let attribute: UnsafeMutablePointer<pthread_mutexattr_t> internal init() { self.mutex = UnsafeMutablePointer<pthread_mutex_t>(allocatingCapacity: 1) self.attribute = UnsafeMutablePointer<pthread_mutexattr_t>(allocatingCapacity: 1) pthread_mutexattr_init(self.attribute) pthread_mutexattr_settype(self.attribute, PTHREAD_MUTEX_RECURSIVE) pthread_mutex_init(self.mutex, self.attribute) } deinit { pthread_mutexattr_destroy(self.attribute) pthread_mutex_destroy(self.mutex) self.attribute.deallocateCapacity(1) self.mutex.deallocateCapacity(1) } internal func lock() { pthread_mutex_lock(self.mutex) } internal func unlock() { pthread_mutex_unlock(self.mutex) } } ## Instruction: Update for Xcode 8 beta 4 ## Code After: // // _RecursiveLock.swift // SwiftTask // // Created by Yasuhiro Inami on 2015/05/18. // Copyright (c) 2015年 Yasuhiro Inami. All rights reserved. // import Darwin internal final class _RecursiveLock { private let mutex: UnsafeMutablePointer<pthread_mutex_t> private let attribute: UnsafeMutablePointer<pthread_mutexattr_t> internal init() { self.mutex = UnsafeMutablePointer<pthread_mutex_t>.allocate(capacity: 1) self.attribute = UnsafeMutablePointer<pthread_mutexattr_t>.allocate(capacity: 1) pthread_mutexattr_init(self.attribute) pthread_mutexattr_settype(self.attribute, PTHREAD_MUTEX_RECURSIVE) pthread_mutex_init(self.mutex, self.attribute) } deinit { pthread_mutexattr_destroy(self.attribute) pthread_mutex_destroy(self.mutex) self.attribute.deallocate(capacity: 1) self.mutex.deallocate(capacity: 1) } internal func lock() { pthread_mutex_lock(self.mutex) } internal func unlock() { pthread_mutex_unlock(self.mutex) } }
0916ed4903914ee46dbe4e451d367dff719c9a15
tests/example_project/urls.py
tests/example_project/urls.py
from os.path import dirname, join, normpath import django from django.conf.urls.defaults import * from django.conf import settings from django.contrib.admin import autodiscover import ella from ella import newman from ella.utils import installedapps newman.autodiscover() installedapps.init_logger() ADMIN_ROOTS = ( normpath(join(dirname(ella.__file__), 'newman', 'media')), normpath(join(dirname(django.__file__), 'contrib', 'admin', 'media')), ) urlpatterns = patterns('', # serve admin media static files (r'^static/newman_media/(?P<path>.*)$', 'ella.utils.views.fallback_serve', {'document_roots': ADMIN_ROOTS}), (r'^static/admin_media/(?P<path>.*)$', 'ella.utils.views.fallback_serve', {'document_roots': ADMIN_ROOTS}), # serve static files (r'^static/(?P<path>.*)$', 'django.views.static.serve', { 'document_root': settings.MEDIA_ROOT, 'show_indexes': True }), # main admin urls ('^newman/', include(newman.site.urls)), # reverse url lookups (r'^', include('ella.core.urls')), ) handler404 = 'ella.core.views.page_not_found' handler500 = 'ella.core.views.handle_error'
from os.path import dirname, join, normpath import django from django.conf.urls.defaults import * from django.conf import settings from django.contrib import admin import ella from ella import newman from ella.utils import installedapps newman.autodiscover() admin.autodiscover() installedapps.init_logger() ADMIN_ROOTS = ( normpath(join(dirname(ella.__file__), 'newman', 'media')), normpath(join(dirname(django.__file__), 'contrib', 'admin', 'media')), ) urlpatterns = patterns('', # serve admin media static files (r'^static/newman_media/(?P<path>.*)$', 'ella.utils.views.fallback_serve', {'document_roots': ADMIN_ROOTS}), (r'^static/admin_media/(?P<path>.*)$', 'ella.utils.views.fallback_serve', {'document_roots': ADMIN_ROOTS}), # serve static files (r'^static/(?P<path>.*)$', 'django.views.static.serve', { 'document_root': settings.MEDIA_ROOT, 'show_indexes': True }), # main admin urls ('^newman/', include(newman.site.urls)), ('^admin/', include(admin.site.urls)), # reverse url lookups (r'^', include('ella.core.urls')), ) handler404 = 'ella.core.views.page_not_found' handler500 = 'ella.core.views.handle_error'
Test running both newman/ and admin/ - some templates still mixed.
Test running both newman/ and admin/ - some templates still mixed.
Python
bsd-3-clause
petrlosa/ella,ella/ella,whalerock/ella,WhiskeyMedia/ella,WhiskeyMedia/ella,petrlosa/ella,MichalMaM/ella,whalerock/ella,MichalMaM/ella,whalerock/ella
python
## Code Before: from os.path import dirname, join, normpath import django from django.conf.urls.defaults import * from django.conf import settings from django.contrib.admin import autodiscover import ella from ella import newman from ella.utils import installedapps newman.autodiscover() installedapps.init_logger() ADMIN_ROOTS = ( normpath(join(dirname(ella.__file__), 'newman', 'media')), normpath(join(dirname(django.__file__), 'contrib', 'admin', 'media')), ) urlpatterns = patterns('', # serve admin media static files (r'^static/newman_media/(?P<path>.*)$', 'ella.utils.views.fallback_serve', {'document_roots': ADMIN_ROOTS}), (r'^static/admin_media/(?P<path>.*)$', 'ella.utils.views.fallback_serve', {'document_roots': ADMIN_ROOTS}), # serve static files (r'^static/(?P<path>.*)$', 'django.views.static.serve', { 'document_root': settings.MEDIA_ROOT, 'show_indexes': True }), # main admin urls ('^newman/', include(newman.site.urls)), # reverse url lookups (r'^', include('ella.core.urls')), ) handler404 = 'ella.core.views.page_not_found' handler500 = 'ella.core.views.handle_error' ## Instruction: Test running both newman/ and admin/ - some templates still mixed. ## Code After: from os.path import dirname, join, normpath import django from django.conf.urls.defaults import * from django.conf import settings from django.contrib import admin import ella from ella import newman from ella.utils import installedapps newman.autodiscover() admin.autodiscover() installedapps.init_logger() ADMIN_ROOTS = ( normpath(join(dirname(ella.__file__), 'newman', 'media')), normpath(join(dirname(django.__file__), 'contrib', 'admin', 'media')), ) urlpatterns = patterns('', # serve admin media static files (r'^static/newman_media/(?P<path>.*)$', 'ella.utils.views.fallback_serve', {'document_roots': ADMIN_ROOTS}), (r'^static/admin_media/(?P<path>.*)$', 'ella.utils.views.fallback_serve', {'document_roots': ADMIN_ROOTS}), # serve static files (r'^static/(?P<path>.*)$', 'django.views.static.serve', { 'document_root': settings.MEDIA_ROOT, 'show_indexes': True }), # main admin urls ('^newman/', include(newman.site.urls)), ('^admin/', include(admin.site.urls)), # reverse url lookups (r'^', include('ella.core.urls')), ) handler404 = 'ella.core.views.page_not_found' handler500 = 'ella.core.views.handle_error'
c2cacebcce85247cae467c1846ca3f8738f50424
test/regression/Str2.java
test/regression/Str2.java
class Str2 { public static void main (String args[]) { String a = "1"; a += "2"; System.out.println(a); System.out.println("abc".indexOf("", -32)); System.out.println("abc".indexOf("", 100)); System.out.println("abc".lastIndexOf("", -32)); System.out.println("abc".lastIndexOf("", 100)); } } /* Expected Output: 12 0 -1 -1 3 */
class Str2 { public static void main (String args[]) { String a = "1"; a += "2"; System.out.println(a); System.out.println("abc".indexOf("", -99999999)); System.out.println("abc".indexOf("", 99999999)); System.out.println("".indexOf("a")); System.out.println("".indexOf("")); System.out.println("abc".lastIndexOf("", -99999999)); System.out.println("abc".lastIndexOf("", 99999999)); System.out.println("".lastIndexOf("a")); System.out.println("".lastIndexOf("")); } } /* Expected Output: 12 0 -1 -1 0 -1 3 -1 0 */
Add a couple more tests.
Add a couple more tests.
Java
lgpl-2.1
kaffe/kaffe,kaffe/kaffe,kaffe/kaffe,kaffe/kaffe,kaffe/kaffe
java
## Code Before: class Str2 { public static void main (String args[]) { String a = "1"; a += "2"; System.out.println(a); System.out.println("abc".indexOf("", -32)); System.out.println("abc".indexOf("", 100)); System.out.println("abc".lastIndexOf("", -32)); System.out.println("abc".lastIndexOf("", 100)); } } /* Expected Output: 12 0 -1 -1 3 */ ## Instruction: Add a couple more tests. ## Code After: class Str2 { public static void main (String args[]) { String a = "1"; a += "2"; System.out.println(a); System.out.println("abc".indexOf("", -99999999)); System.out.println("abc".indexOf("", 99999999)); System.out.println("".indexOf("a")); System.out.println("".indexOf("")); System.out.println("abc".lastIndexOf("", -99999999)); System.out.println("abc".lastIndexOf("", 99999999)); System.out.println("".lastIndexOf("a")); System.out.println("".lastIndexOf("")); } } /* Expected Output: 12 0 -1 -1 0 -1 3 -1 0 */
4f724898a1314949f02c96e3d2bab8b9abf099b7
test/.eslintrc.yml
test/.eslintrc.yml
parserOptions: sourceType: module extends: - "eslint:recommended" - "plugin:react/recommended" env: mocha: true
parserOptions: sourceType: module extends: - "eslint:recommended" - "plugin:react/recommended" rules: no-console: 1 env: mocha: true
Set no-console to 1 in test/.eslintconfig.yml
Set no-console to 1 in test/.eslintconfig.yml
YAML
mit
noraesae/pen
yaml
## Code Before: parserOptions: sourceType: module extends: - "eslint:recommended" - "plugin:react/recommended" env: mocha: true ## Instruction: Set no-console to 1 in test/.eslintconfig.yml ## Code After: parserOptions: sourceType: module extends: - "eslint:recommended" - "plugin:react/recommended" rules: no-console: 1 env: mocha: true
495ab8011269e74da24c5595a6f6e1bc3ac12ee5
codeclimate.gemspec
codeclimate.gemspec
$LOAD_PATH.unshift(File.join(__FILE__, "../lib")) VERSION = File.read(File.expand_path("../VERSION", __FILE__)) Gem::Specification.new do |s| s.name = "codeclimate" s.version = VERSION s.summary = "Code Climate CLI" s.license = "AGPL" s.authors = "Code Climate" s.email = "[email protected]" s.homepage = "https://codeclimate.com" s.description = "Code Climate command line tool" s.files = Dir["lib/**/*.rb"] + Dir["bin/*"] + Dir.glob("config/**/*", File::FNM_DOTMATCH) s.require_paths = ["lib"] s.bindir = "bin" s.executables = [] s.add_dependency "activesupport", ">= 5.1.3", "< 5.2" s.add_dependency "tty-spinner", "~> 0.1.0" s.add_dependency "highline", "~> 1.7", ">= 1.7.2" s.add_dependency "posix-spawn", "~> 0.3", ">= 0.3.11" s.add_dependency "pry", "~> 0.10.1" s.add_dependency "rainbow", "~> 2.0", ">= 2.0.0" s.add_dependency "redcarpet", "~> 3.2" s.add_dependency "uuid", "~> 2.3" end
$LOAD_PATH.unshift(File.join(__FILE__, "../lib")) VERSION = File.read(File.expand_path("../VERSION", __FILE__)) Gem::Specification.new do |s| s.name = "codeclimate" s.version = VERSION s.summary = "Code Climate CLI" s.license = "AGPL" s.authors = "Code Climate" s.email = "[email protected]" s.homepage = "https://codeclimate.com" s.description = "Code Climate command line tool" s.files = Dir["lib/**/*.rb"] + Dir["bin/*"] + Dir.glob("config/**/*", File::FNM_DOTMATCH) s.require_paths = ["lib"] s.bindir = "bin" s.executables = [] s.required_ruby_version = "~> 2.3" s.add_dependency "activesupport", ">= 5.1.3", "< 5.2" s.add_dependency "tty-spinner", "~> 0.1.0" s.add_dependency "highline", "~> 1.7", ">= 1.7.2" s.add_dependency "posix-spawn", "~> 0.3", ">= 0.3.11" s.add_dependency "pry", "~> 0.10.1" s.add_dependency "rainbow", "~> 2.0", ">= 2.0.0" s.add_dependency "redcarpet", "~> 3.2" s.add_dependency "uuid", "~> 2.3" end
Add ruby version requirement to gemspec
Add ruby version requirement to gemspec
Ruby
agpl-3.0
codeclimate/codeclimate,codeclimate/codeclimate,codeclimate/codeclimate
ruby
## Code Before: $LOAD_PATH.unshift(File.join(__FILE__, "../lib")) VERSION = File.read(File.expand_path("../VERSION", __FILE__)) Gem::Specification.new do |s| s.name = "codeclimate" s.version = VERSION s.summary = "Code Climate CLI" s.license = "AGPL" s.authors = "Code Climate" s.email = "[email protected]" s.homepage = "https://codeclimate.com" s.description = "Code Climate command line tool" s.files = Dir["lib/**/*.rb"] + Dir["bin/*"] + Dir.glob("config/**/*", File::FNM_DOTMATCH) s.require_paths = ["lib"] s.bindir = "bin" s.executables = [] s.add_dependency "activesupport", ">= 5.1.3", "< 5.2" s.add_dependency "tty-spinner", "~> 0.1.0" s.add_dependency "highline", "~> 1.7", ">= 1.7.2" s.add_dependency "posix-spawn", "~> 0.3", ">= 0.3.11" s.add_dependency "pry", "~> 0.10.1" s.add_dependency "rainbow", "~> 2.0", ">= 2.0.0" s.add_dependency "redcarpet", "~> 3.2" s.add_dependency "uuid", "~> 2.3" end ## Instruction: Add ruby version requirement to gemspec ## Code After: $LOAD_PATH.unshift(File.join(__FILE__, "../lib")) VERSION = File.read(File.expand_path("../VERSION", __FILE__)) Gem::Specification.new do |s| s.name = "codeclimate" s.version = VERSION s.summary = "Code Climate CLI" s.license = "AGPL" s.authors = "Code Climate" s.email = "[email protected]" s.homepage = "https://codeclimate.com" s.description = "Code Climate command line tool" s.files = Dir["lib/**/*.rb"] + Dir["bin/*"] + Dir.glob("config/**/*", File::FNM_DOTMATCH) s.require_paths = ["lib"] s.bindir = "bin" s.executables = [] s.required_ruby_version = "~> 2.3" s.add_dependency "activesupport", ">= 5.1.3", "< 5.2" s.add_dependency "tty-spinner", "~> 0.1.0" s.add_dependency "highline", "~> 1.7", ">= 1.7.2" s.add_dependency "posix-spawn", "~> 0.3", ">= 0.3.11" s.add_dependency "pry", "~> 0.10.1" s.add_dependency "rainbow", "~> 2.0", ">= 2.0.0" s.add_dependency "redcarpet", "~> 3.2" s.add_dependency "uuid", "~> 2.3" end
ce446e7a0b97e3dc3ac8e6b870cc0367dfef36f0
lib/observe.coffee
lib/observe.coffee
module.exports = (observed, keys, callback) -> Object.observe observed, (changes) => for change in changes if change.name in keys callback() break
module.exports = (observed, keys, callback) -> Object.observe observed, (changes) => for change in changes if (change.name in keys) or (keys.length is 0) callback() break
Allow observing [] for all keys
Allow observing [] for all keys
CoffeeScript
mit
atom/github,atom/github,atom/github
coffeescript
## Code Before: module.exports = (observed, keys, callback) -> Object.observe observed, (changes) => for change in changes if change.name in keys callback() break ## Instruction: Allow observing [] for all keys ## Code After: module.exports = (observed, keys, callback) -> Object.observe observed, (changes) => for change in changes if (change.name in keys) or (keys.length is 0) callback() break
84e964eba11e344f6f0ec612b5743e693a8825bd
thoonk/config.py
thoonk/config.py
import json import threading import uuid from thoonk.consts import * class ConfigCache(object): def __init__(self, pubsub): self._feeds = {} self.pubsub = pubsub self.lock = threading.Lock() self.instance = uuid.uuid4().hex def __getitem__(self, feed): with self.lock: if feed in self._feeds: return self._feeds[feed] else: if not self.pubsub.feed_exists(feed): raise FeedDoesNotExist config = json.loads(self.pubsub.redis.get(FEEDCONFIG % feed)) self._feeds[feed] = self.pubsub.feedtypes[config.get(u'type', u'feed')](self.pubsub, feed, config) return self._feeds[feed] def invalidate(self, feed, instance, delete=False): if instance != self.instance: with self.lock: if feed in self._feeds: if delete: del self._feeds[feed] else: del self._feeds[feed].config
import json import threading import uuid class ConfigCache(object): """ The ConfigCache class stores an in-memory version of each feed's configuration. As there may be multiple systems using Thoonk with the same Redis server, and each with its own ConfigCache instance, each ConfigCache has a self.instance field to uniquely identify itself. Attributes: thoonk -- The main Thoonk object. instance -- A hex string for uniquely identifying this ConfigCache instance. Methods: invalidate -- Force a feed's config to be retrieved from Redis instead of in-memory. """ def __init__(self, thoonk): """ Create a new configuration cache. Arguments: thoonk -- The main Thoonk object. """ self._feeds = {} self.thoonk = thoonk self.lock = threading.Lock() self.instance = uuid.uuid4().hex def __getitem__(self, feed): """ Return a feed object for a given feed name. Arguments: feed -- The name of the requested feed. """ with self.lock: if feed in self._feeds: return self._feeds[feed] else: if not self.thoonk.feed_exists(feed): raise FeedDoesNotExist config = self.thoonk.redis.get('feed.config:%s' % feed) config = json.loads(config) feed_type = config.get(u'type', u'feed') feed_class = self.thoonk.feedtypes[feed_type] self._feeds[feed] = feed_class(self.thoonk, feed, config) return self._feeds[feed] def invalidate(self, feed, instance, delete=False): """ Delete a configuration so that it will be retrieved from Redis instead of from the cache. Arguments: feed -- The name of the feed to invalidate. instance -- A UUID identifying the cache which made the invalidation request. delete -- Indicates if the entire feed object should be invalidated, or just its configuration. """ if instance != self.instance: with self.lock: if feed in self._feeds: if delete: del self._feeds[feed] else: del self._feeds[feed].config
Add docs to the ConfigCache.
Add docs to the ConfigCache.
Python
mit
andyet/thoonk.py,fritzy/thoonk.py
python
## Code Before: import json import threading import uuid from thoonk.consts import * class ConfigCache(object): def __init__(self, pubsub): self._feeds = {} self.pubsub = pubsub self.lock = threading.Lock() self.instance = uuid.uuid4().hex def __getitem__(self, feed): with self.lock: if feed in self._feeds: return self._feeds[feed] else: if not self.pubsub.feed_exists(feed): raise FeedDoesNotExist config = json.loads(self.pubsub.redis.get(FEEDCONFIG % feed)) self._feeds[feed] = self.pubsub.feedtypes[config.get(u'type', u'feed')](self.pubsub, feed, config) return self._feeds[feed] def invalidate(self, feed, instance, delete=False): if instance != self.instance: with self.lock: if feed in self._feeds: if delete: del self._feeds[feed] else: del self._feeds[feed].config ## Instruction: Add docs to the ConfigCache. ## Code After: import json import threading import uuid class ConfigCache(object): """ The ConfigCache class stores an in-memory version of each feed's configuration. As there may be multiple systems using Thoonk with the same Redis server, and each with its own ConfigCache instance, each ConfigCache has a self.instance field to uniquely identify itself. Attributes: thoonk -- The main Thoonk object. instance -- A hex string for uniquely identifying this ConfigCache instance. Methods: invalidate -- Force a feed's config to be retrieved from Redis instead of in-memory. """ def __init__(self, thoonk): """ Create a new configuration cache. Arguments: thoonk -- The main Thoonk object. """ self._feeds = {} self.thoonk = thoonk self.lock = threading.Lock() self.instance = uuid.uuid4().hex def __getitem__(self, feed): """ Return a feed object for a given feed name. Arguments: feed -- The name of the requested feed. """ with self.lock: if feed in self._feeds: return self._feeds[feed] else: if not self.thoonk.feed_exists(feed): raise FeedDoesNotExist config = self.thoonk.redis.get('feed.config:%s' % feed) config = json.loads(config) feed_type = config.get(u'type', u'feed') feed_class = self.thoonk.feedtypes[feed_type] self._feeds[feed] = feed_class(self.thoonk, feed, config) return self._feeds[feed] def invalidate(self, feed, instance, delete=False): """ Delete a configuration so that it will be retrieved from Redis instead of from the cache. Arguments: feed -- The name of the feed to invalidate. instance -- A UUID identifying the cache which made the invalidation request. delete -- Indicates if the entire feed object should be invalidated, or just its configuration. """ if instance != self.instance: with self.lock: if feed in self._feeds: if delete: del self._feeds[feed] else: del self._feeds[feed].config
d93ffe995dfbdbc698c4594f9e0d255a6af3802b
index.html
index.html
<!DOCTYPE HTML> <html lang="pt-br"> <head> <!-- META TAGS --> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, minimal-ui" /> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta name="description" content="Conferência sobre as tecnolgoias em volta do NoSQL" /> <meta name="keywords" content="nosql, sql, rdms, sgbdr, banco de dados, database, not only sql, bahia, salvador, mongodb, couchdb, cassandra, neo4j, hipertable, bigtable, mysql, oracle, postgres, web, internet, solution, solução, soluções, solutions, app, webapp, application, applications, aplicativos, aplicativo, design, programação, programming, desenvolvimento, development, develop, developer" /> <meta name="copyright" content="&copy; Copyleft NoSQL BA" /> <title>NoSQLBA - Conferência Baiana de NoSQL</title> <meta http-equiv="refresh" content="0; url=2019/index.html" /> </head> <body> <p><a href="2019/index.html">Redirect</a></p> </body> </html>
<!DOCTYPE HTML> <html lang="pt-br"> <head> <!-- META TAGS --> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, minimal-ui" /> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta name="description" content="Conferência sobre as tecnolgoias em volta do NoSQL" /> <meta name="keywords" content="nosql, sql, rdms, sgbdr, banco de dados, database, not only sql, bahia, salvador, mongodb, couchdb, cassandra, neo4j, hipertable, bigtable, mysql, oracle, postgres, web, internet, solution, solução, soluções, solutions, app, webapp, application, applications, aplicativos, aplicativo, design, programação, programming, desenvolvimento, development, develop, developer" /> <meta name="copyright" content="&copy; Copyleft NoSQL BA" /> <title>NoSQLBA - Conferência Baiana de NoSQL</title> <meta http-equiv="refresh" content="0; url=2019/index.html" /> </head> <body> <p><a href="2019/">Redirect</a></p> </body> </html>
Make the redirect generic, now its point to the folder and not for the file
Make the redirect generic, now its point to the folder and not for the file
HTML
apache-2.0
otaviojava/nosqlba,otaviojava/nosqlba
html
## Code Before: <!DOCTYPE HTML> <html lang="pt-br"> <head> <!-- META TAGS --> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, minimal-ui" /> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta name="description" content="Conferência sobre as tecnolgoias em volta do NoSQL" /> <meta name="keywords" content="nosql, sql, rdms, sgbdr, banco de dados, database, not only sql, bahia, salvador, mongodb, couchdb, cassandra, neo4j, hipertable, bigtable, mysql, oracle, postgres, web, internet, solution, solução, soluções, solutions, app, webapp, application, applications, aplicativos, aplicativo, design, programação, programming, desenvolvimento, development, develop, developer" /> <meta name="copyright" content="&copy; Copyleft NoSQL BA" /> <title>NoSQLBA - Conferência Baiana de NoSQL</title> <meta http-equiv="refresh" content="0; url=2019/index.html" /> </head> <body> <p><a href="2019/index.html">Redirect</a></p> </body> </html> ## Instruction: Make the redirect generic, now its point to the folder and not for the file ## Code After: <!DOCTYPE HTML> <html lang="pt-br"> <head> <!-- META TAGS --> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, minimal-ui" /> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta name="description" content="Conferência sobre as tecnolgoias em volta do NoSQL" /> <meta name="keywords" content="nosql, sql, rdms, sgbdr, banco de dados, database, not only sql, bahia, salvador, mongodb, couchdb, cassandra, neo4j, hipertable, bigtable, mysql, oracle, postgres, web, internet, solution, solução, soluções, solutions, app, webapp, application, applications, aplicativos, aplicativo, design, programação, programming, desenvolvimento, development, develop, developer" /> <meta name="copyright" content="&copy; Copyleft NoSQL BA" /> <title>NoSQLBA - Conferência Baiana de NoSQL</title> <meta http-equiv="refresh" content="0; url=2019/index.html" /> </head> <body> <p><a href="2019/">Redirect</a></p> </body> </html>
185eedb347f1fb8b915ee5ee54b6acc7fda2f940
src/protocolsupport/protocol/packet/middleimpl/clientbound/play/v_7/EntityTeleport.java
src/protocolsupport/protocol/packet/middleimpl/clientbound/play/v_7/EntityTeleport.java
package protocolsupport.protocol.packet.middleimpl.clientbound.play.v_7; import protocolsupport.api.ProtocolVersion; import protocolsupport.protocol.packet.ClientBoundPacket; import protocolsupport.protocol.packet.middle.clientbound.play.MiddleEntityTeleport; import protocolsupport.protocol.packet.middleimpl.ClientBoundPacketData; import protocolsupport.protocol.utils.types.NetworkEntity; import protocolsupport.protocol.utils.types.NetworkEntityType; import protocolsupport.utils.recyclable.RecyclableCollection; import protocolsupport.utils.recyclable.RecyclableSingletonList; public class EntityTeleport extends MiddleEntityTeleport { @Override public RecyclableCollection<ClientBoundPacketData> toData(ProtocolVersion version) { NetworkEntity wentity = cache.getWatchedEntity(entityId); y *= 32; if ((wentity.getType() == NetworkEntityType.TNT) || (wentity.getType() == NetworkEntityType.FALLING_OBJECT)) { y += 16; } ClientBoundPacketData serializer = ClientBoundPacketData.create(ClientBoundPacket.PLAY_ENTITY_TELEPORT_ID, version); serializer.writeInt(entityId); serializer.writeInt((int) (x * 32)); serializer.writeInt((int) y); serializer.writeInt((int) (z * 32)); serializer.writeByte(yaw); serializer.writeByte(pitch); return RecyclableSingletonList.create(serializer); } }
package protocolsupport.protocol.packet.middleimpl.clientbound.play.v_7; import protocolsupport.api.ProtocolVersion; import protocolsupport.protocol.packet.ClientBoundPacket; import protocolsupport.protocol.packet.middle.clientbound.play.MiddleEntityTeleport; import protocolsupport.protocol.packet.middleimpl.ClientBoundPacketData; import protocolsupport.protocol.utils.types.NetworkEntity; import protocolsupport.protocol.utils.types.NetworkEntityType; import protocolsupport.utils.recyclable.RecyclableCollection; import protocolsupport.utils.recyclable.RecyclableSingletonList; public class EntityTeleport extends MiddleEntityTeleport { @Override public RecyclableCollection<ClientBoundPacketData> toData(ProtocolVersion version) { NetworkEntity wentity = cache.getWatchedEntity(entityId); y *= 32; if ((wentity != null) && ((wentity.getType() == NetworkEntityType.TNT) || (wentity.getType() == NetworkEntityType.FALLING_OBJECT))) { y += 16; } ClientBoundPacketData serializer = ClientBoundPacketData.create(ClientBoundPacket.PLAY_ENTITY_TELEPORT_ID, version); serializer.writeInt(entityId); serializer.writeInt((int) (x * 32)); serializer.writeInt((int) y); serializer.writeInt((int) (z * 32)); serializer.writeByte(yaw); serializer.writeByte(pitch); return RecyclableSingletonList.create(serializer); } }
Add != null check to avoid exceptions when teleporting unknown entity
Add != null check to avoid exceptions when teleporting unknown entity
Java
agpl-3.0
ridalarry/ProtocolSupport,ProtocolSupport/ProtocolSupport
java
## Code Before: package protocolsupport.protocol.packet.middleimpl.clientbound.play.v_7; import protocolsupport.api.ProtocolVersion; import protocolsupport.protocol.packet.ClientBoundPacket; import protocolsupport.protocol.packet.middle.clientbound.play.MiddleEntityTeleport; import protocolsupport.protocol.packet.middleimpl.ClientBoundPacketData; import protocolsupport.protocol.utils.types.NetworkEntity; import protocolsupport.protocol.utils.types.NetworkEntityType; import protocolsupport.utils.recyclable.RecyclableCollection; import protocolsupport.utils.recyclable.RecyclableSingletonList; public class EntityTeleport extends MiddleEntityTeleport { @Override public RecyclableCollection<ClientBoundPacketData> toData(ProtocolVersion version) { NetworkEntity wentity = cache.getWatchedEntity(entityId); y *= 32; if ((wentity.getType() == NetworkEntityType.TNT) || (wentity.getType() == NetworkEntityType.FALLING_OBJECT)) { y += 16; } ClientBoundPacketData serializer = ClientBoundPacketData.create(ClientBoundPacket.PLAY_ENTITY_TELEPORT_ID, version); serializer.writeInt(entityId); serializer.writeInt((int) (x * 32)); serializer.writeInt((int) y); serializer.writeInt((int) (z * 32)); serializer.writeByte(yaw); serializer.writeByte(pitch); return RecyclableSingletonList.create(serializer); } } ## Instruction: Add != null check to avoid exceptions when teleporting unknown entity ## Code After: package protocolsupport.protocol.packet.middleimpl.clientbound.play.v_7; import protocolsupport.api.ProtocolVersion; import protocolsupport.protocol.packet.ClientBoundPacket; import protocolsupport.protocol.packet.middle.clientbound.play.MiddleEntityTeleport; import protocolsupport.protocol.packet.middleimpl.ClientBoundPacketData; import protocolsupport.protocol.utils.types.NetworkEntity; import protocolsupport.protocol.utils.types.NetworkEntityType; import protocolsupport.utils.recyclable.RecyclableCollection; import protocolsupport.utils.recyclable.RecyclableSingletonList; public class EntityTeleport extends MiddleEntityTeleport { @Override public RecyclableCollection<ClientBoundPacketData> toData(ProtocolVersion version) { NetworkEntity wentity = cache.getWatchedEntity(entityId); y *= 32; if ((wentity != null) && ((wentity.getType() == NetworkEntityType.TNT) || (wentity.getType() == NetworkEntityType.FALLING_OBJECT))) { y += 16; } ClientBoundPacketData serializer = ClientBoundPacketData.create(ClientBoundPacket.PLAY_ENTITY_TELEPORT_ID, version); serializer.writeInt(entityId); serializer.writeInt((int) (x * 32)); serializer.writeInt((int) y); serializer.writeInt((int) (z * 32)); serializer.writeByte(yaw); serializer.writeByte(pitch); return RecyclableSingletonList.create(serializer); } }
340bc3e2a9494eeffcd50c906000b75081e14eb3
.rubocop.yml
.rubocop.yml
inherit_gem: rubocop-govuk: - config/default.yml - config/rails.yml AllCops: Exclude: - 'bin/**/*' - 'config.ru' - 'tmp/**/*' - 'db/schema.rb' - 'lib/tasks/cucumber.rake' Metrics/BlockLength: Enabled: false Naming/VariableNumber: EnforcedStyle: snake_case Style/FormatStringToken: Exclude: - 'config/routes.rb' # Hopefully this file can be removed soon... - 'lib/migrate_assets_to_asset_manager.rb' - 'lib/tasks/scheduled_publishing.rake' Rails/FindBy: Enabled: false Rails/DynamicFindBy: Enabled: false Rails/HttpPositionalArguments: Enabled: false Rails/OutputSafety: Enabled: false Rails/HelperInstanceVariable: Enabled: false Rails/InverseOf: Enabled: false Rails/HasManyOrHasOneDependent: Enabled: false Rails/LexicallyScopedActionFilter: Enabled: false Rails/BulkChangeTable: Enabled: false Rails/ReversibleMigration: Enabled: false Rails/NotNullColumn: Enabled: false Rails/CreateTableWithTimestamps: Enabled: false Rails/FilePath: EnforcedStyle: slashes
inherit_gem: rubocop-govuk: - config/default.yml - config/rails.yml AllCops: Exclude: - 'bin/**/*' - 'config.ru' - 'tmp/**/*' - 'db/schema.rb' - 'lib/tasks/cucumber.rake' Metrics/BlockLength: Enabled: false Naming/VariableNumber: EnforcedStyle: snake_case Style/FormatStringToken: Exclude: - 'config/routes.rb' - 'lib/tasks/scheduled_publishing.rake' Rails/FindBy: Enabled: false Rails/DynamicFindBy: Enabled: false Rails/HttpPositionalArguments: Enabled: false Rails/OutputSafety: Enabled: false Rails/HelperInstanceVariable: Enabled: false Rails/InverseOf: Enabled: false Rails/HasManyOrHasOneDependent: Enabled: false Rails/LexicallyScopedActionFilter: Enabled: false Rails/BulkChangeTable: Enabled: false Rails/ReversibleMigration: Enabled: false Rails/NotNullColumn: Enabled: false Rails/CreateTableWithTimestamps: Enabled: false Rails/FilePath: EnforcedStyle: slashes
Remove file listed that has now gone
Remove file listed that has now gone The hope of whoever left this comment has been fulfilled.
YAML
mit
alphagov/whitehall,alphagov/whitehall,alphagov/whitehall,alphagov/whitehall
yaml
## Code Before: inherit_gem: rubocop-govuk: - config/default.yml - config/rails.yml AllCops: Exclude: - 'bin/**/*' - 'config.ru' - 'tmp/**/*' - 'db/schema.rb' - 'lib/tasks/cucumber.rake' Metrics/BlockLength: Enabled: false Naming/VariableNumber: EnforcedStyle: snake_case Style/FormatStringToken: Exclude: - 'config/routes.rb' # Hopefully this file can be removed soon... - 'lib/migrate_assets_to_asset_manager.rb' - 'lib/tasks/scheduled_publishing.rake' Rails/FindBy: Enabled: false Rails/DynamicFindBy: Enabled: false Rails/HttpPositionalArguments: Enabled: false Rails/OutputSafety: Enabled: false Rails/HelperInstanceVariable: Enabled: false Rails/InverseOf: Enabled: false Rails/HasManyOrHasOneDependent: Enabled: false Rails/LexicallyScopedActionFilter: Enabled: false Rails/BulkChangeTable: Enabled: false Rails/ReversibleMigration: Enabled: false Rails/NotNullColumn: Enabled: false Rails/CreateTableWithTimestamps: Enabled: false Rails/FilePath: EnforcedStyle: slashes ## Instruction: Remove file listed that has now gone The hope of whoever left this comment has been fulfilled. ## Code After: inherit_gem: rubocop-govuk: - config/default.yml - config/rails.yml AllCops: Exclude: - 'bin/**/*' - 'config.ru' - 'tmp/**/*' - 'db/schema.rb' - 'lib/tasks/cucumber.rake' Metrics/BlockLength: Enabled: false Naming/VariableNumber: EnforcedStyle: snake_case Style/FormatStringToken: Exclude: - 'config/routes.rb' - 'lib/tasks/scheduled_publishing.rake' Rails/FindBy: Enabled: false Rails/DynamicFindBy: Enabled: false Rails/HttpPositionalArguments: Enabled: false Rails/OutputSafety: Enabled: false Rails/HelperInstanceVariable: Enabled: false Rails/InverseOf: Enabled: false Rails/HasManyOrHasOneDependent: Enabled: false Rails/LexicallyScopedActionFilter: Enabled: false Rails/BulkChangeTable: Enabled: false Rails/ReversibleMigration: Enabled: false Rails/NotNullColumn: Enabled: false Rails/CreateTableWithTimestamps: Enabled: false Rails/FilePath: EnforcedStyle: slashes
114ad3c29df12a0d892c62e8008f1956e2144555
test-project/docker-compose.yml
test-project/docker-compose.yml
test-project: build: . volumes: - .:/usr/src/app ports: - 8080:8080
test-project: build: . volumes: - .:/usr/src/app
Remove redundant ports definition (Gdrive upload doesn't work anyway).
Remove redundant ports definition (Gdrive upload doesn't work anyway).
YAML
mit
foliant-docs/foliant
yaml
## Code Before: test-project: build: . volumes: - .:/usr/src/app ports: - 8080:8080 ## Instruction: Remove redundant ports definition (Gdrive upload doesn't work anyway). ## Code After: test-project: build: . volumes: - .:/usr/src/app
6d56f5f27936e362e85c140190d87d675b98bea1
templates/opt/splunk/etc/passwd.erb
templates/opt/splunk/etc/passwd.erb
<%= @splunkadmin %> <% if @type == 'search' and @localusers != :undef then -%> <% localusers.each do |user| -%> <%= user %> <% end -%> <% end -%>
<%= @splunkadmin %> <% if @type == 'search' and @localusers then -%> <% @localusers.each do |user| -%> <%= user %> <% end -%> <% end -%>
Fix comparison of @localusers to undef for puppet3.7/ruby1.8
Fix comparison of @localusers to undef for puppet3.7/ruby1.8 Catalog compilation fails with puppet 3.7 on ruby 1.8 (centos6) with error calling .each on undef, due to failing comparison of @localusers to :undef. Replace witha simple truthyness test of @localusers.
HTML+ERB
mit
huit/puppet-splunk,huit/puppet-splunk,tfhartmann/puppet-splunk,tfhartmann/puppet-splunk,huit/puppet-splunk,tfhartmann/puppet-splunk,huit/puppet-splunk,huit/puppet-splunk,tfhartmann/puppet-splunk,tfhartmann/puppet-splunk
html+erb
## Code Before: <%= @splunkadmin %> <% if @type == 'search' and @localusers != :undef then -%> <% localusers.each do |user| -%> <%= user %> <% end -%> <% end -%> ## Instruction: Fix comparison of @localusers to undef for puppet3.7/ruby1.8 Catalog compilation fails with puppet 3.7 on ruby 1.8 (centos6) with error calling .each on undef, due to failing comparison of @localusers to :undef. Replace witha simple truthyness test of @localusers. ## Code After: <%= @splunkadmin %> <% if @type == 'search' and @localusers then -%> <% @localusers.each do |user| -%> <%= user %> <% end -%> <% end -%>
d6eafa5c08839d1fc10c5f6dadb53afc694a3c08
src/main/java/com/nincraft/ninbot/command/DabCommand.java
src/main/java/com/nincraft/ninbot/command/DabCommand.java
package com.nincraft.ninbot.command; import com.nincraft.ninbot.util.MessageUtils; import lombok.val; import net.dv8tion.jda.core.entities.Message; import net.dv8tion.jda.core.events.message.MessageReceivedEvent; public class DabCommand extends AbstractCommand { public DabCommand() { length = 3; name = "dab"; description = "Adds all dab emojis to the last message of the user named"; } @Override public void executeCommand(MessageReceivedEvent event) { val content = event.getMessage().getContent(); if (isCommandLengthCorrect(content)) { val channel = event.getChannel(); val dabUser = content.split(" ")[2]; int count = 0; int maxDab = 10; for (Message message : channel.getIterableHistory()) { if (message.getAuthor().getName().equalsIgnoreCase(dabUser)) { dabOnMessage(message); break; } if (count >= maxDab) { MessageUtils.reactUnsuccessfulResponse(event.getMessage()); break; } count++; } } else { MessageUtils.reactUnsuccessfulResponse(event.getMessage()); } } private void dabOnMessage(Message message) { val guild = message.getGuild(); for (val emote : guild.getEmotes()) { if (emote.getName().contains("dab")) { MessageUtils.addReaction(message, emote); } } } }
package com.nincraft.ninbot.command; import com.nincraft.ninbot.util.MessageUtils; import lombok.val; import net.dv8tion.jda.core.entities.Message; import net.dv8tion.jda.core.events.message.MessageReceivedEvent; public class DabCommand extends AbstractCommand { public DabCommand() { length = 3; name = "dab"; description = "Adds all dab emojis to the last message of the user named"; } @Override public void executeCommand(MessageReceivedEvent event) { val content = event.getMessage().getContent(); if (isCommandLengthCorrect(content)) { val channel = event.getChannel(); val dabUser = content.split(" ")[2].replaceFirst("@", ""); int count = 0; int maxDab = 10; for (Message message : channel.getIterableHistory()) { if (message.getAuthor().getName().equalsIgnoreCase(dabUser)) { dabOnMessage(message); break; } if (count >= maxDab) { MessageUtils.reactUnsuccessfulResponse(event.getMessage()); break; } count++; } } else { MessageUtils.reactUnsuccessfulResponse(event.getMessage()); } } private void dabOnMessage(Message message) { val guild = message.getGuild(); for (val emote : guild.getEmotes()) { if (emote.getName().contains("dab")) { MessageUtils.addReaction(message, emote); } } } }
Remove @ from user on Dab command
Remove @ from user on Dab command
Java
mit
Nincodedo/Ninbot
java
## Code Before: package com.nincraft.ninbot.command; import com.nincraft.ninbot.util.MessageUtils; import lombok.val; import net.dv8tion.jda.core.entities.Message; import net.dv8tion.jda.core.events.message.MessageReceivedEvent; public class DabCommand extends AbstractCommand { public DabCommand() { length = 3; name = "dab"; description = "Adds all dab emojis to the last message of the user named"; } @Override public void executeCommand(MessageReceivedEvent event) { val content = event.getMessage().getContent(); if (isCommandLengthCorrect(content)) { val channel = event.getChannel(); val dabUser = content.split(" ")[2]; int count = 0; int maxDab = 10; for (Message message : channel.getIterableHistory()) { if (message.getAuthor().getName().equalsIgnoreCase(dabUser)) { dabOnMessage(message); break; } if (count >= maxDab) { MessageUtils.reactUnsuccessfulResponse(event.getMessage()); break; } count++; } } else { MessageUtils.reactUnsuccessfulResponse(event.getMessage()); } } private void dabOnMessage(Message message) { val guild = message.getGuild(); for (val emote : guild.getEmotes()) { if (emote.getName().contains("dab")) { MessageUtils.addReaction(message, emote); } } } } ## Instruction: Remove @ from user on Dab command ## Code After: package com.nincraft.ninbot.command; import com.nincraft.ninbot.util.MessageUtils; import lombok.val; import net.dv8tion.jda.core.entities.Message; import net.dv8tion.jda.core.events.message.MessageReceivedEvent; public class DabCommand extends AbstractCommand { public DabCommand() { length = 3; name = "dab"; description = "Adds all dab emojis to the last message of the user named"; } @Override public void executeCommand(MessageReceivedEvent event) { val content = event.getMessage().getContent(); if (isCommandLengthCorrect(content)) { val channel = event.getChannel(); val dabUser = content.split(" ")[2].replaceFirst("@", ""); int count = 0; int maxDab = 10; for (Message message : channel.getIterableHistory()) { if (message.getAuthor().getName().equalsIgnoreCase(dabUser)) { dabOnMessage(message); break; } if (count >= maxDab) { MessageUtils.reactUnsuccessfulResponse(event.getMessage()); break; } count++; } } else { MessageUtils.reactUnsuccessfulResponse(event.getMessage()); } } private void dabOnMessage(Message message) { val guild = message.getGuild(); for (val emote : guild.getEmotes()) { if (emote.getName().contains("dab")) { MessageUtils.addReaction(message, emote); } } } }
010a8b2d421b57a0dfa4b1c468f5381d94496fbf
src/test/java/com/vtence/molecule/testing/HtmlForm.java
src/test/java/com/vtence/molecule/testing/HtmlForm.java
package com.vtence.molecule.testing; import com.vtence.molecule.helpers.Charsets; import com.vtence.molecule.helpers.Joiner; import java.nio.charset.Charset; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; public class HtmlForm { private final Map<String, String> data = new HashMap<String, String>(); private Charset charset = Charsets.UTF_8; public String contentType() { return "application/x-www-form-urlencoded"; } public HtmlForm encoding(String charsetName) { return encoding(Charset.forName(charsetName)); } public HtmlForm encoding(Charset charset) { this.charset = charset; return this; } public HtmlForm set(String name, String value) { data.put(name, value); return this; } public String encode() { List<String> pairs = new ArrayList<String>(); URLEscaper escaper = URLEscaper.to(charset); for (String name : data.keySet()) { pairs.add(escaper.escape(name) + "=" + escaper.escape(data.get(name))); } return Joiner.on("&").join(pairs); } }
package com.vtence.molecule.testing; import com.vtence.molecule.helpers.Charsets; import com.vtence.molecule.helpers.Joiner; import java.nio.charset.Charset; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; public class HtmlForm { private final Map<String, String> data = new HashMap<String, String>(); private Charset charset = Charsets.UTF_8; public String contentType() { return "application/x-www-form-urlencoded"; } public HtmlForm charset(String charsetName) { return charset(Charset.forName(charsetName)); } public HtmlForm charset(Charset charset) { this.charset = charset; return this; } public HtmlForm set(String name, String value) { data.put(name, value); return this; } public String encode() { List<String> pairs = new ArrayList<String>(); URLEscaper escaper = URLEscaper.to(charset); for (String name : data.keySet()) { pairs.add(escaper.escape(name) + "=" + escaper.escape(data.get(name))); } return Joiner.on("&").join(pairs); } }
Clarify language to avoid confusing between form accepted charset and form encoding type
Clarify language to avoid confusing between form accepted charset and form encoding type
Java
mit
testinfected/molecule,ensonik/molecule,testinfected/molecule,ensonik/molecule,testinfected/molecule,testinfected/molecule,ensonik/molecule,ensonik/molecule,testinfected/molecule,ensonik/molecule
java
## Code Before: package com.vtence.molecule.testing; import com.vtence.molecule.helpers.Charsets; import com.vtence.molecule.helpers.Joiner; import java.nio.charset.Charset; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; public class HtmlForm { private final Map<String, String> data = new HashMap<String, String>(); private Charset charset = Charsets.UTF_8; public String contentType() { return "application/x-www-form-urlencoded"; } public HtmlForm encoding(String charsetName) { return encoding(Charset.forName(charsetName)); } public HtmlForm encoding(Charset charset) { this.charset = charset; return this; } public HtmlForm set(String name, String value) { data.put(name, value); return this; } public String encode() { List<String> pairs = new ArrayList<String>(); URLEscaper escaper = URLEscaper.to(charset); for (String name : data.keySet()) { pairs.add(escaper.escape(name) + "=" + escaper.escape(data.get(name))); } return Joiner.on("&").join(pairs); } } ## Instruction: Clarify language to avoid confusing between form accepted charset and form encoding type ## Code After: package com.vtence.molecule.testing; import com.vtence.molecule.helpers.Charsets; import com.vtence.molecule.helpers.Joiner; import java.nio.charset.Charset; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; public class HtmlForm { private final Map<String, String> data = new HashMap<String, String>(); private Charset charset = Charsets.UTF_8; public String contentType() { return "application/x-www-form-urlencoded"; } public HtmlForm charset(String charsetName) { return charset(Charset.forName(charsetName)); } public HtmlForm charset(Charset charset) { this.charset = charset; return this; } public HtmlForm set(String name, String value) { data.put(name, value); return this; } public String encode() { List<String> pairs = new ArrayList<String>(); URLEscaper escaper = URLEscaper.to(charset); for (String name : data.keySet()) { pairs.add(escaper.escape(name) + "=" + escaper.escape(data.get(name))); } return Joiner.on("&").join(pairs); } }
a5463c4c1021009be6958c3821605e8b803edc45
local-cli/run-packager.js
local-cli/run-packager.js
'use strict'; var path = require('path'); var child_process = require('child_process'); module.exports = function(newWindow) { if (newWindow) { var launchPackagerScript = path.resolve(__dirname, '..', 'packager', 'launchPackager.command'); if (process.platform === 'darwin') { child_process.spawnSync('open', [launchPackagerScript]); } else if (process.platform === 'linux') { child_process.spawn( 'xterm', ['-e', 'sh', launchPackagerScript], {detached: true}); } } else { child_process.spawn('sh', [ path.resolve(__dirname, '..', 'packager', 'packager.sh'), '--projectRoots', process.cwd(), ], {stdio: 'inherit'}); } };
'use strict'; var path = require('path'); var child_process = require('child_process'); module.exports = function(newWindow) { if (newWindow) { var launchPackagerScript = path.resolve(__dirname, '..', 'packager', 'launchPackager.command'); if (process.platform === 'darwin') { child_process.spawnSync('open', [launchPackagerScript]); } else if (process.platform === 'linux') { child_process.spawn( 'xterm', ['-e', 'sh', launchPackagerScript], {detached: true}); } } else { if (/^win/.test(process.platform)) { child_process.spawn('node', [ path.resolve(__dirname, '..', 'packager', 'packager.js'), '--projectRoots', process.cwd(), ], {stdio: 'inherit'}); } else { child_process.spawn('sh', [ path.resolve(__dirname, '..', 'packager', 'packager.sh'), '--projectRoots', process.cwd(), ], {stdio: 'inherit'}); } } };
Fix 'react-native start' on Windows
[cli] Fix 'react-native start' on Windows Based on https://github.com/facebook/react-native/pull/2989 Thanks @BerndWessels!
JavaScript
bsd-3-clause
machard/react-native,Tredsite/react-native,cdlewis/react-native,myntra/react-native,ankitsinghania94/react-native,mrngoitall/react-native,hzgnpu/react-native,negativetwelve/react-native,CntChen/react-native,Maxwell2022/react-native,lprhodes/react-native,makadaw/react-native,philonpang/react-native,wesley1001/react-native,naoufal/react-native,csatf/react-native,a2/react-native,rebeccahughes/react-native,darkrishabh/react-native,shinate/react-native,ptmt/react-native-macos,myntra/react-native,esauter5/react-native,ptomasroos/react-native,wenpkpk/react-native,Emilios1995/react-native,xiayz/react-native,luqin/react-native,jasonnoahchoi/react-native,tsjing/react-native,glovebx/react-native,lelandrichardson/react-native,orenklein/react-native,Tredsite/react-native,puf/react-native,jadbox/react-native,foghina/react-native,thotegowda/react-native,tadeuzagallo/react-native,Swaagie/react-native,shinate/react-native,aaron-goshine/react-native,kassens/react-native,vjeux/react-native,chirag04/react-native,pvinis/react-native-desktop,almost/react-native,glovebx/react-native,chetstone/react-native,foghina/react-native,patoroco/react-native,dubert/react-native,kushal/react-native,Intellicode/react-native,lprhodes/react-native,satya164/react-native,catalinmiron/react-native,jaggs6/react-native,mrspeaker/react-native,mironiasty/react-native,eduvon0220/react-native,alin23/react-native,myntra/react-native,mchinyakov/react-native,skatpgusskat/react-native,doochik/react-native,jevakallio/react-native,DannyvanderJagt/react-native,iodine/react-native,shrutic123/react-native,happypancake/react-native,aaron-goshine/react-native,a2/react-native,christopherdro/react-native,miracle2k/react-native,makadaw/react-native,lelandrichardson/react-native,eduardinni/react-native,Andreyco/react-native,NZAOM/react-native,Bhullnatik/react-native,gitim/react-native,aljs/react-native,dvcrn/react-native,imjerrybao/react-native,cdlewis/react-native,ehd/react-native,lprhodes/react-native,sghiassy/react-native,mchinyakov/react-native,mchinyakov/react-native,BretJohnson/react-native,clozr/react-native,imDangerous/react-native,puf/react-native,ehd/react-native,forcedotcom/react-native,shrutic/react-native,foghina/react-native,hammerandchisel/react-native,NZAOM/react-native,Intellicode/react-native,jeanblanchard/react-native,pglotov/react-native,ProjectSeptemberInc/react-native,ankitsinghania94/react-native,ptomasroos/react-native,ptomasroos/react-native,glovebx/react-native,peterp/react-native,orenklein/react-native,wesley1001/react-native,nickhudkins/react-native,mironiasty/react-native,zenlambda/react-native,quyixia/react-native,myntra/react-native,lelandrichardson/react-native,udnisap/react-native,adamjmcgrath/react-native,facebook/react-native,gre/react-native,peterp/react-native,gre/react-native,Andreyco/react-native,shrutic123/react-native,kassens/react-native,htc2u/react-native,makadaw/react-native,Purii/react-native,philikon/react-native,cdlewis/react-native,vjeux/react-native,facebook/react-native,mihaigiurgeanu/react-native,dikaiosune/react-native,miracle2k/react-native,yamill/react-native,exponent/react-native,chirag04/react-native,DanielMSchmidt/react-native,chetstone/react-native,bradbumbalough/react-native,ehd/react-native,ehd/react-native,dubert/react-native,clozr/react-native,MattFoley/react-native,tsjing/react-native,makadaw/react-native,dubert/react-native,pglotov/react-native,iodine/react-native,sospartan/react-native,adamkrell/react-native,kesha-antonov/react-native,YComputer/react-native,hzgnpu/react-native,wesley1001/react-native,gre/react-native,mironiasty/react-native,frantic/react-native,Livyli/react-native,andrewljohnson/react-native,cpunion/react-native,clozr/react-native,farazs/react-native,ptmt/react-native-macos,BretJohnson/react-native,machard/react-native,catalinmiron/react-native,jhen0409/react-native,pandiaraj44/react-native,yamill/react-native,gilesvangruisen/react-native,yzarubin/react-native,jasonnoahchoi/react-native,bsansouci/react-native,Bhullnatik/react-native,dikaiosune/react-native,catalinmiron/react-native,a2/react-native,NZAOM/react-native,ndejesus1227/react-native,forcedotcom/react-native,Swaagie/react-native,rickbeerendonk/react-native,sospartan/react-native,dvcrn/react-native,dabit3/react-native,javache/react-native,catalinmiron/react-native,formatlos/react-native,pglotov/react-native,Swaagie/react-native,almost/react-native,gitim/react-native,ehd/react-native,mrngoitall/react-native,glovebx/react-native,Maxwell2022/react-native,gilesvangruisen/react-native,lloydho/react-native,lprhodes/react-native,janicduplessis/react-native,andrewljohnson/react-native,aaron-goshine/react-native,philikon/react-native,kesha-antonov/react-native,philonpang/react-native,shrutic123/react-native,hammerandchisel/react-native,kesha-antonov/react-native,vjeux/react-native,csatf/react-native,janicduplessis/react-native,kushal/react-native,Guardiannw/react-native,sospartan/react-native,kassens/react-native,DannyvanderJagt/react-native,bsansouci/react-native,imjerrybao/react-native,gre/react-native,CodeLinkIO/react-native,gitim/react-native,Purii/react-native,marlonandrade/react-native,happypancake/react-native,ultralame/react-native,puf/react-native,CntChen/react-native,kassens/react-native,happypancake/react-native,tgoldenberg/react-native,apprennet/react-native,programming086/react-native,aljs/react-native,mrngoitall/react-native,glovebx/react-native,Emilios1995/react-native,nsimmons/react-native,Maxwell2022/react-native,bradbumbalough/react-native,patoroco/react-native,jasonnoahchoi/react-native,Tredsite/react-native,dabit3/react-native,mihaigiurgeanu/react-native,Guardiannw/react-native,orenklein/react-native,darkrishabh/react-native,esauter5/react-native,dabit3/react-native,hzgnpu/react-native,dikaiosune/react-native,naoufal/react-native,ProjectSeptemberInc/react-native,jeanblanchard/react-native,exponent/react-native,DerayGa/react-native,pandiaraj44/react-native,dralletje/react-native,andrewljohnson/react-native,ankitsinghania94/react-native,esauter5/react-native,programming086/react-native,ptmt/react-native-macos,jevakallio/react-native,quyixia/react-native,chetstone/react-native,lloydho/react-native,exponent/react-native,jhen0409/react-native,Emilios1995/react-native,YComputer/react-native,peterp/react-native,wenpkpk/react-native,CodeLinkIO/react-native,Purii/react-native,Bhullnatik/react-native,zenlambda/react-native,tsjing/react-native,doochik/react-native,happypancake/react-native,mironiasty/react-native,yamill/react-native,callstack-io/react-native,chnfeeeeeef/react-native,dubert/react-native,udnisap/react-native,thotegowda/react-native,martinbigio/react-native,sospartan/react-native,timfpark/react-native,adamkrell/react-native,mrngoitall/react-native,sospartan/react-native,hoastoolshop/react-native,Livyli/react-native,DannyvanderJagt/react-native,pglotov/react-native,aaron-goshine/react-native,adamjmcgrath/react-native,a2/react-native,chirag04/react-native,eduardinni/react-native,Ehesp/react-native,javache/react-native,kesha-antonov/react-native,doochik/react-native,Emilios1995/react-native,exponentjs/rex,imDangerous/react-native,bradbumbalough/react-native,dabit3/react-native,hayeah/react-native,jadbox/react-native,Guardiannw/react-native,exponent/react-native,pjcabrera/react-native,naoufal/react-native,htc2u/react-native,brentvatne/react-native,Emilios1995/react-native,jaggs6/react-native,salanki/react-native,martinbigio/react-native,machard/react-native,catalinmiron/react-native,mchinyakov/react-native,jevakallio/react-native,peterp/react-native,pglotov/react-native,peterp/react-native,thotegowda/react-native,jasonnoahchoi/react-native,kassens/react-native,kushal/react-native,Bhullnatik/react-native,cdlewis/react-native,ultralame/react-native,lelandrichardson/react-native,shrutic/react-native,xiayz/react-native,javache/react-native,adamkrell/react-native,miracle2k/react-native,negativetwelve/react-native,christopherdro/react-native,mchinyakov/react-native,ultralame/react-native,aljs/react-native,ndejesus1227/react-native,alin23/react-native,lelandrichardson/react-native,CodeLinkIO/react-native,jaggs6/react-native,ultralame/react-native,callstack-io/react-native,browniefed/react-native,jaggs6/react-native,HealthyWealthy/react-native,adamkrell/react-native,nathanajah/react-native,nsimmons/react-native,shrutic/react-native,tadeuzagallo/react-native,Swaagie/react-native,adamkrell/react-native,tszajna0/react-native,Ehesp/react-native,rickbeerendonk/react-native,cpunion/react-native,eduardinni/react-native,hzgnpu/react-native,tarkus/react-native-appletv,shinate/react-native,janicduplessis/react-native,hayeah/react-native,farazs/react-native,wenpkpk/react-native,shrutic123/react-native,elliottsj/react-native,satya164/react-native,Ehesp/react-native,hzgnpu/react-native,sospartan/react-native,almost/react-native,PlexChat/react-native,DannyvanderJagt/react-native,apprennet/react-native,negativetwelve/react-native,foghina/react-native,dralletje/react-native,kushal/react-native,doochik/react-native,almost/react-native,ankitsinghania94/react-native,javache/react-native,ptmt/react-native-macos,hoangpham95/react-native,dikaiosune/react-native,brentvatne/react-native,ankitsinghania94/react-native,gre/react-native,gitim/react-native,exponent/react-native,CodeLinkIO/react-native,exponent/react-native,chetstone/react-native,iodine/react-native,corbt/react-native,formatlos/react-native,dikaiosune/react-native,chnfeeeeeef/react-native,exponentjs/react-native,imjerrybao/react-native,chnfeeeeeef/react-native,philonpang/react-native,ptomasroos/react-native,orenklein/react-native,shrutic123/react-native,peterp/react-native,christopherdro/react-native,sghiassy/react-native,YComputer/react-native,udnisap/react-native,CntChen/react-native,mihaigiurgeanu/react-native,salanki/react-native,Intellicode/react-native,luqin/react-native,salanki/react-native,salanki/react-native,NZAOM/react-native,cdlewis/react-native,spicyj/react-native,exponent/react-native,tadeuzagallo/react-native,marlonandrade/react-native,almost/react-native,programming086/react-native,HealthyWealthy/react-native,ultralame/react-native,PlexChat/react-native,a2/react-native,nickhudkins/react-native,rickbeerendonk/react-native,alin23/react-native,aaron-goshine/react-native,yzarubin/react-native,chirag04/react-native,eduardinni/react-native,makadaw/react-native,dralletje/react-native,Swaagie/react-native,adamkrell/react-native,udnisap/react-native,naoufal/react-native,wesley1001/react-native,ankitsinghania94/react-native,mihaigiurgeanu/react-native,makadaw/react-native,hoangpham95/react-native,CntChen/react-native,gilesvangruisen/react-native,jevakallio/react-native,exponentjs/rex,rickbeerendonk/react-native,marlonandrade/react-native,orenklein/react-native,chnfeeeeeef/react-native,mihaigiurgeanu/react-native,arbesfeld/react-native,yamill/react-native,dvcrn/react-native,clozr/react-native,esauter5/react-native,pjcabrera/react-native,sghiassy/react-native,Andreyco/react-native,mrngoitall/react-native,MattFoley/react-native,lloydho/react-native,YComputer/react-native,udnisap/react-native,tadeuzagallo/react-native,dubert/react-native,wesley1001/react-native,pjcabrera/react-native,sghiassy/react-native,bradbumbalough/react-native,nathanajah/react-native,callstack-io/react-native,ndejesus1227/react-native,BretJohnson/react-native,DanielMSchmidt/react-native,darkrishabh/react-native,Livyli/react-native,formatlos/react-native,chnfeeeeeef/react-native,arbesfeld/react-native,alin23/react-native,foghina/react-native,aljs/react-native,skatpgusskat/react-native,nsimmons/react-native,arthuralee/react-native,jhen0409/react-native,luqin/react-native,MattFoley/react-native,tsjing/react-native,bsansouci/react-native,jaggs6/react-native,shrutic/react-native,mironiasty/react-native,Bhullnatik/react-native,yzarubin/react-native,cpunion/react-native,nathanajah/react-native,Guardiannw/react-native,patoroco/react-native,jadbox/react-native,almost/react-native,formatlos/react-native,charlesvinette/react-native,apprennet/react-native,Livyli/react-native,apprennet/react-native,HealthyWealthy/react-native,a2/react-native,jadbox/react-native,foghina/react-native,a2/react-native,skevy/react-native,wesley1001/react-native,DanielMSchmidt/react-native,kesha-antonov/react-native,corbt/react-native,patoroco/react-native,cosmith/react-native,ProjectSeptemberInc/react-native,sghiassy/react-native,marlonandrade/react-native,Ehesp/react-native,programming086/react-native,PlexChat/react-native,shrimpy/react-native,pjcabrera/react-native,jeffchienzabinet/react-native,Andreyco/react-native,xiayz/react-native,makadaw/react-native,facebook/react-native,gitim/react-native,jhen0409/react-native,apprennet/react-native,dabit3/react-native,dikaiosune/react-native,Maxwell2022/react-native,cdlewis/react-native,marlonandrade/react-native,browniefed/react-native,facebook/react-native,shrimpy/react-native,puf/react-native,facebook/react-native,miracle2k/react-native,yzarubin/react-native,programming086/react-native,arthuralee/react-native,quyixia/react-native,naoufal/react-native,ProjectSeptemberInc/react-native,happypancake/react-native,Livyli/react-native,satya164/react-native,jaredly/react-native,nsimmons/react-native,nickhudkins/react-native,lprhodes/react-native,puf/react-native,machard/react-native,tszajna0/react-native,Emilios1995/react-native,almost/react-native,rickbeerendonk/react-native,Purii/react-native,farazs/react-native,NZAOM/react-native,CodeLinkIO/react-native,nickhudkins/react-native,satya164/react-native,hoastoolshop/react-native,chnfeeeeeef/react-native,tarkus/react-native-appletv,CodeLinkIO/react-native,shinate/react-native,tsjing/react-native,xiayz/react-native,InterfaceInc/react-native,lloydho/react-native,adamjmcgrath/react-native,kushal/react-native,charlesvinette/react-native,martinbigio/react-native,corbt/react-native,timfpark/react-native,cpunion/react-native,andrewljohnson/react-native,gre/react-native,BretJohnson/react-native,arthuralee/react-native,forcedotcom/react-native,arbesfeld/react-native,alin23/react-native,ehd/react-native,chirag04/react-native,gilesvangruisen/react-native,shrutic/react-native,gilesvangruisen/react-native,tadeuzagallo/react-native,bsansouci/react-native,chetstone/react-native,iodine/react-native,mironiasty/react-native,aljs/react-native,Guardiannw/react-native,arbesfeld/react-native,aaron-goshine/react-native,ProjectSeptemberInc/react-native,negativetwelve/react-native,facebook/react-native,HealthyWealthy/react-native,adamjmcgrath/react-native,salanki/react-native,browniefed/react-native,csatf/react-native,rebeccahughes/react-native,zenlambda/react-native,Maxwell2022/react-native,adamjmcgrath/react-native,skevy/react-native,bradbumbalough/react-native,darkrishabh/react-native,shrimpy/react-native,dabit3/react-native,javache/react-native,gitim/react-native,DerayGa/react-native,DanielMSchmidt/react-native,DerayGa/react-native,pandiaraj44/react-native,brentvatne/react-native,jeffchienzabinet/react-native,DannyvanderJagt/react-native,Emilios1995/react-native,dralletje/react-native,cpunion/react-native,BretJohnson/react-native,foghina/react-native,yamill/react-native,eduvon0220/react-native,catalinmiron/react-native,elliottsj/react-native,philikon/react-native,philonpang/react-native,gre/react-native,janicduplessis/react-native,chirag04/react-native,mrspeaker/react-native,PlexChat/react-native,shrutic/react-native,Bhullnatik/react-native,miracle2k/react-native,exponentjs/react-native,thotegowda/react-native,farazs/react-native,Guardiannw/react-native,apprennet/react-native,Guardiannw/react-native,timfpark/react-native,arthuralee/react-native,jaredly/react-native,skevy/react-native,bsansouci/react-native,hayeah/react-native,jeanblanchard/react-native,MattFoley/react-native,salanki/react-native,quyixia/react-native,forcedotcom/react-native,dubert/react-native,adamkrell/react-native,imjerrybao/react-native,DerayGa/react-native,hzgnpu/react-native,charlesvinette/react-native,kesha-antonov/react-native,imDangerous/react-native,myntra/react-native,ankitsinghania94/react-native,HealthyWealthy/react-native,dvcrn/react-native,dvcrn/react-native,jhen0409/react-native,NZAOM/react-native,martinbigio/react-native,exponentjs/react-native,iodine/react-native,browniefed/react-native,frantic/react-native,hzgnpu/react-native,ehd/react-native,hammerandchisel/react-native,machard/react-native,DanielMSchmidt/react-native,Bhullnatik/react-native,janicduplessis/react-native,satya164/react-native,jeffchienzabinet/react-native,jeffchienzabinet/react-native,bradbumbalough/react-native,mrspeaker/react-native,eduvon0220/react-native,alin23/react-native,dabit3/react-native,kushal/react-native,machard/react-native,dralletje/react-native,dabit3/react-native,cosmith/react-native,xiayz/react-native,iodine/react-native,christopherdro/react-native,jeanblanchard/react-native,chetstone/react-native,hayeah/react-native,shrutic123/react-native,andrewljohnson/react-native,cdlewis/react-native,tarkus/react-native-appletv,chirag04/react-native,timfpark/react-native,gitim/react-native,jasonnoahchoi/react-native,darkrishabh/react-native,naoufal/react-native,satya164/react-native,elliottsj/react-native,urvashi01/react-native,javache/react-native,patoroco/react-native,pjcabrera/react-native,jeffchienzabinet/react-native,cpunion/react-native,patoroco/react-native,browniefed/react-native,pjcabrera/react-native,pjcabrera/react-native,yzarubin/react-native,yamill/react-native,satya164/react-native,spicyj/react-native,jeanblanchard/react-native,zenlambda/react-native,jadbox/react-native,kassens/react-native,philikon/react-native,elliottsj/react-native,lelandrichardson/react-native,patoroco/react-native,dralletje/react-native,Guardiannw/react-native,jevakallio/react-native,imjerrybao/react-native,Purii/react-native,Purii/react-native,tgoldenberg/react-native,Livyli/react-native,lloydho/react-native,CntChen/react-native,ptmt/react-native-macos,gilesvangruisen/react-native,DanielMSchmidt/react-native,timfpark/react-native,lprhodes/react-native,nickhudkins/react-native,imDangerous/react-native,Purii/react-native,callstack-io/react-native,jevakallio/react-native,programming086/react-native,Livyli/react-native,farazs/react-native,Andreyco/react-native,mrspeaker/react-native,formatlos/react-native,jaggs6/react-native,yzarubin/react-native,charlesvinette/react-native,nickhudkins/react-native,xiayz/react-native,tszajna0/react-native,hoangpham95/react-native,corbt/react-native,doochik/react-native,exponentjs/react-native,urvashi01/react-native,pvinis/react-native-desktop,Tredsite/react-native,skevy/react-native,xiayz/react-native,tszajna0/react-native,formatlos/react-native,miracle2k/react-native,hoangpham95/react-native,darkrishabh/react-native,MattFoley/react-native,formatlos/react-native,cdlewis/react-native,wesley1001/react-native,mironiasty/react-native,myntra/react-native,forcedotcom/react-native,elliottsj/react-native,catalinmiron/react-native,jeffchienzabinet/react-native,InterfaceInc/react-native,arbesfeld/react-native,shrimpy/react-native,jaredly/react-native,facebook/react-native,tszajna0/react-native,gre/react-native,csatf/react-native,esauter5/react-native,corbt/react-native,quyixia/react-native,pvinis/react-native-desktop,brentvatne/react-native,jeanblanchard/react-native,esauter5/react-native,farazs/react-native,skatpgusskat/react-native,happypancake/react-native,shrimpy/react-native,zenlambda/react-native,jadbox/react-native,machard/react-native,DerayGa/react-native,browniefed/react-native,cpunion/react-native,cpunion/react-native,philonpang/react-native,eduvon0220/react-native,tarkus/react-native-appletv,tadeuzagallo/react-native,mrngoitall/react-native,skatpgusskat/react-native,bsansouci/react-native,InterfaceInc/react-native,mchinyakov/react-native,CntChen/react-native,chetstone/react-native,yamill/react-native,urvashi01/react-native,NZAOM/react-native,spicyj/react-native,bsansouci/react-native,HealthyWealthy/react-native,marlonandrade/react-native,tszajna0/react-native,pandiaraj44/react-native,DerayGa/react-native,DanielMSchmidt/react-native,imjerrybao/react-native,csatf/react-native,brentvatne/react-native,cosmith/react-native,quyixia/react-native,kassens/react-native,jhen0409/react-native,hoangpham95/react-native,philonpang/react-native,InterfaceInc/react-native,CodeLinkIO/react-native,mrspeaker/react-native,facebook/react-native,mrspeaker/react-native,InterfaceInc/react-native,makadaw/react-native,hammerandchisel/react-native,philikon/react-native,myntra/react-native,wenpkpk/react-native,luqin/react-native,dubert/react-native,gilesvangruisen/react-native,rebeccahughes/react-native,cosmith/react-native,DannyvanderJagt/react-native,jaredly/react-native,skevy/react-native,Intellicode/react-native,hoangpham95/react-native,exponentjs/react-native,martinbigio/react-native,jhen0409/react-native,jaredly/react-native,eduardinni/react-native,shrimpy/react-native,PlexChat/react-native,htc2u/react-native,InterfaceInc/react-native,cosmith/react-native,pandiaraj44/react-native,HealthyWealthy/react-native,skevy/react-native,adamjmcgrath/react-native,csatf/react-native,Tredsite/react-native,frantic/react-native,adamjmcgrath/react-native,tgoldenberg/react-native,charlesvinette/react-native,doochik/react-native,rickbeerendonk/react-native,rickbeerendonk/react-native,brentvatne/react-native,csatf/react-native,happypancake/react-native,PlexChat/react-native,myntra/react-native,DannyvanderJagt/react-native,urvashi01/react-native,skatpgusskat/react-native,philikon/react-native,rebeccahughes/react-native,wesley1001/react-native,DanielMSchmidt/react-native,philonpang/react-native,dikaiosune/react-native,zenlambda/react-native,javache/react-native,mironiasty/react-native,patoroco/react-native,negativetwelve/react-native,skevy/react-native,esauter5/react-native,arbesfeld/react-native,csatf/react-native,machard/react-native,urvashi01/react-native,arbesfeld/react-native,mrngoitall/react-native,jaredly/react-native,andrewljohnson/react-native,jasonnoahchoi/react-native,jeffchienzabinet/react-native,miracle2k/react-native,pandiaraj44/react-native,eduardinni/react-native,esauter5/react-native,makadaw/react-native,glovebx/react-native,eduvon0220/react-native,tgoldenberg/react-native,nsimmons/react-native,martinbigio/react-native,kassens/react-native,forcedotcom/react-native,Ehesp/react-native,bradbumbalough/react-native,htc2u/react-native,Swaagie/react-native,ProjectSeptemberInc/react-native,Ehesp/react-native,hoastoolshop/react-native,YComputer/react-native,andrewljohnson/react-native,udnisap/react-native,programming086/react-native,corbt/react-native,frantic/react-native,mrspeaker/react-native,pglotov/react-native,lelandrichardson/react-native,programming086/react-native,CntChen/react-native,jaredly/react-native,htc2u/react-native,negativetwelve/react-native,rickbeerendonk/react-native,nickhudkins/react-native,NZAOM/react-native,lloydho/react-native,dralletje/react-native,lloydho/react-native,orenklein/react-native,Maxwell2022/react-native,apprennet/react-native,farazs/react-native,callstack-io/react-native,kesha-antonov/react-native,yzarubin/react-native,doochik/react-native,ptmt/react-native-macos,tadeuzagallo/react-native,tgoldenberg/react-native,MattFoley/react-native,janicduplessis/react-native,yamill/react-native,cosmith/react-native,hammerandchisel/react-native,shinate/react-native,shrimpy/react-native,ankitsinghania94/react-native,jeanblanchard/react-native,corbt/react-native,hoastoolshop/react-native,timfpark/react-native,cosmith/react-native,Intellicode/react-native,mihaigiurgeanu/react-native,udnisap/react-native,compulim/react-native,Bhullnatik/react-native,yzarubin/react-native,pvinis/react-native-desktop,dralletje/react-native,pglotov/react-native,christopherdro/react-native,tarkus/react-native-appletv,callstack-io/react-native,chnfeeeeeef/react-native,darkrishabh/react-native,Tredsite/react-native,philikon/react-native,cosmith/react-native,CntChen/react-native,jeffchienzabinet/react-native,bradbumbalough/react-native,eduvon0220/react-native,MattFoley/react-native,Intellicode/react-native,brentvatne/react-native,elliottsj/react-native,tsjing/react-native,kushal/react-native,lprhodes/react-native,zenlambda/react-native,ehd/react-native,rebeccahughes/react-native,jadbox/react-native,charlesvinette/react-native,hoastoolshop/react-native,compulim/react-native,htc2u/react-native,elliottsj/react-native,christopherdro/react-native,tgoldenberg/react-native,negativetwelve/react-native,aljs/react-native,sghiassy/react-native,urvashi01/react-native,ndejesus1227/react-native,alin23/react-native,luqin/react-native,hzgnpu/react-native,ndejesus1227/react-native,luqin/react-native,myntra/react-native,spicyj/react-native,jhen0409/react-native,DannyvanderJagt/react-native,charlesvinette/react-native,htc2u/react-native,ptomasroos/react-native,tarkus/react-native-appletv,peterp/react-native,aaron-goshine/react-native,wenpkpk/react-native,InterfaceInc/react-native,doochik/react-native,ptmt/react-native-macos,imjerrybao/react-native,pjcabrera/react-native,dvcrn/react-native,skatpgusskat/react-native,zenlambda/react-native,tarkus/react-native-appletv,mihaigiurgeanu/react-native,foghina/react-native,chnfeeeeeef/react-native,kesha-antonov/react-native,orenklein/react-native,negativetwelve/react-native,thotegowda/react-native,exponentjs/react-native,tadeuzagallo/react-native,Tredsite/react-native,frantic/react-native,sospartan/react-native,YComputer/react-native,pvinis/react-native-desktop,BretJohnson/react-native,ndejesus1227/react-native,jeanblanchard/react-native,christopherdro/react-native,lloydho/react-native,mrspeaker/react-native,martinbigio/react-native,callstack-io/react-native,Ehesp/react-native,skatpgusskat/react-native,salanki/react-native,nathanajah/react-native,udnisap/react-native,darkrishabh/react-native,farazs/react-native,urvashi01/react-native,ptomasroos/react-native,happypancake/react-native,marlonandrade/react-native,hammerandchisel/react-native,skevy/react-native,javache/react-native,iodine/react-native,jaredly/react-native,gilesvangruisen/react-native,Swaagie/react-native,jevakallio/react-native,InterfaceInc/react-native,imDangerous/react-native,orenklein/react-native,imjerrybao/react-native,alin23/react-native,eduardinni/react-native,Maxwell2022/react-native,timfpark/react-native,nathanajah/react-native,BretJohnson/react-native,peterp/react-native,miracle2k/react-native,negativetwelve/react-native,BretJohnson/react-native,gitim/react-native,forcedotcom/react-native,luqin/react-native,thotegowda/react-native,philonpang/react-native,tsjing/react-native,ptmt/react-native-macos,sghiassy/react-native,adamkrell/react-native,luqin/react-native,Intellicode/react-native,glovebx/react-native,janicduplessis/react-native,hayeah/react-native,nathanajah/react-native,hoangpham95/react-native,exponentjs/rex,nsimmons/react-native,exponent/react-native,compulim/react-native,arthuralee/react-native,ndejesus1227/react-native,DerayGa/react-native,shrutic/react-native,forcedotcom/react-native,jaggs6/react-native,nsimmons/react-native,timfpark/react-native,tarkus/react-native-appletv,imDangerous/react-native,kushal/react-native,janicduplessis/react-native,salanki/react-native,vjeux/react-native,jevakallio/react-native,wenpkpk/react-native,Tredsite/react-native,charlesvinette/react-native,mrngoitall/react-native,naoufal/react-native,kesha-antonov/react-native,clozr/react-native,jaggs6/react-native,PlexChat/react-native,shinate/react-native,andrewljohnson/react-native,elliottsj/react-native,MattFoley/react-native,spicyj/react-native,aljs/react-native,eduvon0220/react-native,aljs/react-native,formatlos/react-native,hoastoolshop/react-native,quyixia/react-native,eduardinni/react-native,aaron-goshine/react-native,browniefed/react-native,ptomasroos/react-native,Purii/react-native,wenpkpk/react-native,bsansouci/react-native,shrimpy/react-native,clozr/react-native,mironiasty/react-native,shrutic123/react-native,callstack-io/react-native,urvashi01/react-native,nathanajah/react-native,dvcrn/react-native,corbt/react-native,puf/react-native,lelandrichardson/react-native,pglotov/react-native,shinate/react-native,puf/react-native,Intellicode/react-native,catalinmiron/react-native,xiayz/react-native,rickbeerendonk/react-native,dvcrn/react-native,jasonnoahchoi/react-native,hoangpham95/react-native,javache/react-native,naoufal/react-native,Livyli/react-native,hoastoolshop/react-native,compulim/react-native,jasonnoahchoi/react-native,HealthyWealthy/react-native,jadbox/react-native,browniefed/react-native,shinate/react-native,sospartan/react-native,formatlos/react-native,tgoldenberg/react-native,YComputer/react-native,Andreyco/react-native,christopherdro/react-native,hammerandchisel/react-native,hammerandchisel/react-native,DerayGa/react-native,ndejesus1227/react-native,tsjing/react-native,nsimmons/react-native,tszajna0/react-native,nickhudkins/react-native,wenpkpk/react-native,iodine/react-native,glovebx/react-native,hoastoolshop/react-native,facebook/react-native,YComputer/react-native,clozr/react-native,shrutic/react-native,lprhodes/react-native,pandiaraj44/react-native,pandiaraj44/react-native,thotegowda/react-native,clozr/react-native,Ehesp/react-native,Maxwell2022/react-native,philikon/react-native,apprennet/react-native,pvinis/react-native-desktop,imDangerous/react-native,imDangerous/react-native,ProjectSeptemberInc/react-native,mchinyakov/react-native,CodeLinkIO/react-native,Swaagie/react-native,doochik/react-native,sghiassy/react-native,htc2u/react-native,spicyj/react-native,Andreyco/react-native,shrutic123/react-native,compulim/react-native,thotegowda/react-native,skatpgusskat/react-native,a2/react-native,nathanajah/react-native,spicyj/react-native,vjeux/react-native,mchinyakov/react-native,quyixia/react-native,almost/react-native,exponentjs/react-native,exponentjs/react-native,spicyj/react-native,tgoldenberg/react-native,farazs/react-native,PlexChat/react-native,tszajna0/react-native,pvinis/react-native-desktop,marlonandrade/react-native,Andreyco/react-native,chirag04/react-native,adamjmcgrath/react-native,mihaigiurgeanu/react-native,dubert/react-native,brentvatne/react-native,cdlewis/react-native,ProjectSeptemberInc/react-native,puf/react-native,brentvatne/react-native,arbesfeld/react-native,martinbigio/react-native,dikaiosune/react-native,ptomasroos/react-native,satya164/react-native,eduvon0220/react-native,jevakallio/react-native,chetstone/react-native,Emilios1995/react-native
javascript
## Code Before: 'use strict'; var path = require('path'); var child_process = require('child_process'); module.exports = function(newWindow) { if (newWindow) { var launchPackagerScript = path.resolve(__dirname, '..', 'packager', 'launchPackager.command'); if (process.platform === 'darwin') { child_process.spawnSync('open', [launchPackagerScript]); } else if (process.platform === 'linux') { child_process.spawn( 'xterm', ['-e', 'sh', launchPackagerScript], {detached: true}); } } else { child_process.spawn('sh', [ path.resolve(__dirname, '..', 'packager', 'packager.sh'), '--projectRoots', process.cwd(), ], {stdio: 'inherit'}); } }; ## Instruction: [cli] Fix 'react-native start' on Windows Based on https://github.com/facebook/react-native/pull/2989 Thanks @BerndWessels! ## Code After: 'use strict'; var path = require('path'); var child_process = require('child_process'); module.exports = function(newWindow) { if (newWindow) { var launchPackagerScript = path.resolve(__dirname, '..', 'packager', 'launchPackager.command'); if (process.platform === 'darwin') { child_process.spawnSync('open', [launchPackagerScript]); } else if (process.platform === 'linux') { child_process.spawn( 'xterm', ['-e', 'sh', launchPackagerScript], {detached: true}); } } else { if (/^win/.test(process.platform)) { child_process.spawn('node', [ path.resolve(__dirname, '..', 'packager', 'packager.js'), '--projectRoots', process.cwd(), ], {stdio: 'inherit'}); } else { child_process.spawn('sh', [ path.resolve(__dirname, '..', 'packager', 'packager.sh'), '--projectRoots', process.cwd(), ], {stdio: 'inherit'}); } } };
ceb6975d517a63d08f7e77bd7ebb5651b3e3d973
README.md
README.md
This module provides the ability to have partial password masking on a Titanium `TextField` object. This may be desirable in certain applications, for example, which may want to reveal only the last few digits of a Social Security Number or a Drivers License number. This [Screen Capture](http://www.screencast.com/t/VbLZkIi4h0bJ) shows a sample app using the `PartialMaskField` module. > __NOTE: This module does NOT support partial masking for Android.__ > __Technical Reason:__ When programmatically updating the value of a `TextField`, Android will place the cursor at position 0 instead of after the last position (where it would be expected). This affects the ability to perform dynamic `TextField` updates internally within this module. But, there is a feature request in for this functionality under [TIMOB-6006](https://jira.appcelerator.org/browse/TIMOB-6006). > _The behavior on Android will mimic the native functionality of a having a fully masked `TextField` with the setting `passwordMask:true`._
This module provides the ability to have partial password masking on a Titanium `TextField` object. This may be desirable in certain applications, for example, which may want to reveal only the last few digits of a Social Security Number or a Drivers License number. This [Screen Capture](http://www.screencast.com/t/4rxNmTuxkN) shows a sample app using the `PartialMaskField` module. > __NOTE: This module does NOT support partial masking for Android.__ > __Technical Reason:__ When programmatically updating the value of a `TextField`, Android will place the cursor at position 0 instead of after the last position (where it would be expected). This affects the ability to perform dynamic `TextField` updates internally within this module. But, there is a feature request in for this functionality under [TIMOB-6006](https://jira.appcelerator.org/browse/TIMOB-6006). > _The behavior on Android will mimic the native functionality of a having a fully masked `TextField` with the setting `passwordMask:true`._ > __UPDATE: The Android limitation has been fixed with SDK 2.1.2 and this module has been updated to function appropriately.__
Update to reflect 2.1.2 capability for Android
Update to reflect 2.1.2 capability for Android
Markdown
apache-2.0
patrickseda/PartialMaskField
markdown
## Code Before: This module provides the ability to have partial password masking on a Titanium `TextField` object. This may be desirable in certain applications, for example, which may want to reveal only the last few digits of a Social Security Number or a Drivers License number. This [Screen Capture](http://www.screencast.com/t/VbLZkIi4h0bJ) shows a sample app using the `PartialMaskField` module. > __NOTE: This module does NOT support partial masking for Android.__ > __Technical Reason:__ When programmatically updating the value of a `TextField`, Android will place the cursor at position 0 instead of after the last position (where it would be expected). This affects the ability to perform dynamic `TextField` updates internally within this module. But, there is a feature request in for this functionality under [TIMOB-6006](https://jira.appcelerator.org/browse/TIMOB-6006). > _The behavior on Android will mimic the native functionality of a having a fully masked `TextField` with the setting `passwordMask:true`._ ## Instruction: Update to reflect 2.1.2 capability for Android ## Code After: This module provides the ability to have partial password masking on a Titanium `TextField` object. This may be desirable in certain applications, for example, which may want to reveal only the last few digits of a Social Security Number or a Drivers License number. This [Screen Capture](http://www.screencast.com/t/4rxNmTuxkN) shows a sample app using the `PartialMaskField` module. > __NOTE: This module does NOT support partial masking for Android.__ > __Technical Reason:__ When programmatically updating the value of a `TextField`, Android will place the cursor at position 0 instead of after the last position (where it would be expected). This affects the ability to perform dynamic `TextField` updates internally within this module. But, there is a feature request in for this functionality under [TIMOB-6006](https://jira.appcelerator.org/browse/TIMOB-6006). > _The behavior on Android will mimic the native functionality of a having a fully masked `TextField` with the setting `passwordMask:true`._ > __UPDATE: The Android limitation has been fixed with SDK 2.1.2 and this module has been updated to function appropriately.__
4d2b172730b6889bd8793bbe3ed548bc87b6b658
app/src/main/res/layout/message_view.xml
app/src/main/res/layout/message_view.xml
<?xml version="1.0" encoding="utf-8"?> <merge xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="wrap_content" tools:parentTag="android.widget.FrameLayout"> <ImageView android:id="@+id/message_image" android:layout_width="40dp" android:layout_height="40dp"/> <com.pr0gramm.app.ui.views.RecyclerViewCompatibleTextView android:id="@+id/message_text" style="@style/TextAppearance.AppCompat.Body1" android:layout_width="match_parent" android:layout_height="wrap_content" android:textIsSelectable="true" android:layout_marginLeft="56dp" android:layout_marginBottom="36dp" android:singleLine="false" tools:text="@string/dummy_text" android:layout_marginStart="56dp"/> <com.pr0gramm.app.ui.views.SenderInfoView android:id="@+id/message_sender_info" android:layout_width="match_parent" android:layout_height="32dp" android:layout_gravity="bottom" android:layout_marginLeft="56dp" android:layout_marginStart="56dp" android:layout_marginTop="4dp"/> </merge>
<?xml version="1.0" encoding="utf-8"?> <merge xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="wrap_content" tools:parentTag="android.widget.FrameLayout"> <ImageView android:id="@+id/message_image" android:background="@color/grey_800" android:layout_width="40dp" android:layout_height="40dp"/> <com.pr0gramm.app.ui.views.RecyclerViewCompatibleTextView android:id="@+id/message_text" style="@style/TextAppearance.AppCompat.Body1" android:layout_width="match_parent" android:layout_height="wrap_content" android:textIsSelectable="true" android:layout_marginLeft="56dp" android:layout_marginBottom="36dp" android:singleLine="false" tools:text="@string/dummy_text" android:layout_marginStart="56dp"/> <com.pr0gramm.app.ui.views.SenderInfoView android:id="@+id/message_sender_info" android:layout_width="match_parent" android:layout_height="32dp" android:layout_gravity="bottom" android:layout_marginLeft="56dp" android:layout_marginStart="56dp" android:layout_marginTop="4dp"/> </merge>
Add placeholder when loading thumbnails
Add placeholder when loading thumbnails
XML
mit
mopsalarm/Pr0,mopsalarm/Pr0,mopsalarm/Pr0
xml
## Code Before: <?xml version="1.0" encoding="utf-8"?> <merge xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="wrap_content" tools:parentTag="android.widget.FrameLayout"> <ImageView android:id="@+id/message_image" android:layout_width="40dp" android:layout_height="40dp"/> <com.pr0gramm.app.ui.views.RecyclerViewCompatibleTextView android:id="@+id/message_text" style="@style/TextAppearance.AppCompat.Body1" android:layout_width="match_parent" android:layout_height="wrap_content" android:textIsSelectable="true" android:layout_marginLeft="56dp" android:layout_marginBottom="36dp" android:singleLine="false" tools:text="@string/dummy_text" android:layout_marginStart="56dp"/> <com.pr0gramm.app.ui.views.SenderInfoView android:id="@+id/message_sender_info" android:layout_width="match_parent" android:layout_height="32dp" android:layout_gravity="bottom" android:layout_marginLeft="56dp" android:layout_marginStart="56dp" android:layout_marginTop="4dp"/> </merge> ## Instruction: Add placeholder when loading thumbnails ## Code After: <?xml version="1.0" encoding="utf-8"?> <merge xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="wrap_content" tools:parentTag="android.widget.FrameLayout"> <ImageView android:id="@+id/message_image" android:background="@color/grey_800" android:layout_width="40dp" android:layout_height="40dp"/> <com.pr0gramm.app.ui.views.RecyclerViewCompatibleTextView android:id="@+id/message_text" style="@style/TextAppearance.AppCompat.Body1" android:layout_width="match_parent" android:layout_height="wrap_content" android:textIsSelectable="true" android:layout_marginLeft="56dp" android:layout_marginBottom="36dp" android:singleLine="false" tools:text="@string/dummy_text" android:layout_marginStart="56dp"/> <com.pr0gramm.app.ui.views.SenderInfoView android:id="@+id/message_sender_info" android:layout_width="match_parent" android:layout_height="32dp" android:layout_gravity="bottom" android:layout_marginLeft="56dp" android:layout_marginStart="56dp" android:layout_marginTop="4dp"/> </merge>
979bf24a28e95f6975fde020b002426eafe5f3e6
static/js/activity-23andme-complete-import.js
static/js/activity-23andme-complete-import.js
$(function () { var params = {'data_type': '23andme_names'}; $.ajax({ 'type': 'GET', 'url': '/json-data/', 'data': params, 'success': function(data) { if (data.profiles && data.profiles.length > 0) { for (var i = 0; i < data.profiles.length; i++) { var radioElem = $('<input />'); radioElem.attr({'type' : 'radio', 'name' : 'profile_id', 'value' : data.profiles[i].id}); if (data.profiles.length == 1) { radioElem.attr('checked', true); } var labelElem = $('<label></label>'); labelElem.append(radioElem); labelElem.append(data.profiles[i].first_name + ' ' + data.profiles[i].last_name); var divElem = $('<div></div>'); divElem.attr('class', 'radio'); divElem.append(labelElem); $("#23andme-list-profiles").append(divElem); } $("#load-23andme-waiting").hide(); $("#23andme-complete-submit").css('visibility', 'visible'); } } }); });
$(function () { var params = {'data_type': '23andme_names'}; $.ajax({ 'type': 'GET', 'url': '/json-data/', 'data': params, 'success': function(data) { if (data.profiles && data.profiles.length > 0) { for (var i = 0; i < data.profiles.length; i++) { var radioElem = $('<input />'); radioElem.attr({'type' : 'radio', 'name' : 'profile_id', 'value' : data.profiles[i].id}); if (data.profiles.length == 1) { radioElem.attr('checked', true); } var labelElem = $('<label></label>'); labelElem.append(radioElem); labelElem.append(data.profiles[i].first_name + ' ' + data.profiles[i].last_name); var divElem = $('<div></div>'); divElem.attr('class', 'radio'); divElem.append(labelElem); $("#23andme-list-profiles").append(divElem); } $("#load-23andme-waiting").hide(); $("#23andme-complete-submit").css('visibility', 'visible'); } } }); });
Fix JS to use 2-space tabs
Fix JS to use 2-space tabs
JavaScript
mit
PersonalGenomesOrg/open-humans,OpenHumans/open-humans,PersonalGenomesOrg/open-humans,OpenHumans/open-humans,OpenHumans/open-humans,PersonalGenomesOrg/open-humans,PersonalGenomesOrg/open-humans,OpenHumans/open-humans
javascript
## Code Before: $(function () { var params = {'data_type': '23andme_names'}; $.ajax({ 'type': 'GET', 'url': '/json-data/', 'data': params, 'success': function(data) { if (data.profiles && data.profiles.length > 0) { for (var i = 0; i < data.profiles.length; i++) { var radioElem = $('<input />'); radioElem.attr({'type' : 'radio', 'name' : 'profile_id', 'value' : data.profiles[i].id}); if (data.profiles.length == 1) { radioElem.attr('checked', true); } var labelElem = $('<label></label>'); labelElem.append(radioElem); labelElem.append(data.profiles[i].first_name + ' ' + data.profiles[i].last_name); var divElem = $('<div></div>'); divElem.attr('class', 'radio'); divElem.append(labelElem); $("#23andme-list-profiles").append(divElem); } $("#load-23andme-waiting").hide(); $("#23andme-complete-submit").css('visibility', 'visible'); } } }); }); ## Instruction: Fix JS to use 2-space tabs ## Code After: $(function () { var params = {'data_type': '23andme_names'}; $.ajax({ 'type': 'GET', 'url': '/json-data/', 'data': params, 'success': function(data) { if (data.profiles && data.profiles.length > 0) { for (var i = 0; i < data.profiles.length; i++) { var radioElem = $('<input />'); radioElem.attr({'type' : 'radio', 'name' : 'profile_id', 'value' : data.profiles[i].id}); if (data.profiles.length == 1) { radioElem.attr('checked', true); } var labelElem = $('<label></label>'); labelElem.append(radioElem); labelElem.append(data.profiles[i].first_name + ' ' + data.profiles[i].last_name); var divElem = $('<div></div>'); divElem.attr('class', 'radio'); divElem.append(labelElem); $("#23andme-list-profiles").append(divElem); } $("#load-23andme-waiting").hide(); $("#23andme-complete-submit").css('visibility', 'visible'); } } }); });
eebb736bf83c572b797931c571e7416223436461
homeassistant/components/light/insteon.py
homeassistant/components/light/insteon.py
from homeassistant.components.insteon import (INSTEON, InsteonToggleDevice) def setup_platform(hass, config, add_devices, discovery_info=None): """ Sets up the Insteon Hub light platform. """ devs = [] for device in INSTEON.devices: if device.DeviceCategory == "Switched Lighting Control": devs.append(InsteonToggleDevice(device)) add_devices(devs)
from homeassistant.components.insteon import (INSTEON, InsteonToggleDevice) def setup_platform(hass, config, add_devices, discovery_info=None): """ Sets up the Insteon Hub light platform. """ devs = [] for device in INSTEON.devices: if device.DeviceCategory == "Switched Lighting Control": devs.append(InsteonToggleDevice(device)) if device.DeviceCategory == "Dimmable Lighting Control": devs.append(InsteonToggleDevice(device)) add_devices(devs)
Add ability to control dimmable sources
Add ability to control dimmable sources
Python
mit
emilhetty/home-assistant,Duoxilian/home-assistant,rohitranjan1991/home-assistant,toddeye/home-assistant,ct-23/home-assistant,florianholzapfel/home-assistant,kennedyshead/home-assistant,keerts/home-assistant,lukas-hetzenecker/home-assistant,jabesq/home-assistant,JshWright/home-assistant,open-homeautomation/home-assistant,molobrakos/home-assistant,dmeulen/home-assistant,qedi-r/home-assistant,coteyr/home-assistant,molobrakos/home-assistant,leppa/home-assistant,miniconfig/home-assistant,alexmogavero/home-assistant,Duoxilian/home-assistant,DavidLP/home-assistant,instantchow/home-assistant,mKeRix/home-assistant,Smart-Torvy/torvy-home-assistant,hmronline/home-assistant,LinuxChristian/home-assistant,Julian/home-assistant,varunr047/homefile,balloob/home-assistant,kyvinh/home-assistant,rohitranjan1991/home-assistant,aequitas/home-assistant,dmeulen/home-assistant,postlund/home-assistant,luxus/home-assistant,jawilson/home-assistant,auduny/home-assistant,Zac-HD/home-assistant,LinuxChristian/home-assistant,tchellomello/home-assistant,Duoxilian/home-assistant,Julian/home-assistant,mikaelboman/home-assistant,shaftoe/home-assistant,luxus/home-assistant,tboyce1/home-assistant,happyleavesaoc/home-assistant,w1ll1am23/home-assistant,robjohnson189/home-assistant,JshWright/home-assistant,nkgilley/home-assistant,stefan-jonasson/home-assistant,pschmitt/home-assistant,balloob/home-assistant,hmronline/home-assistant,molobrakos/home-assistant,Zac-HD/home-assistant,betrisey/home-assistant,robjohnson189/home-assistant,sffjunkie/home-assistant,mezz64/home-assistant,Smart-Torvy/torvy-home-assistant,varunr047/homefile,jnewland/home-assistant,keerts/home-assistant,tinloaf/home-assistant,sander76/home-assistant,robbiet480/home-assistant,tinloaf/home-assistant,deisi/home-assistant,leoc/home-assistant,ma314smith/home-assistant,mikaelboman/home-assistant,morphis/home-assistant,DavidLP/home-assistant,varunr047/homefile,robjohnson189/home-assistant,ma314smith/home-assistant,open-homeautomation/home-assistant,oandrew/home-assistant,stefan-jonasson/home-assistant,keerts/home-assistant,titilambert/home-assistant,ma314smith/home-assistant,ct-23/home-assistant,tboyce1/home-assistant,toddeye/home-assistant,philipbl/home-assistant,emilhetty/home-assistant,shaftoe/home-assistant,nnic/home-assistant,florianholzapfel/home-assistant,Danielhiversen/home-assistant,xifle/home-assistant,auduny/home-assistant,fbradyirl/home-assistant,philipbl/home-assistant,coteyr/home-assistant,LinuxChristian/home-assistant,jamespcole/home-assistant,mKeRix/home-assistant,alexmogavero/home-assistant,jaharkes/home-assistant,turbokongen/home-assistant,shaftoe/home-assistant,jnewland/home-assistant,betrisey/home-assistant,MungoRae/home-assistant,MungoRae/home-assistant,nugget/home-assistant,oandrew/home-assistant,PetePriority/home-assistant,devdelay/home-assistant,aoakeson/home-assistant,eagleamon/home-assistant,titilambert/home-assistant,nnic/home-assistant,rohitranjan1991/home-assistant,jaharkes/home-assistant,hmronline/home-assistant,tinloaf/home-assistant,devdelay/home-assistant,MungoRae/home-assistant,srcLurker/home-assistant,aronsky/home-assistant,kyvinh/home-assistant,tchellomello/home-assistant,tboyce021/home-assistant,florianholzapfel/home-assistant,Zac-HD/home-assistant,jamespcole/home-assistant,alexmogavero/home-assistant,nugget/home-assistant,eagleamon/home-assistant,alexmogavero/home-assistant,happyleavesaoc/home-assistant,Theb-1/home-assistant,HydrelioxGitHub/home-assistant,luxus/home-assistant,Zac-HD/home-assistant,eagleamon/home-assistant,leoc/home-assistant,mikaelboman/home-assistant,deisi/home-assistant,postlund/home-assistant,mKeRix/home-assistant,ct-23/home-assistant,jawilson/home-assistant,leppa/home-assistant,auduny/home-assistant,happyleavesaoc/home-assistant,soldag/home-assistant,bdfoster/blumate,stefan-jonasson/home-assistant,leoc/home-assistant,instantchow/home-assistant,sffjunkie/home-assistant,sffjunkie/home-assistant,qedi-r/home-assistant,morphis/home-assistant,varunr047/homefile,jaharkes/home-assistant,betrisey/home-assistant,mKeRix/home-assistant,deisi/home-assistant,morphis/home-assistant,persandstrom/home-assistant,oandrew/home-assistant,MartinHjelmare/home-assistant,adrienbrault/home-assistant,Zyell/home-assistant,emilhetty/home-assistant,turbokongen/home-assistant,jabesq/home-assistant,emilhetty/home-assistant,srcLurker/home-assistant,Julian/home-assistant,HydrelioxGitHub/home-assistant,leoc/home-assistant,MartinHjelmare/home-assistant,Cinntax/home-assistant,hexxter/home-assistant,dmeulen/home-assistant,robjohnson189/home-assistant,aequitas/home-assistant,DavidLP/home-assistant,joopert/home-assistant,kennedyshead/home-assistant,philipbl/home-assistant,justyns/home-assistant,instantchow/home-assistant,w1ll1am23/home-assistant,FreekingDean/home-assistant,hexxter/home-assistant,Danielhiversen/home-assistant,betrisey/home-assistant,nnic/home-assistant,Cinntax/home-assistant,varunr047/homefile,mikaelboman/home-assistant,hmronline/home-assistant,Teagan42/home-assistant,mezz64/home-assistant,jabesq/home-assistant,keerts/home-assistant,sdague/home-assistant,morphis/home-assistant,xifle/home-assistant,devdelay/home-assistant,sander76/home-assistant,LinuxChristian/home-assistant,joopert/home-assistant,hmronline/home-assistant,kyvinh/home-assistant,sdague/home-assistant,eagleamon/home-assistant,Smart-Torvy/torvy-home-assistant,tboyce021/home-assistant,ewandor/home-assistant,bdfoster/blumate,ewandor/home-assistant,PetePriority/home-assistant,bdfoster/blumate,open-homeautomation/home-assistant,dmeulen/home-assistant,shaftoe/home-assistant,MungoRae/home-assistant,aequitas/home-assistant,ct-23/home-assistant,xifle/home-assistant,JshWright/home-assistant,LinuxChristian/home-assistant,kyvinh/home-assistant,partofthething/home-assistant,bdfoster/blumate,ewandor/home-assistant,Zyell/home-assistant,emilhetty/home-assistant,FreekingDean/home-assistant,miniconfig/home-assistant,coteyr/home-assistant,Teagan42/home-assistant,mikaelboman/home-assistant,Julian/home-assistant,philipbl/home-assistant,PetePriority/home-assistant,Theb-1/home-assistant,jnewland/home-assistant,ma314smith/home-assistant,GenericStudent/home-assistant,deisi/home-assistant,Smart-Torvy/torvy-home-assistant,nugget/home-assistant,soldag/home-assistant,home-assistant/home-assistant,MungoRae/home-assistant,deisi/home-assistant,robbiet480/home-assistant,sffjunkie/home-assistant,GenericStudent/home-assistant,aoakeson/home-assistant,justyns/home-assistant,xifle/home-assistant,oandrew/home-assistant,Zyell/home-assistant,justyns/home-assistant,sffjunkie/home-assistant,pschmitt/home-assistant,fbradyirl/home-assistant,miniconfig/home-assistant,hexxter/home-assistant,srcLurker/home-assistant,open-homeautomation/home-assistant,srcLurker/home-assistant,JshWright/home-assistant,aronsky/home-assistant,home-assistant/home-assistant,nkgilley/home-assistant,jamespcole/home-assistant,bdfoster/blumate,miniconfig/home-assistant,fbradyirl/home-assistant,Duoxilian/home-assistant,devdelay/home-assistant,jaharkes/home-assistant,Theb-1/home-assistant,stefan-jonasson/home-assistant,florianholzapfel/home-assistant,balloob/home-assistant,ct-23/home-assistant,tboyce1/home-assistant,tboyce1/home-assistant,happyleavesaoc/home-assistant,hexxter/home-assistant,lukas-hetzenecker/home-assistant,adrienbrault/home-assistant,HydrelioxGitHub/home-assistant,partofthething/home-assistant,persandstrom/home-assistant,MartinHjelmare/home-assistant,aoakeson/home-assistant,persandstrom/home-assistant
python
## Code Before: from homeassistant.components.insteon import (INSTEON, InsteonToggleDevice) def setup_platform(hass, config, add_devices, discovery_info=None): """ Sets up the Insteon Hub light platform. """ devs = [] for device in INSTEON.devices: if device.DeviceCategory == "Switched Lighting Control": devs.append(InsteonToggleDevice(device)) add_devices(devs) ## Instruction: Add ability to control dimmable sources ## Code After: from homeassistant.components.insteon import (INSTEON, InsteonToggleDevice) def setup_platform(hass, config, add_devices, discovery_info=None): """ Sets up the Insteon Hub light platform. """ devs = [] for device in INSTEON.devices: if device.DeviceCategory == "Switched Lighting Control": devs.append(InsteonToggleDevice(device)) if device.DeviceCategory == "Dimmable Lighting Control": devs.append(InsteonToggleDevice(device)) add_devices(devs)
3ed21ceecba25a5265a407a8643f050d00df69f5
lib/usps/test.rb
lib/usps/test.rb
require 'test/unit' require 'rubygems' module USPS # This class is a test runner for the various test requests that are outlined # in the USPS API documentation. These tests are often used to determine if a # developer is allowed to gain access to the production systems. # # Running this test suite should fullfil all requirements for access to the production # system for the APIs supported by the library. class Test < Test::Unit::TestCase require 'usps/test/zip_code_lookup' require 'usps/test/address_verification' require 'usps/test/city_and_state_lookup' require 'usps/test/tracking_lookup' # if(USPS.config.username.nil?) raise 'USPS_USER must be set in the environment to run these tests' end # Set USPS_LIVE to anything to run against production USPS.testing = true unless ENV['USPS_LIVE'] include ZipCodeLookup include CityAndStateLookup include AddressVerification include TrackingLookup end end
require 'test/unit' require 'rubygems' module USPS # This class is a test runner for the various test requests that are outlined # in the USPS API documentation. These tests are often used to determine if a # developer is allowed to gain access to the production systems. # # Running this test suite should fullfil all requirements for access to the production # system for the APIs supported by the library. class Test < Test::Unit::TestCase require 'usps/test/zip_code_lookup' require 'usps/test/address_verification' require 'usps/test/city_and_state_lookup' require 'usps/test/tracking_lookup' if(ENV['USPS_USER'].nil?) raise 'USPS_USER must be set in the environment to run these tests' end USPS.configure do |config| # Being explicit even though it's set in the configuration by default config.username = ENV['USPS_USER'] # Set USPS_LIVE to anything to run against production config.testing = true end include ZipCodeLookup include CityAndStateLookup include AddressVerification include TrackingLookup end end
Use the new configuration idiom and remove USPS_LIVE.
Use the new configuration idiom and remove USPS_LIVE. The test data was defined in 2006 or before and isn't valid any more for many of the tests.
Ruby
mit
gaffneyc/usps,18F/usps
ruby
## Code Before: require 'test/unit' require 'rubygems' module USPS # This class is a test runner for the various test requests that are outlined # in the USPS API documentation. These tests are often used to determine if a # developer is allowed to gain access to the production systems. # # Running this test suite should fullfil all requirements for access to the production # system for the APIs supported by the library. class Test < Test::Unit::TestCase require 'usps/test/zip_code_lookup' require 'usps/test/address_verification' require 'usps/test/city_and_state_lookup' require 'usps/test/tracking_lookup' # if(USPS.config.username.nil?) raise 'USPS_USER must be set in the environment to run these tests' end # Set USPS_LIVE to anything to run against production USPS.testing = true unless ENV['USPS_LIVE'] include ZipCodeLookup include CityAndStateLookup include AddressVerification include TrackingLookup end end ## Instruction: Use the new configuration idiom and remove USPS_LIVE. The test data was defined in 2006 or before and isn't valid any more for many of the tests. ## Code After: require 'test/unit' require 'rubygems' module USPS # This class is a test runner for the various test requests that are outlined # in the USPS API documentation. These tests are often used to determine if a # developer is allowed to gain access to the production systems. # # Running this test suite should fullfil all requirements for access to the production # system for the APIs supported by the library. class Test < Test::Unit::TestCase require 'usps/test/zip_code_lookup' require 'usps/test/address_verification' require 'usps/test/city_and_state_lookup' require 'usps/test/tracking_lookup' if(ENV['USPS_USER'].nil?) raise 'USPS_USER must be set in the environment to run these tests' end USPS.configure do |config| # Being explicit even though it's set in the configuration by default config.username = ENV['USPS_USER'] # Set USPS_LIVE to anything to run against production config.testing = true end include ZipCodeLookup include CityAndStateLookup include AddressVerification include TrackingLookup end end
d0565266fa984591df46a361e20cc603dd19ec0a
README.rst
README.rst
Introduction ============ psphere is a Python interface for the `VMware vSphere Web Services SDK`_, a powerful API for programatically managing your VMware infrastructure: * Provision, clone and snapshot virtual machines * Query and configure clusters, host systems and datastores * Programatically configure ESXi hosts (i.e. for automation) psphere can be used to create standalone Python scripts or used as a library in larger Python applications (e.g. Django). Usage ===== >>> from psphere.client import Client >>> client = Client("your.esxserver.com", "Administrator", "strongpass") >>> servertime = client.si.CurrentTime() >>> print(servertime) 2010-09-04 18:35:12.062575 >>> client.logout() Installation ============ The latest stable version of psphere can be installed from PyPi: # pip install -U psphere Community ========= Discussion and support can be found on the `psphere Google Group`_. .. _psphere Google Group: https://groups.google.com/group/psphere .. _VMware vSphere Web Services SDK: http://pubs.vmware.com/vsphere-50/index.jsp?topic=/com.vmware.wssdk.apiref.doc_50/right-pane.html
Sunset Notice ============= This project is no longer under development. We recommend that you start your VMware Python journey with the official `VMware pyvmomi`_ library. psphere was created when no other client was available. It was a privilege to create something that was useful to others. *"Death is only the end if you assume the story is about you."* *― The Nightvale Podcast* Introduction ============ psphere is a Python interface for the `VMware vSphere Web Services SDK`_, a powerful API for programatically managing your VMware infrastructure: * Provision, clone and snapshot virtual machines * Query and configure clusters, host systems and datastores * Programatically configure ESXi hosts (i.e. for automation) psphere can be used to create standalone Python scripts or used as a library in larger Python applications (e.g. Django). Usage ===== >>> from psphere.client import Client >>> client = Client("your.esxserver.com", "Administrator", "strongpass") >>> servertime = client.si.CurrentTime() >>> print(servertime) 2010-09-04 18:35:12.062575 >>> client.logout() Installation ============ The latest stable version of psphere can be installed from PyPi: # pip install -U psphere Community ========= Discussion and support can be found on the `psphere Google Group`_. .. _VMware pyvmomi: https://github.com/vmware/pyvmomi .. _psphere Google Group: https://groups.google.com/group/psphere .. _VMware vSphere Web Services SDK: http://pubs.vmware.com/vsphere-50/index.jsp?topic=/com.vmware.wssdk.apiref.doc_50/right-pane.html
Add a sunset notice to the project
Add a sunset notice to the project
reStructuredText
apache-2.0
jkinred/psphere
restructuredtext
## Code Before: Introduction ============ psphere is a Python interface for the `VMware vSphere Web Services SDK`_, a powerful API for programatically managing your VMware infrastructure: * Provision, clone and snapshot virtual machines * Query and configure clusters, host systems and datastores * Programatically configure ESXi hosts (i.e. for automation) psphere can be used to create standalone Python scripts or used as a library in larger Python applications (e.g. Django). Usage ===== >>> from psphere.client import Client >>> client = Client("your.esxserver.com", "Administrator", "strongpass") >>> servertime = client.si.CurrentTime() >>> print(servertime) 2010-09-04 18:35:12.062575 >>> client.logout() Installation ============ The latest stable version of psphere can be installed from PyPi: # pip install -U psphere Community ========= Discussion and support can be found on the `psphere Google Group`_. .. _psphere Google Group: https://groups.google.com/group/psphere .. _VMware vSphere Web Services SDK: http://pubs.vmware.com/vsphere-50/index.jsp?topic=/com.vmware.wssdk.apiref.doc_50/right-pane.html ## Instruction: Add a sunset notice to the project ## Code After: Sunset Notice ============= This project is no longer under development. We recommend that you start your VMware Python journey with the official `VMware pyvmomi`_ library. psphere was created when no other client was available. It was a privilege to create something that was useful to others. *"Death is only the end if you assume the story is about you."* *― The Nightvale Podcast* Introduction ============ psphere is a Python interface for the `VMware vSphere Web Services SDK`_, a powerful API for programatically managing your VMware infrastructure: * Provision, clone and snapshot virtual machines * Query and configure clusters, host systems and datastores * Programatically configure ESXi hosts (i.e. for automation) psphere can be used to create standalone Python scripts or used as a library in larger Python applications (e.g. Django). Usage ===== >>> from psphere.client import Client >>> client = Client("your.esxserver.com", "Administrator", "strongpass") >>> servertime = client.si.CurrentTime() >>> print(servertime) 2010-09-04 18:35:12.062575 >>> client.logout() Installation ============ The latest stable version of psphere can be installed from PyPi: # pip install -U psphere Community ========= Discussion and support can be found on the `psphere Google Group`_. .. _VMware pyvmomi: https://github.com/vmware/pyvmomi .. _psphere Google Group: https://groups.google.com/group/psphere .. _VMware vSphere Web Services SDK: http://pubs.vmware.com/vsphere-50/index.jsp?topic=/com.vmware.wssdk.apiref.doc_50/right-pane.html
f481d5c5a67cf657b6a9d59f34d083d35e5fcc16
blink1/style.css
blink1/style.css
input[type=range] { -webkit-appearance: none; width: 140px; }
input[type=range] { outline: none; -webkit-appearance: none; width: 140px; }
Hide the outline around sliders while dragging.
blink1: Hide the outline around sliders while dragging. Modifies the CSS for range input elements to remove the outline when the element is selected.
CSS
apache-2.0
GoogleChrome/chrome-extensions-samples,GoogleChrome/chrome-extensions-samples,Jabqooo/chrome-app-samples,GoogleChrome/chrome-extensions-samples,roshan2806/chrome-app-samples,sgrizzi/tcpmonitor_test,PyNate/chrome-app-samples,yetixxx83/chrome-app-samples,MrSwiss/chrome-app-samples,icasey/chrome-app-samples,shansana/chrome-app-samples,GoogleChrome/chrome-app-samples,sansiri20/chrome-app-samples,vssranganadhp/chrome-app-samples,CodericSandbox/chrome-app-samples,nikodtb/chrome-app-samples,No9/chrome-app-samples,beni55/chrome-app-samples,GoogleChrome/chrome-extensions-samples,ehsan-karamad/chrome-app-samples,lag945/chrome-app-samples,thenaughtychild/chrome-app-samples,ksonglover/chrome-app-samples,prasanna-rajapaksha/chrome-app-samples,tsszh/chrome-app-samples,wearecharette/chrome-app-samples,gbrutkie/chrome-app-samples,MFolgado/chrome-app-samples,grman157/socket_udp,GoogleChrome/chrome-app-samples,tamdao/chrome-app-samples,KevinChien/chrome-app-samples,GoogleChrome/chrome-app-samples,reillyeon/chrome-app-samples,killerwilmer/chrome-app-samples,LyndaT/chrome-app-samples,ChristineLaMuse/chrome-app-samples,michals/chrome-app-samples,joshuarossi/chrome-app-samples,newuserjim/chrome-app-samples,jfdesrochers/chrome-app-samples,tksugimoto/chrome-app-samples,bathos/chrome-app-samples,GoogleChrome/chrome-app-samples,mchangeat/chrome-app-samples,srzmldl/chrome-app-samples,GoogleChrome/chrome-app-samples,madtrapper/chrome-app-samples,shenyun2304/chrome-app-samples,benaslinjenner/chrome-app-samples,komacke/chrome-app-samples,phanhuy/chrome-app-samples,GoogleChrome/chrome-extensions-samples,zilongqiu/chrome-app-samples,rmadziyauswa/chrome-app-samples,serj1chen/chrome-app-samples,thmavri/chrome-app-samples,hamperfect/chrome_extension_samples,GoogleChrome/chrome-extensions-samples,GoogleChrome/chrome-app-samples,GoogleChrome/chrome-extensions-samples,gabrielduque/chrome-app-samples,usfbrian/chrome-app-samples,GoogleChrome/chrome-app-samples,landsurveyorsunited/chrome-app-samples,bdunnette/chrome-app-samples,oahziur/chrome-app-samples,GoogleChrome/chrome-app-samples,paramananda/chrome-app-samples,angeliaz/chrome-app-samples,ehazon/chrome-app-samples,GoogleChrome/chrome-app-samples,dexigner/chrome-app-samples,pradeep-rajapaksha/chrome-app-samples,amirhm/chrome-app-samples,hjktiger10/sssss,ptopenny/chrome-app-samples,GoogleChrome/chrome-extensions-samples,gre370/chrome-app-samples,ihappyk/chrome-app-samples,GoogleChrome/chrome-extensions-samples
css
## Code Before: input[type=range] { -webkit-appearance: none; width: 140px; } ## Instruction: blink1: Hide the outline around sliders while dragging. Modifies the CSS for range input elements to remove the outline when the element is selected. ## Code After: input[type=range] { outline: none; -webkit-appearance: none; width: 140px; }
bb7ac94e33faa35387199e08ec95008a8248d432
lib/garage/docs/application.rb
lib/garage/docs/application.rb
module Garage module Docs class Application def initialize(application) @application = application end def name @application.class.name.split("::")[0] end def documents @documents ||= pathnames.map {|pathname| Documentation.new(pathname) } end def pathnames Pathname.glob("#{Garage.configuration.docs.document_root}/resources/**/*.md").sort end def find_document(name) documents.find {|document| document.name == name } end end class Documentation attr_reader :pathname def self.renderer @renderer ||= Redcarpet::Markdown.new(Redcarpet::Render::HTML.new(with_toc_data: true), fenced_code_blocks: true) end def self.toc_renderer @toc_renderer ||= Redcarpet::Markdown.new(Redcarpet::Render::HTML_TOC) end def initialize(pathname) @pathname = pathname end def name pathname.basename(".md").to_s end def toc self.class.toc_renderer.render(body).html_safe end def render self.class.renderer.render(body).html_safe end def body pathname.read end end end end
module Garage module Docs class Application def initialize(application) @application = application end def name @application.class.name.split("::")[0] end def documents @documents ||= pathnames.map {|pathname| Documentation.new(pathname) } end def pathnames Pathname.glob("#{Garage.configuration.docs.document_root}/resources/**/*.md").sort end def find_document(name) documents.find {|document| document.name == name } end end class Documentation attr_reader :pathname def self.renderer @renderer ||= Redcarpet::Markdown.new( Redcarpet::Render::HTML.new(with_toc_data: true), fenced_code_blocks: true, no_intra_emphasis: true ) end def self.toc_renderer @toc_renderer ||= Redcarpet::Markdown.new(Redcarpet::Render::HTML_TOC, no_intra_emphasis: true) end def initialize(pathname) @pathname = pathname end def name pathname.basename(".md").to_s end def toc self.class.toc_renderer.render(body).html_safe end def render self.class.renderer.render(body).html_safe end def body pathname.read end end end end
Change redcarpet option: disable emphasis
Change redcarpet option: disable emphasis
Ruby
mit
takashi/garage,kenchan0130/garage,y-yagi/garage,cookpad/garage,taiki45/garage,takashi/garage,taiki45/garage,taiki45/garage,luvtechno/garage,luvtechno/garage,takashi/garage,kenchan0130/garage,luvtechno/garage,kenchan0130/garage,y-yagi/garage,y-yagi/garage,cookpad/garage,cookpad/garage,cookpad/garage
ruby
## Code Before: module Garage module Docs class Application def initialize(application) @application = application end def name @application.class.name.split("::")[0] end def documents @documents ||= pathnames.map {|pathname| Documentation.new(pathname) } end def pathnames Pathname.glob("#{Garage.configuration.docs.document_root}/resources/**/*.md").sort end def find_document(name) documents.find {|document| document.name == name } end end class Documentation attr_reader :pathname def self.renderer @renderer ||= Redcarpet::Markdown.new(Redcarpet::Render::HTML.new(with_toc_data: true), fenced_code_blocks: true) end def self.toc_renderer @toc_renderer ||= Redcarpet::Markdown.new(Redcarpet::Render::HTML_TOC) end def initialize(pathname) @pathname = pathname end def name pathname.basename(".md").to_s end def toc self.class.toc_renderer.render(body).html_safe end def render self.class.renderer.render(body).html_safe end def body pathname.read end end end end ## Instruction: Change redcarpet option: disable emphasis ## Code After: module Garage module Docs class Application def initialize(application) @application = application end def name @application.class.name.split("::")[0] end def documents @documents ||= pathnames.map {|pathname| Documentation.new(pathname) } end def pathnames Pathname.glob("#{Garage.configuration.docs.document_root}/resources/**/*.md").sort end def find_document(name) documents.find {|document| document.name == name } end end class Documentation attr_reader :pathname def self.renderer @renderer ||= Redcarpet::Markdown.new( Redcarpet::Render::HTML.new(with_toc_data: true), fenced_code_blocks: true, no_intra_emphasis: true ) end def self.toc_renderer @toc_renderer ||= Redcarpet::Markdown.new(Redcarpet::Render::HTML_TOC, no_intra_emphasis: true) end def initialize(pathname) @pathname = pathname end def name pathname.basename(".md").to_s end def toc self.class.toc_renderer.render(body).html_safe end def render self.class.renderer.render(body).html_safe end def body pathname.read end end end end
a21d484cc1131b56d793e75fbb6ab1531205dae6
joueur/base_game_object.py
joueur/base_game_object.py
from joueur.delta_mergeable import DeltaMergeable # the base class that every game object within a game inherit from for Python # manipulation that would be redundant via Creer class BaseGameObject(DeltaMergeable): def __init__(self): DeltaMergeable.__init__(self) def __str__(self): return "{} #{}".format(self.game_object_name, self.id) def __repr__(self): return str(self)
from joueur.delta_mergeable import DeltaMergeable # the base class that every game object within a game inherit from for Python # manipulation that would be redundant via Creer class BaseGameObject(DeltaMergeable): def __init__(self): DeltaMergeable.__init__(self) def __str__(self): return "{} #{}".format(self.game_object_name, self.id) def __repr__(self): return str(self) def __hash__(self): # id will always be unique server side anyways, # so it should be safe to hash on return hash(self.id)
Update BaseGameObject to be hashable
Update BaseGameObject to be hashable
Python
mit
JacobFischer/Joueur.py,siggame/Joueur.py,siggame/Joueur.py,JacobFischer/Joueur.py
python
## Code Before: from joueur.delta_mergeable import DeltaMergeable # the base class that every game object within a game inherit from for Python # manipulation that would be redundant via Creer class BaseGameObject(DeltaMergeable): def __init__(self): DeltaMergeable.__init__(self) def __str__(self): return "{} #{}".format(self.game_object_name, self.id) def __repr__(self): return str(self) ## Instruction: Update BaseGameObject to be hashable ## Code After: from joueur.delta_mergeable import DeltaMergeable # the base class that every game object within a game inherit from for Python # manipulation that would be redundant via Creer class BaseGameObject(DeltaMergeable): def __init__(self): DeltaMergeable.__init__(self) def __str__(self): return "{} #{}".format(self.game_object_name, self.id) def __repr__(self): return str(self) def __hash__(self): # id will always be unique server side anyways, # so it should be safe to hash on return hash(self.id)
68f8a4a8f0b429e36ffca2d542ea9cc06a0bd475
contrib/util/generate-changelog.sh
contrib/util/generate-changelog.sh
usage() { echo "Usage: $0 <from> [to]" } retrieve() { git --no-pager log --oneline --no-merges --grep="$1" $FROM..$TO } subheading() { echo "#### $1\n" retrieve "$2" echo } FROM=$1 TO=${2:-"HEAD"} if [ -z $1 ]; then usage exit 1 fi echo "### $FROM -> $TO\n" subheading "Features" "feat(" subheading "Fixes" "fix(" subheading "Documentation" "docs("
usage() { echo "Usage: $0 <from> [to]" } retrieve() { git --no-pager log --oneline --no-merges --oneline --format=" - %h %s" --grep="$1" $FROM..$TO } subheading() { echo "#### $1\n" retrieve "$2" echo } FROM=$1 TO=${2:-"HEAD"} if [ -z $1 ]; then usage exit 1 fi echo "### $FROM -> $TO\n" subheading "Features" "feat(" subheading "Fixes" "fix(" subheading "Documentation" "docs("
Fix markdown output of changelog script
fix(contrib): Fix markdown output of changelog script Now the script will generate markdown lists just as the current changelog in deis/deis:CHANGELOG.md is in. Thanks to @bacongobbler for the insight about `--format` over `--pretty=format` and unneeded newlines not being echoed.
Shell
mit
deis/workflow,deis/workflow,deis/workflow
shell
## Code Before: usage() { echo "Usage: $0 <from> [to]" } retrieve() { git --no-pager log --oneline --no-merges --grep="$1" $FROM..$TO } subheading() { echo "#### $1\n" retrieve "$2" echo } FROM=$1 TO=${2:-"HEAD"} if [ -z $1 ]; then usage exit 1 fi echo "### $FROM -> $TO\n" subheading "Features" "feat(" subheading "Fixes" "fix(" subheading "Documentation" "docs(" ## Instruction: fix(contrib): Fix markdown output of changelog script Now the script will generate markdown lists just as the current changelog in deis/deis:CHANGELOG.md is in. Thanks to @bacongobbler for the insight about `--format` over `--pretty=format` and unneeded newlines not being echoed. ## Code After: usage() { echo "Usage: $0 <from> [to]" } retrieve() { git --no-pager log --oneline --no-merges --oneline --format=" - %h %s" --grep="$1" $FROM..$TO } subheading() { echo "#### $1\n" retrieve "$2" echo } FROM=$1 TO=${2:-"HEAD"} if [ -z $1 ]; then usage exit 1 fi echo "### $FROM -> $TO\n" subheading "Features" "feat(" subheading "Fixes" "fix(" subheading "Documentation" "docs("
fd7452e2aa1daada74e7f8ceda22b68697bb9644
tests/matrix.php
tests/matrix.php
<?php require '../src/Hungarian.php'; $array = [ [1,2,3,0,1], [0,2,3,12,1], [3,0,1,13,1], [3,1,1,12,0], [3,1,1,12,0], ]; $hungarian = new \RPFK\Hungarian\Hungarian($array); $hungarian->solve(); var_dump($hungarian->getMatrix()); var_dump($hungarian->allocation());
<?php require '../src/Hungarian.php'; $array = [ [1,2,3,0,1], [0,2,3,12,1], [3,0,1,13,1], [3,1,1,12,0], [3,1,1,12,0], ]; $hungarian = new \RPFK\Hungarian\Hungarian($array); $hungarian->solve(true);
Add debug lines to test.
Add debug lines to test.
PHP
mit
rpfk/Hungarian
php
## Code Before: <?php require '../src/Hungarian.php'; $array = [ [1,2,3,0,1], [0,2,3,12,1], [3,0,1,13,1], [3,1,1,12,0], [3,1,1,12,0], ]; $hungarian = new \RPFK\Hungarian\Hungarian($array); $hungarian->solve(); var_dump($hungarian->getMatrix()); var_dump($hungarian->allocation()); ## Instruction: Add debug lines to test. ## Code After: <?php require '../src/Hungarian.php'; $array = [ [1,2,3,0,1], [0,2,3,12,1], [3,0,1,13,1], [3,1,1,12,0], [3,1,1,12,0], ]; $hungarian = new \RPFK\Hungarian\Hungarian($array); $hungarian->solve(true);
6f725253b5d83cc1ed4cd92befda2bd0cb8a897a
.travis.yml
.travis.yml
language: node_js node_js: - "0.8" - "0.10"
language: node_js node_js: - "0.8" - "0.10" env: global: # NPM_KEY - secure: aOHRXELamyzmgttmZszXZER7w4XNrXHvuE4bFB/s3jWs9pk/z4DG72y+33KQN8e+IOcqCgoVmIqV1CnARJCZHh4VkqW1qPTQpKLHDKGf4v1O2wJDM/+DUhVRig+OU2ehZj/xkvnUn05tZ1ptlYlof3Xhb5ads4sVX30INmIgpxw= # NPM Deploy deploy: provider: npm email: "[email protected]" api_key: "${NPM_KEY}" on: tags: true
Add auto deployment to NPM via Travis
Add auto deployment to NPM via Travis
YAML
mit
markelog/grunt-checker,jscs-dev/grunt-jscs,BridgeAR/grunt-jscs
yaml
## Code Before: language: node_js node_js: - "0.8" - "0.10" ## Instruction: Add auto deployment to NPM via Travis ## Code After: language: node_js node_js: - "0.8" - "0.10" env: global: # NPM_KEY - secure: aOHRXELamyzmgttmZszXZER7w4XNrXHvuE4bFB/s3jWs9pk/z4DG72y+33KQN8e+IOcqCgoVmIqV1CnARJCZHh4VkqW1qPTQpKLHDKGf4v1O2wJDM/+DUhVRig+OU2ehZj/xkvnUn05tZ1ptlYlof3Xhb5ads4sVX30INmIgpxw= # NPM Deploy deploy: provider: npm email: "[email protected]" api_key: "${NPM_KEY}" on: tags: true
5b59cd2bbde84290279d46617f56de17cc6e39ee
packages/bootstrap/buildinfo.json
packages/bootstrap/buildinfo.json
{ "requires": [ "dcos-image", "python", "python-kazoo", "python-requests", "python-cryptography", "python-jwt" ], "state_directory": true }
{ "requires": [ "python", "python-kazoo", "python-requests", "python-cryptography", "python-jwt" ], "state_directory": true }
Remove dcos-image dependency from bootstrap
Remove dcos-image dependency from bootstrap
JSON
apache-2.0
dcos/dcos,dcos/dcos,dcos/dcos,dcos/dcos,dcos/dcos
json
## Code Before: { "requires": [ "dcos-image", "python", "python-kazoo", "python-requests", "python-cryptography", "python-jwt" ], "state_directory": true } ## Instruction: Remove dcos-image dependency from bootstrap ## Code After: { "requires": [ "python", "python-kazoo", "python-requests", "python-cryptography", "python-jwt" ], "state_directory": true }
1f77efc424c970705ba8f6b14cacf33ce77b9445
README.md
README.md
Various algorithms and datastructures written in JavaScript ## Tests Tests are all in the `/test` folder. The tests use `mocha` framework. To install and run tests, follow these instructions: ``` $ npm install -g mocha $ mocha --watch --reporter min ```
Various algorithms and data-structures written in JavaScript ##Data-Structures - linkedlist - queue - stack ## Tests Tests are all in the `/test` folder. The tests use `mocha` framework. To install and run tests, follow these instructions: ``` $ npm install -g mocha $ mocha --watch --reporter min ```
Update readme with supported datastructures
Update readme with supported datastructures
Markdown
apache-2.0
ryanseys/algos-n-dstructs
markdown
## Code Before: Various algorithms and datastructures written in JavaScript ## Tests Tests are all in the `/test` folder. The tests use `mocha` framework. To install and run tests, follow these instructions: ``` $ npm install -g mocha $ mocha --watch --reporter min ``` ## Instruction: Update readme with supported datastructures ## Code After: Various algorithms and data-structures written in JavaScript ##Data-Structures - linkedlist - queue - stack ## Tests Tests are all in the `/test` folder. The tests use `mocha` framework. To install and run tests, follow these instructions: ``` $ npm install -g mocha $ mocha --watch --reporter min ```
dca859d320714595bfeb0dbc3f8f300dca0b20ec
requirements-test.txt
requirements-test.txt
coverage==5.3.1 # Test coverage flake8==3.8.4 # Python linting mypy==0.790 # Static typing typing==3.7.4.3 # Type hints
coverage==5.3.1 # Test coverage flake8==3.8.4 # Python linting mypy==0.790 # Static typing
Uninstall typing package because it is now in stdlib
Uninstall typing package because it is now in stdlib
Text
mit
albertyw/csv-to-ical
text
## Code Before: coverage==5.3.1 # Test coverage flake8==3.8.4 # Python linting mypy==0.790 # Static typing typing==3.7.4.3 # Type hints ## Instruction: Uninstall typing package because it is now in stdlib ## Code After: coverage==5.3.1 # Test coverage flake8==3.8.4 # Python linting mypy==0.790 # Static typing
9013376a8741fcac22e045442cdcaccbf7f22ad7
Cargo.toml
Cargo.toml
[package] name = "vobject" description = "Simple VObject parsing library." homepage = "http://rust-vobject.unterwaditzer.net/" documentation = "http://rust-vobject.unterwaditzer.net/" repository = "https://github.com/untitaker/rust-vobject" readme = "README.md" keywords = ["vobject", "icalendar", "calendar", "contacts"] version = "0.0.1" authors = ["Markus Unterwaditzer <[email protected]>"] license = "MIT" [lib] name = "vobject" path = "src/vobject/lib.rs" [dependencies.peg] git = "https://github.com/untitaker/rust-peg.git" branch = "more-breakages"
[package] name = "vobject" description = "Simple VObject parsing library." homepage = "http://rust-vobject.unterwaditzer.net/" documentation = "http://rust-vobject.unterwaditzer.net/" repository = "https://github.com/untitaker/rust-vobject" readme = "README.md" keywords = ["vobject", "icalendar", "calendar", "contacts"] version = "0.0.1" authors = ["Markus Unterwaditzer <[email protected]>"] license = "MIT" [lib] name = "vobject" path = "src/vobject/lib.rs" [dependencies] peg = "*"
Switch back to official peg
Switch back to official peg
TOML
mit
gracinet/rust-vobject,untitaker/rust-vobject
toml
## Code Before: [package] name = "vobject" description = "Simple VObject parsing library." homepage = "http://rust-vobject.unterwaditzer.net/" documentation = "http://rust-vobject.unterwaditzer.net/" repository = "https://github.com/untitaker/rust-vobject" readme = "README.md" keywords = ["vobject", "icalendar", "calendar", "contacts"] version = "0.0.1" authors = ["Markus Unterwaditzer <[email protected]>"] license = "MIT" [lib] name = "vobject" path = "src/vobject/lib.rs" [dependencies.peg] git = "https://github.com/untitaker/rust-peg.git" branch = "more-breakages" ## Instruction: Switch back to official peg ## Code After: [package] name = "vobject" description = "Simple VObject parsing library." homepage = "http://rust-vobject.unterwaditzer.net/" documentation = "http://rust-vobject.unterwaditzer.net/" repository = "https://github.com/untitaker/rust-vobject" readme = "README.md" keywords = ["vobject", "icalendar", "calendar", "contacts"] version = "0.0.1" authors = ["Markus Unterwaditzer <[email protected]>"] license = "MIT" [lib] name = "vobject" path = "src/vobject/lib.rs" [dependencies] peg = "*"
5c36591ee725a4ac4b606a927e259c24d598d5da
app/src/main/java/com/veyndan/paper/reddit/ui/widget/PostFlairsLayout.java
app/src/main/java/com/veyndan/paper/reddit/ui/widget/PostFlairsLayout.java
package com.veyndan.paper.reddit.ui.widget; import android.content.Context; import android.util.AttributeSet; import android.view.LayoutInflater; import com.google.android.flexbox.FlexboxLayout; import com.veyndan.paper.reddit.databinding.PostFlairBinding; import com.veyndan.paper.reddit.post.Flair; import java.util.Collection; public class PostFlairsLayout extends FlexboxLayout { public PostFlairsLayout(final Context context, final AttributeSet attrs) { super(context, attrs); } public void setFlairs(final Collection<Flair> flairs, final String subreddit) { if (flairs.isEmpty()) { setVisibility(GONE); return; } for (final Flair flair : flairs) { final PostFlairBinding binding = PostFlairBinding.inflate(LayoutInflater.from(getContext()), this, false); binding.postFlair.setFlair(flair, subreddit); addView(binding.getRoot()); } setVisibility(VISIBLE); } }
package com.veyndan.paper.reddit.ui.widget; import android.content.Context; import android.util.AttributeSet; import android.view.LayoutInflater; import com.google.android.flexbox.FlexboxLayout; import com.veyndan.paper.reddit.databinding.PostFlairBinding; import com.veyndan.paper.reddit.post.Flair; import java.util.Collection; public class PostFlairsLayout extends FlexboxLayout { public PostFlairsLayout(final Context context, final AttributeSet attrs) { super(context, attrs); } public void setFlairs(final Collection<Flair> flairs, final String subreddit) { removeAllViews(); if (flairs.isEmpty()) { setVisibility(GONE); return; } for (final Flair flair : flairs) { final PostFlairBinding binding = PostFlairBinding.inflate(LayoutInflater.from(getContext()), this, false); binding.postFlair.setFlair(flair, subreddit); addView(binding.getRoot()); } setVisibility(VISIBLE); } }
Fix bug where multiple flairs from unrelated posts are shown
Fix bug where multiple flairs from unrelated posts are shown
Java
mit
veyndan/paper-for-reddit,veyndan/paper-for-reddit,veyndan/reddit-client
java
## Code Before: package com.veyndan.paper.reddit.ui.widget; import android.content.Context; import android.util.AttributeSet; import android.view.LayoutInflater; import com.google.android.flexbox.FlexboxLayout; import com.veyndan.paper.reddit.databinding.PostFlairBinding; import com.veyndan.paper.reddit.post.Flair; import java.util.Collection; public class PostFlairsLayout extends FlexboxLayout { public PostFlairsLayout(final Context context, final AttributeSet attrs) { super(context, attrs); } public void setFlairs(final Collection<Flair> flairs, final String subreddit) { if (flairs.isEmpty()) { setVisibility(GONE); return; } for (final Flair flair : flairs) { final PostFlairBinding binding = PostFlairBinding.inflate(LayoutInflater.from(getContext()), this, false); binding.postFlair.setFlair(flair, subreddit); addView(binding.getRoot()); } setVisibility(VISIBLE); } } ## Instruction: Fix bug where multiple flairs from unrelated posts are shown ## Code After: package com.veyndan.paper.reddit.ui.widget; import android.content.Context; import android.util.AttributeSet; import android.view.LayoutInflater; import com.google.android.flexbox.FlexboxLayout; import com.veyndan.paper.reddit.databinding.PostFlairBinding; import com.veyndan.paper.reddit.post.Flair; import java.util.Collection; public class PostFlairsLayout extends FlexboxLayout { public PostFlairsLayout(final Context context, final AttributeSet attrs) { super(context, attrs); } public void setFlairs(final Collection<Flair> flairs, final String subreddit) { removeAllViews(); if (flairs.isEmpty()) { setVisibility(GONE); return; } for (final Flair flair : flairs) { final PostFlairBinding binding = PostFlairBinding.inflate(LayoutInflater.from(getContext()), this, false); binding.postFlair.setFlair(flair, subreddit); addView(binding.getRoot()); } setVisibility(VISIBLE); } }
64bd8acc1e59b0c948b7be4f3f096720acf585f6
test/app.spec.coffee
test/app.spec.coffee
path = require 'path' helpers = require('yeoman-generator').test describe 'app', -> beforeEach (done) -> helpers.testDirectory path.join(__dirname, 'app.tmp'), (err) => return done(err) if err @app = helpers.createGenerator 'coffee-module:app', ['../../app'] done() it 'creates expected files', (done) -> # add files you expect to exist here. expected = """ package.json README.md LICENSE .travis.yml .gitignore test/mocha.opts test/test-module.spec.coffee src/test-module.coffee """.split /\s+/g helpers.mockPrompt @app, someOption: true @app.options['skip-install'] = true @app.userInfo = -> @realname = 'Alex Gorbatchev'; @email = '[email protected]'; @githubUrl = 'https://github.com/alexgorbatchev'; helpers.mockPrompt @app, githubUser: 'alexgorbatchev' moduleName: 'test-module' @app.run {}, -> helpers.assertFile expected done()
path = require 'path' helpers = require('yeoman-generator').test describe 'app', -> beforeEach (done) -> helpers.testDirectory path.join(__dirname, 'app.tmp'), (err) => return done(err) if err @app = helpers.createGenerator 'coffee-module:app', ['../../app'] done() it 'creates expected files', (done) -> # add files you expect to exist here. expected = """ package.json README.md LICENSE .travis.yml .gitignore gulpfile.js gulpfile.coffee test/mocha.opts test/test-module.spec.coffee src/test-module.coffee """.split /\s+/g helpers.mockPrompt @app, someOption: true @app.options['skip-install'] = true @app.userInfo = -> @realname = 'Alex Gorbatchev'; @email = '[email protected]'; @githubUrl = 'https://github.com/alexgorbatchev'; helpers.mockPrompt @app, githubUser: 'alexgorbatchev' moduleName: 'test-module' @app.run {}, -> helpers.assertFile expected done()
Add new gulp files to tests
Add new gulp files to tests
CoffeeScript
mit
alexgorbatchev/generator-coffee-module
coffeescript
## Code Before: path = require 'path' helpers = require('yeoman-generator').test describe 'app', -> beforeEach (done) -> helpers.testDirectory path.join(__dirname, 'app.tmp'), (err) => return done(err) if err @app = helpers.createGenerator 'coffee-module:app', ['../../app'] done() it 'creates expected files', (done) -> # add files you expect to exist here. expected = """ package.json README.md LICENSE .travis.yml .gitignore test/mocha.opts test/test-module.spec.coffee src/test-module.coffee """.split /\s+/g helpers.mockPrompt @app, someOption: true @app.options['skip-install'] = true @app.userInfo = -> @realname = 'Alex Gorbatchev'; @email = '[email protected]'; @githubUrl = 'https://github.com/alexgorbatchev'; helpers.mockPrompt @app, githubUser: 'alexgorbatchev' moduleName: 'test-module' @app.run {}, -> helpers.assertFile expected done() ## Instruction: Add new gulp files to tests ## Code After: path = require 'path' helpers = require('yeoman-generator').test describe 'app', -> beforeEach (done) -> helpers.testDirectory path.join(__dirname, 'app.tmp'), (err) => return done(err) if err @app = helpers.createGenerator 'coffee-module:app', ['../../app'] done() it 'creates expected files', (done) -> # add files you expect to exist here. expected = """ package.json README.md LICENSE .travis.yml .gitignore gulpfile.js gulpfile.coffee test/mocha.opts test/test-module.spec.coffee src/test-module.coffee """.split /\s+/g helpers.mockPrompt @app, someOption: true @app.options['skip-install'] = true @app.userInfo = -> @realname = 'Alex Gorbatchev'; @email = '[email protected]'; @githubUrl = 'https://github.com/alexgorbatchev'; helpers.mockPrompt @app, githubUser: 'alexgorbatchev' moduleName: 'test-module' @app.run {}, -> helpers.assertFile expected done()
12921e5d3864c86663d11b74a2a3f8dd34498abb
docs/dev_guide.rst
docs/dev_guide.rst
Developer's Guide ================= As you might have figured out, the library relies quite heavily on Sphinx documentation tool. It is in fact used to test it. Provided you have installed Sphinx (via easy_install, pip or something), you can use "make doctest" at the docs directory to run doctests. This probably needs a nice setup.py alias but I haven't gotten around implementing that... It is possible to generate the documentation via setup.py, though. You can do this simply via "build_sphinx" parameter (ie. setup.py build_sphinx). There's also an untested "upload_sphinx" that's supposed to upload the project documentation to the right place. Especially "sliceable" could use some extra work. It might be nice to use some form of caching or some other minor optimizations (esp. for slice!) there. Current implementation is somewhat simplistic. "chainable" probably should be expanded as well and made work better with iterators.
Developer's Guide ================= As you might have figured out, the library relies quite heavily on Sphinx documentation tool. It is in fact used to test it. Provided you have installed Sphinx (via easy_install, pip or something), you can use "make doctest" at the docs directory to run doctests. This probably needs a nice setup.py alias but I haven't gotten around implementing that... It is possible to generate the documentation via setup.py, though. You can do this simply via "build_sphinx" parameter (ie. setup.py build_sphinx). There's also an untested "upload_sphinx" that's supposed to upload the project documentation to the right place.
Remove redundant bits from dev guide
Remove redundant bits from dev guide
reStructuredText
mit
bebraw/iterplus
restructuredtext
## Code Before: Developer's Guide ================= As you might have figured out, the library relies quite heavily on Sphinx documentation tool. It is in fact used to test it. Provided you have installed Sphinx (via easy_install, pip or something), you can use "make doctest" at the docs directory to run doctests. This probably needs a nice setup.py alias but I haven't gotten around implementing that... It is possible to generate the documentation via setup.py, though. You can do this simply via "build_sphinx" parameter (ie. setup.py build_sphinx). There's also an untested "upload_sphinx" that's supposed to upload the project documentation to the right place. Especially "sliceable" could use some extra work. It might be nice to use some form of caching or some other minor optimizations (esp. for slice!) there. Current implementation is somewhat simplistic. "chainable" probably should be expanded as well and made work better with iterators. ## Instruction: Remove redundant bits from dev guide ## Code After: Developer's Guide ================= As you might have figured out, the library relies quite heavily on Sphinx documentation tool. It is in fact used to test it. Provided you have installed Sphinx (via easy_install, pip or something), you can use "make doctest" at the docs directory to run doctests. This probably needs a nice setup.py alias but I haven't gotten around implementing that... It is possible to generate the documentation via setup.py, though. You can do this simply via "build_sphinx" parameter (ie. setup.py build_sphinx). There's also an untested "upload_sphinx" that's supposed to upload the project documentation to the right place.
b2bab786c4af3dcca7d35b1e6ecff8699e542ec4
pytest_girder/pytest_girder/plugin.py
pytest_girder/pytest_girder/plugin.py
from .fixtures import * # noqa def pytest_addoption(parser): group = parser.getgroup('girder') group.addoption('--mock-db', action='store_true', default=False, help='Whether or not to mock the database using mongomock.') group.addoption('--mongo-uri', action='store', default='mongodb://localhost:27017', help=('The base URI to the MongoDB instance to use for database connections, ' 'default is mongodb://localhost:27017')) group.addoption('--drop-db', action='store', default='both', choices=('both', 'pre', 'post', 'never'), help='When to destroy testing databases, default is both ' '(before and after running tests)')
import os from .fixtures import * # noqa def pytest_configure(config): """ Create the necessary directories for coverage. This is necessary because neither coverage nor pytest-cov have support for making the data_file directory before running. """ covPlugin = config.pluginmanager.get_plugin('_cov') if covPlugin is not None: covPluginConfig = covPlugin.cov_controller.cov.config covDataFileDir = os.path.dirname(covPluginConfig.data_file) try: os.makedirs(covDataFileDir) except OSError: pass def pytest_addoption(parser): group = parser.getgroup('girder') group.addoption('--mock-db', action='store_true', default=False, help='Whether or not to mock the database using mongomock.') group.addoption('--mongo-uri', action='store', default='mongodb://localhost:27017', help=('The base URI to the MongoDB instance to use for database connections, ' 'default is mongodb://localhost:27017')) group.addoption('--drop-db', action='store', default='both', choices=('both', 'pre', 'post', 'never'), help='When to destroy testing databases, default is both ' '(before and after running tests)')
Add a pytest hook for creating the coverage data_file directory
Add a pytest hook for creating the coverage data_file directory
Python
apache-2.0
jbeezley/girder,jbeezley/girder,girder/girder,kotfic/girder,jbeezley/girder,data-exp-lab/girder,Xarthisius/girder,data-exp-lab/girder,girder/girder,RafaelPalomar/girder,jbeezley/girder,girder/girder,kotfic/girder,manthey/girder,kotfic/girder,girder/girder,RafaelPalomar/girder,Xarthisius/girder,RafaelPalomar/girder,Xarthisius/girder,data-exp-lab/girder,manthey/girder,manthey/girder,RafaelPalomar/girder,data-exp-lab/girder,RafaelPalomar/girder,Kitware/girder,manthey/girder,data-exp-lab/girder,Xarthisius/girder,Kitware/girder,Xarthisius/girder,kotfic/girder,Kitware/girder,kotfic/girder,Kitware/girder
python
## Code Before: from .fixtures import * # noqa def pytest_addoption(parser): group = parser.getgroup('girder') group.addoption('--mock-db', action='store_true', default=False, help='Whether or not to mock the database using mongomock.') group.addoption('--mongo-uri', action='store', default='mongodb://localhost:27017', help=('The base URI to the MongoDB instance to use for database connections, ' 'default is mongodb://localhost:27017')) group.addoption('--drop-db', action='store', default='both', choices=('both', 'pre', 'post', 'never'), help='When to destroy testing databases, default is both ' '(before and after running tests)') ## Instruction: Add a pytest hook for creating the coverage data_file directory ## Code After: import os from .fixtures import * # noqa def pytest_configure(config): """ Create the necessary directories for coverage. This is necessary because neither coverage nor pytest-cov have support for making the data_file directory before running. """ covPlugin = config.pluginmanager.get_plugin('_cov') if covPlugin is not None: covPluginConfig = covPlugin.cov_controller.cov.config covDataFileDir = os.path.dirname(covPluginConfig.data_file) try: os.makedirs(covDataFileDir) except OSError: pass def pytest_addoption(parser): group = parser.getgroup('girder') group.addoption('--mock-db', action='store_true', default=False, help='Whether or not to mock the database using mongomock.') group.addoption('--mongo-uri', action='store', default='mongodb://localhost:27017', help=('The base URI to the MongoDB instance to use for database connections, ' 'default is mongodb://localhost:27017')) group.addoption('--drop-db', action='store', default='both', choices=('both', 'pre', 'post', 'never'), help='When to destroy testing databases, default is both ' '(before and after running tests)')
dcfb66925c5a73d79c4bd5c986de38f48a65f4b0
laravel/webpack.config.js
laravel/webpack.config.js
require('dotenv').config(); const webpack = require('webpack'); // I don't really like doing it this way but it works for a limited number // of configuration options. const socketsEnabled = process.env.WEBSOCKETS_ENABLED && process.env.WEBSOCKETS_ENABLED != ('false' || '0'); const appEntry = socketsEnabled ? './resources/app.js' : './resources/app_nosockets.js'; module.exports = { entry: { main: appEntry }, output: { filename: './public/js/bundle.js' }, module: { rules: [ { test: /\.s[ac]ss$/i, use: [ // Creates `style` nodes from JS strings 'style-loader', // Translates CSS into CommonJS 'css-loader', // Compiles Sass to CSS 'sass-loader', ], }, { test: /\.html\.tpl$/, loader: 'ejs-loader', options: { variable: 'data', } }, { test: /\.js$/, exclude: /(node_modules|bower_components)/, use: { loader: 'babel-loader', options: { presets: ['@babel/preset-env'] } } } ] }, plugins: [ new webpack.ProvidePlugin({ _: 'lodash' }) ] };
require('dotenv').config(); const path = require('path'); const webpack = require('webpack'); // I don't really like doing it this way but it works for a limited number // of configuration options. const socketsEnabled = process.env.WEBSOCKETS_ENABLED && process.env.WEBSOCKETS_ENABLED != ('false' || '0'); const appEntry = socketsEnabled ? './resources/app.js' : './resources/app_nosockets.js'; module.exports = { entry: { main: appEntry }, output: { filename: "bundle.js", path: path.resolve(__dirname, "./public/js/"), publicPath: "/js/" }, module: { rules: [ { test: /\.s[ac]ss$/i, use: [ // Creates `style` nodes from JS strings 'style-loader', // Translates CSS into CommonJS 'css-loader', // Compiles Sass to CSS 'sass-loader', ], }, { test: /\.html\.tpl$/, loader: 'ejs-loader', options: { variable: 'data', } }, { test: /\.js$/, exclude: /(node_modules|bower_components)/, use: { loader: 'babel-loader', options: { presets: ['@babel/preset-env'] } } } ] }, plugins: [ new webpack.ProvidePlugin({ _: 'lodash' }) ] };
Fix the webpack putting files into dist/ by mistake
Fix the webpack putting files into dist/ by mistake
JavaScript
agpl-3.0
playasoft/laravel-voldb,playasoft/laravel-voldb,playasoft/laravel-voldb,itsrachelfish/laravel-voldb,itsrachelfish/laravel-voldb
javascript
## Code Before: require('dotenv').config(); const webpack = require('webpack'); // I don't really like doing it this way but it works for a limited number // of configuration options. const socketsEnabled = process.env.WEBSOCKETS_ENABLED && process.env.WEBSOCKETS_ENABLED != ('false' || '0'); const appEntry = socketsEnabled ? './resources/app.js' : './resources/app_nosockets.js'; module.exports = { entry: { main: appEntry }, output: { filename: './public/js/bundle.js' }, module: { rules: [ { test: /\.s[ac]ss$/i, use: [ // Creates `style` nodes from JS strings 'style-loader', // Translates CSS into CommonJS 'css-loader', // Compiles Sass to CSS 'sass-loader', ], }, { test: /\.html\.tpl$/, loader: 'ejs-loader', options: { variable: 'data', } }, { test: /\.js$/, exclude: /(node_modules|bower_components)/, use: { loader: 'babel-loader', options: { presets: ['@babel/preset-env'] } } } ] }, plugins: [ new webpack.ProvidePlugin({ _: 'lodash' }) ] }; ## Instruction: Fix the webpack putting files into dist/ by mistake ## Code After: require('dotenv').config(); const path = require('path'); const webpack = require('webpack'); // I don't really like doing it this way but it works for a limited number // of configuration options. const socketsEnabled = process.env.WEBSOCKETS_ENABLED && process.env.WEBSOCKETS_ENABLED != ('false' || '0'); const appEntry = socketsEnabled ? './resources/app.js' : './resources/app_nosockets.js'; module.exports = { entry: { main: appEntry }, output: { filename: "bundle.js", path: path.resolve(__dirname, "./public/js/"), publicPath: "/js/" }, module: { rules: [ { test: /\.s[ac]ss$/i, use: [ // Creates `style` nodes from JS strings 'style-loader', // Translates CSS into CommonJS 'css-loader', // Compiles Sass to CSS 'sass-loader', ], }, { test: /\.html\.tpl$/, loader: 'ejs-loader', options: { variable: 'data', } }, { test: /\.js$/, exclude: /(node_modules|bower_components)/, use: { loader: 'babel-loader', options: { presets: ['@babel/preset-env'] } } } ] }, plugins: [ new webpack.ProvidePlugin({ _: 'lodash' }) ] };
a2e1051fb4b2065fb5ebea49dc0bcc583d113187
build/jslint-check.js
build/jslint-check.js
load("build/jslint.js"); var src = readFile("dist/jquery.js"); JSLINT(src, { evil: true, forin: true }); // All of the following are known issues that we think are 'ok' // (in contradiction with JSLint) more information here: // http://docs.jquery.com/JQuery_Core_Style_Guidelines var ok = { "Expected an identifier and instead saw 'undefined' (a reserved word).": true, "Use '===' to compare with 'null'.": true, "Use '!==' to compare with 'null'.": true, "Expected an assignment or function call and instead saw an expression.": true, "Expected a 'break' statement before 'case'.": true }; var e = JSLINT.errors, found = 0, w; for ( var i = 0; i < e.length; i++ ) { w = e[i]; if ( !ok[ w.reason ] ) { found++; print( "\n" + w.evidence + "\n" ); print( " Problem at line " + w.line + " character " + w.character + ": " + w.reason ); } } if ( found > 0 ) { print( "\n" + found + " Error(s) found." ); } else { print( "JSLint check passed." ); }
load("build/jslint.js"); var src = readFile("dist/jquery.js"); JSLINT(src, { evil: true, forin: true, maxerr: 100 }); // All of the following are known issues that we think are 'ok' // (in contradiction with JSLint) more information here: // http://docs.jquery.com/JQuery_Core_Style_Guidelines var ok = { "Expected an identifier and instead saw 'undefined' (a reserved word).": true, "Use '===' to compare with 'null'.": true, "Use '!==' to compare with 'null'.": true, "Expected an assignment or function call and instead saw an expression.": true, "Expected a 'break' statement before 'case'.": true }; var e = JSLINT.errors, found = 0, w; for ( var i = 0; i < e.length; i++ ) { w = e[i]; if ( !ok[ w.reason ] ) { found++; print( "\n" + w.evidence + "\n" ); print( " Problem at line " + w.line + " character " + w.character + ": " + w.reason ); } } if ( found > 0 ) { print( "\n" + found + " Error(s) found." ); } else { print( "JSLint check passed." ); }
Increase max number of JSLint errors. This is necessary because we have several error messages that we choose to ignore.
Increase max number of JSLint errors. This is necessary because we have several error messages that we choose to ignore.
JavaScript
mit
quiaro/request-agent,chitranshi/jquery,dtjm/jquery,isaacs/jquery,dtjm/jquery,jquery/jquery,Karyotyper/jquery,isaacs/jquery,ilyakharlamov/jquery-xul,Karyotyper/jquery,scottjehl/jquery,hoorayimhelping/jquery,jcutrell/jquery,praveen9102/Shazam,kpozin/jquery-nodom,demetr84/Jquery,gnarf/jquery,ilyakharlamov/jquery-xul,diracdeltas/jquery,roytoo/jquery,jquery/jquery,eburgos/jquery,diracdeltas/jquery,jcutrell/jquery,gnarf/jquery,jquery/jquery,fat/jquery,sancao2/jquery,rwaldron/jquery,kpozin/jquery-nodom,rwaldron/jquery,RubyLouvre/jquery,npmcomponent/component-jquery,hoorayimhelping/jquery,RubyLouvre/jquery,scottjehl/jquery,chitranshi/jquery,Karyotyper/jquery,npmcomponent/component-jquery,demetr84/Jquery,roytoo/jquery,roytoo/jquery,fat/jquery,sancao2/jquery,eburgos/jquery,diracdeltas/jquery,eburgos/jquery,praveen9102/Shazam,sancao2/jquery
javascript
## Code Before: load("build/jslint.js"); var src = readFile("dist/jquery.js"); JSLINT(src, { evil: true, forin: true }); // All of the following are known issues that we think are 'ok' // (in contradiction with JSLint) more information here: // http://docs.jquery.com/JQuery_Core_Style_Guidelines var ok = { "Expected an identifier and instead saw 'undefined' (a reserved word).": true, "Use '===' to compare with 'null'.": true, "Use '!==' to compare with 'null'.": true, "Expected an assignment or function call and instead saw an expression.": true, "Expected a 'break' statement before 'case'.": true }; var e = JSLINT.errors, found = 0, w; for ( var i = 0; i < e.length; i++ ) { w = e[i]; if ( !ok[ w.reason ] ) { found++; print( "\n" + w.evidence + "\n" ); print( " Problem at line " + w.line + " character " + w.character + ": " + w.reason ); } } if ( found > 0 ) { print( "\n" + found + " Error(s) found." ); } else { print( "JSLint check passed." ); } ## Instruction: Increase max number of JSLint errors. This is necessary because we have several error messages that we choose to ignore. ## Code After: load("build/jslint.js"); var src = readFile("dist/jquery.js"); JSLINT(src, { evil: true, forin: true, maxerr: 100 }); // All of the following are known issues that we think are 'ok' // (in contradiction with JSLint) more information here: // http://docs.jquery.com/JQuery_Core_Style_Guidelines var ok = { "Expected an identifier and instead saw 'undefined' (a reserved word).": true, "Use '===' to compare with 'null'.": true, "Use '!==' to compare with 'null'.": true, "Expected an assignment or function call and instead saw an expression.": true, "Expected a 'break' statement before 'case'.": true }; var e = JSLINT.errors, found = 0, w; for ( var i = 0; i < e.length; i++ ) { w = e[i]; if ( !ok[ w.reason ] ) { found++; print( "\n" + w.evidence + "\n" ); print( " Problem at line " + w.line + " character " + w.character + ": " + w.reason ); } } if ( found > 0 ) { print( "\n" + found + " Error(s) found." ); } else { print( "JSLint check passed." ); }
987264a4575935e96d1972f1198ff35d77df3daf
src/main/resources/application.properties
src/main/resources/application.properties
dataStore=mongo # spring.data.mongodb.host=localhost # spring.data.mongodb.port=27017 spring.data.mongodb.database=omh
dataStore=mongo # spring.data.mongodb.host=localhost # spring.data.mongodb.port=27017 spring.data.mongodb.database=omh http.mappersjsonPrettyPrint=true
Add pretty printing of JSON output from MVC controllers.
Add pretty printing of JSON output from MVC controllers.
INI
apache-2.0
openmhealth/omh-dsu-ri,smalldatalab/omh-dsu,smalldatalab/omh-dsu,smalldatalab/omh-dsu,smalldatalab/omh-dsu,openmhealth/omh-dsu-ri
ini
## Code Before: dataStore=mongo # spring.data.mongodb.host=localhost # spring.data.mongodb.port=27017 spring.data.mongodb.database=omh ## Instruction: Add pretty printing of JSON output from MVC controllers. ## Code After: dataStore=mongo # spring.data.mongodb.host=localhost # spring.data.mongodb.port=27017 spring.data.mongodb.database=omh http.mappersjsonPrettyPrint=true
a58bceb4aad2c356de7196c49a571a0f9da84eae
src/GaryJones/OAuth/Client.php
src/GaryJones/OAuth/Client.php
<?php /** * OAuth * * @package OAuth * @author Andy Smith * @author Gary Jones <[email protected]> * @license https://raw.github.com/GaryJones/OAuth/master/LICENSE MIT * @link https://github.com/GaryJones/OAuth */ namespace GaryJones\OAuth; /** * Client holds the properties of a single client / consumer. * * @package OAuth * @author Gary Jones <[email protected]> */ class Client extends Credential { /** * Constructs a new client object and populates the required parameters. * * @param string $key Client key / identifier. * @param string $secret Client shared-secret. * @param string $callback_url URL to which authorized request will redirect to. */ public function __construct($key, $secret, $callback_url = null) { $this->setKey($key); $this->setSecret($secret); $this->callback_url = $callback_url; } }
<?php /** * OAuth * * @package OAuth * @author Andy Smith * @author Gary Jones <[email protected]> * @license https://raw.github.com/GaryJones/OAuth/master/LICENSE MIT * @link https://github.com/GaryJones/OAuth */ namespace GaryJones\OAuth; /** * Client holds the properties of a single client / consumer. * * @package OAuth * @author Gary Jones <[email protected]> */ class Client extends Credential { /** * URL to which authorized requests will redirect to. * * @var string */ protected $callback_url; /** * Constructs a new client object and populates the required parameters. * * @param string $key Client key / identifier. * @param string $secret Client shared-secret. * @param string $callback_url URL to which authorized request will redirect to. */ public function __construct($key, $secret, $callback_url = null) { $this->setKey($key); $this->setSecret($secret); $this->setCallbackUrl($callback_url); } /** * Get the callback URL. * * @return string */ public function getCallbackUrl() { return $this->callback_url; } /** * Set the callbackURL * * @param string $callback_url */ public function setCallbackUrl($callback_url) { $this->callback_url = $callback_url; } }
Make callback_url property protected, and add get/set methods.
Make callback_url property protected, and add get/set methods.
PHP
mit
jacobkiers/OAuth
php
## Code Before: <?php /** * OAuth * * @package OAuth * @author Andy Smith * @author Gary Jones <[email protected]> * @license https://raw.github.com/GaryJones/OAuth/master/LICENSE MIT * @link https://github.com/GaryJones/OAuth */ namespace GaryJones\OAuth; /** * Client holds the properties of a single client / consumer. * * @package OAuth * @author Gary Jones <[email protected]> */ class Client extends Credential { /** * Constructs a new client object and populates the required parameters. * * @param string $key Client key / identifier. * @param string $secret Client shared-secret. * @param string $callback_url URL to which authorized request will redirect to. */ public function __construct($key, $secret, $callback_url = null) { $this->setKey($key); $this->setSecret($secret); $this->callback_url = $callback_url; } } ## Instruction: Make callback_url property protected, and add get/set methods. ## Code After: <?php /** * OAuth * * @package OAuth * @author Andy Smith * @author Gary Jones <[email protected]> * @license https://raw.github.com/GaryJones/OAuth/master/LICENSE MIT * @link https://github.com/GaryJones/OAuth */ namespace GaryJones\OAuth; /** * Client holds the properties of a single client / consumer. * * @package OAuth * @author Gary Jones <[email protected]> */ class Client extends Credential { /** * URL to which authorized requests will redirect to. * * @var string */ protected $callback_url; /** * Constructs a new client object and populates the required parameters. * * @param string $key Client key / identifier. * @param string $secret Client shared-secret. * @param string $callback_url URL to which authorized request will redirect to. */ public function __construct($key, $secret, $callback_url = null) { $this->setKey($key); $this->setSecret($secret); $this->setCallbackUrl($callback_url); } /** * Get the callback URL. * * @return string */ public function getCallbackUrl() { return $this->callback_url; } /** * Set the callbackURL * * @param string $callback_url */ public function setCallbackUrl($callback_url) { $this->callback_url = $callback_url; } }
149f0cda3b04359638af20ccdbee2e1753f21425
source/campaigns/offers_expiration.rst
source/campaigns/offers_expiration.rst
.. _campaigns: .. include:: /partials/common.rst Offers Expiration ################# Talkable Campaign allows to set offer expiration for |advocate| and |friend| by specifying specific date or setting offer duration in hours. .. note:: Offer Expiration does not prevent |advocate| or |friend| from getting rewards and receiving corresponding emails. This can be configured separately through Trigger/Sending criteria. .. raw:: html <h2>Advocate</h2> - ``deadline`` - |advocate| will no longer be able to share after this date. - All existing |advocate| offers are always affected if specified date is changed while campaign is live. - Deadline is not copied when campaign is copied. .. raw:: html <h2>Friend</h2> - ``deadline`` - |friend| will no longer be able to claim the offer after this date. - ``offer duration`` - |friend| will no longer be able to claim the offer X hours after |advocate| shared it with him. Leave blank to disable expiration at all. - All existing |friend| offers are not affected if specified date or offer duration is changed while campaign is live. - If date and offer duration are specified, |friend| offer will be expired on the closest date. - |friend| offer deadline should never be earlier than |advocate| offer deadline (because there is no sense to share offer that cannot be claimed). - When campaign is copied only offer duration gets copied, but not deadline.
.. _campaigns: .. include:: /partials/common.rst Offers Expiration ################# Talkable Campaign allows to set offer expiration for |advocate| and |friend| by specifying specific date or setting offer duration in hours. .. raw:: html <h2>Advocate</h2> - ``deadline`` - |advocate| will no longer be able to share after this date. - All existing |advocate| offers are always affected if specified date is changed while campaign is live. - Deadline is not copied when campaign is copied. - When |advocate| offer is expired, Advocate and Friend are still eligible for reward. In other words advocate offer expiration only prevents |advocate| from sharing but not from getting rewarded .. raw:: html <h2>Friend</h2> - ``deadline`` - |friend| will no longer be able to claim the offer after this date. - ``offer duration`` - |friend| will no longer be able to claim the offer X hours after |advocate| shared it with him. Leave blank to disable expiration at all. - All existing |friend| offers are not affected if specified date or offer duration is changed while campaign is live. - If date and offer duration are specified, |friend| offer will be expired on the closest date. - |friend| offer deadline should never be earlier than |advocate| offer deadline (because there is no sense to share offer that cannot be claimed). - When |friend| offer is expired, |friend| and |advocate| are not able to receive any rewards. But they still may try to use coupon they received earlier because talkable platform doesn't control coupon expiration. Only merchant site does that. - When campaign is copied only offer duration gets copied, but not deadline.
Add reward eligibility info to offer expiration
Add reward eligibility info to offer expiration
reStructuredText
mit
talkable/talkable-docs,talkable/talkable-docs,talkable/talkable-docs
restructuredtext
## Code Before: .. _campaigns: .. include:: /partials/common.rst Offers Expiration ################# Talkable Campaign allows to set offer expiration for |advocate| and |friend| by specifying specific date or setting offer duration in hours. .. note:: Offer Expiration does not prevent |advocate| or |friend| from getting rewards and receiving corresponding emails. This can be configured separately through Trigger/Sending criteria. .. raw:: html <h2>Advocate</h2> - ``deadline`` - |advocate| will no longer be able to share after this date. - All existing |advocate| offers are always affected if specified date is changed while campaign is live. - Deadline is not copied when campaign is copied. .. raw:: html <h2>Friend</h2> - ``deadline`` - |friend| will no longer be able to claim the offer after this date. - ``offer duration`` - |friend| will no longer be able to claim the offer X hours after |advocate| shared it with him. Leave blank to disable expiration at all. - All existing |friend| offers are not affected if specified date or offer duration is changed while campaign is live. - If date and offer duration are specified, |friend| offer will be expired on the closest date. - |friend| offer deadline should never be earlier than |advocate| offer deadline (because there is no sense to share offer that cannot be claimed). - When campaign is copied only offer duration gets copied, but not deadline. ## Instruction: Add reward eligibility info to offer expiration ## Code After: .. _campaigns: .. include:: /partials/common.rst Offers Expiration ################# Talkable Campaign allows to set offer expiration for |advocate| and |friend| by specifying specific date or setting offer duration in hours. .. raw:: html <h2>Advocate</h2> - ``deadline`` - |advocate| will no longer be able to share after this date. - All existing |advocate| offers are always affected if specified date is changed while campaign is live. - Deadline is not copied when campaign is copied. - When |advocate| offer is expired, Advocate and Friend are still eligible for reward. In other words advocate offer expiration only prevents |advocate| from sharing but not from getting rewarded .. raw:: html <h2>Friend</h2> - ``deadline`` - |friend| will no longer be able to claim the offer after this date. - ``offer duration`` - |friend| will no longer be able to claim the offer X hours after |advocate| shared it with him. Leave blank to disable expiration at all. - All existing |friend| offers are not affected if specified date or offer duration is changed while campaign is live. - If date and offer duration are specified, |friend| offer will be expired on the closest date. - |friend| offer deadline should never be earlier than |advocate| offer deadline (because there is no sense to share offer that cannot be claimed). - When |friend| offer is expired, |friend| and |advocate| are not able to receive any rewards. But they still may try to use coupon they received earlier because talkable platform doesn't control coupon expiration. Only merchant site does that. - When campaign is copied only offer duration gets copied, but not deadline.
0cada6da41f225f5f84320747c6827e85866edf1
source/styles/site.css
source/styles/site.css
@media (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { html { font-size: 16px; } body { font-size: 1rem; } } a { color: #0f7661; } .body-content { padding-top: 10px; } blockquote { border-left: 5px solid #ecf0f1; margin: 0 0 21px; padding: 10.5px 21px; } code { background-color: #f9f2f4; color: #cd186d; border-radius: 4px; padding: 2px 4px; } div.fb-like > span, div.fb-share-button > span { vertical-align: initial !important; } pre code { background-color: #ecf0f1; border: 1px solid #cccccc; border-radius: 4px; display: block; margin: 0 0 10.5px; padding: 10px; word-break: break-all; word-wrap: break-word; }
@media (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { html { font-size: 16px; } body { font-size: 1rem; } } a { color: #0f7661; } .body-content { padding-top: 10px; } blockquote { border-left: 5px solid #ecf0f1; margin: 0 0 21px; padding: 10.5px 21px; } code { background-color: #f9f2f4; border-radius: 4px; color: #cd186d; padding: 2px 4px; } div.fb-like > span, div.fb-share-button > span { vertical-align: initial !important; } pre code { background-color: #ecf0f1; border: 1px solid #cccccc; border-radius: 4px; display: block; font-size: 1rem; margin: 0 0 10.5px; padding: 10px; word-break: break-all; word-wrap: break-word; }
Increase code example font size
Increase code example font size Increase the font size for code examples.
CSS
mit
martincostello/blog,martincostello/blog,martincostello/blog
css
## Code Before: @media (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { html { font-size: 16px; } body { font-size: 1rem; } } a { color: #0f7661; } .body-content { padding-top: 10px; } blockquote { border-left: 5px solid #ecf0f1; margin: 0 0 21px; padding: 10.5px 21px; } code { background-color: #f9f2f4; color: #cd186d; border-radius: 4px; padding: 2px 4px; } div.fb-like > span, div.fb-share-button > span { vertical-align: initial !important; } pre code { background-color: #ecf0f1; border: 1px solid #cccccc; border-radius: 4px; display: block; margin: 0 0 10.5px; padding: 10px; word-break: break-all; word-wrap: break-word; } ## Instruction: Increase code example font size Increase the font size for code examples. ## Code After: @media (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { html { font-size: 16px; } body { font-size: 1rem; } } a { color: #0f7661; } .body-content { padding-top: 10px; } blockquote { border-left: 5px solid #ecf0f1; margin: 0 0 21px; padding: 10.5px 21px; } code { background-color: #f9f2f4; border-radius: 4px; color: #cd186d; padding: 2px 4px; } div.fb-like > span, div.fb-share-button > span { vertical-align: initial !important; } pre code { background-color: #ecf0f1; border: 1px solid #cccccc; border-radius: 4px; display: block; font-size: 1rem; margin: 0 0 10.5px; padding: 10px; word-break: break-all; word-wrap: break-word; }
fba52aa32395f6f8ee4ab1891b095752dc74f0e3
test/DICTest.php
test/DICTest.php
<?php /** * Definition of class DICTest * * @copyright 2015-today Justso GmbH * @author [email protected] * @package justso\justapi\test */ namespace justso\justapi\test; use justso\justapi\Bootstrap; use justso\justapi\DependencyContainer; use justso\justapi\testutil\FileSystemSandbox; /** * Class DICTest * * @package justso\justapi\test */ class DICTest extends \PHPUnit_Framework_TestCase { public function testInstantiation() { $config = array('environments' => array('test' => array('approot' => '/test'))); Bootstrap::getInstance()->setTestConfiguration('/test', $config); $fs = new FileSystemSandbox(); $fs->copyFromRealFS(dirname(__DIR__) . '/testutil/TestDICConfig.php', '/test/conf/dependencies.php'); $env = new DependencyContainer($fs); $object = $env->newInstanceOf('TestInterface'); $this->assertInstanceOf('MockClass', $object); } }
<?php /** * Definition of class DICTest * * @copyright 2015-today Justso GmbH * @author [email protected] * @package justso\justapi\test */ namespace justso\justapi\test; use justso\justapi\Bootstrap; use justso\justapi\DependencyContainer; use justso\justapi\testutil\FileSystemSandbox; require (dirname(__DIR__) . '/testutil/MockClass.php'); require (dirname(__DIR__) . '/testutil/MockClass2.php'); /** * Class DICTest * * @package justso\justapi\test */ class DICTest extends \PHPUnit_Framework_TestCase { public function testInstantiation() { $config = array('environments' => array('test' => array('approot' => '/test'))); Bootstrap::getInstance()->setTestConfiguration('/test', $config); $fs = new FileSystemSandbox(); $fs->copyFromRealFS(dirname(__DIR__) . '/testutil/TestDICConfig.php', '/test/conf/dependencies.php'); $env = new DependencyContainer($fs); $object = $env->newInstanceOf('TestInterface'); $this->assertInstanceOf('MockClass', $object); } }
Include mock classes in test class file
Include mock classes in test class file
PHP
mit
JustsoSoftware/JustAPI
php
## Code Before: <?php /** * Definition of class DICTest * * @copyright 2015-today Justso GmbH * @author [email protected] * @package justso\justapi\test */ namespace justso\justapi\test; use justso\justapi\Bootstrap; use justso\justapi\DependencyContainer; use justso\justapi\testutil\FileSystemSandbox; /** * Class DICTest * * @package justso\justapi\test */ class DICTest extends \PHPUnit_Framework_TestCase { public function testInstantiation() { $config = array('environments' => array('test' => array('approot' => '/test'))); Bootstrap::getInstance()->setTestConfiguration('/test', $config); $fs = new FileSystemSandbox(); $fs->copyFromRealFS(dirname(__DIR__) . '/testutil/TestDICConfig.php', '/test/conf/dependencies.php'); $env = new DependencyContainer($fs); $object = $env->newInstanceOf('TestInterface'); $this->assertInstanceOf('MockClass', $object); } } ## Instruction: Include mock classes in test class file ## Code After: <?php /** * Definition of class DICTest * * @copyright 2015-today Justso GmbH * @author [email protected] * @package justso\justapi\test */ namespace justso\justapi\test; use justso\justapi\Bootstrap; use justso\justapi\DependencyContainer; use justso\justapi\testutil\FileSystemSandbox; require (dirname(__DIR__) . '/testutil/MockClass.php'); require (dirname(__DIR__) . '/testutil/MockClass2.php'); /** * Class DICTest * * @package justso\justapi\test */ class DICTest extends \PHPUnit_Framework_TestCase { public function testInstantiation() { $config = array('environments' => array('test' => array('approot' => '/test'))); Bootstrap::getInstance()->setTestConfiguration('/test', $config); $fs = new FileSystemSandbox(); $fs->copyFromRealFS(dirname(__DIR__) . '/testutil/TestDICConfig.php', '/test/conf/dependencies.php'); $env = new DependencyContainer($fs); $object = $env->newInstanceOf('TestInterface'); $this->assertInstanceOf('MockClass', $object); } }
4c23bfe382c8013ac6cc91d8a4f07a7b598c148a
assets/game_state.coffee
assets/game_state.coffee
class GameState customers: [] agents: [] requestQueues: {} chanceOfRequest: 0.005 tickables: [] tick: 0 money: 1000000 reputation: 0.5 agentSpawner: new AgentSpawner() addAgent: (agent) -> @agents.push(agent) @tickables.push(agent) fireAgent: (agent) -> @agents.filter((item) -> item != agent ) removeCustomer: (customer) -> customers.pop(customer) calculateReputation: -> totalWorth = 0 totalRep = 0 for customer in @customers totalRep += customer.mood * customer.worth totalWorth += customer.worth if totalWorth != 0 @reputation = totalRep / totalWorth constructor: -> @level = new Level numberOfRequests: -> requests = 0 for queue of @requestQueues requests += @requestQueues[queue].length() requests toString: -> "Customers: " + @customers.length + "\nRequest queue: " + @numberOfRequests() + "\nReputation: " + (@reputation * 100) + "%" + "\nAgents: " + @agents.join(", ")
class GameState customers: [] agents: [] requestQueues: {} chanceOfRequest: 0.005 tickables: [] tick: 0 money: 1000000 reputation: 0.5 agentSpawner: new AgentSpawner() addAgent: (agent) -> @agents.push(agent) @tickables.push(agent) fireAgent: (agent) -> @agents.filter((item) -> item != agent ) removeCustomer: (customer) -> @customers.filter((item) -> item != customer ) calculateReputation: -> totalWorth = 0 totalRep = 0 for customer in @customers totalRep += customer.mood * customer.worth totalWorth += customer.worth if totalWorth != 0 @reputation = totalRep / totalWorth calculateBudgetChange: -> budget = 0 for agent in @agents budget -= agent.salary for customer in @customers budget += customer.worth budget constructor: -> @level = new Level numberOfRequests: -> requests = 0 for queue of @requestQueues requests += @requestQueues[queue].length() requests toString: -> "Customers: " + @customers.length + "\nMoney: " + @money + " (" + @calculateBudgetChange() + ")" + "\nRequest queue: " + @numberOfRequests() + "\nReputation: " + (@reputation * 100) + "%" + "\nAgents: " + @agents.join(", ")
Add budget and change to left menu
Add budget and change to left menu
CoffeeScript
mit
guts2014/TEAM-NAME-PHP,guts2014/TEAM-NAME-PHP
coffeescript
## Code Before: class GameState customers: [] agents: [] requestQueues: {} chanceOfRequest: 0.005 tickables: [] tick: 0 money: 1000000 reputation: 0.5 agentSpawner: new AgentSpawner() addAgent: (agent) -> @agents.push(agent) @tickables.push(agent) fireAgent: (agent) -> @agents.filter((item) -> item != agent ) removeCustomer: (customer) -> customers.pop(customer) calculateReputation: -> totalWorth = 0 totalRep = 0 for customer in @customers totalRep += customer.mood * customer.worth totalWorth += customer.worth if totalWorth != 0 @reputation = totalRep / totalWorth constructor: -> @level = new Level numberOfRequests: -> requests = 0 for queue of @requestQueues requests += @requestQueues[queue].length() requests toString: -> "Customers: " + @customers.length + "\nRequest queue: " + @numberOfRequests() + "\nReputation: " + (@reputation * 100) + "%" + "\nAgents: " + @agents.join(", ") ## Instruction: Add budget and change to left menu ## Code After: class GameState customers: [] agents: [] requestQueues: {} chanceOfRequest: 0.005 tickables: [] tick: 0 money: 1000000 reputation: 0.5 agentSpawner: new AgentSpawner() addAgent: (agent) -> @agents.push(agent) @tickables.push(agent) fireAgent: (agent) -> @agents.filter((item) -> item != agent ) removeCustomer: (customer) -> @customers.filter((item) -> item != customer ) calculateReputation: -> totalWorth = 0 totalRep = 0 for customer in @customers totalRep += customer.mood * customer.worth totalWorth += customer.worth if totalWorth != 0 @reputation = totalRep / totalWorth calculateBudgetChange: -> budget = 0 for agent in @agents budget -= agent.salary for customer in @customers budget += customer.worth budget constructor: -> @level = new Level numberOfRequests: -> requests = 0 for queue of @requestQueues requests += @requestQueues[queue].length() requests toString: -> "Customers: " + @customers.length + "\nMoney: " + @money + " (" + @calculateBudgetChange() + ")" + "\nRequest queue: " + @numberOfRequests() + "\nReputation: " + (@reputation * 100) + "%" + "\nAgents: " + @agents.join(", ")
c3792ccdde5a44979f34d84cebad722c7a64ab64
juliet_importer.py
juliet_importer.py
import os import imp modules = {} def load_modules(path="./modules/"): # Consider adding recursive sorting at some point in the future names = os.listdir(path) for name in names: if not name.endswith(".py"): continue print("Importing module {0}".format(name)) name = name.split('.')[0] try: new_module = imp.load_source(name, path) modules[name] = new_module except ImportError as e: print("Error importing module {0} from directory {1}".format(name,os.getcwd())) print(e) continue print("Success") load_modules()
import os import imp modules = {} def load_modules(path="./modules/"): # Consider adding recursive searching at some point in the future modules['juliet_module'] = imp.load_source('juliet_module', path + "juliet_module.py") names = os.listdir(path) for name in names: if not name.endswith(".py"): continue print("Importing module {0}".format(name)) try: modules[name.split('.')[0]] = imp.load_source(name.split('.')[0], path + name) except ImportError as e: print("Error importing module {0} from directory {1}".format(name,os.getcwd())) print(e) continue print("Success") load_modules()
Change juliet_module to load before other modules for dependency reasons
Change juliet_module to load before other modules for dependency reasons
Python
bsd-2-clause
halfbro/juliet
python
## Code Before: import os import imp modules = {} def load_modules(path="./modules/"): # Consider adding recursive sorting at some point in the future names = os.listdir(path) for name in names: if not name.endswith(".py"): continue print("Importing module {0}".format(name)) name = name.split('.')[0] try: new_module = imp.load_source(name, path) modules[name] = new_module except ImportError as e: print("Error importing module {0} from directory {1}".format(name,os.getcwd())) print(e) continue print("Success") load_modules() ## Instruction: Change juliet_module to load before other modules for dependency reasons ## Code After: import os import imp modules = {} def load_modules(path="./modules/"): # Consider adding recursive searching at some point in the future modules['juliet_module'] = imp.load_source('juliet_module', path + "juliet_module.py") names = os.listdir(path) for name in names: if not name.endswith(".py"): continue print("Importing module {0}".format(name)) try: modules[name.split('.')[0]] = imp.load_source(name.split('.')[0], path + name) except ImportError as e: print("Error importing module {0} from directory {1}".format(name,os.getcwd())) print(e) continue print("Success") load_modules()
1f5a7c5e8e56c7b2a1ca93602bd77c13f495360c
recipes-kernel/linux/linux-ti-staging-rt_5.10.bb
recipes-kernel/linux/linux-ti-staging-rt_5.10.bb
require linux-ti-staging_5.10.bb # Look in the generic major.minor directory for files # This will have priority over generic non-rt path FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-5.10:" BRANCH = "ti-rt-linux-5.10.y" SRCREV = "d238e71a2d3157a7faec48d4d3681b537a2e08cc" PV = "5.10.41+git${SRCPV}"
require linux-ti-staging_5.10.bb # Look in the generic major.minor directory for files # This will have priority over generic non-rt path FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-5.10:" BRANCH = "ti-rt-linux-5.10.y" SRCREV = "bee192299392dc41c94f4603968b7a3c02f17a1d" PV = "5.10.41+git${SRCPV}"
Update linux-rt srcrev to 08.00.00.003
linux-ti-staging-rt: Update linux-rt srcrev to 08.00.00.003 Updated the linux-rt to pick 08.00.00.003 tag Signed-off-by: Yogesh Siraswar <[email protected]>
BitBake
mit
rcn-ee/meta-ti,rcn-ee/meta-ti,rcn-ee/meta-ti,rcn-ee/meta-ti
bitbake
## Code Before: require linux-ti-staging_5.10.bb # Look in the generic major.minor directory for files # This will have priority over generic non-rt path FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-5.10:" BRANCH = "ti-rt-linux-5.10.y" SRCREV = "d238e71a2d3157a7faec48d4d3681b537a2e08cc" PV = "5.10.41+git${SRCPV}" ## Instruction: linux-ti-staging-rt: Update linux-rt srcrev to 08.00.00.003 Updated the linux-rt to pick 08.00.00.003 tag Signed-off-by: Yogesh Siraswar <[email protected]> ## Code After: require linux-ti-staging_5.10.bb # Look in the generic major.minor directory for files # This will have priority over generic non-rt path FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-5.10:" BRANCH = "ti-rt-linux-5.10.y" SRCREV = "bee192299392dc41c94f4603968b7a3c02f17a1d" PV = "5.10.41+git${SRCPV}"
5f1864c1f7bcc5fa837b807dbba6e0399ab77f61
spec/spec_helper.rb
spec/spec_helper.rb
require "sequel" require "sequel/string_nilifier" class << Sequel::Model attr_writer :db_schema alias orig_columns columns def columns(*cols) return super if cols.empty? define_method(:columns){cols} @dataset.instance_variable_set(:@columns, cols) if @dataset def_column_accessor(*cols) @columns = cols @db_schema = {} cols.each{|c| @db_schema[c] = {}} end end Sequel::Model.use_transactions = false if Sequel.respond_to? :cache_anonymous_models= Sequel.cache_anonymous_models = false end db = Sequel.mock(:fetch=>{:id => 1, :x => 1}, :numrows=>1, :autoid=>proc{|sql| 10}) def db.schema(*) [[:id, {:primary_key=>true}]] end def db.reset() sqls end def db.supports_schema_parsing?() true end Sequel::Model.db = MODEL_DB = db
require "sequel" require "sequel/string_nilifier" class << Sequel::Model attr_writer :db_schema alias orig_columns columns def columns(*cols) return super if cols.empty? define_method(:columns){cols} @dataset.send(:columns=, cols) if @dataset def_column_accessor(*cols) @columns = cols @db_schema = {} cols.each{|c| @db_schema[c] = {}} end end Sequel::Model.use_transactions = false if Sequel.respond_to? :cache_anonymous_models= Sequel.cache_anonymous_models = false end db = Sequel.mock(:fetch=>{:id => 1, :x => 1}, :numrows=>1, :autoid=>proc{|sql| 10}) def db.schema(*) [[:id, {:primary_key=>true}]] end def db.reset() sqls end def db.supports_schema_parsing?() true end Sequel::Model.db = MODEL_DB = db
Fix spec for Sequel > 5.1
Fix spec for Sequel > 5.1
Ruby
mit
TalentBox/sequel-string_nilifier
ruby
## Code Before: require "sequel" require "sequel/string_nilifier" class << Sequel::Model attr_writer :db_schema alias orig_columns columns def columns(*cols) return super if cols.empty? define_method(:columns){cols} @dataset.instance_variable_set(:@columns, cols) if @dataset def_column_accessor(*cols) @columns = cols @db_schema = {} cols.each{|c| @db_schema[c] = {}} end end Sequel::Model.use_transactions = false if Sequel.respond_to? :cache_anonymous_models= Sequel.cache_anonymous_models = false end db = Sequel.mock(:fetch=>{:id => 1, :x => 1}, :numrows=>1, :autoid=>proc{|sql| 10}) def db.schema(*) [[:id, {:primary_key=>true}]] end def db.reset() sqls end def db.supports_schema_parsing?() true end Sequel::Model.db = MODEL_DB = db ## Instruction: Fix spec for Sequel > 5.1 ## Code After: require "sequel" require "sequel/string_nilifier" class << Sequel::Model attr_writer :db_schema alias orig_columns columns def columns(*cols) return super if cols.empty? define_method(:columns){cols} @dataset.send(:columns=, cols) if @dataset def_column_accessor(*cols) @columns = cols @db_schema = {} cols.each{|c| @db_schema[c] = {}} end end Sequel::Model.use_transactions = false if Sequel.respond_to? :cache_anonymous_models= Sequel.cache_anonymous_models = false end db = Sequel.mock(:fetch=>{:id => 1, :x => 1}, :numrows=>1, :autoid=>proc{|sql| 10}) def db.schema(*) [[:id, {:primary_key=>true}]] end def db.reset() sqls end def db.supports_schema_parsing?() true end Sequel::Model.db = MODEL_DB = db
a7bf688d859a0500c77ab89d58cafc25b537fab5
libproxy/module_wpad.cpp
libproxy/module_wpad.cpp
using namespace com::googlecode::libproxy; static const char *DEFAULT_WPAD_ORDER[] = { "wpad_dhcp", "wpad_slp", "wpad_dns", "wpad_dnsdevolution", NULL }; bool wpad_module::operator<(const wpad_module& module) const { for (int i=0 ; DEFAULT_WPAD_ORDER[i] ; i++) { if (module.get_id() == DEFAULT_WPAD_ORDER[i]) break; if (this->get_id() == DEFAULT_WPAD_ORDER[i]) return true; } return false; }
using namespace com::googlecode::libproxy; static const char *DEFAULT_WPAD_ORDER[] = { "wpad_dhcp", "wpad_slp", "wpad_dns_srv", "wpad_dns_txt", "wpad_dns_alias", NULL }; bool wpad_module::operator<(const wpad_module& module) const { for (int i=0 ; DEFAULT_WPAD_ORDER[i] ; i++) { if (module.get_id() == DEFAULT_WPAD_ORDER[i]) break; if (this->get_id() == DEFAULT_WPAD_ORDER[i]) return true; } return false; }
Fix wpad ordering table after wpad_dns -> wpad_dns_alias rename
Fix wpad ordering table after wpad_dns -> wpad_dns_alias rename
C++
lgpl-2.1
binarycrusader/libproxy,libproxy/libproxy,anonymous2ch/libproxy,binarycrusader/libproxy,binarycrusader/libproxy,cicku/libproxy,cicku/libproxy,anonymous2ch/libproxy,horar/libproxy,binarycrusader/libproxy,cicku/libproxy,horar/libproxy,horar/libproxy,anonymous2ch/libproxy,maxinbjohn/libproxy,maxinbjohn/libproxy,libproxy/libproxy,codegooglecom/libproxy,libproxy/libproxy,anonymous2ch/libproxy,cicku/libproxy,markcox/libproxy,libproxy/libproxy,binarycrusader/libproxy,cicku/libproxy,codegooglecom/libproxy,maxinbjohn/libproxy,cicku/libproxy,codegooglecom/libproxy,maxinbjohn/libproxy,markcox/libproxy,horar/libproxy,markcox/libproxy,codegooglecom/libproxy,binarycrusader/libproxy,horar/libproxy,markcox/libproxy,markcox/libproxy,anonymous2ch/libproxy,horar/libproxy,codegooglecom/libproxy,markcox/libproxy,cicku/libproxy,codegooglecom/libproxy,horar/libproxy,binarycrusader/libproxy,markcox/libproxy,maxinbjohn/libproxy,anonymous2ch/libproxy,libproxy/libproxy,libproxy/libproxy,markcox/libproxy,codegooglecom/libproxy,maxinbjohn/libproxy,anonymous2ch/libproxy,libproxy/libproxy,binarycrusader/libproxy,maxinbjohn/libproxy
c++
## Code Before: using namespace com::googlecode::libproxy; static const char *DEFAULT_WPAD_ORDER[] = { "wpad_dhcp", "wpad_slp", "wpad_dns", "wpad_dnsdevolution", NULL }; bool wpad_module::operator<(const wpad_module& module) const { for (int i=0 ; DEFAULT_WPAD_ORDER[i] ; i++) { if (module.get_id() == DEFAULT_WPAD_ORDER[i]) break; if (this->get_id() == DEFAULT_WPAD_ORDER[i]) return true; } return false; } ## Instruction: Fix wpad ordering table after wpad_dns -> wpad_dns_alias rename ## Code After: using namespace com::googlecode::libproxy; static const char *DEFAULT_WPAD_ORDER[] = { "wpad_dhcp", "wpad_slp", "wpad_dns_srv", "wpad_dns_txt", "wpad_dns_alias", NULL }; bool wpad_module::operator<(const wpad_module& module) const { for (int i=0 ; DEFAULT_WPAD_ORDER[i] ; i++) { if (module.get_id() == DEFAULT_WPAD_ORDER[i]) break; if (this->get_id() == DEFAULT_WPAD_ORDER[i]) return true; } return false; }
940c1699c5d8025da3aa51fd0fc886071deff2f4
pillar/edx/ansible_vars/next_residential.sls
pillar/edx/ansible_vars/next_residential.sls
{% set env_settings = salt.cp.get_file_str("salt://environment_settings.yml")|load_yaml %} {% set purpose = salt.grains.get('purpose', 'current-residential-live') %} {% set environment = salt.grains.get('environment', 'mitx-qa') %} edx: ansible_vars: EDXAPP_EXTRA_MIDDLEWARE_CLASSES: [] # Worth keeping track of in case we need to take advantage of it EDXAPP_SESSION_COOKIE_DOMAIN: .mitx.mit.edu EDXAPP_SESSION_COOKIE_NAME: {{ environment }}-{{ purpose }}-session EDXAPP_CMS_AUTH_EXTRA: SECRET_KEY: __vault__:gen_if_missing:secret-residential/global/edxapp-lms-django-secret-key>data>value
{% set env_settings = salt.cp.get_file_str("salt://environment_settings.yml")|load_yaml %} {% set purpose = salt.grains.get('purpose', 'current-residential-live') %} {% set environment = salt.grains.get('environment', 'mitx-qa') %} edx: ansible_vars: EDXAPP_EXTRA_MIDDLEWARE_CLASSES: [] # Worth keeping track of in case we need to take advantage of it EDXAPP_SESSION_COOKIE_DOMAIN: .mitx.mit.edu EDXAPP_SESSION_COOKIE_NAME: {{ environment }}-{{ purpose }}-session EDXAPP_CMS_AUTH_EXTRA: SECRET_KEY: __vault__:gen_if_missing:secret-residential/global/edxapp-lms-django-secret-key>data>value EDXAPP_REGISTRATION_EXTRA_FIELDS: confirm_email: "hidden" level_of_education: "optional" gender: "optional" year_of_birth: "optional" mailing_address: "hidden" goals: "optional" honor_code: "required" terms_of_service: "hidden" city: "hidden" country: "hidden" EDXAPP_LMS_ENV_EXTRA: FEATURES: AUTH_USE_CAS: true ALLOW_PUBLIC_ACCOUNT_CREATION: True SKIP_EMAIL_VALIDATION: True EDXAPP_CMS_ENV_EXTRA: FEATURES: AUTH_USE_CAS: true
Revert "Revert "Updated settings and hacks to resolve SAML login""
Revert "Revert "Updated settings and hacks to resolve SAML login"" This reverts commit 21bfc74580e03a217d8fa701ff7dc8b7c507a207.
SaltStack
bsd-3-clause
mitodl/salt-ops,mitodl/salt-ops
saltstack
## Code Before: {% set env_settings = salt.cp.get_file_str("salt://environment_settings.yml")|load_yaml %} {% set purpose = salt.grains.get('purpose', 'current-residential-live') %} {% set environment = salt.grains.get('environment', 'mitx-qa') %} edx: ansible_vars: EDXAPP_EXTRA_MIDDLEWARE_CLASSES: [] # Worth keeping track of in case we need to take advantage of it EDXAPP_SESSION_COOKIE_DOMAIN: .mitx.mit.edu EDXAPP_SESSION_COOKIE_NAME: {{ environment }}-{{ purpose }}-session EDXAPP_CMS_AUTH_EXTRA: SECRET_KEY: __vault__:gen_if_missing:secret-residential/global/edxapp-lms-django-secret-key>data>value ## Instruction: Revert "Revert "Updated settings and hacks to resolve SAML login"" This reverts commit 21bfc74580e03a217d8fa701ff7dc8b7c507a207. ## Code After: {% set env_settings = salt.cp.get_file_str("salt://environment_settings.yml")|load_yaml %} {% set purpose = salt.grains.get('purpose', 'current-residential-live') %} {% set environment = salt.grains.get('environment', 'mitx-qa') %} edx: ansible_vars: EDXAPP_EXTRA_MIDDLEWARE_CLASSES: [] # Worth keeping track of in case we need to take advantage of it EDXAPP_SESSION_COOKIE_DOMAIN: .mitx.mit.edu EDXAPP_SESSION_COOKIE_NAME: {{ environment }}-{{ purpose }}-session EDXAPP_CMS_AUTH_EXTRA: SECRET_KEY: __vault__:gen_if_missing:secret-residential/global/edxapp-lms-django-secret-key>data>value EDXAPP_REGISTRATION_EXTRA_FIELDS: confirm_email: "hidden" level_of_education: "optional" gender: "optional" year_of_birth: "optional" mailing_address: "hidden" goals: "optional" honor_code: "required" terms_of_service: "hidden" city: "hidden" country: "hidden" EDXAPP_LMS_ENV_EXTRA: FEATURES: AUTH_USE_CAS: true ALLOW_PUBLIC_ACCOUNT_CREATION: True SKIP_EMAIL_VALIDATION: True EDXAPP_CMS_ENV_EXTRA: FEATURES: AUTH_USE_CAS: true
fde8a38f7bdcb14d84d74561394480d05a2fe90a
cms_shiny/templates/cms_shiny/shiny_detail.html
cms_shiny/templates/cms_shiny/shiny_detail.html
{% extends "base.html" %} {% load sekizai_tags staticfiles %} {% block title %} {{ shiny_app.name }}{% if LAB_NAME %} | {{ LAB_NAME }}{% endif %} {% endblock title %} {% block content %} {% addtoblock "css" strip %} <link rel="stylesheet" type="text/css" href="{% static 'cms_shiny/app.css' %}"> {% endaddtoblock %} <iframe class="shiny-app" src="{{ shiny_app.url }}" frameborder="0"></iframe> {% include "cms_shiny/_shiny_app_info.html" %} {% endblock content %}
{% extends "base.html" %} {% load sekizai_tags staticfiles %} {% block title %} {{ shiny_app.name }}{% if LAB_NAME %} | {{ LAB_NAME }}{% endif %} {% endblock title %} {% block content %} {% addtoblock "css" strip %} <link rel="stylesheet" type="text/css" href="{% static 'cms_shiny/app.css' %}"> {% endaddtoblock %} <iframe class="shiny-app" src="{{ shiny_app.url }}"></iframe> {% include "cms_shiny/_shiny_app_info.html" %} {% endblock content %}
Remove iframe's frameborder attribute (redundant with Bootstrap)
Remove iframe's frameborder attribute (redundant with Bootstrap)
HTML
bsd-3-clause
mfcovington/djangocms-shiny-app,mfcovington/djangocms-shiny-app,mfcovington/djangocms-shiny-app
html
## Code Before: {% extends "base.html" %} {% load sekizai_tags staticfiles %} {% block title %} {{ shiny_app.name }}{% if LAB_NAME %} | {{ LAB_NAME }}{% endif %} {% endblock title %} {% block content %} {% addtoblock "css" strip %} <link rel="stylesheet" type="text/css" href="{% static 'cms_shiny/app.css' %}"> {% endaddtoblock %} <iframe class="shiny-app" src="{{ shiny_app.url }}" frameborder="0"></iframe> {% include "cms_shiny/_shiny_app_info.html" %} {% endblock content %} ## Instruction: Remove iframe's frameborder attribute (redundant with Bootstrap) ## Code After: {% extends "base.html" %} {% load sekizai_tags staticfiles %} {% block title %} {{ shiny_app.name }}{% if LAB_NAME %} | {{ LAB_NAME }}{% endif %} {% endblock title %} {% block content %} {% addtoblock "css" strip %} <link rel="stylesheet" type="text/css" href="{% static 'cms_shiny/app.css' %}"> {% endaddtoblock %} <iframe class="shiny-app" src="{{ shiny_app.url }}"></iframe> {% include "cms_shiny/_shiny_app_info.html" %} {% endblock content %}
33239257ff65e7079574eec65d432750add01f3a
tests/Properties/DelegatingAdditionalPropertiesResolverTest.php
tests/Properties/DelegatingAdditionalPropertiesResolverTest.php
<?php namespace SimpleBus\Asynchronous\Tests\Properties; use PHPUnit\Framework\TestCase; use SimpleBus\Asynchronous\Properties\AdditionalPropertiesResolver; use SimpleBus\Asynchronous\Properties\DelegatingAdditionalPropertiesResolver; class DelegatingAdditionalPropertiesResolverTest extends TestCase { /** * @test */ public function it_should_merge_multiple_resolvers() { $message = $this->messageDummy(); $resolver = new DelegatingAdditionalPropertiesResolver(array( $this->getResolver($message, array('test' => 'a')), $this->getResolver($message, array('test' => 'b', 'priority' => 123)), )); $this->assertSame(['test' => 'b', 'priority' => 123], $resolver->resolveAdditionalPropertiesFor($message)); } /** * @param object $message * @param array $data * * @return \PHPUnit\Framework\MockObject\MockObject|AdditionalPropertiesResolver */ private function getResolver($message, array $data) { $resolver = $this->createMock('SimpleBus\Asynchronous\Properties\AdditionalPropertiesResolver'); $resolver->expects($this->once()) ->method('resolveAdditionalPropertiesFor') ->with($this->identicalTo($message)) ->will($this->returnValue($data)); return $resolver; } /** * @return \PHPUnit\Framework\MockObject\MockObject|object */ private function messageDummy() { return new \stdClass(); } }
<?php namespace SimpleBus\Asynchronous\Tests\Properties; use PHPUnit\Framework\TestCase; use SimpleBus\Asynchronous\Properties\AdditionalPropertiesResolver; use SimpleBus\Asynchronous\Properties\DelegatingAdditionalPropertiesResolver; class DelegatingAdditionalPropertiesResolverTest extends TestCase { /** * @test */ public function it_should_merge_multiple_resolvers() { $message = $this->messageDummy(); $resolver = new DelegatingAdditionalPropertiesResolver([ $this->getResolver($message, ['test' => 'a']), $this->getResolver($message, ['test' => 'b', 'priority' => 123]), ]); $this->assertSame(['test' => 'b', 'priority' => 123], $resolver->resolveAdditionalPropertiesFor($message)); } /** * @param object $message * @param array $data * * @return \PHPUnit\Framework\MockObject\MockObject|AdditionalPropertiesResolver */ private function getResolver($message, array $data) { $resolver = $this->createMock('SimpleBus\Asynchronous\Properties\AdditionalPropertiesResolver'); $resolver->expects($this->once()) ->method('resolveAdditionalPropertiesFor') ->with($this->identicalTo($message)) ->will($this->returnValue($data)); return $resolver; } /** * @return \PHPUnit\Framework\MockObject\MockObject|object */ private function messageDummy() { return new \stdClass(); } }
Add PHP-CS-Fixer with a simple baseline
Add PHP-CS-Fixer with a simple baseline
PHP
mit
SimpleBus/Asynchronous
php
## Code Before: <?php namespace SimpleBus\Asynchronous\Tests\Properties; use PHPUnit\Framework\TestCase; use SimpleBus\Asynchronous\Properties\AdditionalPropertiesResolver; use SimpleBus\Asynchronous\Properties\DelegatingAdditionalPropertiesResolver; class DelegatingAdditionalPropertiesResolverTest extends TestCase { /** * @test */ public function it_should_merge_multiple_resolvers() { $message = $this->messageDummy(); $resolver = new DelegatingAdditionalPropertiesResolver(array( $this->getResolver($message, array('test' => 'a')), $this->getResolver($message, array('test' => 'b', 'priority' => 123)), )); $this->assertSame(['test' => 'b', 'priority' => 123], $resolver->resolveAdditionalPropertiesFor($message)); } /** * @param object $message * @param array $data * * @return \PHPUnit\Framework\MockObject\MockObject|AdditionalPropertiesResolver */ private function getResolver($message, array $data) { $resolver = $this->createMock('SimpleBus\Asynchronous\Properties\AdditionalPropertiesResolver'); $resolver->expects($this->once()) ->method('resolveAdditionalPropertiesFor') ->with($this->identicalTo($message)) ->will($this->returnValue($data)); return $resolver; } /** * @return \PHPUnit\Framework\MockObject\MockObject|object */ private function messageDummy() { return new \stdClass(); } } ## Instruction: Add PHP-CS-Fixer with a simple baseline ## Code After: <?php namespace SimpleBus\Asynchronous\Tests\Properties; use PHPUnit\Framework\TestCase; use SimpleBus\Asynchronous\Properties\AdditionalPropertiesResolver; use SimpleBus\Asynchronous\Properties\DelegatingAdditionalPropertiesResolver; class DelegatingAdditionalPropertiesResolverTest extends TestCase { /** * @test */ public function it_should_merge_multiple_resolvers() { $message = $this->messageDummy(); $resolver = new DelegatingAdditionalPropertiesResolver([ $this->getResolver($message, ['test' => 'a']), $this->getResolver($message, ['test' => 'b', 'priority' => 123]), ]); $this->assertSame(['test' => 'b', 'priority' => 123], $resolver->resolveAdditionalPropertiesFor($message)); } /** * @param object $message * @param array $data * * @return \PHPUnit\Framework\MockObject\MockObject|AdditionalPropertiesResolver */ private function getResolver($message, array $data) { $resolver = $this->createMock('SimpleBus\Asynchronous\Properties\AdditionalPropertiesResolver'); $resolver->expects($this->once()) ->method('resolveAdditionalPropertiesFor') ->with($this->identicalTo($message)) ->will($this->returnValue($data)); return $resolver; } /** * @return \PHPUnit\Framework\MockObject\MockObject|object */ private function messageDummy() { return new \stdClass(); } }
4dd54885f2ddc2b4c1b0ea30fdc7f61514bcc93c
Segment16Sign.ino
Segment16Sign.ino
Segment16 display; void setup(){ Serial.begin(9600); while (!Serial) {} // wait for Leonardo Serial.println("Type any character to start"); while (Serial.read() <= 0) {} delay(200); // Catch Due reset problem // assume the user typed a valid character and no reset happened } void loop(){ Serial.println("LOOP"); display.show(); delay(1000); }
Segment16 display; uint32_t incomingByte = 0, input = 0; // for incoming serial data void setup(){ Serial.begin(9600); while (!Serial) {} // wait for Leonard Serial.println("Type any character to start"); while (Serial.read() <= 0) {} delay(200); // Catch Due reset problem display.init(); // assume the user typed a valid character and no reset happened } void loop(){ if(Serial.available() > 0){ input = 0; while(Serial.available() > 0){ incomingByte = Serial.read(); input = (input << 8) | incomingByte; } display.pushChar(input); Serial.println(input, HEX); //incomingByte = Serial.read(); } display.show(); delay(5); }
Add ability to input alt characters
Add ability to input alt characters
Arduino
mit
bguest/Segment16Sign,bguest/Segment16Sign
arduino
## Code Before: Segment16 display; void setup(){ Serial.begin(9600); while (!Serial) {} // wait for Leonardo Serial.println("Type any character to start"); while (Serial.read() <= 0) {} delay(200); // Catch Due reset problem // assume the user typed a valid character and no reset happened } void loop(){ Serial.println("LOOP"); display.show(); delay(1000); } ## Instruction: Add ability to input alt characters ## Code After: Segment16 display; uint32_t incomingByte = 0, input = 0; // for incoming serial data void setup(){ Serial.begin(9600); while (!Serial) {} // wait for Leonard Serial.println("Type any character to start"); while (Serial.read() <= 0) {} delay(200); // Catch Due reset problem display.init(); // assume the user typed a valid character and no reset happened } void loop(){ if(Serial.available() > 0){ input = 0; while(Serial.available() > 0){ incomingByte = Serial.read(); input = (input << 8) | incomingByte; } display.pushChar(input); Serial.println(input, HEX); //incomingByte = Serial.read(); } display.show(); delay(5); }
251143afad694aaadfe297387516b7205f506dca
ember/app/components/layer-switcher.js
ember/app/components/layer-switcher.js
import Component from '@ember/component'; import { inject as service } from '@ember/service'; import { BASE_LAYERS, OVERLAY_LAYERS } from '../services/map-settings'; export default class LayerSwitcher extends Component { tagName = ''; @service mapSettings; open = false; BASE_LAYERS = BASE_LAYERS; OVERLAY_LAYERS = OVERLAY_LAYERS; }
import Component from '@ember/component'; import { inject as service } from '@ember/service'; import { tracked } from '@glimmer/tracking'; import { BASE_LAYERS, OVERLAY_LAYERS } from '../services/map-settings'; export default class LayerSwitcher extends Component { tagName = ''; @service mapSettings; @tracked open = false; BASE_LAYERS = BASE_LAYERS; OVERLAY_LAYERS = OVERLAY_LAYERS; }
Convert `open` to tracked property
LayerSwitcher: Convert `open` to tracked property
JavaScript
agpl-3.0
skylines-project/skylines,skylines-project/skylines,skylines-project/skylines,skylines-project/skylines
javascript
## Code Before: import Component from '@ember/component'; import { inject as service } from '@ember/service'; import { BASE_LAYERS, OVERLAY_LAYERS } from '../services/map-settings'; export default class LayerSwitcher extends Component { tagName = ''; @service mapSettings; open = false; BASE_LAYERS = BASE_LAYERS; OVERLAY_LAYERS = OVERLAY_LAYERS; } ## Instruction: LayerSwitcher: Convert `open` to tracked property ## Code After: import Component from '@ember/component'; import { inject as service } from '@ember/service'; import { tracked } from '@glimmer/tracking'; import { BASE_LAYERS, OVERLAY_LAYERS } from '../services/map-settings'; export default class LayerSwitcher extends Component { tagName = ''; @service mapSettings; @tracked open = false; BASE_LAYERS = BASE_LAYERS; OVERLAY_LAYERS = OVERLAY_LAYERS; }
c3767049a83ad751a11c63bb7921c5752855e88e
composer.json
composer.json
{ "name": "laravelcollective/remote", "description": "Remote for The Laravel Framework.", "license": "MIT", "homepage": "http://laravelcollective.com", "support": { "issues": "https://github.com/LaravelCollective/remote/issues", "source": "https://github.com/LaravelCollective/remote" }, "authors": [ { "name": "Taylor Otwell", "email": "[email protected]" }, { "name": "Tom Shafer", "email": "[email protected]" } ], "require": { "php": ">=7.0.0", "illuminate/support": "5.5.*", "illuminate/filesystem": "5.5.*", "phpseclib/phpseclib": "^2.0" }, "require-dev": { "illuminate/console": "5.5.*", "mockery/mockery": "~0.9.4", "phpunit/phpunit": "~5.5" }, "extra": { "laravel": { "providers": [ "Collective\\Remote\\RemoteServiceProvider" ], "aliases": { "SSH": "Collective\\Remote\\RemoteFacade" } } }, "autoload": { "psr-4": { "Collective\\Remote\\": "src/" } }, "minimum-stability": "dev" }
{ "name": "laravelcollective/remote", "description": "Remote for The Laravel Framework.", "license": "MIT", "homepage": "http://laravelcollective.com", "support": { "issues": "https://github.com/LaravelCollective/remote/issues", "source": "https://github.com/LaravelCollective/remote" }, "authors": [ { "name": "Taylor Otwell", "email": "[email protected]" }, { "name": "Tom Shafer", "email": "[email protected]" } ], "require": { "php": ">=7.0.0", "illuminate/support": "5.5.*|5.6.*", "illuminate/filesystem": "5.5.*|5.6.*", "phpseclib/phpseclib": "^2.0" }, "require-dev": { "illuminate/console": "5.5.*", "mockery/mockery": "~0.9.4", "phpunit/phpunit": "~5.5" }, "extra": { "laravel": { "providers": [ "Collective\\Remote\\RemoteServiceProvider" ], "aliases": { "SSH": "Collective\\Remote\\RemoteFacade" } } }, "autoload": { "psr-4": { "Collective\\Remote\\": "src/" } }, "minimum-stability": "dev" }
Adjust dependencies for Laravel 5.6
Adjust dependencies for Laravel 5.6
JSON
mit
LaravelCollective/remote
json
## Code Before: { "name": "laravelcollective/remote", "description": "Remote for The Laravel Framework.", "license": "MIT", "homepage": "http://laravelcollective.com", "support": { "issues": "https://github.com/LaravelCollective/remote/issues", "source": "https://github.com/LaravelCollective/remote" }, "authors": [ { "name": "Taylor Otwell", "email": "[email protected]" }, { "name": "Tom Shafer", "email": "[email protected]" } ], "require": { "php": ">=7.0.0", "illuminate/support": "5.5.*", "illuminate/filesystem": "5.5.*", "phpseclib/phpseclib": "^2.0" }, "require-dev": { "illuminate/console": "5.5.*", "mockery/mockery": "~0.9.4", "phpunit/phpunit": "~5.5" }, "extra": { "laravel": { "providers": [ "Collective\\Remote\\RemoteServiceProvider" ], "aliases": { "SSH": "Collective\\Remote\\RemoteFacade" } } }, "autoload": { "psr-4": { "Collective\\Remote\\": "src/" } }, "minimum-stability": "dev" } ## Instruction: Adjust dependencies for Laravel 5.6 ## Code After: { "name": "laravelcollective/remote", "description": "Remote for The Laravel Framework.", "license": "MIT", "homepage": "http://laravelcollective.com", "support": { "issues": "https://github.com/LaravelCollective/remote/issues", "source": "https://github.com/LaravelCollective/remote" }, "authors": [ { "name": "Taylor Otwell", "email": "[email protected]" }, { "name": "Tom Shafer", "email": "[email protected]" } ], "require": { "php": ">=7.0.0", "illuminate/support": "5.5.*|5.6.*", "illuminate/filesystem": "5.5.*|5.6.*", "phpseclib/phpseclib": "^2.0" }, "require-dev": { "illuminate/console": "5.5.*", "mockery/mockery": "~0.9.4", "phpunit/phpunit": "~5.5" }, "extra": { "laravel": { "providers": [ "Collective\\Remote\\RemoteServiceProvider" ], "aliases": { "SSH": "Collective\\Remote\\RemoteFacade" } } }, "autoload": { "psr-4": { "Collective\\Remote\\": "src/" } }, "minimum-stability": "dev" }
6d60229e820c5069fa1477b91e12d1d7dea0a395
static/main-hall/components/adventure-list.component.ts
static/main-hall/components/adventure-list.component.ts
import {Component, OnInit} from '@angular/core'; import {Router, ActivatedRoute} from '@angular/router'; import {Player} from '../models/player'; import {AdventureService} from '../services/adventure.service'; import {StatusComponent} from "../components/status.component"; import {PlayerService} from "../services/player.service"; @Component({ template: ` <h4>Go on an adventure</h4> <p class="adventure" *ngFor="let adv of _adventureService.adventures"><a href="/adventure/{{adv.slug}}">{{adv.name}}</a></p> <button class="btn"><a (click)="gotoDetail()">Go back to Main Hall</a></button> `, directives: [StatusComponent] }) export class AdventureListComponent implements OnInit { constructor(private _router: Router, private _route: ActivatedRoute, private _adventureService: AdventureService, private _playerService: PlayerService) { } ngOnInit() { this._adventureService.getList(); let id = Number(this._route.snapshot.params['id']); this._playerService.getPlayer(id); } gotoDetail() { this._router.navigate(['/player', this._playerService.player.id]); } }
import {Component, OnInit} from '@angular/core'; import {Router, ActivatedRoute} from '@angular/router'; import {Player} from '../models/player'; import {AdventureService} from '../services/adventure.service'; import {StatusComponent} from "../components/status.component"; import {PlayerService} from "../services/player.service"; import {Adventure} from "../models/adventure"; @Component({ template: ` <h4>Go on an adventure</h4> <p class="adventure" *ngFor="let adv of _adventureService.adventures"><a (click)="gotoAdventure(adv)">{{adv.name}}</a></p> <button class="btn"><a (click)="gotoDetail()">Go back to Main Hall</a></button> `, directives: [StatusComponent] }) export class AdventureListComponent implements OnInit { constructor(private _router: Router, private _route: ActivatedRoute, private _adventureService: AdventureService, private _playerService: PlayerService) { } ngOnInit() { this._adventureService.getList(); let id = Number(this._route.snapshot.params['id']); this._playerService.getPlayer(id); } gotoAdventure(adv: Adventure) { this._playerService.update().subscribe( data => { window.location.href = '/adventure/' + adv.slug; } ); } gotoDetail() { this._router.navigate(['/player', this._playerService.player.id]); } }
Save player when leaving to go on an adventure
Save player when leaving to go on an adventure
TypeScript
mit
kdechant/eamon,kdechant/eamon,kdechant/eamon,kdechant/eamon
typescript
## Code Before: import {Component, OnInit} from '@angular/core'; import {Router, ActivatedRoute} from '@angular/router'; import {Player} from '../models/player'; import {AdventureService} from '../services/adventure.service'; import {StatusComponent} from "../components/status.component"; import {PlayerService} from "../services/player.service"; @Component({ template: ` <h4>Go on an adventure</h4> <p class="adventure" *ngFor="let adv of _adventureService.adventures"><a href="/adventure/{{adv.slug}}">{{adv.name}}</a></p> <button class="btn"><a (click)="gotoDetail()">Go back to Main Hall</a></button> `, directives: [StatusComponent] }) export class AdventureListComponent implements OnInit { constructor(private _router: Router, private _route: ActivatedRoute, private _adventureService: AdventureService, private _playerService: PlayerService) { } ngOnInit() { this._adventureService.getList(); let id = Number(this._route.snapshot.params['id']); this._playerService.getPlayer(id); } gotoDetail() { this._router.navigate(['/player', this._playerService.player.id]); } } ## Instruction: Save player when leaving to go on an adventure ## Code After: import {Component, OnInit} from '@angular/core'; import {Router, ActivatedRoute} from '@angular/router'; import {Player} from '../models/player'; import {AdventureService} from '../services/adventure.service'; import {StatusComponent} from "../components/status.component"; import {PlayerService} from "../services/player.service"; import {Adventure} from "../models/adventure"; @Component({ template: ` <h4>Go on an adventure</h4> <p class="adventure" *ngFor="let adv of _adventureService.adventures"><a (click)="gotoAdventure(adv)">{{adv.name}}</a></p> <button class="btn"><a (click)="gotoDetail()">Go back to Main Hall</a></button> `, directives: [StatusComponent] }) export class AdventureListComponent implements OnInit { constructor(private _router: Router, private _route: ActivatedRoute, private _adventureService: AdventureService, private _playerService: PlayerService) { } ngOnInit() { this._adventureService.getList(); let id = Number(this._route.snapshot.params['id']); this._playerService.getPlayer(id); } gotoAdventure(adv: Adventure) { this._playerService.update().subscribe( data => { window.location.href = '/adventure/' + adv.slug; } ); } gotoDetail() { this._router.navigate(['/player', this._playerService.player.id]); } }
71464335873116050336f4be16db035f4cd04aef
tests/src/Hodor/MessageQueue/QueueFactoryTest.php
tests/src/Hodor/MessageQueue/QueueFactoryTest.php
<?php namespace Hodor\MessageQueue; use Exception; use PHPUnit_Framework_TestCase; class QueueFactoryTest extends PHPUnit_Framework_TestCase { /** * @var array */ private $config; /** * @var QueueFactory */ private $queue_factory; public function setUp() { parent::setUp(); $config_path = __DIR__ . '/../../../../config/config.test.php'; if (!file_exists($config_path)) { throw new Exception("'{$config_path}' not found"); } $this->config = require $config_path; $this->queue_factory = new QueueFactory(); } public function testQueueCanBeGenerated() { $config_template = $this->config['test']['rabbitmq']; $config = [ 'host' => $config_template['host'], 'port' => $config_template['port'], 'username' => $config_template['username'], 'password' => $config_template['password'], 'queue_name' => $config_template['queue_prefix'] . uniqid(), ]; $this->assertInstanceOf( '\Hodor\MessageQueue\Queue', $this->queue_factory->getQueue($config) ); } }
<?php namespace Hodor\MessageQueue; use Exception; use PHPUnit_Framework_TestCase; class QueueFactoryTest extends PHPUnit_Framework_TestCase { /** * @var array */ private $config; /** * @var QueueFactory */ private $queue_factory; public function setUp() { parent::setUp(); $config_path = __DIR__ . '/../../../../config/config.test.php'; if (!file_exists($config_path)) { throw new Exception("'{$config_path}' not found"); } $this->config = require $config_path; $this->queue_factory = new QueueFactory(); } public function testQueueCanBeGenerated() { $config_template = $this->config['test']['rabbitmq']; $config = [ 'host' => $config_template['host'], 'port' => $config_template['port'], 'username' => $config_template['username'], 'password' => $config_template['password'], 'queue_name' => $config_template['queue_prefix'] . uniqid(), 'fetch_count' => 1, ]; $this->assertInstanceOf( '\Hodor\MessageQueue\Queue', $this->queue_factory->getQueue($config) ); } }
Fix warning caused by undefined index
Fix warning caused by undefined index
PHP
mit
lightster/hodor,lightster/hodor,Twenty7/hodor
php
## Code Before: <?php namespace Hodor\MessageQueue; use Exception; use PHPUnit_Framework_TestCase; class QueueFactoryTest extends PHPUnit_Framework_TestCase { /** * @var array */ private $config; /** * @var QueueFactory */ private $queue_factory; public function setUp() { parent::setUp(); $config_path = __DIR__ . '/../../../../config/config.test.php'; if (!file_exists($config_path)) { throw new Exception("'{$config_path}' not found"); } $this->config = require $config_path; $this->queue_factory = new QueueFactory(); } public function testQueueCanBeGenerated() { $config_template = $this->config['test']['rabbitmq']; $config = [ 'host' => $config_template['host'], 'port' => $config_template['port'], 'username' => $config_template['username'], 'password' => $config_template['password'], 'queue_name' => $config_template['queue_prefix'] . uniqid(), ]; $this->assertInstanceOf( '\Hodor\MessageQueue\Queue', $this->queue_factory->getQueue($config) ); } } ## Instruction: Fix warning caused by undefined index ## Code After: <?php namespace Hodor\MessageQueue; use Exception; use PHPUnit_Framework_TestCase; class QueueFactoryTest extends PHPUnit_Framework_TestCase { /** * @var array */ private $config; /** * @var QueueFactory */ private $queue_factory; public function setUp() { parent::setUp(); $config_path = __DIR__ . '/../../../../config/config.test.php'; if (!file_exists($config_path)) { throw new Exception("'{$config_path}' not found"); } $this->config = require $config_path; $this->queue_factory = new QueueFactory(); } public function testQueueCanBeGenerated() { $config_template = $this->config['test']['rabbitmq']; $config = [ 'host' => $config_template['host'], 'port' => $config_template['port'], 'username' => $config_template['username'], 'password' => $config_template['password'], 'queue_name' => $config_template['queue_prefix'] . uniqid(), 'fetch_count' => 1, ]; $this->assertInstanceOf( '\Hodor\MessageQueue\Queue', $this->queue_factory->getQueue($config) ); } }
580120eee723fe925ff8fdb88ee5ea63092e70a2
db/ignore_patterns/blogs.json
db/ignore_patterns/blogs.json
{ "_id": "ignore_patterns:blogs", "name": "blogs", "type": "ignore_patterns", "patterns": [ "%?replytocom=", "%?share=email", "%?share=linkedin", "%?share=twitter", "%?share=stumbleupon", "%?share=google-plus-1", "%?share=digg", "https://plus.google.com/share%?url=", "http://www.facebook.com/login.php", "https://ssl.reddit.com/login%?dest=", "http://www.reddit.com/login%?dest=", "http://www.reddit.com/submit%?url=", "http://digg.com/submit%?url=", "http://www.facebook.com/sharer.php%?", "http://www.facebook.com/sharer/sharer.php%?", "http://pixel.quantserve.com/pixel/", "'%%20%+%%20liker.profile_URL%%20%+%%20'", "'%%20%+%%20liker.avatar_URL%%20%+%%20'", "%%22%%20%+%%20$wrapper%.data%(", "http://.*%.blogspot%.com/search%?" ] }
{ "_id": "ignore_patterns:blogs", "name": "blogs", "type": "ignore_patterns", "patterns": [ "%?replytocom=", "%?share=email", "%?share=linkedin", "%?share=twitter", "%?share=stumbleupon", "%?share=google-plus-1", "%?share=digg", "%?showComment=", "^https://plus%.google%.com/share%?url=", "^http://www%.facebook%.com/login%.php", "^https://ssl%.reddit%.com/login%?dest=", "^http://www%.reddit%.com/login%?dest=", "^http://www%.reddit%.com/submit%?url=", "^http://digg%.com/submit%?url=", "^http://www%.facebook%.com/sharer%.php%?", "^http://www%.facebook%.com/sharer/sharer%.php%?", "^http://pixel%.quantserve%.com/pixel/", "'%%20%+%%20liker%.profile_URL%%20%+%%20'", "'%%20%+%%20liker%.avatar_URL%%20%+%%20'", "%%22%%20%+%%20$wrapper%.data%(", "^http://.+%.blogspot%.com/search%?", "^http://.+%.blogspot%.com/search/label/" ] }
Add showComment=; add /search/label/; fix . -> %.
Add showComment=; add /search/label/; fix . -> %.
JSON
mit
bright-sparks/grab-site,UncleStranger/grab-site,bright-sparks/grab-site,UncleStranger/grab-site
json
## Code Before: { "_id": "ignore_patterns:blogs", "name": "blogs", "type": "ignore_patterns", "patterns": [ "%?replytocom=", "%?share=email", "%?share=linkedin", "%?share=twitter", "%?share=stumbleupon", "%?share=google-plus-1", "%?share=digg", "https://plus.google.com/share%?url=", "http://www.facebook.com/login.php", "https://ssl.reddit.com/login%?dest=", "http://www.reddit.com/login%?dest=", "http://www.reddit.com/submit%?url=", "http://digg.com/submit%?url=", "http://www.facebook.com/sharer.php%?", "http://www.facebook.com/sharer/sharer.php%?", "http://pixel.quantserve.com/pixel/", "'%%20%+%%20liker.profile_URL%%20%+%%20'", "'%%20%+%%20liker.avatar_URL%%20%+%%20'", "%%22%%20%+%%20$wrapper%.data%(", "http://.*%.blogspot%.com/search%?" ] } ## Instruction: Add showComment=; add /search/label/; fix . -> %. ## Code After: { "_id": "ignore_patterns:blogs", "name": "blogs", "type": "ignore_patterns", "patterns": [ "%?replytocom=", "%?share=email", "%?share=linkedin", "%?share=twitter", "%?share=stumbleupon", "%?share=google-plus-1", "%?share=digg", "%?showComment=", "^https://plus%.google%.com/share%?url=", "^http://www%.facebook%.com/login%.php", "^https://ssl%.reddit%.com/login%?dest=", "^http://www%.reddit%.com/login%?dest=", "^http://www%.reddit%.com/submit%?url=", "^http://digg%.com/submit%?url=", "^http://www%.facebook%.com/sharer%.php%?", "^http://www%.facebook%.com/sharer/sharer%.php%?", "^http://pixel%.quantserve%.com/pixel/", "'%%20%+%%20liker%.profile_URL%%20%+%%20'", "'%%20%+%%20liker%.avatar_URL%%20%+%%20'", "%%22%%20%+%%20$wrapper%.data%(", "^http://.+%.blogspot%.com/search%?", "^http://.+%.blogspot%.com/search/label/" ] }
ab6468fc90598b25a009a2e362549bdfce1edcb6
README.md
README.md
`qtools` offers the shortcuts for some common procedures when working with the Open Grid Scheduler. ## Installation Install `qtools` using `gem`: $ gem install qtools ## Usage - `qqsub` to submit a script or a compiled executable - `qwatch` to see the running tasks for the current user - `qclean` to remove `.e[0-9]*` and `.o[0-9]*` files in the current directory ## Contributing Bug reports and pull requests are welcome on [GitHub](https://github.com/kerkomen/qtools). ## License The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
`qtools` offers the shortcuts for some common procedures when working with the Open Grid Scheduler. ## Installation Install `qtools` using `gem`: $ gem install qtools ## Usage - `qqsub` to submit a script or a compiled executable - `qwatch` to see the running tasks for the current user - `qclean` to remove `.e[0-9]*` and `.o[0-9]*` files in the current directory ### qqsub Usage: $ qqsub 'python3 my_script.py -i input.txt -v' -n my_name -m 8gb The command above will create a shell script file with the corresponding command and submit a job which will feature the name `my_name` and require `8gb` of memory. ### qwatch Usage: $ qwatch The command above is equivalent to running `watch -n1 -d "qstat -u $USER"`. ### qclean Usage: $ qclean The command above will run `rm *.[eo][0-9]*` in the current directory (if such files exist). ### qclean ## Contributing Bug reports and pull requests are welcome on [GitHub](https://github.com/kerkomen/qtools). ## License The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
Add information on commands to readme.md
Add information on commands to readme.md
Markdown
mit
kerkomen/qtools,kerkomen/qtools
markdown
## Code Before: `qtools` offers the shortcuts for some common procedures when working with the Open Grid Scheduler. ## Installation Install `qtools` using `gem`: $ gem install qtools ## Usage - `qqsub` to submit a script or a compiled executable - `qwatch` to see the running tasks for the current user - `qclean` to remove `.e[0-9]*` and `.o[0-9]*` files in the current directory ## Contributing Bug reports and pull requests are welcome on [GitHub](https://github.com/kerkomen/qtools). ## License The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT). ## Instruction: Add information on commands to readme.md ## Code After: `qtools` offers the shortcuts for some common procedures when working with the Open Grid Scheduler. ## Installation Install `qtools` using `gem`: $ gem install qtools ## Usage - `qqsub` to submit a script or a compiled executable - `qwatch` to see the running tasks for the current user - `qclean` to remove `.e[0-9]*` and `.o[0-9]*` files in the current directory ### qqsub Usage: $ qqsub 'python3 my_script.py -i input.txt -v' -n my_name -m 8gb The command above will create a shell script file with the corresponding command and submit a job which will feature the name `my_name` and require `8gb` of memory. ### qwatch Usage: $ qwatch The command above is equivalent to running `watch -n1 -d "qstat -u $USER"`. ### qclean Usage: $ qclean The command above will run `rm *.[eo][0-9]*` in the current directory (if such files exist). ### qclean ## Contributing Bug reports and pull requests are welcome on [GitHub](https://github.com/kerkomen/qtools). ## License The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
150741269e8cc655ad7041faa1cf825fbf5a4515
WebComponentsMonkeyPatch.js
WebComponentsMonkeyPatch.js
/** * Evidently superinspired by Chris Wilson's AudioContext-MonkeyPatch library, * and just patching webkitCreateShadowRoot to createShadowRoot */ (function() { if( HTMLElement.prototype.webkitCreateShadowRoot !== undefined && HTMLElement.prototype.createShadowRoot === undefined ) { HTMLElement.prototype.createShadowRoot = HTMLElement.prototype.webkitCreateShadowRoot; } })(); (function() { if('register' in document || 'registerElement' in document){ document.register = document.registerElement = document.register || document.register; } })();
/** * Evidently superinspired by Chris Wilson's AudioContext-MonkeyPatch library, */ (function() { // Unprefixed createShadowRoot if( HTMLElement.prototype.webkitCreateShadowRoot !== undefined && HTMLElement.prototype.createShadowRoot === undefined ) { HTMLElement.prototype.createShadowRoot = HTMLElement.prototype.webkitCreateShadowRoot; } // Alias document.register to document.registerElement if('register' in document || 'registerElement' in document){ document.register = document.registerElement = document.register || document.register; } })();
Use only one function call
Use only one function call
JavaScript
apache-2.0
sole/WebComponentsMonkeyPatch
javascript
## Code Before: /** * Evidently superinspired by Chris Wilson's AudioContext-MonkeyPatch library, * and just patching webkitCreateShadowRoot to createShadowRoot */ (function() { if( HTMLElement.prototype.webkitCreateShadowRoot !== undefined && HTMLElement.prototype.createShadowRoot === undefined ) { HTMLElement.prototype.createShadowRoot = HTMLElement.prototype.webkitCreateShadowRoot; } })(); (function() { if('register' in document || 'registerElement' in document){ document.register = document.registerElement = document.register || document.register; } })(); ## Instruction: Use only one function call ## Code After: /** * Evidently superinspired by Chris Wilson's AudioContext-MonkeyPatch library, */ (function() { // Unprefixed createShadowRoot if( HTMLElement.prototype.webkitCreateShadowRoot !== undefined && HTMLElement.prototype.createShadowRoot === undefined ) { HTMLElement.prototype.createShadowRoot = HTMLElement.prototype.webkitCreateShadowRoot; } // Alias document.register to document.registerElement if('register' in document || 'registerElement' in document){ document.register = document.registerElement = document.register || document.register; } })();
dc2bfd8aaee1cd4d66ec17f9cc4707af7e843ae3
_sass/_base.scss
_sass/_base.scss
// Basic reset html, body, div, main, header, nav, footer, section, article, p, pre, h1, h2 { padding: 0; margin: 0; display: block; } * { box-sizing: border-box; } html { color: white; background-color: #222; line-height: 1.5; font-size: 1.1rem; font-family: "Helvetica Neue", "Helvetica", "Roboto", "Arial", sans-serif; } html.light { color: #111; background-color: #eee; } body { min-height: 100vh; display: -webkit-flex; display: -moz-flex; display: -ms-flex; display: -o-flex; display: flex; flex-direction: column; justify-content: flex-start; align-items: stretch; } a { color: #82A7DB; text-decoration: none; } code:not([class|=language]) { display: inline-block; padding: 0.05rem 0.3rem; border-radius: 4px; font-family: monospace; background-color: #454545; html.light & { background-color: #ddd; } }
// Basic reset html, body, div, main, header, nav, footer, section, article, p, pre, h1, h2 { padding: 0; margin: 0; display: block; } * { box-sizing: border-box; } html { color: white; background-color: #222; line-height: 1.5; font-size: 1.1rem; font-family: "Helvetica Neue", "Helvetica", "Roboto", "Arial", sans-serif; } html.light { color: #111; background-color: #eee; } body { min-height: 100vh; display: -webkit-flex; display: -moz-flex; display: -ms-flex; display: -o-flex; display: flex; flex-direction: column; justify-content: flex-start; align-items: stretch; } a { color: #82A7DB; text-decoration: none; html.light & { color: #3264ac; } } code:not([class|=language]) { display: inline-block; padding: 0.05rem 0.3rem; border-radius: 4px; font-family: monospace; background-color: #454545; html.light & { background-color: #ddd; } }
Fix link colors on light theme
Fix link colors on light theme
SCSS
mit
korobi/weblog,korobi/weblog
scss
## Code Before: // Basic reset html, body, div, main, header, nav, footer, section, article, p, pre, h1, h2 { padding: 0; margin: 0; display: block; } * { box-sizing: border-box; } html { color: white; background-color: #222; line-height: 1.5; font-size: 1.1rem; font-family: "Helvetica Neue", "Helvetica", "Roboto", "Arial", sans-serif; } html.light { color: #111; background-color: #eee; } body { min-height: 100vh; display: -webkit-flex; display: -moz-flex; display: -ms-flex; display: -o-flex; display: flex; flex-direction: column; justify-content: flex-start; align-items: stretch; } a { color: #82A7DB; text-decoration: none; } code:not([class|=language]) { display: inline-block; padding: 0.05rem 0.3rem; border-radius: 4px; font-family: monospace; background-color: #454545; html.light & { background-color: #ddd; } } ## Instruction: Fix link colors on light theme ## Code After: // Basic reset html, body, div, main, header, nav, footer, section, article, p, pre, h1, h2 { padding: 0; margin: 0; display: block; } * { box-sizing: border-box; } html { color: white; background-color: #222; line-height: 1.5; font-size: 1.1rem; font-family: "Helvetica Neue", "Helvetica", "Roboto", "Arial", sans-serif; } html.light { color: #111; background-color: #eee; } body { min-height: 100vh; display: -webkit-flex; display: -moz-flex; display: -ms-flex; display: -o-flex; display: flex; flex-direction: column; justify-content: flex-start; align-items: stretch; } a { color: #82A7DB; text-decoration: none; html.light & { color: #3264ac; } } code:not([class|=language]) { display: inline-block; padding: 0.05rem 0.3rem; border-radius: 4px; font-family: monospace; background-color: #454545; html.light & { background-color: #ddd; } }
a286112c22cccf474183f67aa457fdf595016b95
gulpfile.babel.js
gulpfile.babel.js
import gulp from 'gulp' import git from 'gulp-git' import bump from 'gulp-bump' import tagVersion from 'gulp-tag-version' ;['major', 'minor', 'patch'].forEach((type) => { gulp.task(`bump:${type}`, () => gulp.src('./package.json') .pipe(bump({ type })) .pipe(gulp.dest('./')) .pipe(git.commit('bumps version')) .pipe(tagVersion()) ) }) gulp.task('bump', ['bump:patch'])
import gulp from 'gulp' import git from 'gulp-git' import bump from 'gulp-bump' import tagVersion from 'gulp-tag-version' import babel from 'gulp-babel' ;['major', 'minor', 'patch'].forEach((type) => { gulp.task(`bump:${type}`, ['build'], () => gulp.src('./package.json') .pipe(bump({ type })) .pipe(gulp.dest('./')) .pipe(git.commit('bumps version')) .pipe(tagVersion()) ) }) gulp.task('bump', ['bump:patch']) gulp.task('build', ['build:babel']) gulp.task('build:babel', () => gulp.src('src/*.js') .pipe(babel()) .pipe(gulp.dest('lib')) )
Add build script to gulp script
Add build script to gulp script
JavaScript
mit
timnew/sa-debug-viewer
javascript
## Code Before: import gulp from 'gulp' import git from 'gulp-git' import bump from 'gulp-bump' import tagVersion from 'gulp-tag-version' ;['major', 'minor', 'patch'].forEach((type) => { gulp.task(`bump:${type}`, () => gulp.src('./package.json') .pipe(bump({ type })) .pipe(gulp.dest('./')) .pipe(git.commit('bumps version')) .pipe(tagVersion()) ) }) gulp.task('bump', ['bump:patch']) ## Instruction: Add build script to gulp script ## Code After: import gulp from 'gulp' import git from 'gulp-git' import bump from 'gulp-bump' import tagVersion from 'gulp-tag-version' import babel from 'gulp-babel' ;['major', 'minor', 'patch'].forEach((type) => { gulp.task(`bump:${type}`, ['build'], () => gulp.src('./package.json') .pipe(bump({ type })) .pipe(gulp.dest('./')) .pipe(git.commit('bumps version')) .pipe(tagVersion()) ) }) gulp.task('bump', ['bump:patch']) gulp.task('build', ['build:babel']) gulp.task('build:babel', () => gulp.src('src/*.js') .pipe(babel()) .pipe(gulp.dest('lib')) )
2ef578aada73767ad7f44f4b8a50d9768d8c46d2
spec/shard_monitor/config_spec.rb
spec/shard_monitor/config_spec.rb
require 'spec_helper' require 'shard_monitor/config' RSpec.describe ShardMonitor::Config do subject { ShardMonitor::Config.new } let(:argv) { %w(--redis redis://blah.com/5) } before do subject.parse_options argv end it 'takes command line arguments' do expect(subject.redis).to eq('redis://blah.com/5') end end
require 'spec_helper' require 'shard_monitor/config' RSpec.describe ShardMonitor::Config do subject { ShardMonitor::Config.new } let(:argv) { %w(--redis redis://blah.com/5 --table thingy) } before do subject.parse_options argv end it 'takes command line arguments' do expect(subject.redis).to eq('redis://blah.com/5') expect(subject.table_name).to eq('thingy') end end
Fix config spec for table name
Fix config spec for table name
Ruby
mit
wanelo/sequel-schema-sharding-minotaur,wanelo/sequel-schema-sharding-minotaur
ruby
## Code Before: require 'spec_helper' require 'shard_monitor/config' RSpec.describe ShardMonitor::Config do subject { ShardMonitor::Config.new } let(:argv) { %w(--redis redis://blah.com/5) } before do subject.parse_options argv end it 'takes command line arguments' do expect(subject.redis).to eq('redis://blah.com/5') end end ## Instruction: Fix config spec for table name ## Code After: require 'spec_helper' require 'shard_monitor/config' RSpec.describe ShardMonitor::Config do subject { ShardMonitor::Config.new } let(:argv) { %w(--redis redis://blah.com/5 --table thingy) } before do subject.parse_options argv end it 'takes command line arguments' do expect(subject.redis).to eq('redis://blah.com/5') expect(subject.table_name).to eq('thingy') end end
77deaef7c475de0fcc71294fd8724742ed74d188
README.md
README.md
[![Build Status](https://travis-ci.org/weblogng/angular-weblogng.svg?branch=master)](https://travis-ci.org/weblogng/angular-weblogng) # angular-weblogng AngularJS module for the WeblogNG client library. ## About See the [project homepage](http://weblogng.github.io/angular-weblogng). ## Installation Using Bower: bower install angular-weblogng Or grab the [source](https://github.com/weblogng/angular-weblogng/dist/angular-weblogng.js) ([minified](https://github.com/weblogng/angular-weblogng/dist/angular-weblogng.min.js)). ## Documentation Start with `docs/MAIN.md`. ## Contributing We'll check out your contribution if you: * Provide a comprehensive suite of tests for your fork. * Have a clear and documented rationale for your changes. * Package these up in a pull request. We'll do our best to help you out with any contribution issues you may have. ## License MIT. See `LICENSE.txt` in this directory.
[![Build Status](https://travis-ci.org/weblogng/angular-weblogng.svg?branch=master)](https://travis-ci.org/weblogng/angular-weblogng) # angular-weblogng AngularJS module for the WeblogNG client library. ## About See the [project homepage](http://weblogng.github.io/angular-weblogng). ## Installation Using Bower: bower install angular-weblogng Or grab the [source](https://github.com/weblogng/angular-weblogng/blob/master/dist/angular-weblogng.js) ([minified](https://github.com/weblogng/angular-weblogng/blob/master/dist/angular-weblogng.min.js)). ## Documentation Start with `docs/MAIN.md`. ## Contributing We'll check out your contribution if you: * Provide a comprehensive suite of tests for your fork. * Have a clear and documented rationale for your changes. * Package these up in a pull request. We'll do our best to help you out with any contribution issues you may have. ## License MIT. See `LICENSE.txt` in this directory.
Update urls to release builds.
Update urls to release builds.
Markdown
mit
weblogng/angular-weblogng
markdown
## Code Before: [![Build Status](https://travis-ci.org/weblogng/angular-weblogng.svg?branch=master)](https://travis-ci.org/weblogng/angular-weblogng) # angular-weblogng AngularJS module for the WeblogNG client library. ## About See the [project homepage](http://weblogng.github.io/angular-weblogng). ## Installation Using Bower: bower install angular-weblogng Or grab the [source](https://github.com/weblogng/angular-weblogng/dist/angular-weblogng.js) ([minified](https://github.com/weblogng/angular-weblogng/dist/angular-weblogng.min.js)). ## Documentation Start with `docs/MAIN.md`. ## Contributing We'll check out your contribution if you: * Provide a comprehensive suite of tests for your fork. * Have a clear and documented rationale for your changes. * Package these up in a pull request. We'll do our best to help you out with any contribution issues you may have. ## License MIT. See `LICENSE.txt` in this directory. ## Instruction: Update urls to release builds. ## Code After: [![Build Status](https://travis-ci.org/weblogng/angular-weblogng.svg?branch=master)](https://travis-ci.org/weblogng/angular-weblogng) # angular-weblogng AngularJS module for the WeblogNG client library. ## About See the [project homepage](http://weblogng.github.io/angular-weblogng). ## Installation Using Bower: bower install angular-weblogng Or grab the [source](https://github.com/weblogng/angular-weblogng/blob/master/dist/angular-weblogng.js) ([minified](https://github.com/weblogng/angular-weblogng/blob/master/dist/angular-weblogng.min.js)). ## Documentation Start with `docs/MAIN.md`. ## Contributing We'll check out your contribution if you: * Provide a comprehensive suite of tests for your fork. * Have a clear and documented rationale for your changes. * Package these up in a pull request. We'll do our best to help you out with any contribution issues you may have. ## License MIT. See `LICENSE.txt` in this directory.
5a8c25f81481acb82ce5d8c034b39c473a9964cd
data/transition-sites/co_pgc.yml
data/transition-sites/co_pgc.yml
--- site: co_pgc whitehall_slug: cabinet-office homepage_title: 'Payroll Giving Centre' homepage: https://www.gov.uk/government/organisations/cabinet-office tna_timestamp: 20121015131350 host: www.payrollgivingcentre.com aliases: - payrollgivingcentre.com extra_organisation_slugs: - hm-revenue-customs
--- site: co_pgc whitehall_slug: cabinet-office homepage_title: 'Payroll Giving Centre' homepage: https://www.gov.uk/government/organisations/cabinet-office tna_timestamp: 20121015131350 host: www.payrollgivingcentre.com aliases: - payrollgivingcentre.com extra_organisation_slugs: - hm-revenue-customs global: =301 https://www.gov.uk/payroll-giving
Make payrollgivingcentre.com a global redirect
Make payrollgivingcentre.com a global redirect This site was configured last year and has a few mappings, but hasn't transitioned yet. We now want it to be a global redirect.
YAML
mit
alphagov/transition-config,alphagov/transition-config
yaml
## Code Before: --- site: co_pgc whitehall_slug: cabinet-office homepage_title: 'Payroll Giving Centre' homepage: https://www.gov.uk/government/organisations/cabinet-office tna_timestamp: 20121015131350 host: www.payrollgivingcentre.com aliases: - payrollgivingcentre.com extra_organisation_slugs: - hm-revenue-customs ## Instruction: Make payrollgivingcentre.com a global redirect This site was configured last year and has a few mappings, but hasn't transitioned yet. We now want it to be a global redirect. ## Code After: --- site: co_pgc whitehall_slug: cabinet-office homepage_title: 'Payroll Giving Centre' homepage: https://www.gov.uk/government/organisations/cabinet-office tna_timestamp: 20121015131350 host: www.payrollgivingcentre.com aliases: - payrollgivingcentre.com extra_organisation_slugs: - hm-revenue-customs global: =301 https://www.gov.uk/payroll-giving
0586fcf8beb3f3e46113b6537c8ae8d69ee47b23
ci_environment/python/recipes/pip.rb
ci_environment/python/recipes/pip.rb
remote_file "#{Chef::Config[:file_cache_path]}/ez_setup.py" do source "https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py" mode "0644" not_if "which pip" end bash "install-pip" do cwd Chef::Config[:file_cache_path] code <<-EOF python ez_setup.py easy_install pip EOF not_if "which pip" end
remote_file "#{Chef::Config[:file_cache_path]}/ez_setup.py" do source 'https://bootstrap.pypa.io/ez_setup.py' mode "0644" not_if "which pip" end bash "install-pip" do cwd Chef::Config[:file_cache_path] code <<-EOF python ez_setup.py easy_install pip EOF not_if "which pip" end
Update download URL for ez_setup.py
Update download URL for ez_setup.py
Ruby
mit
dracos/travis-cookbooks,dracos/travis-cookbooks,dracos/travis-cookbooks,dracos/travis-cookbooks
ruby
## Code Before: remote_file "#{Chef::Config[:file_cache_path]}/ez_setup.py" do source "https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py" mode "0644" not_if "which pip" end bash "install-pip" do cwd Chef::Config[:file_cache_path] code <<-EOF python ez_setup.py easy_install pip EOF not_if "which pip" end ## Instruction: Update download URL for ez_setup.py ## Code After: remote_file "#{Chef::Config[:file_cache_path]}/ez_setup.py" do source 'https://bootstrap.pypa.io/ez_setup.py' mode "0644" not_if "which pip" end bash "install-pip" do cwd Chef::Config[:file_cache_path] code <<-EOF python ez_setup.py easy_install pip EOF not_if "which pip" end
79241c8d2691d296332cb86938742ad6c8d07186
hieradata/vagrant/modules/profile.yaml
hieradata/vagrant/modules/profile.yaml
--- profile::development::network::dns::manage_hosts: true profile::application::openssl::catrust::ca_cert: '/opt/himlar/provision/ca/intermediate/certs/ca-chain.cert.pem' profile::application::himlarcli::cacert: '/opt/himlar/provision/ca/intermediate/certs/ca-chain.cert.pem' profile::application::himlarcli::smtp: '' profile::application::himlarcli::from_addr: '' profile::application::himlarcli::mq_host: "%{hiera('mgmt__address__mq_01')}" profile::openstack::openrc::cacert: '/opt/himlar/provision/ca/intermediate/certs/ca-chain.cert.pem' # Use newest test repositories yum_base_mirror: 'https://download.iaas.uio.no/uh-iaas/test' #sensu_ssl_cachain: '-C /opt/himlar/provision/ca/intermediate/certs/ca-chain.cert.pem' sensu_ssl_cachain: '-k' # no proxy for vagrant environments profile::network::yum_proxy::yum_proxy: '' profile::openstack::identity::swift_enabled: true
--- profile::logging::rsyslog::client::manage_rsyslog: false profile::development::network::dns::manage_hosts: true profile::application::openssl::catrust::ca_cert: '/opt/himlar/provision/ca/intermediate/certs/ca-chain.cert.pem' profile::application::himlarcli::cacert: '/opt/himlar/provision/ca/intermediate/certs/ca-chain.cert.pem' profile::application::himlarcli::smtp: '' profile::application::himlarcli::from_addr: '' profile::application::himlarcli::mq_host: "%{hiera('mgmt__address__mq_01')}" profile::openstack::openrc::cacert: '/opt/himlar/provision/ca/intermediate/certs/ca-chain.cert.pem' # Use newest test repositories yum_base_mirror: 'https://download.iaas.uio.no/uh-iaas/test' #sensu_ssl_cachain: '-C /opt/himlar/provision/ca/intermediate/certs/ca-chain.cert.pem' sensu_ssl_cachain: '-k' # no proxy for vagrant environments profile::network::yum_proxy::yum_proxy: '' profile::openstack::identity::swift_enabled: true
Disable sending logs to logger in vagrant
Disable sending logs to logger in vagrant
YAML
apache-2.0
norcams/himlar,tanzr/himlar,tanzr/himlar,raykrist/himlar,norcams/himlar,tanzr/himlar,raykrist/himlar,TorLdre/himlar,tanzr/himlar,norcams/himlar,TorLdre/himlar,raykrist/himlar,raykrist/himlar,mikaeld66/himlar,TorLdre/himlar,mikaeld66/himlar,tanzr/himlar,norcams/himlar,mikaeld66/himlar,norcams/himlar,TorLdre/himlar,mikaeld66/himlar,mikaeld66/himlar,TorLdre/himlar,raykrist/himlar
yaml
## Code Before: --- profile::development::network::dns::manage_hosts: true profile::application::openssl::catrust::ca_cert: '/opt/himlar/provision/ca/intermediate/certs/ca-chain.cert.pem' profile::application::himlarcli::cacert: '/opt/himlar/provision/ca/intermediate/certs/ca-chain.cert.pem' profile::application::himlarcli::smtp: '' profile::application::himlarcli::from_addr: '' profile::application::himlarcli::mq_host: "%{hiera('mgmt__address__mq_01')}" profile::openstack::openrc::cacert: '/opt/himlar/provision/ca/intermediate/certs/ca-chain.cert.pem' # Use newest test repositories yum_base_mirror: 'https://download.iaas.uio.no/uh-iaas/test' #sensu_ssl_cachain: '-C /opt/himlar/provision/ca/intermediate/certs/ca-chain.cert.pem' sensu_ssl_cachain: '-k' # no proxy for vagrant environments profile::network::yum_proxy::yum_proxy: '' profile::openstack::identity::swift_enabled: true ## Instruction: Disable sending logs to logger in vagrant ## Code After: --- profile::logging::rsyslog::client::manage_rsyslog: false profile::development::network::dns::manage_hosts: true profile::application::openssl::catrust::ca_cert: '/opt/himlar/provision/ca/intermediate/certs/ca-chain.cert.pem' profile::application::himlarcli::cacert: '/opt/himlar/provision/ca/intermediate/certs/ca-chain.cert.pem' profile::application::himlarcli::smtp: '' profile::application::himlarcli::from_addr: '' profile::application::himlarcli::mq_host: "%{hiera('mgmt__address__mq_01')}" profile::openstack::openrc::cacert: '/opt/himlar/provision/ca/intermediate/certs/ca-chain.cert.pem' # Use newest test repositories yum_base_mirror: 'https://download.iaas.uio.no/uh-iaas/test' #sensu_ssl_cachain: '-C /opt/himlar/provision/ca/intermediate/certs/ca-chain.cert.pem' sensu_ssl_cachain: '-k' # no proxy for vagrant environments profile::network::yum_proxy::yum_proxy: '' profile::openstack::identity::swift_enabled: true
c71250213317338e99a8d4a38342f30d4b3053a8
README.md
README.md
practicalmayapython =================== Source code repository for the "Practical Maya Programming with Python" book. You can get an eBook version of the book FREE! Just email me at the email below. Or you can purchase/learn more at: - https://www.amazon.com/Practical-Programming-Python-Robert-Galanakis/dp/1849694729 - http://shop.oreilly.com/product/9781849694728.do - https://www.packtpub.com/hardware-and-creative/practical-maya-programming-python - https://www.goodreads.com/book/show/22863108-practical-maya-programming-with-python - https://books.google.com/books/about/Practical_Maya_Programming_with_Python.html Author Information === Name: Rob Galanakis Email: [email protected] Website: https://robg3d.com (personal) and https://lithic.tech (business)
practicalmayapython =================== Source code repository for the "Practical Maya Programming with Python" book. You can get an eBook version of the book FREE! Just email me at the email below. Or you can purchase/learn more at: - https://www.amazon.com/Practical-Programming-Python-Robert-Galanakis/dp/1849694729 - http://shop.oreilly.com/product/9781849694728.do - https://www.packtpub.com/hardware-and-creative/practical-maya-programming-python - https://www.goodreads.com/book/show/22863108-practical-maya-programming-with-python - https://books.google.com/books/about/Practical_Maya_Programming_with_Python.html?id=ESAZBAAAQBAJ Author Information === Name: Rob Galanakis Email: [email protected] Website: https://robg3d.com (personal) and https://lithic.tech (business)
Fix google link in readme
Fix google link in readme
Markdown
mit
rgalanakis/practicalmayapython,rgalanakis/practicalmayapython
markdown
## Code Before: practicalmayapython =================== Source code repository for the "Practical Maya Programming with Python" book. You can get an eBook version of the book FREE! Just email me at the email below. Or you can purchase/learn more at: - https://www.amazon.com/Practical-Programming-Python-Robert-Galanakis/dp/1849694729 - http://shop.oreilly.com/product/9781849694728.do - https://www.packtpub.com/hardware-and-creative/practical-maya-programming-python - https://www.goodreads.com/book/show/22863108-practical-maya-programming-with-python - https://books.google.com/books/about/Practical_Maya_Programming_with_Python.html Author Information === Name: Rob Galanakis Email: [email protected] Website: https://robg3d.com (personal) and https://lithic.tech (business) ## Instruction: Fix google link in readme ## Code After: practicalmayapython =================== Source code repository for the "Practical Maya Programming with Python" book. You can get an eBook version of the book FREE! Just email me at the email below. Or you can purchase/learn more at: - https://www.amazon.com/Practical-Programming-Python-Robert-Galanakis/dp/1849694729 - http://shop.oreilly.com/product/9781849694728.do - https://www.packtpub.com/hardware-and-creative/practical-maya-programming-python - https://www.goodreads.com/book/show/22863108-practical-maya-programming-with-python - https://books.google.com/books/about/Practical_Maya_Programming_with_Python.html?id=ESAZBAAAQBAJ Author Information === Name: Rob Galanakis Email: [email protected] Website: https://robg3d.com (personal) and https://lithic.tech (business)
5059649ac07f27b4efdd2dfe8590ee575be5fdf6
package.json
package.json
{ "name": "emailjs", "description": "send text/html emails and attachments (files, streams and strings) from node.js to any smtp server", "version": "0.2.9", "author": "eleith", "contributors":["izuzak", "Hiverness", "mscdex"], "repository": { "type": "git", "url": "http://github.com/eleith/emailjs.git" }, "devDependencies": { "mocha": ">= 1.0.3", "chai": ">= 1.0.3", "simplesmtp" : ">= 0.1.18", "mailparser" : ">= 0.2.26" }, "dependencies": { "buffertools" : ">= 1.0.8" }, "engine": ["node >= 0.6.15"], "main": "email", "scripts": { "test": "mocha -R spec -t 5000 test/*.js" } }
{ "name": "emailjs", "description": "send text/html emails and attachments (files, streams and strings) from node.js to any smtp server", "version": "0.2.9", "author": "eleith", "contributors":["izuzak", "Hiverness", "mscdex"], "repository": { "type": "git", "url": "http://github.com/eleith/emailjs.git" }, "devDependencies": { "mocha": ">= 1.0.3", "chai": ">= 1.0.3", "simplesmtp" : ">= 0.1.18", "mailparser" : ">= 0.2.26" }, "dependencies": { "buffertools" : ">= 1.0.8" }, "engine": ["node >= 0.6.15"], "main": "email", "scripts": { "test": "mocha -R spec -t 5000" } }
Fix test command line on Windows.
Fix test command line on Windows. Globs don't work great there, and test/*.js is the default pattern anyway.
JSON
mit
jniles/emailjs,lvnhmd/emailjs,eleith/emailjs,imclab/emailjs,eleith/emailjs,jniles/emailjs,eleith/emailjs,lvnhmd/emailjs,imclab/emailjs
json
## Code Before: { "name": "emailjs", "description": "send text/html emails and attachments (files, streams and strings) from node.js to any smtp server", "version": "0.2.9", "author": "eleith", "contributors":["izuzak", "Hiverness", "mscdex"], "repository": { "type": "git", "url": "http://github.com/eleith/emailjs.git" }, "devDependencies": { "mocha": ">= 1.0.3", "chai": ">= 1.0.3", "simplesmtp" : ">= 0.1.18", "mailparser" : ">= 0.2.26" }, "dependencies": { "buffertools" : ">= 1.0.8" }, "engine": ["node >= 0.6.15"], "main": "email", "scripts": { "test": "mocha -R spec -t 5000 test/*.js" } } ## Instruction: Fix test command line on Windows. Globs don't work great there, and test/*.js is the default pattern anyway. ## Code After: { "name": "emailjs", "description": "send text/html emails and attachments (files, streams and strings) from node.js to any smtp server", "version": "0.2.9", "author": "eleith", "contributors":["izuzak", "Hiverness", "mscdex"], "repository": { "type": "git", "url": "http://github.com/eleith/emailjs.git" }, "devDependencies": { "mocha": ">= 1.0.3", "chai": ">= 1.0.3", "simplesmtp" : ">= 0.1.18", "mailparser" : ">= 0.2.26" }, "dependencies": { "buffertools" : ">= 1.0.8" }, "engine": ["node >= 0.6.15"], "main": "email", "scripts": { "test": "mocha -R spec -t 5000" } }
3df8a507d11831c60cf0bef33d6e0872ef167117
resources/public/common/dataSource.js
resources/public/common/dataSource.js
var dataSource = function () { var module = {}; module.load = function (url, callback) { d3.json(url, function (_, data) { callback(data); }); }; module.loadCSV = function (url, callback) { d3.csv(url, function (_, data) { callback(data); }); }; return module; }();
var dataSource = function () { var module = {}; module.load = function (url, callback) { d3.json(url, function (error, data) { if (error) return console.warn(error); callback(data); }); }; module.loadCSV = function (url, callback) { d3.csv(url, function (error, data) { if (error) return console.warn(error); callback(data); }); }; return module; }();
Handle ajax errors, don't show 'no content'
Handle ajax errors, don't show 'no content'
JavaScript
bsd-2-clause
cburgmer/buildviz,cburgmer/buildviz,cburgmer/buildviz
javascript
## Code Before: var dataSource = function () { var module = {}; module.load = function (url, callback) { d3.json(url, function (_, data) { callback(data); }); }; module.loadCSV = function (url, callback) { d3.csv(url, function (_, data) { callback(data); }); }; return module; }(); ## Instruction: Handle ajax errors, don't show 'no content' ## Code After: var dataSource = function () { var module = {}; module.load = function (url, callback) { d3.json(url, function (error, data) { if (error) return console.warn(error); callback(data); }); }; module.loadCSV = function (url, callback) { d3.csv(url, function (error, data) { if (error) return console.warn(error); callback(data); }); }; return module; }();
a0a54533c320aa6698896e6b181e8368c1c82c01
examples/baas-minikube-setup/create-minikube-namespace.sh
examples/baas-minikube-setup/create-minikube-namespace.sh
set -o errexit set -eo pipefail set -o nounset #set -o xtrace RED='\033[0;31m' NC='\033[0m' # No Color echo -e "Creating minikube cluster locally ${RED}(takes up to 10 minutes)${NC}" minikube delete || echo "Ignoring delete for non existed minikube cluster" minikube --vm-driver virtualbox --memory 8192 --cpus 4 start --insecure-registry=registry-all.docker.ing.net hostIp=$(minikube ssh "route -n | grep ^0.0.0.0 | awk '{ print \$2 }'") #Removes last \r symbol hostIp=${hostIp%?} dockerVars="--insecure-registry=registry-all.docker.ing.net --docker-env http_proxy=${hostIp}:3128 --docker-env https_proxy=${hostIp}:3128" minikube stop minikube --vm-driver virtualbox --memory 8192 --cpus 4 start --insecure-registry=registry-all.docker.ing.net ${dockerVars} kubectl api-resources
set -o errexit set -eo pipefail set -o nounset #set -o xtrace RED='\033[0;31m' NC='\033[0m' # No Color echo -e "Creating minikube cluster locally ${RED}(takes up to 10 minutes)${NC}" minikube delete || echo "Ignoring delete for non existed minikube cluster" minikube --vm-driver virtualbox --memory 8192 --cpus 4 start kubectl api-resources
Remove corporate proxy specific steps from namespace creation.
Remove corporate proxy specific steps from namespace creation.
Shell
mit
ing-bank/baker,ing-bank/baker,ing-bank/baker,ing-bank/baker,ing-bank/baker
shell
## Code Before: set -o errexit set -eo pipefail set -o nounset #set -o xtrace RED='\033[0;31m' NC='\033[0m' # No Color echo -e "Creating minikube cluster locally ${RED}(takes up to 10 minutes)${NC}" minikube delete || echo "Ignoring delete for non existed minikube cluster" minikube --vm-driver virtualbox --memory 8192 --cpus 4 start --insecure-registry=registry-all.docker.ing.net hostIp=$(minikube ssh "route -n | grep ^0.0.0.0 | awk '{ print \$2 }'") #Removes last \r symbol hostIp=${hostIp%?} dockerVars="--insecure-registry=registry-all.docker.ing.net --docker-env http_proxy=${hostIp}:3128 --docker-env https_proxy=${hostIp}:3128" minikube stop minikube --vm-driver virtualbox --memory 8192 --cpus 4 start --insecure-registry=registry-all.docker.ing.net ${dockerVars} kubectl api-resources ## Instruction: Remove corporate proxy specific steps from namespace creation. ## Code After: set -o errexit set -eo pipefail set -o nounset #set -o xtrace RED='\033[0;31m' NC='\033[0m' # No Color echo -e "Creating minikube cluster locally ${RED}(takes up to 10 minutes)${NC}" minikube delete || echo "Ignoring delete for non existed minikube cluster" minikube --vm-driver virtualbox --memory 8192 --cpus 4 start kubectl api-resources
b189837f511396c1f901fe5b2d186a5f363888ed
app/src/base/navigation_controller.coffee
app/src/base/navigation_controller.coffee
class @NavigationController extends @ViewController viewControllers: [] childViewControllerContentId: 'navigation_controller_content' push: (viewController) -> if @topViewController()? @topViewController().onDetach() @topViewController().parentViewController = undefined @viewControllers.push viewController viewController.parentViewController = @ viewController.onAttach() do @renderChild @emit 'push', {sender: @, viewController: viewController} pop: -> viewController = @viewControllers.pop() viewController.onDetach() viewController.parentViewController = undefined if @topViewController()? @topViewController().parentViewController = @ @topViewController().onAttach() do @renderChild @emit 'pop', {sender: @, viewController: viewController} viewController topViewController: -> @viewControllers[@viewControllers.length - 1] render: (selector) -> @renderedSelector = selector renderChild: -> return if @viewControllers.length == 0 || !@renderedSelector? @topViewController().render($('#' + @childViewControllerContentId))
class @NavigationController extends @ViewController _historyLength: 1 viewControllers: [] childViewControllerContentId: 'navigation_controller_content' push: (viewController) -> if @topViewController()? @topViewController().onDetach() @topViewController().parentViewController = undefined if @viewControllers.length >= @_historyLength @viewController.splice(0, 1) @viewControllers.push viewController viewController.parentViewController = @ viewController.onAttach() do @renderChild @emit 'push', {sender: @, viewController: viewController} pop: -> viewController = @viewControllers.pop() viewController.onDetach() viewController.parentViewController = undefined if @topViewController()? @topViewController().parentViewController = @ @topViewController().onAttach() do @renderChild @emit 'pop', {sender: @, viewController: viewController} viewController topViewController: -> @viewControllers[@viewControllers.length - 1] render: (selector) -> @renderedSelector = selector renderChild: -> return if @viewControllers.length == 0 || !@renderedSelector? @topViewController().render($('#' + @childViewControllerContentId))
Update navigation controller stack history management
Update navigation controller stack history management
CoffeeScript
mit
LedgerHQ/ledger-wallet-chrome,Morveus/ledger-wallet-doge-chrome,Morveus/ledger-wallet-doge-chrome,LedgerHQ/ledger-wallet-chrome
coffeescript
## Code Before: class @NavigationController extends @ViewController viewControllers: [] childViewControllerContentId: 'navigation_controller_content' push: (viewController) -> if @topViewController()? @topViewController().onDetach() @topViewController().parentViewController = undefined @viewControllers.push viewController viewController.parentViewController = @ viewController.onAttach() do @renderChild @emit 'push', {sender: @, viewController: viewController} pop: -> viewController = @viewControllers.pop() viewController.onDetach() viewController.parentViewController = undefined if @topViewController()? @topViewController().parentViewController = @ @topViewController().onAttach() do @renderChild @emit 'pop', {sender: @, viewController: viewController} viewController topViewController: -> @viewControllers[@viewControllers.length - 1] render: (selector) -> @renderedSelector = selector renderChild: -> return if @viewControllers.length == 0 || !@renderedSelector? @topViewController().render($('#' + @childViewControllerContentId)) ## Instruction: Update navigation controller stack history management ## Code After: class @NavigationController extends @ViewController _historyLength: 1 viewControllers: [] childViewControllerContentId: 'navigation_controller_content' push: (viewController) -> if @topViewController()? @topViewController().onDetach() @topViewController().parentViewController = undefined if @viewControllers.length >= @_historyLength @viewController.splice(0, 1) @viewControllers.push viewController viewController.parentViewController = @ viewController.onAttach() do @renderChild @emit 'push', {sender: @, viewController: viewController} pop: -> viewController = @viewControllers.pop() viewController.onDetach() viewController.parentViewController = undefined if @topViewController()? @topViewController().parentViewController = @ @topViewController().onAttach() do @renderChild @emit 'pop', {sender: @, viewController: viewController} viewController topViewController: -> @viewControllers[@viewControllers.length - 1] render: (selector) -> @renderedSelector = selector renderChild: -> return if @viewControllers.length == 0 || !@renderedSelector? @topViewController().render($('#' + @childViewControllerContentId))
6ff9c1f511a63a0063775492b8b7a9acf358ad21
CONTRIB/README.md
CONTRIB/README.md
* [Auto re-start Rocket.Chat if Pi Reboots or Crashes](https://github.com/RocketChat/Rocket.Chat.RaspberryPi/tree/master/CONTRIB/restart_after_reboot_with_supervisor), by @elpatron68 and @j8r * [Monitor or control anything connected to your Pi, from anywhere - *HubotOnPi* style!](https://github.com/RocketChat/Rocket.Chat.RaspberryPi/tree/master/CONTRIB/monitor_and_control_anything_anywhere_with_hubot), by @sing-li * [Single command install Rocket.Chat with supervisor included](https://github.com/RocketChat/Rocket.Chat.RaspberryPi/tree/master/CONTRIB/auto_install_with_supervisor_built_in), by @j8r
* [Auto re-start Rocket.Chat if Pi Reboots or Crashes](https://github.com/RocketChat/Rocket.Chat.RaspberryPi/tree/master/CONTRIB/restart_after_reboot_with_supervisor), by @elpatron68 and @j8r * [Monitor or control anything connected to your Pi, from anywhere - *HubotOnPi* style!](https://github.com/RocketChat/Rocket.Chat.RaspberryPi/tree/master/CONTRIB/monitor_and_control_anything_anywhere_with_hubot), by @sing-li * [Single command install Rocket.Chat with supervisor included](https://github.com/RocketChat/Rocket.Chat.RaspberryPi/tree/master/CONTRIB/auto_install_with_supervisor_built_in), by @j8r * [Turn your front door into a state-of-art gaming center with this Door Timer](https://github.com/RocketChat/Rocket.Chat.RaspberryPi/tree/master/CONTRIB/notify_when_door_opened), by @Christian_Haschek * [Build a pixbot that posts pictures taken with the RaspberryPi camera](https://github.com/RocketChat/Rocket.Chat.RaspberryPi/tree/master/CONTRIB/pixbot_takes_picture_with_raspberry_pi_camera/pixbot) by @sing-li
Add door and pix bots
Add door and pix bots
Markdown
mit
RocketChat/Rocket.Chat.RaspberryPi,RocketChat/Rocket.Chat.RaspberryPi
markdown
## Code Before: * [Auto re-start Rocket.Chat if Pi Reboots or Crashes](https://github.com/RocketChat/Rocket.Chat.RaspberryPi/tree/master/CONTRIB/restart_after_reboot_with_supervisor), by @elpatron68 and @j8r * [Monitor or control anything connected to your Pi, from anywhere - *HubotOnPi* style!](https://github.com/RocketChat/Rocket.Chat.RaspberryPi/tree/master/CONTRIB/monitor_and_control_anything_anywhere_with_hubot), by @sing-li * [Single command install Rocket.Chat with supervisor included](https://github.com/RocketChat/Rocket.Chat.RaspberryPi/tree/master/CONTRIB/auto_install_with_supervisor_built_in), by @j8r ## Instruction: Add door and pix bots ## Code After: * [Auto re-start Rocket.Chat if Pi Reboots or Crashes](https://github.com/RocketChat/Rocket.Chat.RaspberryPi/tree/master/CONTRIB/restart_after_reboot_with_supervisor), by @elpatron68 and @j8r * [Monitor or control anything connected to your Pi, from anywhere - *HubotOnPi* style!](https://github.com/RocketChat/Rocket.Chat.RaspberryPi/tree/master/CONTRIB/monitor_and_control_anything_anywhere_with_hubot), by @sing-li * [Single command install Rocket.Chat with supervisor included](https://github.com/RocketChat/Rocket.Chat.RaspberryPi/tree/master/CONTRIB/auto_install_with_supervisor_built_in), by @j8r * [Turn your front door into a state-of-art gaming center with this Door Timer](https://github.com/RocketChat/Rocket.Chat.RaspberryPi/tree/master/CONTRIB/notify_when_door_opened), by @Christian_Haschek * [Build a pixbot that posts pictures taken with the RaspberryPi camera](https://github.com/RocketChat/Rocket.Chat.RaspberryPi/tree/master/CONTRIB/pixbot_takes_picture_with_raspberry_pi_camera/pixbot) by @sing-li
55f0f4ab81f18cf33ff62389752ee7571623c27f
backend/dynamic-web-apps/voting-app/src/tests/integrated/database.spec.js
backend/dynamic-web-apps/voting-app/src/tests/integrated/database.spec.js
const test = require('tape'); const User = require('../../../models/User'); const { connect, add, remove } = require('../../database'); test('connection to database', async (assert) => { const res = await connect(); assert.equal(res, 0, 'It should connect to the database without errors'); assert.end(); }); test('adding to database', async (assert) => { const res = await add(User, 'sample', 'secret'); // try { await remove(User, 'sample'); // } catch (e) { assert.fail(e); } assert.equal(res, 0, 'It should add documents to the database without errors'); assert.end(); }); test('adding duplicates to database', async (assert) => { await add(User, 'sample', 'secret'); const res = await add(User, 'sample', 'secret'); // try { await remove(User, 'sample'); // } catch (e) {} assert.equal(res, 2, 'It should not add duplicate documents to the database'); assert.end(); });
const test = require('tape'); const User = require('../../../models/User'); const { connect, add, remove } = require('../../database'); test('connection to database', async (assert) => { const actual = await connect(); const expected = 0; assert.equal(actual, expected, 'It should connect to the database without errors'); assert.end(); }); test('adding to database', async (assert) => { const actual = await add(User, 'sample', 'secret'); const expected = 0; await remove(User, 'sample'); assert.equal(actual, expected, 'It should add documents to the database without errors'); assert.end(); }); test('adding duplicates to database', async (assert) => { await add(User, 'sample', 'secret'); const actual = await add(User, 'sample', 'secret'); const expected = 2; await remove(User, 'sample'); assert.equal(actual, expected, 'It should not add duplicate documents to the database'); assert.end(); });
Update test file variable names
Update test file variable names
JavaScript
mit
mkermani144/freecodecamp-projects,mkermani144/freecodecamp-projects
javascript
## Code Before: const test = require('tape'); const User = require('../../../models/User'); const { connect, add, remove } = require('../../database'); test('connection to database', async (assert) => { const res = await connect(); assert.equal(res, 0, 'It should connect to the database without errors'); assert.end(); }); test('adding to database', async (assert) => { const res = await add(User, 'sample', 'secret'); // try { await remove(User, 'sample'); // } catch (e) { assert.fail(e); } assert.equal(res, 0, 'It should add documents to the database without errors'); assert.end(); }); test('adding duplicates to database', async (assert) => { await add(User, 'sample', 'secret'); const res = await add(User, 'sample', 'secret'); // try { await remove(User, 'sample'); // } catch (e) {} assert.equal(res, 2, 'It should not add duplicate documents to the database'); assert.end(); }); ## Instruction: Update test file variable names ## Code After: const test = require('tape'); const User = require('../../../models/User'); const { connect, add, remove } = require('../../database'); test('connection to database', async (assert) => { const actual = await connect(); const expected = 0; assert.equal(actual, expected, 'It should connect to the database without errors'); assert.end(); }); test('adding to database', async (assert) => { const actual = await add(User, 'sample', 'secret'); const expected = 0; await remove(User, 'sample'); assert.equal(actual, expected, 'It should add documents to the database without errors'); assert.end(); }); test('adding duplicates to database', async (assert) => { await add(User, 'sample', 'secret'); const actual = await add(User, 'sample', 'secret'); const expected = 2; await remove(User, 'sample'); assert.equal(actual, expected, 'It should not add duplicate documents to the database'); assert.end(); });
579de843e8dccc8e5e46c5bb4aab75cae09f0dd6
wercker.yml
wercker.yml
box: id: node:8-alpine build: steps: - script: name: install dependencies code: | export YARN_CACHE=$WERCKER_CACHE_DIR/yarn export NODE_ENV=development HOME=$YARN_CACHE yarn - script: name: build code: | npm run build - script: name: test code: | npm run test - script: name: docs code: | npm run docs cp -R examples/* docs deploy: steps: - install-packages: packages: git ssh-client - lukevivier/[email protected]: token: $GIT_TOKEN basedir: docs
box: id: node:8-alpine build: steps: - script: name: install dependencies code: | export YARN_CACHE=$WERCKER_CACHE_DIR/yarn export NODE_ENV=development HOME=$YARN_CACHE yarn - script: name: build code: | npm run build - script: name: test code: | npm run test - script: name: docs code: | npm run docs cp -R examples/* docs deploy: box: id: tetsuo/electron-ready:4 steps: - install-packages: packages: git ssh-client - lukevivier/[email protected]: token: $GIT_TOKEN basedir: docs
Use tetsuo/electron-ready:4 for deploying gh-pages
Use tetsuo/electron-ready:4 for deploying gh-pages
YAML
mit
tetsuo/xus,tetsuo/xus
yaml
## Code Before: box: id: node:8-alpine build: steps: - script: name: install dependencies code: | export YARN_CACHE=$WERCKER_CACHE_DIR/yarn export NODE_ENV=development HOME=$YARN_CACHE yarn - script: name: build code: | npm run build - script: name: test code: | npm run test - script: name: docs code: | npm run docs cp -R examples/* docs deploy: steps: - install-packages: packages: git ssh-client - lukevivier/[email protected]: token: $GIT_TOKEN basedir: docs ## Instruction: Use tetsuo/electron-ready:4 for deploying gh-pages ## Code After: box: id: node:8-alpine build: steps: - script: name: install dependencies code: | export YARN_CACHE=$WERCKER_CACHE_DIR/yarn export NODE_ENV=development HOME=$YARN_CACHE yarn - script: name: build code: | npm run build - script: name: test code: | npm run test - script: name: docs code: | npm run docs cp -R examples/* docs deploy: box: id: tetsuo/electron-ready:4 steps: - install-packages: packages: git ssh-client - lukevivier/[email protected]: token: $GIT_TOKEN basedir: docs
0fcb2eaa36b8cc3411ad2ab5bec3eb9b1f710da5
README.md
README.md
dotfiles ======== Miscellaneous settings files I use across systems. Mostly OSX-specific. # To get up and running From a fresh OSX install: 1. Generate an SSH key with `ssh-keygen`. 2. Add that SSH key to your [GitHub SSH keys](https://github.com/settings/keys). 3. Clone this repo with `git clone [email protected]:spikeheap/dotfiles` (and install XCode tools while you're at it). 4. In the repo run `./_bootstrap.sh`. After that you'll probably want to do a couple of manual tasks: 1. Install your purchased software from the App Store. 2. Enable your mail accounts in Settings -> Internet Accounts. # Thanks A lot of the auto-brewing has been stolen gratuitously from [George Hickman](https://github.com/ghickman/dotfiles). Cheers!
dotfiles ======== Miscellaneous settings files I use across systems. Mostly OSX-specific. # To get up and running From a fresh OSX install: 1. Generate an SSH key with `ssh-keygen`. a. Copy the generated key with `cat .ssh/id_rsa.pub | pbcopy`. 2. Add that SSH key to your [GitHub SSH keys](https://github.com/settings/keys). 3. Clone this repo with: a. `mkdir src && cd src` b. `git clone [email protected]:spikeheap/dotfiles` (and install XCode tools while you're at it). 4. In the repo run `./_bootstrap.sh`. After that you'll probably want to do a couple of manual tasks: 1. Install your purchased software from the App Store. 2. Enable your mail accounts in Settings -> Internet Accounts. # Thanks A lot of the auto-brewing has been stolen gratuitously from [George Hickman](https://github.com/ghickman/dotfiles). Cheers!
Update readme to be more explicit
Update readme to be more explicit
Markdown
mit
spikeheap/dotfiles,spikeheap/dotfiles
markdown
## Code Before: dotfiles ======== Miscellaneous settings files I use across systems. Mostly OSX-specific. # To get up and running From a fresh OSX install: 1. Generate an SSH key with `ssh-keygen`. 2. Add that SSH key to your [GitHub SSH keys](https://github.com/settings/keys). 3. Clone this repo with `git clone [email protected]:spikeheap/dotfiles` (and install XCode tools while you're at it). 4. In the repo run `./_bootstrap.sh`. After that you'll probably want to do a couple of manual tasks: 1. Install your purchased software from the App Store. 2. Enable your mail accounts in Settings -> Internet Accounts. # Thanks A lot of the auto-brewing has been stolen gratuitously from [George Hickman](https://github.com/ghickman/dotfiles). Cheers! ## Instruction: Update readme to be more explicit ## Code After: dotfiles ======== Miscellaneous settings files I use across systems. Mostly OSX-specific. # To get up and running From a fresh OSX install: 1. Generate an SSH key with `ssh-keygen`. a. Copy the generated key with `cat .ssh/id_rsa.pub | pbcopy`. 2. Add that SSH key to your [GitHub SSH keys](https://github.com/settings/keys). 3. Clone this repo with: a. `mkdir src && cd src` b. `git clone [email protected]:spikeheap/dotfiles` (and install XCode tools while you're at it). 4. In the repo run `./_bootstrap.sh`. After that you'll probably want to do a couple of manual tasks: 1. Install your purchased software from the App Store. 2. Enable your mail accounts in Settings -> Internet Accounts. # Thanks A lot of the auto-brewing has been stolen gratuitously from [George Hickman](https://github.com/ghickman/dotfiles). Cheers!
099f6b110ff183f5984a71de436d3f6cff8d5c45
meter-agent/src/test/scala/hyperion/CollectingActorSpec.scala
meter-agent/src/test/scala/hyperion/CollectingActorSpec.scala
package hyperion import akka.testkit.TestProbe import scala.concurrent.duration._ import scala.io.Source class CollectingActorSpec extends BaseAkkaSpec { val CRLF = "\r\n" "Receiving the \"IncomingData\"" should { "skip data until the first complete Telegram comes in" in { val receiver = TestProbe() val actor = system.actorOf(CollectingActor.props(receiver.ref), "skip-data") actor ! MeterAgent.IncomingData("1-3:0.2.8(42)\r\n!522B\r\n/TEST") receiver.expectNoMsg(500 milliseconds) } "emit only complete Telegrams" in { //Arrange val receiver = TestProbe() val actor = system.actorOf(CollectingActor.props(receiver.ref), "emit-telegrams") val source = Source.fromInputStream(getClass.getResourceAsStream("/valid-telegram1.txt")) val text = try source.mkString finally source.close() val data = text.grouped(100).toIndexedSeq // Act actor ! MeterAgent.IncomingData("!XXXX" + CRLF) // simulate end of previous message for (chunk <- data) { actor ! MeterAgent.IncomingData(chunk) } // Assert val telegram = receiver.expectMsgPF(10 seconds) { case TelegramReceived(content) => content } telegram.checksum shouldBe "522B" // other parsing is tested in P1TelegramParserSpec } } }
package hyperion import akka.testkit.TestProbe import scala.concurrent.duration._ import scala.io.Source class CollectingActorSpec extends BaseAkkaSpec { val CRLF = "\r\n" "Receiving the \"IncomingData\"" should { "skip data until the first complete Telegram comes in" in { val receiver = TestProbe() val actor = system.actorOf(CollectingActor.props(receiver.ref), "skip-data") actor ! MeterAgent.IncomingData("1-3:0.2.8(42)\r\n!522B\r\n/TEST") receiver.expectNoMsg(500 milliseconds) } "emit only complete Telegrams" in { //Arrange val receiver = TestProbe() val actor = system.actorOf(CollectingActor.props(receiver.ref), "emit-telegrams") val source = Source.fromInputStream(getClass.getResourceAsStream("/valid-telegram1.txt")) val text = try source.mkString finally source.close() val data = text.grouped(100).toIndexedSeq // Act actor ! MeterAgent.IncomingData("!XXXX" + CRLF) // simulate end of previous message Thread.sleep(50) for (chunk <- data) { Thread.sleep(25) actor ! MeterAgent.IncomingData(chunk) } // Assert val telegram = receiver.expectMsgPF(10 seconds) { case TelegramReceived(content) => content } telegram.checksum shouldBe "522B" // other parsing is tested in P1TelegramParserSpec } } }
Add small pauses between sending chunks of data
Add small pauses between sending chunks of data
Scala
mit
mthmulders/hyperion
scala
## Code Before: package hyperion import akka.testkit.TestProbe import scala.concurrent.duration._ import scala.io.Source class CollectingActorSpec extends BaseAkkaSpec { val CRLF = "\r\n" "Receiving the \"IncomingData\"" should { "skip data until the first complete Telegram comes in" in { val receiver = TestProbe() val actor = system.actorOf(CollectingActor.props(receiver.ref), "skip-data") actor ! MeterAgent.IncomingData("1-3:0.2.8(42)\r\n!522B\r\n/TEST") receiver.expectNoMsg(500 milliseconds) } "emit only complete Telegrams" in { //Arrange val receiver = TestProbe() val actor = system.actorOf(CollectingActor.props(receiver.ref), "emit-telegrams") val source = Source.fromInputStream(getClass.getResourceAsStream("/valid-telegram1.txt")) val text = try source.mkString finally source.close() val data = text.grouped(100).toIndexedSeq // Act actor ! MeterAgent.IncomingData("!XXXX" + CRLF) // simulate end of previous message for (chunk <- data) { actor ! MeterAgent.IncomingData(chunk) } // Assert val telegram = receiver.expectMsgPF(10 seconds) { case TelegramReceived(content) => content } telegram.checksum shouldBe "522B" // other parsing is tested in P1TelegramParserSpec } } } ## Instruction: Add small pauses between sending chunks of data ## Code After: package hyperion import akka.testkit.TestProbe import scala.concurrent.duration._ import scala.io.Source class CollectingActorSpec extends BaseAkkaSpec { val CRLF = "\r\n" "Receiving the \"IncomingData\"" should { "skip data until the first complete Telegram comes in" in { val receiver = TestProbe() val actor = system.actorOf(CollectingActor.props(receiver.ref), "skip-data") actor ! MeterAgent.IncomingData("1-3:0.2.8(42)\r\n!522B\r\n/TEST") receiver.expectNoMsg(500 milliseconds) } "emit only complete Telegrams" in { //Arrange val receiver = TestProbe() val actor = system.actorOf(CollectingActor.props(receiver.ref), "emit-telegrams") val source = Source.fromInputStream(getClass.getResourceAsStream("/valid-telegram1.txt")) val text = try source.mkString finally source.close() val data = text.grouped(100).toIndexedSeq // Act actor ! MeterAgent.IncomingData("!XXXX" + CRLF) // simulate end of previous message Thread.sleep(50) for (chunk <- data) { Thread.sleep(25) actor ! MeterAgent.IncomingData(chunk) } // Assert val telegram = receiver.expectMsgPF(10 seconds) { case TelegramReceived(content) => content } telegram.checksum shouldBe "522B" // other parsing is tested in P1TelegramParserSpec } } }
25e44bb5e37df64916cd4d249bbf7d10115e2d49
src/utils.js
src/utils.js
export function checkStatus(response) { if (response.status >= 200 && response.status < 300) { return response.json(); } throw new Error(response.statusText); } export function getShortDate(dateString) { const d = new Date(dateString); return `${d.getMonth() + 1}/${d.getDate()}/${d.getFullYear() % 100}`; }
import moment from 'moment'; export function checkStatus(response) { if (response.status >= 200 && response.status < 300) { return response.json(); } throw new Error(response.statusText); } export function getShortDate(dateString) { return moment(dateString).format('MM/DD/YY'); }
Fix getShortDate to return leading zeros
Fix getShortDate to return leading zeros
JavaScript
mit
ZachGawlik/print-to-resist,ZachGawlik/print-to-resist
javascript
## Code Before: export function checkStatus(response) { if (response.status >= 200 && response.status < 300) { return response.json(); } throw new Error(response.statusText); } export function getShortDate(dateString) { const d = new Date(dateString); return `${d.getMonth() + 1}/${d.getDate()}/${d.getFullYear() % 100}`; } ## Instruction: Fix getShortDate to return leading zeros ## Code After: import moment from 'moment'; export function checkStatus(response) { if (response.status >= 200 && response.status < 300) { return response.json(); } throw new Error(response.statusText); } export function getShortDate(dateString) { return moment(dateString).format('MM/DD/YY'); }
46245254cdf9c3f2f6a9c27fe7e089867b4f394f
cloudbio/custom/versioncheck.py
cloudbio/custom/versioncheck.py
from distutils.version import LooseVersion from fabric.api import quiet from cloudbio.custom import shared def _parse_from_stdoutflag(out, flag): """Extract version information from a flag in verbose stdout. """ for line in out.split("\n") + out.stderr.split("\n"): if line.find(flag) >= 0: parts = [x for x in line.split() if not x.startswith(flag)] return parts[0] return "" def up_to_date(env, cmd, version, args=None, stdout_flag=None): """Check if the given command is up to date with the provided version. """ if shared._executable_not_on_path(cmd): return False if args: cmd = cmd + " " + " ".join(args) with quiet(): out = env.safe_run_output(cmd) if stdout_flag: iversion = _parse_from_stdoutflag(out, stdout_flag) else: iversion = out.strip() return LooseVersion(iversion) >= LooseVersion(version)
from distutils.version import LooseVersion from fabric.api import quiet from cloudbio.custom import shared def _parse_from_stdoutflag(out, flag): """Extract version information from a flag in verbose stdout. """ for line in out.split("\n") + out.stderr.split("\n"): if line.find(flag) >= 0: parts = [x for x in line.split() if not x.startswith(flag)] return parts[0] return "" def up_to_date(env, cmd, version, args=None, stdout_flag=None): """Check if the given command is up to date with the provided version. """ if shared._executable_not_on_path(cmd): return False if args: cmd = cmd + " " + " ".join(args) with quiet(): path_safe = "export PATH=$PATH:%s/bin && " out = env.safe_run_output(path_safe + cmd) if stdout_flag: iversion = _parse_from_stdoutflag(out, stdout_flag) else: iversion = out.strip() return LooseVersion(iversion) >= LooseVersion(version)
Include env.system_install PATH as part of version checking to work with installed software not on the global PATH. Thanks to James Cuff
Include env.system_install PATH as part of version checking to work with installed software not on the global PATH. Thanks to James Cuff
Python
mit
chapmanb/cloudbiolinux,elkingtonmcb/cloudbiolinux,kdaily/cloudbiolinux,elkingtonmcb/cloudbiolinux,kdaily/cloudbiolinux,averagehat/cloudbiolinux,kdaily/cloudbiolinux,chapmanb/cloudbiolinux,joemphilips/cloudbiolinux,AICIDNN/cloudbiolinux,joemphilips/cloudbiolinux,pjotrp/cloudbiolinux,pjotrp/cloudbiolinux,elkingtonmcb/cloudbiolinux,lpantano/cloudbiolinux,joemphilips/cloudbiolinux,kdaily/cloudbiolinux,heuermh/cloudbiolinux,rchekaluk/cloudbiolinux,heuermh/cloudbiolinux,averagehat/cloudbiolinux,AICIDNN/cloudbiolinux,pjotrp/cloudbiolinux,heuermh/cloudbiolinux,rchekaluk/cloudbiolinux,AICIDNN/cloudbiolinux,rchekaluk/cloudbiolinux,rchekaluk/cloudbiolinux,chapmanb/cloudbiolinux,averagehat/cloudbiolinux,chapmanb/cloudbiolinux,joemphilips/cloudbiolinux,pjotrp/cloudbiolinux,elkingtonmcb/cloudbiolinux,averagehat/cloudbiolinux,AICIDNN/cloudbiolinux,lpantano/cloudbiolinux,heuermh/cloudbiolinux,lpantano/cloudbiolinux
python
## Code Before: from distutils.version import LooseVersion from fabric.api import quiet from cloudbio.custom import shared def _parse_from_stdoutflag(out, flag): """Extract version information from a flag in verbose stdout. """ for line in out.split("\n") + out.stderr.split("\n"): if line.find(flag) >= 0: parts = [x for x in line.split() if not x.startswith(flag)] return parts[0] return "" def up_to_date(env, cmd, version, args=None, stdout_flag=None): """Check if the given command is up to date with the provided version. """ if shared._executable_not_on_path(cmd): return False if args: cmd = cmd + " " + " ".join(args) with quiet(): out = env.safe_run_output(cmd) if stdout_flag: iversion = _parse_from_stdoutflag(out, stdout_flag) else: iversion = out.strip() return LooseVersion(iversion) >= LooseVersion(version) ## Instruction: Include env.system_install PATH as part of version checking to work with installed software not on the global PATH. Thanks to James Cuff ## Code After: from distutils.version import LooseVersion from fabric.api import quiet from cloudbio.custom import shared def _parse_from_stdoutflag(out, flag): """Extract version information from a flag in verbose stdout. """ for line in out.split("\n") + out.stderr.split("\n"): if line.find(flag) >= 0: parts = [x for x in line.split() if not x.startswith(flag)] return parts[0] return "" def up_to_date(env, cmd, version, args=None, stdout_flag=None): """Check if the given command is up to date with the provided version. """ if shared._executable_not_on_path(cmd): return False if args: cmd = cmd + " " + " ".join(args) with quiet(): path_safe = "export PATH=$PATH:%s/bin && " out = env.safe_run_output(path_safe + cmd) if stdout_flag: iversion = _parse_from_stdoutflag(out, stdout_flag) else: iversion = out.strip() return LooseVersion(iversion) >= LooseVersion(version)
eb7a181d9cd222f0c73c8229c39d5360f12138f6
rx-adapter/README.md
rx-adapter/README.md
Experimental Rx Adapter for a unreleased version of Cycle.js which takes advantage of adapters
Experimental Rx Adapter for a unreleased version of Cycle.js which takes advantage of adapters ## Install ```shell npm install cycle-rx-adapter ``` ## Usage ```js import Cycle from '@cycle/core' import streamAdapter from 'cycle-rx-adapter' ... run(main, drivers, {streamAdapter}) ```
Update readme with basic info
docs(readme): Update readme with basic info
Markdown
mit
cyclejs/cyclejs,cyclejs/cycle-core,usm4n/cyclejs,ntilwalli/cyclejs,feliciousx-open-source/cyclejs,usm4n/cyclejs,ntilwalli/cyclejs,staltz/cycle,cyclejs/cyclejs,maskinoshita/cyclejs,usm4n/cyclejs,cyclejs/cyclejs,maskinoshita/cyclejs,maskinoshita/cyclejs,cyclejs/cycle-core,ntilwalli/cyclejs,feliciousx-open-source/cyclejs,usm4n/cyclejs,maskinoshita/cyclejs,staltz/cycle,cyclejs/cyclejs,feliciousx-open-source/cyclejs,feliciousx-open-source/cyclejs,ntilwalli/cyclejs
markdown
## Code Before: Experimental Rx Adapter for a unreleased version of Cycle.js which takes advantage of adapters ## Instruction: docs(readme): Update readme with basic info ## Code After: Experimental Rx Adapter for a unreleased version of Cycle.js which takes advantage of adapters ## Install ```shell npm install cycle-rx-adapter ``` ## Usage ```js import Cycle from '@cycle/core' import streamAdapter from 'cycle-rx-adapter' ... run(main, drivers, {streamAdapter}) ```
3c0ce6a3e4e16ff3991a838009c42efa2f5b237d
tviit/admin.py
tviit/admin.py
from django.contrib import admin from .models import Tviit admin.site.register(Tviit)
from django.contrib import admin from .models import Tviit class TviitAdmin(admin.ModelAdmin): readonly_fields=('uuid',) admin.site.register(Tviit, TviitAdmin)
Add uuid to be readable in Admin-panel
Add uuid to be readable in Admin-panel
Python
mit
DeWaster/Tviserrys,DeWaster/Tviserrys
python
## Code Before: from django.contrib import admin from .models import Tviit admin.site.register(Tviit) ## Instruction: Add uuid to be readable in Admin-panel ## Code After: from django.contrib import admin from .models import Tviit class TviitAdmin(admin.ModelAdmin): readonly_fields=('uuid',) admin.site.register(Tviit, TviitAdmin)
920a025e6f8bafe889e5679a4833ffafd195ae47
build/install_dependencies_ubuntu14.sh
build/install_dependencies_ubuntu14.sh
sudo sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ trusty main" > /etc/apt/sources.list.d/dotnetdev.list' sudo apt-key adv --keyserver apt-mo.trafficmanager.net --recv-keys 417A0893 # Update apt-get cache sudo apt-get update # Install .NET Core SDK sudo apt-get install dotnet-dev-1.0.0-preview2-003131 # Install Python Pip and cdiff sudo apt-get -y install python-pip pip -V pip install --upgrade cdiff
sudo sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ trusty main" > /etc/apt/sources.list.d/dotnetdev.list' sudo apt-key adv --keyserver apt-mo.trafficmanager.net --recv-keys 417A0893 # Add the Mono apt-get feed sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list # Update apt-get cache sudo apt-get update # Install .NET Core SDK sudo apt-get install dotnet-dev-1.0.0-preview2-003131 -y # Install Mono sudo apt-get install mono-complete -y # Install Powershell dependencies sudo apt-get install libunwind8 libicu52 -y # Download and install Powershell wget https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-alpha.11/powershell_6.0.0-alpha.11-1ubuntu1.14.04.1_amd64.deb sudo dpkg -i powershell_6.0.0-alpha.11-1ubuntu1.14.04.1_amd64.deb rm -f powershell_6.0.0-alpha.11-1ubuntu1.14.04.1_amd64.deb # Install Python Pip and cdiff sudo apt-get -y install python-pip pip -V pip install --upgrade cdiff
Install Mono and Powershell in Travis CI
Install Mono and Powershell in Travis CI
Shell
apache-2.0
iolevel/peachpie,peachpiecompiler/peachpie,peachpiecompiler/peachpie,iolevel/peachpie,iolevel/peachpie-concept,peachpiecompiler/peachpie,iolevel/peachpie,iolevel/peachpie-concept,iolevel/peachpie-concept
shell
## Code Before: sudo sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ trusty main" > /etc/apt/sources.list.d/dotnetdev.list' sudo apt-key adv --keyserver apt-mo.trafficmanager.net --recv-keys 417A0893 # Update apt-get cache sudo apt-get update # Install .NET Core SDK sudo apt-get install dotnet-dev-1.0.0-preview2-003131 # Install Python Pip and cdiff sudo apt-get -y install python-pip pip -V pip install --upgrade cdiff ## Instruction: Install Mono and Powershell in Travis CI ## Code After: sudo sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ trusty main" > /etc/apt/sources.list.d/dotnetdev.list' sudo apt-key adv --keyserver apt-mo.trafficmanager.net --recv-keys 417A0893 # Add the Mono apt-get feed sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list # Update apt-get cache sudo apt-get update # Install .NET Core SDK sudo apt-get install dotnet-dev-1.0.0-preview2-003131 -y # Install Mono sudo apt-get install mono-complete -y # Install Powershell dependencies sudo apt-get install libunwind8 libicu52 -y # Download and install Powershell wget https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-alpha.11/powershell_6.0.0-alpha.11-1ubuntu1.14.04.1_amd64.deb sudo dpkg -i powershell_6.0.0-alpha.11-1ubuntu1.14.04.1_amd64.deb rm -f powershell_6.0.0-alpha.11-1ubuntu1.14.04.1_amd64.deb # Install Python Pip and cdiff sudo apt-get -y install python-pip pip -V pip install --upgrade cdiff
5f385913ab06fc288c61d22d98f2f9a903194f8f
data_structures/Stack/Python/Stack.py
data_structures/Stack/Python/Stack.py
class Stack(object): def __init__(self): # Initialize stack as empty array self.stack = [] # Return and remove the last element of the stack array. def pop(self): # If the stack is not empty, pop. if self.stack.length > 0: return self.stack.pop()
class Stack(object): def __init__(self): # Initialize stack as empty array self.stack = [] # Return and remove the last element of the stack array. def pop(self): # If the stack is not empty, pop. if self.stack.length > 0: return self.stack.pop() # Add an element to the end of the stack array. def push(self, element): self.stack.append(element)
Add push method and implementation
Add push method and implementation
Python
cc0-1.0
manikTharaka/al-go-rithms,ZoranPandovski/al-go-rithms,Cnidarias/al-go-rithms,EUNIX-TRIX/al-go-rithms,Cnidarias/al-go-rithms,Deepak345/al-go-rithms,manikTharaka/al-go-rithms,manikTharaka/al-go-rithms,Cnidarias/al-go-rithms,ZoranPandovski/al-go-rithms,manikTharaka/al-go-rithms,manikTharaka/al-go-rithms,Cnidarias/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,EUNIX-TRIX/al-go-rithms,Cnidarias/al-go-rithms,ZoranPandovski/al-go-rithms,manikTharaka/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,Deepak345/al-go-rithms,manikTharaka/al-go-rithms,ZoranPandovski/al-go-rithms,manikTharaka/al-go-rithms,Cnidarias/al-go-rithms,Deepak345/al-go-rithms,Deepak345/al-go-rithms,ZoranPandovski/al-go-rithms,Deepak345/al-go-rithms,EUNIX-TRIX/al-go-rithms,EUNIX-TRIX/al-go-rithms,Deepak345/al-go-rithms,manikTharaka/al-go-rithms,manikTharaka/al-go-rithms,Deepak345/al-go-rithms,ZoranPandovski/al-go-rithms,Deepak345/al-go-rithms,Cnidarias/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,Deepak345/al-go-rithms,manikTharaka/al-go-rithms,EUNIX-TRIX/al-go-rithms,manikTharaka/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,Cnidarias/al-go-rithms,Cnidarias/al-go-rithms,manikTharaka/al-go-rithms,Cnidarias/al-go-rithms,EUNIX-TRIX/al-go-rithms,Deepak345/al-go-rithms,manikTharaka/al-go-rithms,ZoranPandovski/al-go-rithms,EUNIX-TRIX/al-go-rithms,ZoranPandovski/al-go-rithms,Cnidarias/al-go-rithms,Deepak345/al-go-rithms,Cnidarias/al-go-rithms,EUNIX-TRIX/al-go-rithms,Deepak345/al-go-rithms,manikTharaka/al-go-rithms,Cnidarias/al-go-rithms,Deepak345/al-go-rithms,EUNIX-TRIX/al-go-rithms,EUNIX-TRIX/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,manikTharaka/al-go-rithms,EUNIX-TRIX/al-go-rithms,ZoranPandovski/al-go-rithms,EUNIX-TRIX/al-go-rithms,Deepak345/al-go-rithms,EUNIX-TRIX/al-go-rithms,Deepak345/al-go-rithms,Cnidarias/al-go-rithms,Cnidarias/al-go-rithms,ZoranPandovski/al-go-rithms,Deepak345/al-go-rithms
python
## Code Before: class Stack(object): def __init__(self): # Initialize stack as empty array self.stack = [] # Return and remove the last element of the stack array. def pop(self): # If the stack is not empty, pop. if self.stack.length > 0: return self.stack.pop() ## Instruction: Add push method and implementation ## Code After: class Stack(object): def __init__(self): # Initialize stack as empty array self.stack = [] # Return and remove the last element of the stack array. def pop(self): # If the stack is not empty, pop. if self.stack.length > 0: return self.stack.pop() # Add an element to the end of the stack array. def push(self, element): self.stack.append(element)
c25ab2d107b7750f5cc955ff68bb4f8a7c75dccc
pkg/minikube/bootstrapper/kubeadm/default_cni.go
pkg/minikube/bootstrapper/kubeadm/default_cni.go
/* Copyright 2018 The Kubernetes Authors All rights reserved. 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 kubeadm // defaultCNIConfig is the CNI config which is provisioned when --enable-default-cni // has been passed to `minikube start`. // // The config is being written to /etc/cni/net.d/k8s.conf and /etc/rkt/net.d/k8s.conf. const defaultCNIConfig = ` { "name": "rkt.kubernetes.io", "type": "bridge", "bridge": "mybridge", "mtu": 1460, "addIf": "true", "isGateway": true, "ipMasq": true, "ipam": { "type": "host-local", "subnet": "10.1.0.0/16", "gateway": "10.1.0.1", "routes": [ { "dst": "0.0.0.0/0" } ] } } `
/* Copyright 2018 The Kubernetes Authors All rights reserved. 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 kubeadm // defaultCNIConfig is the CNI config which is provisioned when --enable-default-cni // has been passed to `minikube start`. // // The config is being written to /etc/cni/net.d/k8s.conf and /etc/rkt/net.d/k8s.conf. const defaultCNIConfig = ` { "cniVersion": "0.3.0", "name": "rkt.kubernetes.io", "type": "bridge", "bridge": "mybridge", "mtu": 1460, "addIf": "true", "isGateway": true, "ipMasq": true, "ipam": { "type": "host-local", "subnet": "10.1.0.0/16", "gateway": "10.1.0.1", "routes": [ { "dst": "0.0.0.0/0" } ] } } `
Upgrade CNI config version to 0.3.0
Upgrade CNI config version to 0.3.0 Was using the default version of 0.2.0, didn't load with 0.4.0. closes https://github.com/kubernetes/minikube/issues/4406
Go
apache-2.0
warmchang/minikube,dlorenc/minikube,kubernetes/minikube,warmchang/minikube,warmchang/minikube,dalehamel/minikube,warmchang/minikube,kubernetes/minikube,dlorenc/minikube,kubernetes/minikube,warmchang/minikube,kubernetes/minikube,kubernetes/minikube,kubernetes/minikube,warmchang/minikube,dlorenc/minikube,dalehamel/minikube,dlorenc/minikube,dalehamel/minikube,dlorenc/minikube,warmchang/minikube,kubernetes/minikube,dlorenc/minikube,dlorenc/minikube,dlorenc/minikube
go
## Code Before: /* Copyright 2018 The Kubernetes Authors All rights reserved. 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 kubeadm // defaultCNIConfig is the CNI config which is provisioned when --enable-default-cni // has been passed to `minikube start`. // // The config is being written to /etc/cni/net.d/k8s.conf and /etc/rkt/net.d/k8s.conf. const defaultCNIConfig = ` { "name": "rkt.kubernetes.io", "type": "bridge", "bridge": "mybridge", "mtu": 1460, "addIf": "true", "isGateway": true, "ipMasq": true, "ipam": { "type": "host-local", "subnet": "10.1.0.0/16", "gateway": "10.1.0.1", "routes": [ { "dst": "0.0.0.0/0" } ] } } ` ## Instruction: Upgrade CNI config version to 0.3.0 Was using the default version of 0.2.0, didn't load with 0.4.0. closes https://github.com/kubernetes/minikube/issues/4406 ## Code After: /* Copyright 2018 The Kubernetes Authors All rights reserved. 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 kubeadm // defaultCNIConfig is the CNI config which is provisioned when --enable-default-cni // has been passed to `minikube start`. // // The config is being written to /etc/cni/net.d/k8s.conf and /etc/rkt/net.d/k8s.conf. const defaultCNIConfig = ` { "cniVersion": "0.3.0", "name": "rkt.kubernetes.io", "type": "bridge", "bridge": "mybridge", "mtu": 1460, "addIf": "true", "isGateway": true, "ipMasq": true, "ipam": { "type": "host-local", "subnet": "10.1.0.0/16", "gateway": "10.1.0.1", "routes": [ { "dst": "0.0.0.0/0" } ] } } `
c09ce13205f80c686aea05b92183167e43a0b4c9
source/50_aws_env.sh
source/50_aws_env.sh
function aws-load-env { local profile="${1:-default}" if [[ ${profile} == clear ]]; then unset AWS_ACCESS_KEY_ID unset AWS_SECRET_ACCESS_KEY unset AWS_SESSION_TOKEN unset AWS_SECRET_KEY echo "Cleared AWS env variables" else local AWS_ACCESS_KEY_ID="$(aws configure get aws_access_key_id --profile ${profile})" local AWS_SECRET_ACCESS_KEY="$(aws configure get aws_secret_access_key --profile ${profile})" local AWS_SESSION_TOKEN="$(aws configure get aws_session_token --profile ${profile})" local AWS_SECRET_KEY=${AWS_SECRET_ACCESS_KEY} export AWS_ACCESS_KEY_ID export AWS_SECRET_ACCESS_KEY export AWS_SESSION_TOKEN export AWS_SECRET_KEY echo "Set AWS env variables for profile '${profile}'" fi }
function aws-load-env { local profile="${1:-default}" export TEST_FOO=FOO if [[ ${profile} == clear ]]; then unset AWS_ACCESS_KEY_ID unset AWS_SECRET_ACCESS_KEY unset AWS_SESSION_TOKEN unset AWS_SECRET_KEY echo "Cleared AWS env variables" else export AWS_ACCESS_KEY_ID="$(aws configure get aws_access_key_id --profile ${profile})" export AWS_SECRET_ACCESS_KEY="$(aws configure get aws_secret_access_key --profile ${profile})" export AWS_SESSION_TOKEN="$(aws configure get aws_session_token --profile ${profile})" export AWS_SECRET_KEY=${AWS_SECRET_ACCESS_KEY} echo "Set AWS env variables for profile '${profile}'" fi }
Fix up AWS env helper func
Fix up AWS env helper func Signed-off-by: Joe Beda <[email protected]>
Shell
mit
jbeda/dotfiles
shell
## Code Before: function aws-load-env { local profile="${1:-default}" if [[ ${profile} == clear ]]; then unset AWS_ACCESS_KEY_ID unset AWS_SECRET_ACCESS_KEY unset AWS_SESSION_TOKEN unset AWS_SECRET_KEY echo "Cleared AWS env variables" else local AWS_ACCESS_KEY_ID="$(aws configure get aws_access_key_id --profile ${profile})" local AWS_SECRET_ACCESS_KEY="$(aws configure get aws_secret_access_key --profile ${profile})" local AWS_SESSION_TOKEN="$(aws configure get aws_session_token --profile ${profile})" local AWS_SECRET_KEY=${AWS_SECRET_ACCESS_KEY} export AWS_ACCESS_KEY_ID export AWS_SECRET_ACCESS_KEY export AWS_SESSION_TOKEN export AWS_SECRET_KEY echo "Set AWS env variables for profile '${profile}'" fi } ## Instruction: Fix up AWS env helper func Signed-off-by: Joe Beda <[email protected]> ## Code After: function aws-load-env { local profile="${1:-default}" export TEST_FOO=FOO if [[ ${profile} == clear ]]; then unset AWS_ACCESS_KEY_ID unset AWS_SECRET_ACCESS_KEY unset AWS_SESSION_TOKEN unset AWS_SECRET_KEY echo "Cleared AWS env variables" else export AWS_ACCESS_KEY_ID="$(aws configure get aws_access_key_id --profile ${profile})" export AWS_SECRET_ACCESS_KEY="$(aws configure get aws_secret_access_key --profile ${profile})" export AWS_SESSION_TOKEN="$(aws configure get aws_session_token --profile ${profile})" export AWS_SECRET_KEY=${AWS_SECRET_ACCESS_KEY} echo "Set AWS env variables for profile '${profile}'" fi }