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
|
---|---|---|---|---|---|---|---|---|---|---|---|
0caa3cfe22c7bfaf7f2460b3d24c148713fbbc10
|
ci/tasks/build-ucl.yaml
|
ci/tasks/build-ucl.yaml
|
---
platform: linux
image: packages/base-build
inputs:
- name: docker-upx.git
- name: ucl/source
outputs:
- name: ucl/build
run:
path: docker-upx.git/ci/scripts/build-ucl
|
---
platform: linux
image: docker:///packages/build-base
inputs:
- name: docker-upx.git
- name: ucl/source
outputs:
- name: ucl/build
run:
path: docker-upx.git/ci/scripts/build-ucl
|
Fix bad image reference in task
|
Fix bad image reference in task
|
YAML
|
mit
|
colstrom/docker-upx
|
yaml
|
## Code Before:
---
platform: linux
image: packages/base-build
inputs:
- name: docker-upx.git
- name: ucl/source
outputs:
- name: ucl/build
run:
path: docker-upx.git/ci/scripts/build-ucl
## Instruction:
Fix bad image reference in task
## Code After:
---
platform: linux
image: docker:///packages/build-base
inputs:
- name: docker-upx.git
- name: ucl/source
outputs:
- name: ucl/build
run:
path: docker-upx.git/ci/scripts/build-ucl
|
e5d456300842357725e18ab53787f3b6963e6abb
|
app/admin/artifact.rb
|
app/admin/artifact.rb
|
ActiveAdmin.register Artifact do
permit_params :name, :approved, :downloadable, :author, :user, :file_hash, :mirrors, :license,
:more_info_urls, :extra_license_text, :stored_files, :tag_list, :software_list, :file_format_list
index do
selectable_column
id_column
column :name
column :user
column :tag_list
column :software_list
column :file_format_list
column :created_at
actions
end
filter :name
filter :created_at
form do |f|
f.inputs "Artifact Details" do
f.input :name
f.input :user
f.input :approved
f.input :downloadable
f.input :author
f.input :file_hash
f.input :mirrors, input_html: { value: f.artifact.mirrors.join(',') }
f.input :more_info_urls, input_html: { value: f.artifact.more_info_urls.join(',') }
f.input :license
f.input :extra_license_text, as: :text
f.input :stored_files
f.input :tag_list, input_html: { value: f.artifact.tag_list.join(',') }
f.input :software_list, input_html: { value: f.artifact.software_list.join(',') }
f.input :file_format_list, input_html: { value: f.artifact.file_format_list.join(',') }
end
f.actions
end
end
|
ActiveAdmin.register Artifact do
permit_params :name, :approved, :downloadable, :author, :user, :file_hash, :mirrors, :license,
:more_info_urls, :extra_license_text, :stored_files, :tag_list, :software_list, :file_format_list
index do
selectable_column
id_column
column :name
column :user
column :tag_list
column :software_list
column :file_format_list
column :created_at
actions
end
filter :name
filter :created_at
form do |f|
f.inputs "Artifact Details" do
f.input :name
f.input :user
f.input :approved
f.input :downloadable
f.input :author
f.input :file_hash
f.input :mirrors, input_html: { value: f.artifact.mirrors.try(:join, ',') }
f.input :more_info_urls, input_html: { value: f.artifact.more_info_urls.try(:join, ',') }
f.input :license
f.input :extra_license_text, as: :text
f.input :stored_files
f.input :tag_list, input_html: { value: f.artifact.tag_list.try(:join, ',') }
f.input :software_list, input_html: { value: f.artifact.software_list.try(:join, ',') }
f.input :file_format_list, input_html: { value: f.artifact.file_format_list.try(:join, ',') }
end
f.actions
end
end
|
Correct tags, mirrors, etc in admin dashboard in case of nil values
|
Correct tags, mirrors, etc in admin dashboard in case of nil values
|
Ruby
|
mit
|
lfzawacki/musical-artifacts,lfzawacki/musical-artifacts,lfzawacki/musical-artifacts,lfzawacki/musical-artifacts
|
ruby
|
## Code Before:
ActiveAdmin.register Artifact do
permit_params :name, :approved, :downloadable, :author, :user, :file_hash, :mirrors, :license,
:more_info_urls, :extra_license_text, :stored_files, :tag_list, :software_list, :file_format_list
index do
selectable_column
id_column
column :name
column :user
column :tag_list
column :software_list
column :file_format_list
column :created_at
actions
end
filter :name
filter :created_at
form do |f|
f.inputs "Artifact Details" do
f.input :name
f.input :user
f.input :approved
f.input :downloadable
f.input :author
f.input :file_hash
f.input :mirrors, input_html: { value: f.artifact.mirrors.join(',') }
f.input :more_info_urls, input_html: { value: f.artifact.more_info_urls.join(',') }
f.input :license
f.input :extra_license_text, as: :text
f.input :stored_files
f.input :tag_list, input_html: { value: f.artifact.tag_list.join(',') }
f.input :software_list, input_html: { value: f.artifact.software_list.join(',') }
f.input :file_format_list, input_html: { value: f.artifact.file_format_list.join(',') }
end
f.actions
end
end
## Instruction:
Correct tags, mirrors, etc in admin dashboard in case of nil values
## Code After:
ActiveAdmin.register Artifact do
permit_params :name, :approved, :downloadable, :author, :user, :file_hash, :mirrors, :license,
:more_info_urls, :extra_license_text, :stored_files, :tag_list, :software_list, :file_format_list
index do
selectable_column
id_column
column :name
column :user
column :tag_list
column :software_list
column :file_format_list
column :created_at
actions
end
filter :name
filter :created_at
form do |f|
f.inputs "Artifact Details" do
f.input :name
f.input :user
f.input :approved
f.input :downloadable
f.input :author
f.input :file_hash
f.input :mirrors, input_html: { value: f.artifact.mirrors.try(:join, ',') }
f.input :more_info_urls, input_html: { value: f.artifact.more_info_urls.try(:join, ',') }
f.input :license
f.input :extra_license_text, as: :text
f.input :stored_files
f.input :tag_list, input_html: { value: f.artifact.tag_list.try(:join, ',') }
f.input :software_list, input_html: { value: f.artifact.software_list.try(:join, ',') }
f.input :file_format_list, input_html: { value: f.artifact.file_format_list.try(:join, ',') }
end
f.actions
end
end
|
05f8d24ed87947f368b849d0b1b2c31383e4279c
|
lib/spree.rb
|
lib/spree.rb
|
SPREE_ROOT = File.expand_path(File.join(File.dirname(__FILE__), "..")) unless defined? SPREE_ROOT
unless defined? Spree::Version
module Spree
module Version
Major = '0'
Minor = '9'
Tiny = '99'
class << self
def to_s
[Major, Minor, Tiny].join('.')
end
alias :to_str :to_s
end
end
end
end
|
SPREE_ROOT = File.expand_path(File.join(File.dirname(__FILE__), "..")) unless defined? SPREE_ROOT
unless defined? Spree::Version
module Spree
module Version
Major = '0'
Minor = '10'
Tiny = '0'
Pre = nil # 'beta'
class << self
def to_s
v = "#{Major}.#{Minor}.#{Tiny}"
Pre ? "#{v}.#{Pre}" : v
end
alias :to_str :to_s
end
end
end
end
|
Allow for pre-release gem versions.
|
Allow for pre-release gem versions.
|
Ruby
|
bsd-3-clause
|
Nevensoft/spree,jasonfb/spree,archSeer/spree,richardnuno/solidus,SadTreeFriends/spree,bjornlinder/Spree,njerrywerry/spree,robodisco/spree,zaeznet/spree,shaywood2/spree,jeffboulet/spree,surfdome/spree,Senjai/spree,softr8/spree,omarsar/spree,patdec/spree,kewaunited/spree,Ropeney/spree,alepore/spree,thogg4/spree,hifly/spree,preston-scott/spree,welitonfreitas/spree,piousbox/spree,watg/spree,dafontaine/spree,radarseesradar/spree,devilcoders/solidus,Hates/spree,volpejoaquin/spree,locomotivapro/spree,imella/spree,useiichi/spree,delphsoft/spree-store-ballchair,robodisco/spree,builtbybuffalo/spree,Engeltj/spree,priyank-gupta/spree,useiichi/spree,keatonrow/spree,scottcrawford03/solidus,Ropeney/spree,edgward/spree,carlesjove/spree,progsri/spree,grzlus/spree,vcavallo/spree,jparr/spree,mleglise/spree,tomash/spree,lsirivong/spree,grzlus/solidus,scottcrawford03/solidus,beni55/spree,CJMrozek/spree,freerunningtech/spree,adaddeo/spree,shekibobo/spree,pervino/spree,Arpsara/solidus,jparr/spree,carlesjove/spree,welitonfreitas/spree,ahmetabdi/spree,jordan-brough/spree,mindvolt/spree,softr8/spree,TrialGuides/spree,DynamoMTL/spree,Antdesk/karpal-spree,pervino/spree,Senjai/solidus,Migweld/spree,sideci-sample/sideci-sample-spree,rbngzlv/spree,Machpowersystems/spree_mach,Kagetsuki/spree,Machpowersystems/spree_mach,miyazawatomoka/spree,surfdome/spree,trigrass2/spree,keatonrow/spree,jaspreet21anand/spree,TrialGuides/spree,agient/agientstorefront,wolfieorama/spree,SadTreeFriends/spree,fahidnasir/spree,reidblomquist/spree,omarsar/spree,Ropeney/spree,TimurTarasenko/spree,shioyama/spree,Senjai/spree,maybii/spree,orenf/spree,biagidp/spree,radarseesradar/spree,robodisco/spree,shaywood2/spree,sliaquat/spree,abhishekjain16/spree,azclick/spree,PhoenixTeam/spree_phoenix,AgilTec/spree,jsurdilla/solidus,yushine/spree,jordan-brough/solidus,ujai/spree,alejandromangione/spree,jordan-brough/solidus,thogg4/spree,agient/agientstorefront,tailic/spree,zaeznet/spree,ramkumar-kr/spree,karlitxo/spree,reinaris/spree,pervino/solidus,shaywood2/spree,yiqing95/spree,Antdesk/karpal-spree,vinayvinsol/spree,net2b/spree,ujai/spree,groundctrl/spree,Lostmyname/spree,pjmj777/spree,DarkoP/spree,APohio/spree,lsirivong/spree,jeffboulet/spree,AgilTec/spree,siddharth28/spree,rakibulislam/spree,jspizziri/spree,Engeltj/spree,karlitxo/spree,softr8/spree,hoanghiep90/spree,zamiang/spree,athal7/solidus,shekibobo/spree,urimikhli/spree,PhoenixTeam/spree_phoenix,sunny2601/spree,sunny2601/spree,ayb/spree,jimblesm/spree,Senjai/solidus,pulkit21/spree,woboinc/spree,delphsoft/spree-store-ballchair,agient/agientstorefront,jspizziri/spree,jspizziri/spree,fahidnasir/spree,tesserakt/clean_spree,groundctrl/spree,raow/spree,Hawaiideveloper/shoppingcart,JDutil/spree,shaywood2/spree,kitwalker12/spree,archSeer/spree,FadliKun/spree,Migweld/spree,grzlus/solidus,StemboltHQ/spree,HealthWave/spree,kewaunited/spree,shioyama/spree,gautamsawhney/spree,sunny2601/spree,miyazawatomoka/spree,edgward/spree,moneyspyder/spree,kewaunited/spree,jsurdilla/solidus,caiqinghua/spree,codesavvy/sandbox,Nevensoft/spree,zamiang/spree,tancnle/spree,berkes/spree,lsirivong/spree,shekibobo/spree,alejandromangione/spree,sfcgeorge/spree,josephholsten/plain-sight,thogg4/spree,sliaquat/spree,jimblesm/spree,sunny2601/spree,Senjai/spree,vulk/spree,brchristian/spree,CiscoCloud/spree,gregoryrikson/spree-sample,imella/spree,camelmasa/spree,lsirivong/solidus,jaspreet21anand/spree,codesavvy/sandbox,priyank-gupta/spree,assembledbrands/spree,lyzxsc/spree,wolfieorama/spree,kewaunited/spree,trigrass2/spree,lsirivong/solidus,maybii/spree,nooysters/spree,patdec/spree,TrialGuides/spree,priyank-gupta/spree,archSeer/spree,adaddeo/spree,forkata/solidus,forkata/solidus,vinayvinsol/spree,xuewenfei/solidus,wolfieorama/spree,urimikhli/spree,NerdsvilleCEO/spree,delphsoft/spree-store-ballchair,builtbybuffalo/spree,volpejoaquin/spree,lzcabrera/spree-1-3-stable,SadTreeFriends/spree,quentinuys/spree,gautamsawhney/spree,Arpsara/solidus,dafontaine/spree,patdec/spree,DynamoMTL/spree,omarsar/spree,quentinuys/spree,devilcoders/solidus,sanjay1185/mystore,njerrywerry/spree,edgward/spree,cutefrank/spree,useiichi/spree,net2b/spree,vulk/spree,bjornlinder/Spree,priyank-gupta/spree,Nevensoft/spree,Arpsara/solidus,bonobos/solidus,net2b/spree,azclick/spree,KMikhaylovCTG/spree,siddharth28/spree,builtbybuffalo/spree,kitwalker12/spree,JDutil/spree,watg/spree,vinayvinsol/spree,miyazawatomoka/spree,LBRapid/spree,azranel/spree,pervino/spree,RatioClothing/spree,derekluo/spree,siddharth28/spree,beni55/spree,robodisco/spree,TimurTarasenko/spree,athal7/solidus,rajeevriitm/spree,zamiang/spree,Engeltj/spree,bjornlinder/Spree,tancnle/spree,azclick/spree,JuandGirald/spree,CiscoCloud/spree,tailic/spree,bonobos/solidus,odk211/spree,Lostmyname/spree,ahmetabdi/spree,ramkumar-kr/spree,APohio/spree,trigrass2/spree,Boomkat/spree,hifly/spree,lzcabrera/spree-1-3-stable,NerdsvilleCEO/spree,rakibulislam/spree,TrialGuides/spree,athal7/solidus,hifly/spree,jeffboulet/spree,locomotivapro/spree,joanblake/spree,sideci-sample/sideci-sample-spree,azranel/spree,yiqing95/spree,cutefrank/spree,dafontaine/spree,caiqinghua/spree,RatioClothing/spree,assembledbrands/spree,tancnle/spree,ckk-scratch/solidus,madetech/spree,vmatekole/spree,lsirivong/solidus,vinsol/spree,dotandbo/spree,Migweld/spree,lyzxsc/spree,groundctrl/spree,ayb/spree,Kagetsuki/spree,AgilTec/spree,mleglise/spree,rbngzlv/spree,berkes/spree,StemboltHQ/spree,bonobos/solidus,volpejoaquin/spree,Ropeney/spree,miyazawatomoka/spree,hoanghiep90/spree,camelmasa/spree,Mayvenn/spree,shioyama/spree,Hawaiideveloper/shoppingcart,nooysters/spree,ramkumar-kr/spree,camelmasa/spree,piousbox/spree,freerunningtech/spree,pulkit21/spree,CiscoCloud/spree,hifly/spree,dotandbo/spree,vinayvinsol/spree,rajeevriitm/spree,vmatekole/spree,camelmasa/spree,vmatekole/spree,abhishekjain16/spree,devilcoders/solidus,alepore/spree,vcavallo/spree,project-eutopia/spree,richardnuno/solidus,degica/spree,lsirivong/spree,tesserakt/clean_spree,HealthWave/spree,JuandGirald/spree,berkes/spree,vmatekole/spree,quentinuys/spree,jhawthorn/spree,zaeznet/spree,jparr/spree,gautamsawhney/spree,jaspreet21anand/spree,CJMrozek/spree,JuandGirald/spree,jaspreet21anand/spree,jhawthorn/spree,pervino/spree,siddharth28/spree,pervino/solidus,brchristian/spree,Machpowersystems/spree_mach,gregoryrikson/spree-sample,alvinjean/spree,jsurdilla/solidus,watg/spree,grzlus/spree,calvinl/spree,quentinuys/spree,LBRapid/spree,vinsol/spree,brchristian/spree,xuewenfei/solidus,Hawaiideveloper/shoppingcart,tesserakt/clean_spree,rakibulislam/spree,reinaris/spree,CiscoCloud/spree,cutefrank/spree,woboinc/spree,nooysters/spree,hoanghiep90/spree,maybii/spree,Migweld/spree,richardnuno/solidus,azclick/spree,shekibobo/spree,ramkumar-kr/spree,judaro13/spree-fork,grzlus/solidus,Antdesk/karpal-spree,Engeltj/spree,dafontaine/spree,Hates/spree,raow/spree,dandanwei/spree,Senjai/solidus,pjmj777/spree,ckk-scratch/solidus,biagidp/spree,project-eutopia/spree,alepore/spree,richardnuno/solidus,patdec/spree,LBRapid/spree,judaro13/spree-fork,surfdome/spree,progsri/spree,vcavallo/spree,sliaquat/spree,lzcabrera/spree-1-3-stable,jordan-brough/solidus,vinsol/spree,Nevensoft/spree,forkata/solidus,joanblake/spree,sfcgeorge/spree,jordan-brough/spree,JuandGirald/spree,KMikhaylovCTG/spree,net2b/spree,scottcrawford03/solidus,ayb/spree,Boomkat/spree,dandanwei/spree,DarkoP/spree,athal7/solidus,AgilTec/spree,judaro13/spree-fork,pjmj777/spree,mleglise/spree,Arpsara/solidus,piousbox/spree,jimblesm/spree,bricesanchez/spree,archSeer/spree,jasonfb/spree,beni55/spree,hoanghiep90/spree,tomash/spree,KMikhaylovCTG/spree,jordan-brough/spree,yushine/spree,welitonfreitas/spree,KMikhaylovCTG/spree,tancnle/spree,brchristian/spree,yiqing95/spree,lsirivong/solidus,karlitxo/spree,lyzxsc/spree,yomishra/pce,reinaris/spree,omarsar/spree,vivekamn/spree,orenf/spree,freerunningtech/spree,codesavvy/sandbox,derekluo/spree,rbngzlv/spree,FadliKun/spree,grzlus/spree,devilcoders/solidus,reidblomquist/spree,madetech/spree,pulkit21/spree,ahmetabdi/spree,edgward/spree,knuepwebdev/FloatTubeRodHolders,firman/spree,pulkit21/spree,rajeevriitm/spree,mindvolt/spree,odk211/spree,josephholsten/plain-sight,gregoryrikson/spree-sample,preston-scott/spree,Boomkat/spree,gautamsawhney/spree,derekluo/spree,azranel/spree,firman/spree,derekluo/spree,adaddeo/spree,yiqing95/spree,project-eutopia/spree,keatonrow/spree,RatioClothing/spree,bricesanchez/spree,xuewenfei/solidus,jasonfb/spree,sideci-sample/sideci-sample-spree,alvinjean/spree,progsri/spree,Mayvenn/spree,grzlus/spree,firman/spree,yushine/spree,calvinl/spree,woboinc/spree,scottcrawford03/solidus,vulk/spree,JDutil/spree,DarkoP/spree,reidblomquist/spree,degica/spree,caiqinghua/spree,wolfieorama/spree,APohio/spree,piousbox/spree,mleglise/spree,CJMrozek/spree,PhoenixTeam/spree_phoenix,Lostmyname/spree,calvinl/spree,alvinjean/spree,DynamoMTL/spree,moneyspyder/spree,NerdsvilleCEO/spree,CJMrozek/spree,vulk/spree,alvinjean/spree,ckk-scratch/solidus,builtbybuffalo/spree,forkata/solidus,bryanmtl/spree_clear2pay,dandanwei/spree,assembledbrands/spree,dandanwei/spree,kitwalker12/spree,Kagetsuki/spree,Mayvenn/spree,abhishekjain16/spree,StemboltHQ/spree,njerrywerry/spree,maybii/spree,SadTreeFriends/spree,agient/agientstorefront,FadliKun/spree,vivekamn/spree,DynamoMTL/spree,Hawaiideveloper/shoppingcart,raow/spree,vinsol/spree,jhawthorn/spree,xuewenfei/solidus,HealthWave/spree,carlesjove/spree,jspizziri/spree,beni55/spree,Kagetsuki/spree,moneyspyder/spree,mindvolt/spree,fahidnasir/spree,JDutil/spree,zamiang/spree,knuepwebdev/FloatTubeRodHolders,azranel/spree,trigrass2/spree,adaddeo/spree,dotandbo/spree,Hates/spree,Lostmyname/spree,Hates/spree,ahmetabdi/spree,progsri/spree,madetech/spree,tomash/spree,project-eutopia/spree,moneyspyder/spree,odk211/spree,softr8/spree,fahidnasir/spree,rbngzlv/spree,yushine/spree,useiichi/spree,bonobos/solidus,groundctrl/spree,PhoenixTeam/spree_phoenix,karlitxo/spree,pervino/solidus,berkes/spree,ujai/spree,vcavallo/spree,codesavvy/sandbox,carlesjove/spree,zaeznet/spree,sfcgeorge/spree,jimblesm/spree,volpejoaquin/spree,alejandromangione/spree,orenf/spree,lyzxsc/spree,imella/spree,surfdome/spree,biagidp/spree,caiqinghua/spree,NerdsvilleCEO/spree,jsurdilla/solidus,welitonfreitas/spree,grzlus/solidus,odk211/spree,Boomkat/spree,Senjai/solidus,knuepwebdev/FloatTubeRodHolders,thogg4/spree,tailic/spree,locomotivapro/spree,rakibulislam/spree,TimurTarasenko/spree,delphsoft/spree-store-ballchair,raow/spree,madetech/spree,cutefrank/spree,sliaquat/spree,keatonrow/spree,urimikhli/spree,jasonfb/spree,alejandromangione/spree,TimurTarasenko/spree,njerrywerry/spree,bricesanchez/spree,pervino/solidus,calvinl/spree,yomishra/pce,DarkoP/spree,jeffboulet/spree,rajeevriitm/spree,jparr/spree,radarseesradar/spree,ayb/spree,joanblake/spree,orenf/spree,Mayvenn/spree,mindvolt/spree,APohio/spree,abhishekjain16/spree,dotandbo/spree,reinaris/spree,firman/spree,locomotivapro/spree,degica/spree,radarseesradar/spree,tesserakt/clean_spree,gregoryrikson/spree-sample,jordan-brough/solidus,yomishra/pce,ckk-scratch/solidus,reidblomquist/spree,joanblake/spree,sfcgeorge/spree,FadliKun/spree,tomash/spree,nooysters/spree
|
ruby
|
## Code Before:
SPREE_ROOT = File.expand_path(File.join(File.dirname(__FILE__), "..")) unless defined? SPREE_ROOT
unless defined? Spree::Version
module Spree
module Version
Major = '0'
Minor = '9'
Tiny = '99'
class << self
def to_s
[Major, Minor, Tiny].join('.')
end
alias :to_str :to_s
end
end
end
end
## Instruction:
Allow for pre-release gem versions.
## Code After:
SPREE_ROOT = File.expand_path(File.join(File.dirname(__FILE__), "..")) unless defined? SPREE_ROOT
unless defined? Spree::Version
module Spree
module Version
Major = '0'
Minor = '10'
Tiny = '0'
Pre = nil # 'beta'
class << self
def to_s
v = "#{Major}.#{Minor}.#{Tiny}"
Pre ? "#{v}.#{Pre}" : v
end
alias :to_str :to_s
end
end
end
end
|
793e31c814519453f649bd8f7bc898caa35a07b4
|
app/js/react-em.js
|
app/js/react-em.js
|
var CommentBox = React.createClass({
render: function() {
return (
<div className="commentBox">
<h1>Comments</h1>
<CommentList />
<CommentForm />
</div>
);
}
});
var CommentList = React.createClass({
render: function() {
return (
<div className="commentList">
<Comment author="Clint Eastwood">This is one comment</Comment>
<Comment author="John Smith">This is *another* comment</Comment>
</div>
);
}
});
var Comment = React.createClass({
render: function() {
return (
<div className="comment">
<h2 className="commentAuthor">
{this.props.author}
</h2>
{this.props.children}
</div>
);
}
});
var CommentForm = React.createClass({
render: function() {
return (
<div className="commentForm">
Hello, world! I am a CommentForm.
</div>
);
}
});
ReactDOM.render(
<CommentBox />,
document.getElementById('content')
);
|
var data = [
{id: 1, author: "Clint Eastwood", text: "This is one comment"},
{id: 2, author: "Eric Modeen", text: "This is *another* comment"}
];
var CommentBox = React.createClass({
render: function() {
return (
<div className="commentBox">
<h1>Comments</h1>
<CommentList data={this.props.data} />
<CommentForm />
</div>
);
}
});
var CommentList = React.createClass({
render: function() {
var commentNodes = this.props.data.map(function(comment) {
return (
<Comment author={comment.author} key={comment.id}>
{comment.text}
</Comment>
);
});
return (
<div className="commentList">
{commentNodes}
</div>
);
}
});
var Comment = React.createClass({
render: function() {
return (
<div className="comment">
<h2 className="commentAuthor">
{this.props.author}
</h2>
{this.props.children}
</div>
);
}
});
var CommentForm = React.createClass({
render: function() {
return (
<div className="commentForm">
Hello, world! I am a CommentForm.
</div>
);
}
});
ReactDOM.render(
<CommentBox data={data} />,
document.getElementById('content')
);
|
Use JSON to pass in data to CommentList
|
Use JSON to pass in data to CommentList
|
JavaScript
|
mit
|
emodeen/healthcare-dashboard-angular,emodeen/nrdsc,emodeen/nrdsc,emodeen/nrdsc,emodeen/healthcare-dashboard-angular,emodeen/nrdsc,emodeen/healthcare-dashboard-angular
|
javascript
|
## Code Before:
var CommentBox = React.createClass({
render: function() {
return (
<div className="commentBox">
<h1>Comments</h1>
<CommentList />
<CommentForm />
</div>
);
}
});
var CommentList = React.createClass({
render: function() {
return (
<div className="commentList">
<Comment author="Clint Eastwood">This is one comment</Comment>
<Comment author="John Smith">This is *another* comment</Comment>
</div>
);
}
});
var Comment = React.createClass({
render: function() {
return (
<div className="comment">
<h2 className="commentAuthor">
{this.props.author}
</h2>
{this.props.children}
</div>
);
}
});
var CommentForm = React.createClass({
render: function() {
return (
<div className="commentForm">
Hello, world! I am a CommentForm.
</div>
);
}
});
ReactDOM.render(
<CommentBox />,
document.getElementById('content')
);
## Instruction:
Use JSON to pass in data to CommentList
## Code After:
var data = [
{id: 1, author: "Clint Eastwood", text: "This is one comment"},
{id: 2, author: "Eric Modeen", text: "This is *another* comment"}
];
var CommentBox = React.createClass({
render: function() {
return (
<div className="commentBox">
<h1>Comments</h1>
<CommentList data={this.props.data} />
<CommentForm />
</div>
);
}
});
var CommentList = React.createClass({
render: function() {
var commentNodes = this.props.data.map(function(comment) {
return (
<Comment author={comment.author} key={comment.id}>
{comment.text}
</Comment>
);
});
return (
<div className="commentList">
{commentNodes}
</div>
);
}
});
var Comment = React.createClass({
render: function() {
return (
<div className="comment">
<h2 className="commentAuthor">
{this.props.author}
</h2>
{this.props.children}
</div>
);
}
});
var CommentForm = React.createClass({
render: function() {
return (
<div className="commentForm">
Hello, world! I am a CommentForm.
</div>
);
}
});
ReactDOM.render(
<CommentBox data={data} />,
document.getElementById('content')
);
|
f1daedf4c2d20d85e899a033726b81728633fd90
|
Widgets/Widgets/PictureOfTheDayWidget+LocalizedStrings.swift
|
Widgets/Widgets/PictureOfTheDayWidget+LocalizedStrings.swift
|
import Foundation
import WMF
extension PictureOfTheDayWidget {
enum LocalizedStrings {
static let widgetTitle = WMFLocalizedString("potd-widget-title", value:"Picture of the day", comment: "Text for title of Picture of the day widget.")
static let widgetDescription = WMFLocalizedString("potd-widget-description", value:"Enjoy a beautiful daily photo selected by our community.", comment: "Text for description of Picture of the day widget displayed when adding to home screen.")
static let sampleEntryDescription = WMFLocalizedString("potd-widget-description", value:"Two bulls running while the jockey holds on to them in pacu jawi (from Minangkabau, \"bull race\"), a traditional bull race in Tanah Datar, West Sumatra, Indonesia. 2015, Final-45.", comment: "Text for sample entry image caption. It is displayed when we we are unable to fetch Picture of the Day data.")
}
}
|
import Foundation
import WMF
extension PictureOfTheDayWidget {
enum LocalizedStrings {
static let widgetTitle = WMFLocalizedString("potd-widget-title", value:"Picture of the day", comment: "Text for title of Picture of the day widget.")
static let widgetDescription = WMFLocalizedString("potd-widget-description", value:"Enjoy a beautiful daily photo selected by our community.", comment: "Text for description of Picture of the day widget displayed when adding to home screen.")
static let sampleEntryDescription = WMFLocalizedString("potd-sample-entry-description", value:"Two bulls running while the jockey holds on to them in pacu jawi (from Minangkabau, \"bull race\"), a traditional bull race in Tanah Datar, West Sumatra, Indonesia. 2015, Final-45.", comment: "Text for sample entry image caption. It is displayed when we we are unable to fetch Picture of the day data.")
}
}
|
Rename localized string key for sample entry description.
|
Rename localized string key for sample entry description.
|
Swift
|
mit
|
wikimedia/wikipedia-ios,wikimedia/wikipedia-ios,wikimedia/wikipedia-ios,wikimedia/wikipedia-ios,wikimedia/wikipedia-ios,wikimedia/wikipedia-ios,wikimedia/wikipedia-ios
|
swift
|
## Code Before:
import Foundation
import WMF
extension PictureOfTheDayWidget {
enum LocalizedStrings {
static let widgetTitle = WMFLocalizedString("potd-widget-title", value:"Picture of the day", comment: "Text for title of Picture of the day widget.")
static let widgetDescription = WMFLocalizedString("potd-widget-description", value:"Enjoy a beautiful daily photo selected by our community.", comment: "Text for description of Picture of the day widget displayed when adding to home screen.")
static let sampleEntryDescription = WMFLocalizedString("potd-widget-description", value:"Two bulls running while the jockey holds on to them in pacu jawi (from Minangkabau, \"bull race\"), a traditional bull race in Tanah Datar, West Sumatra, Indonesia. 2015, Final-45.", comment: "Text for sample entry image caption. It is displayed when we we are unable to fetch Picture of the Day data.")
}
}
## Instruction:
Rename localized string key for sample entry description.
## Code After:
import Foundation
import WMF
extension PictureOfTheDayWidget {
enum LocalizedStrings {
static let widgetTitle = WMFLocalizedString("potd-widget-title", value:"Picture of the day", comment: "Text for title of Picture of the day widget.")
static let widgetDescription = WMFLocalizedString("potd-widget-description", value:"Enjoy a beautiful daily photo selected by our community.", comment: "Text for description of Picture of the day widget displayed when adding to home screen.")
static let sampleEntryDescription = WMFLocalizedString("potd-sample-entry-description", value:"Two bulls running while the jockey holds on to them in pacu jawi (from Minangkabau, \"bull race\"), a traditional bull race in Tanah Datar, West Sumatra, Indonesia. 2015, Final-45.", comment: "Text for sample entry image caption. It is displayed when we we are unable to fetch Picture of the day data.")
}
}
|
7c6af226c601e337a4d4a11f345a0be5034fab42
|
src/router/index.js
|
src/router/index.js
|
import Vue from 'vue';
import VueResource from 'vue-resource';
import Router from 'vue-router';
import Endpoint from '@/components/Endpoint';
import EndpointList from '@/components/EndpointList';
import Home from '@/components/Home';
import yaml from 'js-yaml';
Vue.use(Router);
Vue.use(VueResource);
const router = new Router({
routes: [
{
path: '/',
name: 'Home',
component: Home,
},
],
});
const yamlPath = '/static/yaml';
Vue.http.get(`${yamlPath}/base/base_endpoints.yaml`).then((response) => {
const baseEndpoints = yaml.load(response.body);
const routes = [];
baseEndpoints.forEach((base) => {
const { title, name } = base;
routes.push({
path: `/${name}`,
name: title,
component: EndpointList,
});
Vue.http.get(`${yamlPath}/endpoints/${name}.yaml`).then((endResp) => {
const endpointRoutes = [];
const { body } = endResp;
const data = yaml.load(body);
const basePath = data.base_path;
const { endpoints } = data;
endpoints.forEach((end) => {
const { route } = end;
const path = `${basePath}/${route}`;
endpointRoutes.push({
path,
name: path,
component: Endpoint,
});
});
router.addRoutes(endpointRoutes);
});
});
router.addRoutes(routes);
});
export default router;
|
import Vue from 'vue';
import VueResource from 'vue-resource';
import Router from 'vue-router';
import Endpoint from '@/components/Endpoint';
import EndpointList from '@/components/EndpointList';
import Home from '@/components/Home';
import yaml from 'js-yaml';
Vue.use(Router);
Vue.use(VueResource);
const router = new Router({
routes: [
{
path: '/',
name: 'Home',
component: Home,
},
],
});
const yamlPath = '/static/yaml';
Vue.http.get(`${yamlPath}/base/base_endpoints.yaml`).then((response) => {
const baseEndpoints = yaml.load(response.body);
const routes = [];
baseEndpoints.forEach((base) => {
const { title, name } = base;
routes.push({
path: `/${name}`,
name: title,
component: EndpointList,
});
});
router.addRoutes(routes);
});
export default router;
|
Remove unnecessary routes for specific routes
|
Remove unnecessary routes for specific routes
|
JavaScript
|
mit
|
Decicus/DecAPI-Docs,Decicus/DecAPI-Docs
|
javascript
|
## Code Before:
import Vue from 'vue';
import VueResource from 'vue-resource';
import Router from 'vue-router';
import Endpoint from '@/components/Endpoint';
import EndpointList from '@/components/EndpointList';
import Home from '@/components/Home';
import yaml from 'js-yaml';
Vue.use(Router);
Vue.use(VueResource);
const router = new Router({
routes: [
{
path: '/',
name: 'Home',
component: Home,
},
],
});
const yamlPath = '/static/yaml';
Vue.http.get(`${yamlPath}/base/base_endpoints.yaml`).then((response) => {
const baseEndpoints = yaml.load(response.body);
const routes = [];
baseEndpoints.forEach((base) => {
const { title, name } = base;
routes.push({
path: `/${name}`,
name: title,
component: EndpointList,
});
Vue.http.get(`${yamlPath}/endpoints/${name}.yaml`).then((endResp) => {
const endpointRoutes = [];
const { body } = endResp;
const data = yaml.load(body);
const basePath = data.base_path;
const { endpoints } = data;
endpoints.forEach((end) => {
const { route } = end;
const path = `${basePath}/${route}`;
endpointRoutes.push({
path,
name: path,
component: Endpoint,
});
});
router.addRoutes(endpointRoutes);
});
});
router.addRoutes(routes);
});
export default router;
## Instruction:
Remove unnecessary routes for specific routes
## Code After:
import Vue from 'vue';
import VueResource from 'vue-resource';
import Router from 'vue-router';
import Endpoint from '@/components/Endpoint';
import EndpointList from '@/components/EndpointList';
import Home from '@/components/Home';
import yaml from 'js-yaml';
Vue.use(Router);
Vue.use(VueResource);
const router = new Router({
routes: [
{
path: '/',
name: 'Home',
component: Home,
},
],
});
const yamlPath = '/static/yaml';
Vue.http.get(`${yamlPath}/base/base_endpoints.yaml`).then((response) => {
const baseEndpoints = yaml.load(response.body);
const routes = [];
baseEndpoints.forEach((base) => {
const { title, name } = base;
routes.push({
path: `/${name}`,
name: title,
component: EndpointList,
});
});
router.addRoutes(routes);
});
export default router;
|
3edddc31237cf76276a74d67d8e93120a128c22d
|
tests/src/main/scala/ingraph/tests/BiValidationTest.scala
|
tests/src/main/scala/ingraph/tests/BiValidationTest.scala
|
package ingraph.tests
import org.scalatest.FunSuite
class BiValidationTest extends FunSuite {
//val testCases: Seq[LdbcSnbTestCase] = Seq(2, 3, 4, 6, 7, 8, 9, 12, 15, 17, 23, 24) map (new LdbcSnbTestCase("bi", _))
val testCases: Seq[LdbcSnbTestCase] = Seq(2, 4, 6, 7, 8, 9, 12) map (new LdbcSnbTestCase("bi", _))
testCases.foreach {
tc =>
test(s"${tc.name}") {
val neo4jResults = TestRunners.neo4jTestRunner(tc)
val ingraphResults = TestRunners.ingraphTestRunner(tc)
println("neo4j results: " + neo4jResults .map(x => x.toSeq.sortBy(_._1)))
println("ingraph results: " + ingraphResults.map(x => x.toSeq.sortBy(_._1)))
// println(tc.parameters.mkString("Parameters: (\n\t", "\n\t", "\n)"))
// println(neo4jResult.mkString("Results: (\n\t", "\n\t", "\n)"))
assert(neo4jResults == ingraphResults)
}
}
}
|
package ingraph.tests
import org.scalatest.FunSuite
class BiValidationTest extends FunSuite {
//val testCases: Seq[LdbcSnbTestCase] = Seq(2, 3, 4, 6, 7, 8, 9, 12, 15, 17, 23, 24) map (new LdbcSnbTestCase("bi", _))
val testCases: Seq[LdbcSnbTestCase] = Seq(2, 4, 6, 7, 8, 9, 12) map (new LdbcSnbTestCase("bi", _))
testCases.foreach {
tc =>
test(s"${tc.name}") {
val neo4jResults = TestRunners.neo4jTestRunner(tc)
val ingraphResults = TestRunners.ingraphTestRunner(tc)
println("neo4j results: " + neo4jResults .map(x => x.toSeq.sortBy(_._1)))
println("ingraph results: " + ingraphResults.map(x => x.toSeq.sortBy(_._1)))
// println(tc.parameters.mkString("Parameters: (\n\t", "\n\t", "\n)"))
// println(neo4jResult.mkString("Results: (\n\t", "\n\t", "\n)"))
assert(ingraphResults == neo4jResults)
}
}
}
|
Swap results to get proper actual vs. expected order
|
Swap results to get proper actual vs. expected order
|
Scala
|
epl-1.0
|
FTSRG/ingraph,FTSRG/ingraph,FTSRG/ingraph,FTSRG/ingraph,FTSRG/ingraph
|
scala
|
## Code Before:
package ingraph.tests
import org.scalatest.FunSuite
class BiValidationTest extends FunSuite {
//val testCases: Seq[LdbcSnbTestCase] = Seq(2, 3, 4, 6, 7, 8, 9, 12, 15, 17, 23, 24) map (new LdbcSnbTestCase("bi", _))
val testCases: Seq[LdbcSnbTestCase] = Seq(2, 4, 6, 7, 8, 9, 12) map (new LdbcSnbTestCase("bi", _))
testCases.foreach {
tc =>
test(s"${tc.name}") {
val neo4jResults = TestRunners.neo4jTestRunner(tc)
val ingraphResults = TestRunners.ingraphTestRunner(tc)
println("neo4j results: " + neo4jResults .map(x => x.toSeq.sortBy(_._1)))
println("ingraph results: " + ingraphResults.map(x => x.toSeq.sortBy(_._1)))
// println(tc.parameters.mkString("Parameters: (\n\t", "\n\t", "\n)"))
// println(neo4jResult.mkString("Results: (\n\t", "\n\t", "\n)"))
assert(neo4jResults == ingraphResults)
}
}
}
## Instruction:
Swap results to get proper actual vs. expected order
## Code After:
package ingraph.tests
import org.scalatest.FunSuite
class BiValidationTest extends FunSuite {
//val testCases: Seq[LdbcSnbTestCase] = Seq(2, 3, 4, 6, 7, 8, 9, 12, 15, 17, 23, 24) map (new LdbcSnbTestCase("bi", _))
val testCases: Seq[LdbcSnbTestCase] = Seq(2, 4, 6, 7, 8, 9, 12) map (new LdbcSnbTestCase("bi", _))
testCases.foreach {
tc =>
test(s"${tc.name}") {
val neo4jResults = TestRunners.neo4jTestRunner(tc)
val ingraphResults = TestRunners.ingraphTestRunner(tc)
println("neo4j results: " + neo4jResults .map(x => x.toSeq.sortBy(_._1)))
println("ingraph results: " + ingraphResults.map(x => x.toSeq.sortBy(_._1)))
// println(tc.parameters.mkString("Parameters: (\n\t", "\n\t", "\n)"))
// println(neo4jResult.mkString("Results: (\n\t", "\n\t", "\n)"))
assert(ingraphResults == neo4jResults)
}
}
}
|
0fd85e031eec0b8b2e5896185d32c320016ac8db
|
README.md
|
README.md
|
The Sensu handlers must have the team declarations available for consumption.
This data must be in hiera because currently the monitoring\_check module also
utilizes it.
On the plus side, hiera allows you to describe your team configuration easily:
```
sensu_handlers::teams:
dev1:
pagerduty_api_key: 1234
pages_irc_channel: 'dev1-pages'
notifications_irc_channel: 'dev1'
dev2:
pagerduty_api_key: 4567
pages_irc_channel: 'dev2-pages'
notifications_irc_channel: 'dev2'
frontend:
# The frontend team doesn't use pagerduty yet, just emails
notifications_irc_channel: 'frontend'
pages_irc_channel: 'frontend'
notification_email: 'frontend+pages@localhost'
project: WWW
ops:
pagerduty_api_key: 78923
pages_irc_channel: 'ops-pages'
notifications_irc_channel: 'operations-notifications'
notification_email: 'operations@localhost'
project: OPS
hardware:
# Uses the ops Pagerduty service for page-worhty events,
# but otherwise just jira tickets
pagerduty_api_key: 78923
project: METAL
```
|

# Yelp sensu\_handlers
## Usage
### Teams
The Sensu handlers must have the team declarations available for consumption.
This data must be in hiera because currently the monitoring\_check module also
utilizes it.
On the plus side, hiera allows you to describe your team configuration easily:
```
sensu_handlers::teams:
dev1:
pagerduty_api_key: 1234
pages_irc_channel: 'dev1-pages'
notifications_irc_channel: 'dev1'
dev2:
pagerduty_api_key: 4567
pages_irc_channel: 'dev2-pages'
notifications_irc_channel: 'dev2'
frontend:
# The frontend team doesn't use pagerduty yet, just emails
notifications_irc_channel: 'frontend'
pages_irc_channel: 'frontend'
notification_email: 'frontend+pages@localhost'
project: WWW
ops:
pagerduty_api_key: 78923
pages_irc_channel: 'ops-pages'
notifications_irc_channel: 'operations-notifications'
notification_email: 'operations@localhost'
project: OPS
hardware:
# Uses the ops Pagerduty service for page-worhty events,
# but otherwise just jira tickets
pagerduty_api_key: 78923
project: METAL
```
|
Add the travis build status icon
|
Add the travis build status icon
|
Markdown
|
apache-2.0
|
somic/sensu_handlers
|
markdown
|
## Code Before:
The Sensu handlers must have the team declarations available for consumption.
This data must be in hiera because currently the monitoring\_check module also
utilizes it.
On the plus side, hiera allows you to describe your team configuration easily:
```
sensu_handlers::teams:
dev1:
pagerduty_api_key: 1234
pages_irc_channel: 'dev1-pages'
notifications_irc_channel: 'dev1'
dev2:
pagerduty_api_key: 4567
pages_irc_channel: 'dev2-pages'
notifications_irc_channel: 'dev2'
frontend:
# The frontend team doesn't use pagerduty yet, just emails
notifications_irc_channel: 'frontend'
pages_irc_channel: 'frontend'
notification_email: 'frontend+pages@localhost'
project: WWW
ops:
pagerduty_api_key: 78923
pages_irc_channel: 'ops-pages'
notifications_irc_channel: 'operations-notifications'
notification_email: 'operations@localhost'
project: OPS
hardware:
# Uses the ops Pagerduty service for page-worhty events,
# but otherwise just jira tickets
pagerduty_api_key: 78923
project: METAL
```
## Instruction:
Add the travis build status icon
## Code After:

# Yelp sensu\_handlers
## Usage
### Teams
The Sensu handlers must have the team declarations available for consumption.
This data must be in hiera because currently the monitoring\_check module also
utilizes it.
On the plus side, hiera allows you to describe your team configuration easily:
```
sensu_handlers::teams:
dev1:
pagerduty_api_key: 1234
pages_irc_channel: 'dev1-pages'
notifications_irc_channel: 'dev1'
dev2:
pagerduty_api_key: 4567
pages_irc_channel: 'dev2-pages'
notifications_irc_channel: 'dev2'
frontend:
# The frontend team doesn't use pagerduty yet, just emails
notifications_irc_channel: 'frontend'
pages_irc_channel: 'frontend'
notification_email: 'frontend+pages@localhost'
project: WWW
ops:
pagerduty_api_key: 78923
pages_irc_channel: 'ops-pages'
notifications_irc_channel: 'operations-notifications'
notification_email: 'operations@localhost'
project: OPS
hardware:
# Uses the ops Pagerduty service for page-worhty events,
# but otherwise just jira tickets
pagerduty_api_key: 78923
project: METAL
```
|
5f4889dfa722a58ec22ea827e6150bc32141f304
|
README.md
|
README.md
|
Zeegaree
========
Stopwatch, Timer and Time Management
## Where does it work?
Zeegaree was developed to work with desktop version of Ubuntu Unity in mind but it also should work on other Linux distros.
## Dependencies
**Zeegaree needs few packages in order to work properly.**
These are:
- libqt4-sql-sqlite
- python-pyside
- gir1.2-unity
- gir1.2-notify
- maybe something more, let me know
## How to run it?
1. Download [zip with all the files](https://github.com/mivoligo/Zeegaree/archive/master.zip)
2. Unpack it somewhere
3. From your terminal run: `python path-to-zeegaree.py`
|
Zeegaree
========
Stopwatch, Timer and Time Management
## Where does it work?
Zeegaree was developed to work with desktop version of Ubuntu Unity in mind but it also should work on other Linux distros.
## Dependencies
**Zeegaree needs few packages in order to work properly.**
These are:
- libqt4-sql-sqlite
- python-pyside
- gir1.2-unity
- gir1.2-notify
- python-dbus
- maybe something more, let me know
## How to run it?
1. Download [zip with all the files](https://github.com/mivoligo/Zeegaree/archive/master.zip)
2. Unpack it somewhere
3. From your terminal run: `python path-to-zeegaree.py`
|
Add info about "python-dbus" to dependencies
|
Add info about "python-dbus" to dependencies
@teobaluta noticed that "python-dbus" is needed on Ubuntu 16.04 ( https://github.com/mivoligo/Zeegaree/issues/8 )
|
Markdown
|
apache-2.0
|
mivoligo/Zeegaree,mivoligo/Zeegaree
|
markdown
|
## Code Before:
Zeegaree
========
Stopwatch, Timer and Time Management
## Where does it work?
Zeegaree was developed to work with desktop version of Ubuntu Unity in mind but it also should work on other Linux distros.
## Dependencies
**Zeegaree needs few packages in order to work properly.**
These are:
- libqt4-sql-sqlite
- python-pyside
- gir1.2-unity
- gir1.2-notify
- maybe something more, let me know
## How to run it?
1. Download [zip with all the files](https://github.com/mivoligo/Zeegaree/archive/master.zip)
2. Unpack it somewhere
3. From your terminal run: `python path-to-zeegaree.py`
## Instruction:
Add info about "python-dbus" to dependencies
@teobaluta noticed that "python-dbus" is needed on Ubuntu 16.04 ( https://github.com/mivoligo/Zeegaree/issues/8 )
## Code After:
Zeegaree
========
Stopwatch, Timer and Time Management
## Where does it work?
Zeegaree was developed to work with desktop version of Ubuntu Unity in mind but it also should work on other Linux distros.
## Dependencies
**Zeegaree needs few packages in order to work properly.**
These are:
- libqt4-sql-sqlite
- python-pyside
- gir1.2-unity
- gir1.2-notify
- python-dbus
- maybe something more, let me know
## How to run it?
1. Download [zip with all the files](https://github.com/mivoligo/Zeegaree/archive/master.zip)
2. Unpack it somewhere
3. From your terminal run: `python path-to-zeegaree.py`
|
ca5660d324e5faa4c795bd3d92a6bf61051b0af3
|
src/certificate/randomgenerator.cpp
|
src/certificate/randomgenerator.cpp
|
QT_BEGIN_NAMESPACE_CERTIFICATE
/*!
\class RandomGenerator
\brief The RandomGenerator class is a tool for creating hard random numbers.
The RandomGenerator class provides a source of secure random numbers using
the system's random source (/dev/random on UNIX). The numbers are suitable
for uses such as certificate serial numbers.
*/
/*!
Generates a set of random bytes of the specified size. In order to allow
these to be conveniently used as serial numbers, this method ensures that
the value returned is positive (ie. that the first bit is 0). This means
that you get one less bit of entropy than requested, but avoids
interoperability issues.
Note that this method will either return the number of bytes requested,
or a null QByteArray. It will never return a smaller number.
*/
QByteArray RandomGenerator::getPositiveBytes(int size)
{
// TODO: Steal win32 version from peppe's change
#if defined(Q_OS_UNIX)
QFile randomDevice(QLatin1String("/dev/random"));
randomDevice.open(QIODevice::ReadOnly|QIODevice::Unbuffered);
QByteArray result = randomDevice.read(size);
if (result.size() != size)
return QByteArray(); // We return what's asked for or not at all
// Clear the top bit to ensure the number is positive
char *data = result.data();
*data = *data & 0x07f;
return result;
#endif
return QByteArray();
}
QT_END_NAMESPACE_CERTIFICATE
|
QT_BEGIN_NAMESPACE_CERTIFICATE
/*!
\class RandomGenerator
\brief The RandomGenerator class is a tool for creating hard random numbers.
The RandomGenerator class provides a source of secure random numbers using
the gnutls rnd API. The numbers are suitable for uses such as certificate
serial numbers.
*/
/*!
Generates a set of random bytes of the specified size. In order to allow
these to be conveniently used as serial numbers, this method ensures that
the value returned is positive (ie. that the first bit is 0). This means
that you get one less bit of entropy than requested, but avoids
interoperability issues.
Note that this method will either return the number of bytes requested,
or a null QByteArray. It will never return a smaller number.
*/
QByteArray RandomGenerator::getPositiveBytes(int size)
{
QByteArray result(size, 0);
int errno = gnutls_rnd(GNUTLS_RND_RANDOM, result.data(), size);
if (GNUTLS_E_SUCCESS != errno)
return QByteArray();
// Clear the top bit to ensure the number is positive
char *data = result.data();
*data = *data & 0x07f;
return result;
}
QT_END_NAMESPACE_CERTIFICATE
|
Switch from using /dev/random directly to use gnutls_rnd.
|
Switch from using /dev/random directly to use gnutls_rnd.
This removes the platform specific code, so we should be portable
again.
|
C++
|
lgpl-2.1
|
richmoore/qt-certificate-addon,richmoore/qt-certificate-addon
|
c++
|
## Code Before:
QT_BEGIN_NAMESPACE_CERTIFICATE
/*!
\class RandomGenerator
\brief The RandomGenerator class is a tool for creating hard random numbers.
The RandomGenerator class provides a source of secure random numbers using
the system's random source (/dev/random on UNIX). The numbers are suitable
for uses such as certificate serial numbers.
*/
/*!
Generates a set of random bytes of the specified size. In order to allow
these to be conveniently used as serial numbers, this method ensures that
the value returned is positive (ie. that the first bit is 0). This means
that you get one less bit of entropy than requested, but avoids
interoperability issues.
Note that this method will either return the number of bytes requested,
or a null QByteArray. It will never return a smaller number.
*/
QByteArray RandomGenerator::getPositiveBytes(int size)
{
// TODO: Steal win32 version from peppe's change
#if defined(Q_OS_UNIX)
QFile randomDevice(QLatin1String("/dev/random"));
randomDevice.open(QIODevice::ReadOnly|QIODevice::Unbuffered);
QByteArray result = randomDevice.read(size);
if (result.size() != size)
return QByteArray(); // We return what's asked for or not at all
// Clear the top bit to ensure the number is positive
char *data = result.data();
*data = *data & 0x07f;
return result;
#endif
return QByteArray();
}
QT_END_NAMESPACE_CERTIFICATE
## Instruction:
Switch from using /dev/random directly to use gnutls_rnd.
This removes the platform specific code, so we should be portable
again.
## Code After:
QT_BEGIN_NAMESPACE_CERTIFICATE
/*!
\class RandomGenerator
\brief The RandomGenerator class is a tool for creating hard random numbers.
The RandomGenerator class provides a source of secure random numbers using
the gnutls rnd API. The numbers are suitable for uses such as certificate
serial numbers.
*/
/*!
Generates a set of random bytes of the specified size. In order to allow
these to be conveniently used as serial numbers, this method ensures that
the value returned is positive (ie. that the first bit is 0). This means
that you get one less bit of entropy than requested, but avoids
interoperability issues.
Note that this method will either return the number of bytes requested,
or a null QByteArray. It will never return a smaller number.
*/
QByteArray RandomGenerator::getPositiveBytes(int size)
{
QByteArray result(size, 0);
int errno = gnutls_rnd(GNUTLS_RND_RANDOM, result.data(), size);
if (GNUTLS_E_SUCCESS != errno)
return QByteArray();
// Clear the top bit to ensure the number is positive
char *data = result.data();
*data = *data & 0x07f;
return result;
}
QT_END_NAMESPACE_CERTIFICATE
|
65a4dd3eb836db75ce80c58f2de8b755c04445c9
|
test/test_mechanize_http_auth_challenge.rb
|
test/test_mechanize_http_auth_challenge.rb
|
require 'mechanize/test_case'
class TestMechanizeHttpAuthChallenge < Mechanize::TestCase
def setup
super
@uri = URI 'http://example/'
@AR = Mechanize::HTTP::AuthRealm
@AC = Mechanize::HTTP::AuthChallenge
@challenge = @AC.new 'Digest', { 'realm' => 'r' }, 'Digest realm=r'
end
def test_realm_basic
@challenge.scheme = 'Basic'
expected = @AR.new 'Basic', @uri, 'r'
assert_equal expected, @challenge.realm(@uri + '/foo')
end
def test_realm_digest
expected = @AR.new 'Digest', @uri, 'r'
assert_equal expected, @challenge.realm(@uri + '/foo')
end
def test_realm_unknown
@challenge.scheme = 'Unknown'
e = assert_raises Mechanize::Error do
@challenge.realm(@uri + '/foo')
end
assert_equal 'unknown HTTP authentication scheme Unknown', e.message
end
def test_realm_name
assert_equal 'r', @challenge.realm_name
end
def test_realm_name_ntlm
challenge = @AC.new 'Negotiate, NTLM'
assert_nil challenge.realm_name
end
end
|
require 'mechanize/test_case'
class TestMechanizeHttpAuthChallenge < Mechanize::TestCase
def setup
super
@uri = URI 'http://example/'
@AR = Mechanize::HTTP::AuthRealm
@AC = Mechanize::HTTP::AuthChallenge
@challenge = @AC.new 'Digest', { 'realm' => 'r' }, 'Digest realm=r'
end
def test_realm_basic
@challenge.scheme = 'Basic'
expected = @AR.new 'Basic', @uri, 'r'
assert_equal expected, @challenge.realm(@uri + '/foo')
end
def test_realm_digest
expected = @AR.new 'Digest', @uri, 'r'
assert_equal expected, @challenge.realm(@uri + '/foo')
end
def test_realm_digest_case
challenge = @AC.new 'Digest', { 'realm' => 'R' }, 'Digest realm=R'
expected = @AR.new 'Digest', @uri, 'R'
assert_equal expected, challenge.realm(@uri + '/foo')
end
def test_realm_unknown
@challenge.scheme = 'Unknown'
e = assert_raises Mechanize::Error do
@challenge.realm(@uri + '/foo')
end
assert_equal 'unknown HTTP authentication scheme Unknown', e.message
end
def test_realm_name
assert_equal 'r', @challenge.realm_name
end
def test_realm_name_case
challenge = @AC.new 'Digest', { 'realm' => 'R' }, 'Digest realm=R'
assert_equal 'R', challenge.realm_name
end
def test_realm_name_ntlm
challenge = @AC.new 'Negotiate, NTLM'
assert_nil challenge.realm_name
end
end
|
Add tests for realm case sensitivity in AuthChallenge
|
Add tests for realm case sensitivity in AuthChallenge
As per RFC 1945 (section 11) and RFC 2617, the realm value is case sensitive.
This commit adds tests for realm case sensitivity in
Mechanize::HTTP::AuthChallenge.
|
Ruby
|
mit
|
eligoenergy/mechanize,sparklemotion/mechanize,sparklemotion/mechanize,eligoenergy/mechanize,flavorjones/mechanize
|
ruby
|
## Code Before:
require 'mechanize/test_case'
class TestMechanizeHttpAuthChallenge < Mechanize::TestCase
def setup
super
@uri = URI 'http://example/'
@AR = Mechanize::HTTP::AuthRealm
@AC = Mechanize::HTTP::AuthChallenge
@challenge = @AC.new 'Digest', { 'realm' => 'r' }, 'Digest realm=r'
end
def test_realm_basic
@challenge.scheme = 'Basic'
expected = @AR.new 'Basic', @uri, 'r'
assert_equal expected, @challenge.realm(@uri + '/foo')
end
def test_realm_digest
expected = @AR.new 'Digest', @uri, 'r'
assert_equal expected, @challenge.realm(@uri + '/foo')
end
def test_realm_unknown
@challenge.scheme = 'Unknown'
e = assert_raises Mechanize::Error do
@challenge.realm(@uri + '/foo')
end
assert_equal 'unknown HTTP authentication scheme Unknown', e.message
end
def test_realm_name
assert_equal 'r', @challenge.realm_name
end
def test_realm_name_ntlm
challenge = @AC.new 'Negotiate, NTLM'
assert_nil challenge.realm_name
end
end
## Instruction:
Add tests for realm case sensitivity in AuthChallenge
As per RFC 1945 (section 11) and RFC 2617, the realm value is case sensitive.
This commit adds tests for realm case sensitivity in
Mechanize::HTTP::AuthChallenge.
## Code After:
require 'mechanize/test_case'
class TestMechanizeHttpAuthChallenge < Mechanize::TestCase
def setup
super
@uri = URI 'http://example/'
@AR = Mechanize::HTTP::AuthRealm
@AC = Mechanize::HTTP::AuthChallenge
@challenge = @AC.new 'Digest', { 'realm' => 'r' }, 'Digest realm=r'
end
def test_realm_basic
@challenge.scheme = 'Basic'
expected = @AR.new 'Basic', @uri, 'r'
assert_equal expected, @challenge.realm(@uri + '/foo')
end
def test_realm_digest
expected = @AR.new 'Digest', @uri, 'r'
assert_equal expected, @challenge.realm(@uri + '/foo')
end
def test_realm_digest_case
challenge = @AC.new 'Digest', { 'realm' => 'R' }, 'Digest realm=R'
expected = @AR.new 'Digest', @uri, 'R'
assert_equal expected, challenge.realm(@uri + '/foo')
end
def test_realm_unknown
@challenge.scheme = 'Unknown'
e = assert_raises Mechanize::Error do
@challenge.realm(@uri + '/foo')
end
assert_equal 'unknown HTTP authentication scheme Unknown', e.message
end
def test_realm_name
assert_equal 'r', @challenge.realm_name
end
def test_realm_name_case
challenge = @AC.new 'Digest', { 'realm' => 'R' }, 'Digest realm=R'
assert_equal 'R', challenge.realm_name
end
def test_realm_name_ntlm
challenge = @AC.new 'Negotiate, NTLM'
assert_nil challenge.realm_name
end
end
|
0d871b83165f0f8b7b663516c05b1e6e646dfd1e
|
.travis.yml
|
.travis.yml
|
sudo: required
dist: trusty
language:
- cpp
compiler:
- gcc
before_install:
- pip install --user cpp-coveralls
- echo -n | openssl s_client -connect scan.coverity.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sudo tee -a /etc/ssl/certs/ca-
addons:
apt:
packages:
- ruby
coverity_scan:
project:
name: "igormironchik/read-excel"
description: "Build submitted via Travis CI"
notification_email: [email protected]
build_command: ruby build.rb
branch_pattern: coverity_scan
before_script:
- sudo gem install Mxx_ru
script:
- |
if [ ${COVERITY_SCAN_BRANCH} != 1 ]; then \
ruby build.rb enable_coverage || { exit 1; }; \
coveralls --build-root . --gcov-options '\-lp' -e sample -e test -e lib || { exit 1; }; \
fi
|
sudo: required
dist: trusty
language:
- cpp
compiler:
- gcc
before_install:
- pip install --user cpp-coveralls
- echo -n | openssl s_client -connect scan.coverity.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sudo tee -a /etc/ssl/certs/ca-
addons:
apt:
packages:
- ruby
coverity_scan:
project:
name: "igormironchik/read-excel"
description: "Build submitted via Travis CI"
notification_email: [email protected]
build_command: ruby build.rb
branch_pattern: coverity_scan
before_script:
- sudo gem install Mxx_ru -v 1.6.14.4
script:
- |
if [ ${COVERITY_SCAN_BRANCH} != 1 ]; then \
ruby build.rb enable_coverage || { exit 1; }; \
coveralls --build-root . --gcov-options '\-lp' -e sample -e test -e lib || { exit 1; }; \
fi
|
Rollback to MxxRu 1.6.14.4 in Travis CI.
|
Rollback to MxxRu 1.6.14.4 in Travis CI.
|
YAML
|
mit
|
igormironchik/read-excel
|
yaml
|
## Code Before:
sudo: required
dist: trusty
language:
- cpp
compiler:
- gcc
before_install:
- pip install --user cpp-coveralls
- echo -n | openssl s_client -connect scan.coverity.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sudo tee -a /etc/ssl/certs/ca-
addons:
apt:
packages:
- ruby
coverity_scan:
project:
name: "igormironchik/read-excel"
description: "Build submitted via Travis CI"
notification_email: [email protected]
build_command: ruby build.rb
branch_pattern: coverity_scan
before_script:
- sudo gem install Mxx_ru
script:
- |
if [ ${COVERITY_SCAN_BRANCH} != 1 ]; then \
ruby build.rb enable_coverage || { exit 1; }; \
coveralls --build-root . --gcov-options '\-lp' -e sample -e test -e lib || { exit 1; }; \
fi
## Instruction:
Rollback to MxxRu 1.6.14.4 in Travis CI.
## Code After:
sudo: required
dist: trusty
language:
- cpp
compiler:
- gcc
before_install:
- pip install --user cpp-coveralls
- echo -n | openssl s_client -connect scan.coverity.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sudo tee -a /etc/ssl/certs/ca-
addons:
apt:
packages:
- ruby
coverity_scan:
project:
name: "igormironchik/read-excel"
description: "Build submitted via Travis CI"
notification_email: [email protected]
build_command: ruby build.rb
branch_pattern: coverity_scan
before_script:
- sudo gem install Mxx_ru -v 1.6.14.4
script:
- |
if [ ${COVERITY_SCAN_BRANCH} != 1 ]; then \
ruby build.rb enable_coverage || { exit 1; }; \
coveralls --build-root . --gcov-options '\-lp' -e sample -e test -e lib || { exit 1; }; \
fi
|
43e1f20e85eb78b80c89dfc3456b1544faee4f00
|
lib/sinatra/assetpack.rb
|
lib/sinatra/assetpack.rb
|
require 'rack/test'
module Sinatra
module AssetPack
def self.registered(app)
unless app.root?
raise Error, "Please set :root in your Sinatra app."
end
app.extend ClassMethods
app.helpers Helpers
end
# Returns a list of formats that can be served.
# Anything not in this list will be rejected.
def self.supported_formats
@supported_formats ||= %w(css js png jpg gif)
end
# Returns a map of what MIME format each Tilt type returns.
def self.tilt_formats
@formats ||= {
'scss' => 'css',
'sass' => 'css',
'less' => 'css',
'coffee' => 'js'
}
end
# Returns the inverse of tilt_formats.
def self.tilt_formats_reverse
re = Hash.new { |h, k| h[k] = Array.new }
formats.each { |tilt, out| re[out] << tilt }
out
end
PREFIX = File.dirname(__FILE__)
autoload :ClassMethods, "#{PREFIX}/assetpack/class_methods"
autoload :Options, "#{PREFIX}/assetpack/options"
autoload :Helpers, "#{PREFIX}/assetpack/helpers"
autoload :Package, "#{PREFIX}/assetpack/package"
autoload :Compressor, "#{PREFIX}/assetpack/compressor"
Error = Class.new(StandardError)
require "#{PREFIX}/assetpack/version"
end
end
|
require 'rack/test'
module Sinatra
module AssetPack
def self.registered(app)
unless app.root?
raise Error, "Please set :root in your Sinatra app."
end
app.extend ClassMethods
app.helpers Helpers
end
# Returns a list of formats that can be served.
# Anything not in this list will be rejected.
def self.supported_formats
@supported_formats ||= %w(css js png jpg gif otf eot ttf woff)
end
# Returns a map of what MIME format each Tilt type returns.
def self.tilt_formats
@formats ||= {
'scss' => 'css',
'sass' => 'css',
'less' => 'css',
'coffee' => 'js'
}
end
# Returns the inverse of tilt_formats.
def self.tilt_formats_reverse
re = Hash.new { |h, k| h[k] = Array.new }
formats.each { |tilt, out| re[out] << tilt }
out
end
PREFIX = File.dirname(__FILE__)
autoload :ClassMethods, "#{PREFIX}/assetpack/class_methods"
autoload :Options, "#{PREFIX}/assetpack/options"
autoload :Helpers, "#{PREFIX}/assetpack/helpers"
autoload :Package, "#{PREFIX}/assetpack/package"
autoload :Compressor, "#{PREFIX}/assetpack/compressor"
Error = Class.new(StandardError)
require "#{PREFIX}/assetpack/version"
end
end
|
Add filetypes used in @font-face.
|
Add filetypes used in @font-face.
|
Ruby
|
mit
|
rstacruz/sinatra-assetpack,rstacruz/sinatra-assetpack,flywithmemsl/sinatra-assetpack,flywithmemsl/sinatra-assetpack,rstacruz/sinatra-assetpack,flywithmemsl/sinatra-assetpack,jwhitcraft/sinatra-assetpack,jwhitcraft/sinatra-assetpack,jwhitcraft/sinatra-assetpack
|
ruby
|
## Code Before:
require 'rack/test'
module Sinatra
module AssetPack
def self.registered(app)
unless app.root?
raise Error, "Please set :root in your Sinatra app."
end
app.extend ClassMethods
app.helpers Helpers
end
# Returns a list of formats that can be served.
# Anything not in this list will be rejected.
def self.supported_formats
@supported_formats ||= %w(css js png jpg gif)
end
# Returns a map of what MIME format each Tilt type returns.
def self.tilt_formats
@formats ||= {
'scss' => 'css',
'sass' => 'css',
'less' => 'css',
'coffee' => 'js'
}
end
# Returns the inverse of tilt_formats.
def self.tilt_formats_reverse
re = Hash.new { |h, k| h[k] = Array.new }
formats.each { |tilt, out| re[out] << tilt }
out
end
PREFIX = File.dirname(__FILE__)
autoload :ClassMethods, "#{PREFIX}/assetpack/class_methods"
autoload :Options, "#{PREFIX}/assetpack/options"
autoload :Helpers, "#{PREFIX}/assetpack/helpers"
autoload :Package, "#{PREFIX}/assetpack/package"
autoload :Compressor, "#{PREFIX}/assetpack/compressor"
Error = Class.new(StandardError)
require "#{PREFIX}/assetpack/version"
end
end
## Instruction:
Add filetypes used in @font-face.
## Code After:
require 'rack/test'
module Sinatra
module AssetPack
def self.registered(app)
unless app.root?
raise Error, "Please set :root in your Sinatra app."
end
app.extend ClassMethods
app.helpers Helpers
end
# Returns a list of formats that can be served.
# Anything not in this list will be rejected.
def self.supported_formats
@supported_formats ||= %w(css js png jpg gif otf eot ttf woff)
end
# Returns a map of what MIME format each Tilt type returns.
def self.tilt_formats
@formats ||= {
'scss' => 'css',
'sass' => 'css',
'less' => 'css',
'coffee' => 'js'
}
end
# Returns the inverse of tilt_formats.
def self.tilt_formats_reverse
re = Hash.new { |h, k| h[k] = Array.new }
formats.each { |tilt, out| re[out] << tilt }
out
end
PREFIX = File.dirname(__FILE__)
autoload :ClassMethods, "#{PREFIX}/assetpack/class_methods"
autoload :Options, "#{PREFIX}/assetpack/options"
autoload :Helpers, "#{PREFIX}/assetpack/helpers"
autoload :Package, "#{PREFIX}/assetpack/package"
autoload :Compressor, "#{PREFIX}/assetpack/compressor"
Error = Class.new(StandardError)
require "#{PREFIX}/assetpack/version"
end
end
|
644392bc52d91c0e9476bfd0a0016efa66c095b8
|
script/msgpackify.coffee
|
script/msgpackify.coffee
|
msgpack = require 'msgpack'
r = require('redis').createClient detect_buffers: true
r.keys '*', (err, all_keys) ->
throw err if err
keys = []
for key in all_keys
parts = key.split ':'
continue if (parts.length == 1) || (parts[0] == 'lock')
keys.push key
count = keys.length
for key in keys
do (key) ->
r.get key, (err, val) ->
throw err if err
object = JSON.parse val
buf = msgpack.pack object
r.set key, buf, (err) ->
throw err if err
unless --count
console.log "Packed #{keys.length} keys"
r.end()
|
msgpack = require 'msgpack'
r = require('redis').createClient 6379, 'localhost', detect_buffers: true
r.keys '*', (err, all_keys) ->
throw err if err
keys = []
for key in all_keys
parts = key.split ':'
continue if (parts.length == 1) || (parts[0] == 'lock')
keys.push key
count = keys.length
for key in keys
do (key) ->
r.get key, (err, val) ->
throw err if err
object = JSON.parse val
buf = msgpack.pack object
r.set key, buf, (err) ->
throw err if err
unless --count
console.log "Packed #{keys.length} keys"
r.end()
|
Fix bug in new script
|
Fix bug in new script
|
CoffeeScript
|
mit
|
waterfield/redeye,waterfield/redeye
|
coffeescript
|
## Code Before:
msgpack = require 'msgpack'
r = require('redis').createClient detect_buffers: true
r.keys '*', (err, all_keys) ->
throw err if err
keys = []
for key in all_keys
parts = key.split ':'
continue if (parts.length == 1) || (parts[0] == 'lock')
keys.push key
count = keys.length
for key in keys
do (key) ->
r.get key, (err, val) ->
throw err if err
object = JSON.parse val
buf = msgpack.pack object
r.set key, buf, (err) ->
throw err if err
unless --count
console.log "Packed #{keys.length} keys"
r.end()
## Instruction:
Fix bug in new script
## Code After:
msgpack = require 'msgpack'
r = require('redis').createClient 6379, 'localhost', detect_buffers: true
r.keys '*', (err, all_keys) ->
throw err if err
keys = []
for key in all_keys
parts = key.split ':'
continue if (parts.length == 1) || (parts[0] == 'lock')
keys.push key
count = keys.length
for key in keys
do (key) ->
r.get key, (err, val) ->
throw err if err
object = JSON.parse val
buf = msgpack.pack object
r.set key, buf, (err) ->
throw err if err
unless --count
console.log "Packed #{keys.length} keys"
r.end()
|
09e65fc25e2ff9a5dac6df1d2b0670027752c942
|
test/unittests/front_end/test_setup/test_setup.ts
|
test/unittests/front_end/test_setup/test_setup.ts
|
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/*
* This file is automatically loaded and run by Karma because it automatically
* loads and injects all *.js files it finds.
*/
import type * as Common from '../../../../front_end/core/common/common.js';
import * as ThemeSupport from '../../../../front_end/ui/legacy/theme_support/theme_support.js';
import {resetTestDOM} from '../helpers/DOMHelpers.js';
beforeEach(resetTestDOM);
before(async function() {
/* Larger than normal timeout because we've seen some slowness on the bots */
this.timeout(10000);
});
beforeEach(() => {
// Some unit tests exercise code that assumes a ThemeSupport instance is available.
// Run this in a beforeEach in case an individual test overrides it.
const setting = {
get() {
return 'default';
},
} as Common.Settings.Setting<string>;
ThemeSupport.ThemeSupport.instance({forceNew: true, setting});
});
|
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/*
* This file is automatically loaded and run by Karma because it automatically
* loads and injects all *.js files it finds.
*/
import type * as Common from '../../../../front_end/core/common/common.js';
import * as ThemeSupport from '../../../../front_end/ui/legacy/theme_support/theme_support.js';
import {resetTestDOM} from '../helpers/DOMHelpers.js';
beforeEach(resetTestDOM);
before(async function() {
/* Larger than normal timeout because we've seen some slowness on the bots */
this.timeout(10000);
});
afterEach(() => {
// Clear out any Sinon stubs or spies between individual tests.
sinon.restore();
});
beforeEach(() => {
// Some unit tests exercise code that assumes a ThemeSupport instance is available.
// Run this in a beforeEach in case an individual test overrides it.
const setting = {
get() {
return 'default';
},
} as Common.Settings.Setting<string>;
ThemeSupport.ThemeSupport.instance({forceNew: true, setting});
});
|
Clear sinon stubs between each unit test
|
Clear sinon stubs between each unit test
Consider the following unit tests:
```
describe.only('jack test', () => {
const someObj = {
foo() {
return 2;
},
};
it('does a thing', () => {
const stub = sinon.stub(someObj, 'foo').callsFake(() => {
return 5;
})
assert.strictEqual(someObj.foo(), 5); // this test PASSES
});
it('does another thing', () => {
assert.strictEqual(someObj.foo(), 2); // this test FAILS
});
});
```
The second test fails in our setup because the stub, although it was
created in the first unit test, survives between tests.
To fix this we can call `sinon.restore()`, which ensures that any
stubbed methods get cleaned between runs, and ensures that in the above
test cases both tests pass. `test_setup.ts` is run automatically between
each test, so by adding it to the `afterEach` we ensure each test starts
with a clean slate as far as sinon is concerned.
Fixed: 1275936
Change-Id: Ic218027979b7d5b323d297d90891d741f61d5d88
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3313069
Auto-Submit: Jack Franklin <[email protected]>
Commit-Queue: Johan Bay <[email protected]>
Reviewed-by: Johan Bay <[email protected]>
|
TypeScript
|
bsd-3-clause
|
ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend
|
typescript
|
## Code Before:
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/*
* This file is automatically loaded and run by Karma because it automatically
* loads and injects all *.js files it finds.
*/
import type * as Common from '../../../../front_end/core/common/common.js';
import * as ThemeSupport from '../../../../front_end/ui/legacy/theme_support/theme_support.js';
import {resetTestDOM} from '../helpers/DOMHelpers.js';
beforeEach(resetTestDOM);
before(async function() {
/* Larger than normal timeout because we've seen some slowness on the bots */
this.timeout(10000);
});
beforeEach(() => {
// Some unit tests exercise code that assumes a ThemeSupport instance is available.
// Run this in a beforeEach in case an individual test overrides it.
const setting = {
get() {
return 'default';
},
} as Common.Settings.Setting<string>;
ThemeSupport.ThemeSupport.instance({forceNew: true, setting});
});
## Instruction:
Clear sinon stubs between each unit test
Consider the following unit tests:
```
describe.only('jack test', () => {
const someObj = {
foo() {
return 2;
},
};
it('does a thing', () => {
const stub = sinon.stub(someObj, 'foo').callsFake(() => {
return 5;
})
assert.strictEqual(someObj.foo(), 5); // this test PASSES
});
it('does another thing', () => {
assert.strictEqual(someObj.foo(), 2); // this test FAILS
});
});
```
The second test fails in our setup because the stub, although it was
created in the first unit test, survives between tests.
To fix this we can call `sinon.restore()`, which ensures that any
stubbed methods get cleaned between runs, and ensures that in the above
test cases both tests pass. `test_setup.ts` is run automatically between
each test, so by adding it to the `afterEach` we ensure each test starts
with a clean slate as far as sinon is concerned.
Fixed: 1275936
Change-Id: Ic218027979b7d5b323d297d90891d741f61d5d88
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3313069
Auto-Submit: Jack Franklin <[email protected]>
Commit-Queue: Johan Bay <[email protected]>
Reviewed-by: Johan Bay <[email protected]>
## Code After:
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/*
* This file is automatically loaded and run by Karma because it automatically
* loads and injects all *.js files it finds.
*/
import type * as Common from '../../../../front_end/core/common/common.js';
import * as ThemeSupport from '../../../../front_end/ui/legacy/theme_support/theme_support.js';
import {resetTestDOM} from '../helpers/DOMHelpers.js';
beforeEach(resetTestDOM);
before(async function() {
/* Larger than normal timeout because we've seen some slowness on the bots */
this.timeout(10000);
});
afterEach(() => {
// Clear out any Sinon stubs or spies between individual tests.
sinon.restore();
});
beforeEach(() => {
// Some unit tests exercise code that assumes a ThemeSupport instance is available.
// Run this in a beforeEach in case an individual test overrides it.
const setting = {
get() {
return 'default';
},
} as Common.Settings.Setting<string>;
ThemeSupport.ThemeSupport.instance({forceNew: true, setting});
});
|
db3a73a5fba7c2a587d7983cc48df7730a9d80a5
|
package.json
|
package.json
|
{
"name": "cloudatcost",
"version": "1.2.0",
"description": "CloudAtCost: An Ionic project",
"scripts": {
"start": "ionic serve",
"emulate:ios": "ionic emulate ios --target iPhone-6",
"run:ios": "ionic run ios --device"
},
"dependencies": {
"gulp": "^3.5.6",
"gulp-sass": "^2.3.1",
"gulp-concat": "^2.2.0",
"gulp-minify-css": "^1.2.4",
"gulp-rename": "^1.2.0"
},
"devDependencies": {
"bower": "^1.7.9",
"gulp-util": "^3.0.7",
"shelljs": "^0.7.0"
},
"cordovaPlugins": [
"org.apache.cordova.inappbrowser",
"org.apache.cordova.device",
"com.phonegap.plugins.barcodescanner",
"com.verso.cordova.clipboard"
],
"cordovaPlatforms": [
"android",
"ios"
]
}
|
{
"name": "cloudatcost",
"version": "1.2.0",
"description": "CloudAtCost: An Ionic project",
"scripts": {
"start": "ionic serve",
"emulate:ios": "ionic emulate ios --target iPhone-6",
"run:ios": "ionic run ios --device"
},
"dependencies": {
"gulp": "^3.5.6",
"gulp-sass": "^2.3.1",
"gulp-concat": "^2.2.0",
"gulp-minify-css": "^1.2.4",
"gulp-rename": "^1.2.0"
},
"devDependencies": {
"bower": "^1.7.9",
"gulp-util": "^3.0.7",
"shelljs": "^0.7.0"
},
"cordovaPlugins": [
"org.apache.cordova.inappbrowser",
"org.apache.cordova.device",
"com.phonegap.plugins.barcodescanner",
"com.verso.cordova.clipboard",
"cordova-plugin-whitelist"
],
"cordovaPlatforms": [
"android",
"ios"
]
}
|
Add cordova-whitelist-plugin to allow network requests on android
|
fix(whitelist): Add cordova-whitelist-plugin to allow network requests on android
|
JSON
|
mit
|
AndreasGassmann/cloudatcostapp,AndreasGassmann/cloudatcostapp,AndreasGassmann/cloudatcostapp
|
json
|
## Code Before:
{
"name": "cloudatcost",
"version": "1.2.0",
"description": "CloudAtCost: An Ionic project",
"scripts": {
"start": "ionic serve",
"emulate:ios": "ionic emulate ios --target iPhone-6",
"run:ios": "ionic run ios --device"
},
"dependencies": {
"gulp": "^3.5.6",
"gulp-sass": "^2.3.1",
"gulp-concat": "^2.2.0",
"gulp-minify-css": "^1.2.4",
"gulp-rename": "^1.2.0"
},
"devDependencies": {
"bower": "^1.7.9",
"gulp-util": "^3.0.7",
"shelljs": "^0.7.0"
},
"cordovaPlugins": [
"org.apache.cordova.inappbrowser",
"org.apache.cordova.device",
"com.phonegap.plugins.barcodescanner",
"com.verso.cordova.clipboard"
],
"cordovaPlatforms": [
"android",
"ios"
]
}
## Instruction:
fix(whitelist): Add cordova-whitelist-plugin to allow network requests on android
## Code After:
{
"name": "cloudatcost",
"version": "1.2.0",
"description": "CloudAtCost: An Ionic project",
"scripts": {
"start": "ionic serve",
"emulate:ios": "ionic emulate ios --target iPhone-6",
"run:ios": "ionic run ios --device"
},
"dependencies": {
"gulp": "^3.5.6",
"gulp-sass": "^2.3.1",
"gulp-concat": "^2.2.0",
"gulp-minify-css": "^1.2.4",
"gulp-rename": "^1.2.0"
},
"devDependencies": {
"bower": "^1.7.9",
"gulp-util": "^3.0.7",
"shelljs": "^0.7.0"
},
"cordovaPlugins": [
"org.apache.cordova.inappbrowser",
"org.apache.cordova.device",
"com.phonegap.plugins.barcodescanner",
"com.verso.cordova.clipboard",
"cordova-plugin-whitelist"
],
"cordovaPlatforms": [
"android",
"ios"
]
}
|
80a11d3ccca09d156272d69ed18f1471b9efb55e
|
Cargo.toml
|
Cargo.toml
|
[package]
exclude = [ ".gitmodules", ".gitignore", ".travis.yml" ]
authors = [ "Tom Bebbington <[email protected]>" ]
description = "Just-In-Time Compilation in Rust using LibJIT bindings"
documentation = "http://tombebbington.github.io/jit.rs/"
keywords = [ "compile", "compiler", "jit", "interpreter" ]
license = "MIT"
name = "jit"
readme = "README.md"
repository = "https://github.com/TomBebbington/jit.rs"
version = "0.4.0"
[lib]
name = "jit"
path = "src/jit.rs"
[dependencies]
libjit-sys = "*"
jit_macros = "*"
|
[package]
exclude = [ ".gitmodules", ".gitignore", ".travis.yml" ]
authors = [ "Tom Bebbington <[email protected]>" ]
description = "Just-In-Time Compilation in Rust using LibJIT bindings"
documentation = "http://tombebbington.github.io/jit.rs/"
keywords = [ "compile", "compiler", "jit", "interpreter" ]
license = "MIT"
name = "jit"
readme = "README.md"
repository = "https://github.com/TomBebbington/jit.rs"
version = "0.4.0"
[lib]
name = "jit"
path = "src/jit.rs"
[dependencies.libjit-sys]
path = "sys"
version = "*"
[dependencies.jit_macros]
path = "macro"
version = "*"
|
Use path dependencies for the repo-internal crates.
|
Use path dependencies for the repo-internal crates.
This ensures that git dependencies get the correct version of those
crates.
|
TOML
|
mit
|
TomBebbington/jit.rs,tempbottle/jit.rs,bvssvni/jit.rs
|
toml
|
## Code Before:
[package]
exclude = [ ".gitmodules", ".gitignore", ".travis.yml" ]
authors = [ "Tom Bebbington <[email protected]>" ]
description = "Just-In-Time Compilation in Rust using LibJIT bindings"
documentation = "http://tombebbington.github.io/jit.rs/"
keywords = [ "compile", "compiler", "jit", "interpreter" ]
license = "MIT"
name = "jit"
readme = "README.md"
repository = "https://github.com/TomBebbington/jit.rs"
version = "0.4.0"
[lib]
name = "jit"
path = "src/jit.rs"
[dependencies]
libjit-sys = "*"
jit_macros = "*"
## Instruction:
Use path dependencies for the repo-internal crates.
This ensures that git dependencies get the correct version of those
crates.
## Code After:
[package]
exclude = [ ".gitmodules", ".gitignore", ".travis.yml" ]
authors = [ "Tom Bebbington <[email protected]>" ]
description = "Just-In-Time Compilation in Rust using LibJIT bindings"
documentation = "http://tombebbington.github.io/jit.rs/"
keywords = [ "compile", "compiler", "jit", "interpreter" ]
license = "MIT"
name = "jit"
readme = "README.md"
repository = "https://github.com/TomBebbington/jit.rs"
version = "0.4.0"
[lib]
name = "jit"
path = "src/jit.rs"
[dependencies.libjit-sys]
path = "sys"
version = "*"
[dependencies.jit_macros]
path = "macro"
version = "*"
|
259598230240544af945254ed834a32eebec2608
|
Pod/Classes/Utils/UIColor+HKHex.h
|
Pod/Classes/Utils/UIColor+HKHex.h
|
//
// UIColor+HKHex.h
// HKProjectBase-Sample
//
// Created by Harley.xk on 15/8/26.
// Copyright (c) 2015年 Harley.xk. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface UIColor (HKHex)
+ (UIColor *)colorWithHexString:(NSString *)hexString;
+ (UIColor *)colorWithHexString:(NSString *)hexString alpha:(CGFloat)alpha;
@end
|
//
// UIColor+HKHex.h
// HKProjectBase-Sample
//
// Created by Harley.xk on 15/8/26.
// Copyright (c) 2015年 Harley.xk. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface UIColor (HKHex)
/**
* 使用16进制字符串创建颜色
*
* @param hexString 16进制字符串,可以是 0XFFFFFF/#FFFFFF/FFFFFF 三种格式之一
*
* @return 返回创建的UIColor对象
*/
+ (UIColor *)colorWithHexString:(NSString *)hexString;
+ (UIColor *)colorWithHexString:(NSString *)hexString alpha:(CGFloat)alpha;
@end
|
Add comment to Hex color category
|
Add comment to Hex color category
|
C
|
mit
|
Harley-xk/HKProjectBase,Harley-xk/HKProjectBase,Harley-xk/HKProjectBase
|
c
|
## Code Before:
//
// UIColor+HKHex.h
// HKProjectBase-Sample
//
// Created by Harley.xk on 15/8/26.
// Copyright (c) 2015年 Harley.xk. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface UIColor (HKHex)
+ (UIColor *)colorWithHexString:(NSString *)hexString;
+ (UIColor *)colorWithHexString:(NSString *)hexString alpha:(CGFloat)alpha;
@end
## Instruction:
Add comment to Hex color category
## Code After:
//
// UIColor+HKHex.h
// HKProjectBase-Sample
//
// Created by Harley.xk on 15/8/26.
// Copyright (c) 2015年 Harley.xk. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface UIColor (HKHex)
/**
* 使用16进制字符串创建颜色
*
* @param hexString 16进制字符串,可以是 0XFFFFFF/#FFFFFF/FFFFFF 三种格式之一
*
* @return 返回创建的UIColor对象
*/
+ (UIColor *)colorWithHexString:(NSString *)hexString;
+ (UIColor *)colorWithHexString:(NSString *)hexString alpha:(CGFloat)alpha;
@end
|
159c20827bc1b14aff2608ccfbf194cfc62df07a
|
src/Zuehlke.Eacm.Client/src/app/shared/navbar/navbar.component.html
|
src/Zuehlke.Eacm.Client/src/app/shared/navbar/navbar.component.html
|
<nav class="navbar">
<a md-button class="button" routerLink="/" aria-label="Configuration Manager">
Configuration Manager
</a>
<div class="flex-spacer"></div>
</nav>
|
<nav class="navbar">
<a md-button class="button" routerLink="/" aria-label="Configuration Manager">
Configuration Manager
</a>
<md-menu #projectsMenu="mdMenu">
<a md-button class="button" routerLink="/projects" aria-label="All Projects">
All Projects
</a>
</md-menu>
<button md-icon-button [mdMenuTriggerFor]="projectsMenu">
<md-icon>Projects</md-icon>
</button>
<div class="flex-spacer"></div>
</nav>
|
Add a projects menu button
|
Add a projects menu button
|
HTML
|
mit
|
lehmamic/EnterpriseApplicationConfigurationManager,lehmamic/EnterpriseApplicationConfigurationManager,lehmamic/EnterpriseApplicationConfigurationManager,lehmamic/EnterpriseApplicationConfigurationManager
|
html
|
## Code Before:
<nav class="navbar">
<a md-button class="button" routerLink="/" aria-label="Configuration Manager">
Configuration Manager
</a>
<div class="flex-spacer"></div>
</nav>
## Instruction:
Add a projects menu button
## Code After:
<nav class="navbar">
<a md-button class="button" routerLink="/" aria-label="Configuration Manager">
Configuration Manager
</a>
<md-menu #projectsMenu="mdMenu">
<a md-button class="button" routerLink="/projects" aria-label="All Projects">
All Projects
</a>
</md-menu>
<button md-icon-button [mdMenuTriggerFor]="projectsMenu">
<md-icon>Projects</md-icon>
</button>
<div class="flex-spacer"></div>
</nav>
|
007afa6f32c7cfd9e0157d62113cc81abd6df098
|
README.md
|
README.md
|
A lite Zebra (i.e. a baby Zebra)
|
A lite Zebra (i.e. a baby Zebra)
## Overview
This is a light version of Zebra enabling users to access their forms and submissions through the Ona API. They will not be able to access projects and organisations from this version.
## Component Architecture
+ Login
+ Forms View
+ Submission View
* table-page
* map-page
* chart-page
* details-page
## License
Hatti is released under the [Apache 2.0 License](http://opensource.org/licenses/Apache-2.0).
|
Update readme to include the component architecture of zebra-lite
|
GM: Update readme to include the component architecture of zebra-lite
|
Markdown
|
agpl-3.0
|
onaio/zebra-lite,onaio/zebra-lite
|
markdown
|
## Code Before:
A lite Zebra (i.e. a baby Zebra)
## Instruction:
GM: Update readme to include the component architecture of zebra-lite
## Code After:
A lite Zebra (i.e. a baby Zebra)
## Overview
This is a light version of Zebra enabling users to access their forms and submissions through the Ona API. They will not be able to access projects and organisations from this version.
## Component Architecture
+ Login
+ Forms View
+ Submission View
* table-page
* map-page
* chart-page
* details-page
## License
Hatti is released under the [Apache 2.0 License](http://opensource.org/licenses/Apache-2.0).
|
ae9cf04fb6ef5df90954046a663af2a9d93387de
|
src/gallery.reveal.js
|
src/gallery.reveal.js
|
(function() {
if( typeof window.addEventListener === 'function' ) {
Reveal.addEventListener("slidechanged", function (event) {
if (event.previousSlide.querySelector('.gallery') || document.querySelector('.reveal > .gallery')) {
Gallery.stop();
}
Gallery.start(event.currentSlide);
});
// during initial load
if (Reveal.getCurrentSlide()) {
Gallery.start(Reveal.getCurrentSlide());
}
}
})();
|
(function() {
if( typeof window.addEventListener === 'function' ) {
Reveal.addEventListener("slidechanged", function (event) {
if (event.previousSlide.querySelector('.gallery') || document.querySelector('.reveal > .gallery')) {
Gallery.stop();
}
var galleryNode = event.currentSlide.querySelector('.gallery');
if (galleryNode) {
Gallery.start(galleryNode);
}
});
// during initial load
if (Reveal.getCurrentSlide()) {
var galleryNode = Reveal.getCurrentSlide().querySelector('.gallery');
if (galleryNode) {
Gallery.start(galleryNode);
}
}
}
})();
|
Fix plugin to pass right node in
|
Fix plugin to pass right node in
|
JavaScript
|
mit
|
marcins/revealjs-simple-gallery
|
javascript
|
## Code Before:
(function() {
if( typeof window.addEventListener === 'function' ) {
Reveal.addEventListener("slidechanged", function (event) {
if (event.previousSlide.querySelector('.gallery') || document.querySelector('.reveal > .gallery')) {
Gallery.stop();
}
Gallery.start(event.currentSlide);
});
// during initial load
if (Reveal.getCurrentSlide()) {
Gallery.start(Reveal.getCurrentSlide());
}
}
})();
## Instruction:
Fix plugin to pass right node in
## Code After:
(function() {
if( typeof window.addEventListener === 'function' ) {
Reveal.addEventListener("slidechanged", function (event) {
if (event.previousSlide.querySelector('.gallery') || document.querySelector('.reveal > .gallery')) {
Gallery.stop();
}
var galleryNode = event.currentSlide.querySelector('.gallery');
if (galleryNode) {
Gallery.start(galleryNode);
}
});
// during initial load
if (Reveal.getCurrentSlide()) {
var galleryNode = Reveal.getCurrentSlide().querySelector('.gallery');
if (galleryNode) {
Gallery.start(galleryNode);
}
}
}
})();
|
8d0c1ce42f72cf87f83836487994a51b7fb8c9f5
|
.travis.yml
|
.travis.yml
|
language: java
jdk: oraclejdk8
before_install:
- npm install
after_script:
- grunt test
|
language: java
jdk: oraclejdk8
before_install:
- npm install
after_success:
- ./gradlew build
- grunt test
|
Update to build before QUnit test
|
Update to build before QUnit test
|
YAML
|
mit
|
kvakil/venus,kvakil/venus,kvakil/venus
|
yaml
|
## Code Before:
language: java
jdk: oraclejdk8
before_install:
- npm install
after_script:
- grunt test
## Instruction:
Update to build before QUnit test
## Code After:
language: java
jdk: oraclejdk8
before_install:
- npm install
after_success:
- ./gradlew build
- grunt test
|
c723471a21751382d92fcbe017a9ce673571a601
|
pombola/south_africa/templates/south_africa/latlon_national_view.html
|
pombola/south_africa/templates/south_africa/latlon_national_view.html
|
{% extends 'south_africa/latlon_detail_base_view.html' %}
{% load url from future %}
{% block title %}{{ object.name }} - National Politicians{% endblock %}
{% block subcontent %}
<ul class="tab-links">
<li><a href="{% url 'latlon' lat=location.y lon=location.x %}">Constituency offices</a></li>
<li><a href="{% url 'latlon-national' lat=location.y lon=location.x %}" class="active">National representatives</a></li>
</ul>
<div class="column politicians-results">
<h2>National representatives</h2>
<ul class="unstyled-list">
{% for politician in politicians %}
{% include "core/generic_list_item.html" with object=politician %}
{% empty %}
<li>
<p>No politicians found</p>
</li>
{% endfor %}
</ul>
</div>
<script type="text/javascript" charset="utf-8">
add_kml_to_map( 'http://{{ request.META.HTTP_HOST }}{% url "mapit_index" %}area/{{ object.mapit_area.id }}.kml?simplify_tolerance=0.001' );
</script>
{% endblock %}
|
{% extends 'south_africa/latlon_detail_base_view.html' %}
{% load url from future %}
{% block title %}{{ object.name }} - National Politicians{% endblock %}
{% block subcontent %}
<ul class="tab-links">
<li><a href="{% url 'latlon' lat=location.y lon=location.x %}">Constituency offices</a></li>
<li><a href="{% url 'latlon-national' lat=location.y lon=location.x %}" class="active">National representatives</a></li>
</ul>
<div class="column politicians-results">
<h2>National representatives for {{ object.name }}</h2>
<ul class="unstyled-list">
{% for politician in politicians %}
{% include "core/generic_list_item.html" with object=politician %}
{% empty %}
<li>
<p>No politicians found</p>
</li>
{% endfor %}
</ul>
</div>
<script type="text/javascript" charset="utf-8">
add_kml_to_map( 'http://{{ request.META.HTTP_HOST }}{% url "mapit_index" %}area/{{ object.mapit_area.id }}.kml?simplify_tolerance=0.001' );
</script>
{% endblock %}
|
Add province name to the heading
|
Add province name to the heading
|
HTML
|
agpl-3.0
|
hzj123/56th,geoffkilpin/pombola,ken-muturi/pombola,hzj123/56th,mysociety/pombola,patricmutwiri/pombola,mysociety/pombola,geoffkilpin/pombola,patricmutwiri/pombola,patricmutwiri/pombola,ken-muturi/pombola,hzj123/56th,ken-muturi/pombola,mysociety/pombola,ken-muturi/pombola,mysociety/pombola,ken-muturi/pombola,geoffkilpin/pombola,hzj123/56th,hzj123/56th,geoffkilpin/pombola,patricmutwiri/pombola,mysociety/pombola,geoffkilpin/pombola,hzj123/56th,geoffkilpin/pombola,patricmutwiri/pombola,patricmutwiri/pombola,mysociety/pombola,ken-muturi/pombola
|
html
|
## Code Before:
{% extends 'south_africa/latlon_detail_base_view.html' %}
{% load url from future %}
{% block title %}{{ object.name }} - National Politicians{% endblock %}
{% block subcontent %}
<ul class="tab-links">
<li><a href="{% url 'latlon' lat=location.y lon=location.x %}">Constituency offices</a></li>
<li><a href="{% url 'latlon-national' lat=location.y lon=location.x %}" class="active">National representatives</a></li>
</ul>
<div class="column politicians-results">
<h2>National representatives</h2>
<ul class="unstyled-list">
{% for politician in politicians %}
{% include "core/generic_list_item.html" with object=politician %}
{% empty %}
<li>
<p>No politicians found</p>
</li>
{% endfor %}
</ul>
</div>
<script type="text/javascript" charset="utf-8">
add_kml_to_map( 'http://{{ request.META.HTTP_HOST }}{% url "mapit_index" %}area/{{ object.mapit_area.id }}.kml?simplify_tolerance=0.001' );
</script>
{% endblock %}
## Instruction:
Add province name to the heading
## Code After:
{% extends 'south_africa/latlon_detail_base_view.html' %}
{% load url from future %}
{% block title %}{{ object.name }} - National Politicians{% endblock %}
{% block subcontent %}
<ul class="tab-links">
<li><a href="{% url 'latlon' lat=location.y lon=location.x %}">Constituency offices</a></li>
<li><a href="{% url 'latlon-national' lat=location.y lon=location.x %}" class="active">National representatives</a></li>
</ul>
<div class="column politicians-results">
<h2>National representatives for {{ object.name }}</h2>
<ul class="unstyled-list">
{% for politician in politicians %}
{% include "core/generic_list_item.html" with object=politician %}
{% empty %}
<li>
<p>No politicians found</p>
</li>
{% endfor %}
</ul>
</div>
<script type="text/javascript" charset="utf-8">
add_kml_to_map( 'http://{{ request.META.HTTP_HOST }}{% url "mapit_index" %}area/{{ object.mapit_area.id }}.kml?simplify_tolerance=0.001' );
</script>
{% endblock %}
|
49999de7ac753f57e3c25d9d36c1806f3ec3a0ee
|
omnirose/curve/forms.py
|
omnirose/curve/forms.py
|
from django import forms
from django.forms.models import formset_factory, BaseModelFormSet
from django.forms.widgets import NumberInput
from .models import Reading
class ReadingForm(forms.Form):
ships_head = forms.FloatField(required=False, widget=NumberInput(attrs={'style': "width: 5em;"}))
deviation = forms.FloatField(required=False, widget=NumberInput(attrs={'style': "width: 5em;"}))
ReadingFormSet = formset_factory(form=ReadingForm)
|
from django import forms
from django.forms.models import formset_factory, BaseModelFormSet
from django.forms.widgets import NumberInput
from .models import Reading
class DegreeInput(NumberInput):
"""Set the default style"""
def __init__(self, attrs=None):
if attrs is None:
attrs = {}
attrs['style'] = "width: 5em;"
super(DegreeInput, self).__init__(attrs)
"""Strip decimal points if not needed"""
def _format_value(self, value):
return u"%g" % value
class ReadingForm(forms.Form):
ships_head = forms.FloatField(
required=False,
widget=DegreeInput()
)
deviation = forms.FloatField(
required=False,
widget=DegreeInput()
)
ReadingFormSet = formset_factory(form=ReadingForm)
|
Customize degree widget so that if formats floats more elegantly
|
Customize degree widget so that if formats floats more elegantly
|
Python
|
agpl-3.0
|
OmniRose/omnirose-website,OmniRose/omnirose-website,OmniRose/omnirose-website
|
python
|
## Code Before:
from django import forms
from django.forms.models import formset_factory, BaseModelFormSet
from django.forms.widgets import NumberInput
from .models import Reading
class ReadingForm(forms.Form):
ships_head = forms.FloatField(required=False, widget=NumberInput(attrs={'style': "width: 5em;"}))
deviation = forms.FloatField(required=False, widget=NumberInput(attrs={'style': "width: 5em;"}))
ReadingFormSet = formset_factory(form=ReadingForm)
## Instruction:
Customize degree widget so that if formats floats more elegantly
## Code After:
from django import forms
from django.forms.models import formset_factory, BaseModelFormSet
from django.forms.widgets import NumberInput
from .models import Reading
class DegreeInput(NumberInput):
"""Set the default style"""
def __init__(self, attrs=None):
if attrs is None:
attrs = {}
attrs['style'] = "width: 5em;"
super(DegreeInput, self).__init__(attrs)
"""Strip decimal points if not needed"""
def _format_value(self, value):
return u"%g" % value
class ReadingForm(forms.Form):
ships_head = forms.FloatField(
required=False,
widget=DegreeInput()
)
deviation = forms.FloatField(
required=False,
widget=DegreeInput()
)
ReadingFormSet = formset_factory(form=ReadingForm)
|
24820f57df9ac141eac7557041c5dd945e69a159
|
app/assets/javascripts/admin/admin.js.coffee
|
app/assets/javascripts/admin/admin.js.coffee
|
jQuery ->
$('.locales a:first').tab('show')
$('.accordion-body').on('hidden', ->
$(@).prev().find('i').first().removeClass().addClass('icon-chevron-right')
)
$('.accordion-body').on('shown', ->
$(@).prev().find('i').first().removeClass().addClass('icon-chevron-down'))
$('body').on('.toggle-hidden', 'click', ->
$(@).parents('td').find('div:hidden').show()
false)
$('#request_hidden_user_explanation_reasons').on('click', 'input', ->
$('#request_hidden_user_subject, #request_hidden_user_explanation, #request_hide_button').show()
info_request_id = $('#hide_request_form').attr('data-info-request-id')
reason = $(this).val()
$('#request_hidden_user_explanation_field').val("[loading default text...]")
$.ajax "/hidden_user_explanation?reason=" + reason + "&info_request_id=" + info_request_id,
type: "GET"
dataType: "text"
error: (data, textStatus, jqXHR) ->
$('#request_hidden_user_explanation_field').val("Error: #{textStatus}")
success: (data, textStatus, jqXHR) ->
$('#request_hidden_user_explanation_field').val(data)
)
|
jQuery ->
$('.locales a:first').tab('show')
$('.accordion-body').on('hidden', ->
$(@).prev().find('i').first().removeClass().addClass('icon-chevron-right')
)
$('.accordion-body').on('shown', ->
$(@).prev().find('i').first().removeClass().addClass('icon-chevron-down'))
$('.toggle-hidden').on('click', ->
$(@).parents('td').find('div:hidden').show()
false)
$('#request_hidden_user_explanation_reasons').on('click', 'input', ->
$('#request_hidden_user_subject, #request_hidden_user_explanation, #request_hide_button').show()
info_request_id = $('#hide_request_form').attr('data-info-request-id')
reason = $(this).val()
$('#request_hidden_user_explanation_field').val("[loading default text...]")
$.ajax "/hidden_user_explanation?reason=" + reason + "&info_request_id=" + info_request_id,
type: "GET"
dataType: "text"
error: (data, textStatus, jqXHR) ->
$('#request_hidden_user_explanation_field').val("Error: #{textStatus}")
success: (data, textStatus, jqXHR) ->
$('#request_hidden_user_explanation_field').val(data)
)
|
Fix syntax error in on() method.
|
Fix syntax error in on() method.
Looks like this was a mistake in ec2999ef8c233d30c46dd5181e246916b0145606
|
CoffeeScript
|
agpl-3.0
|
nzherald/alaveteli,andreicristianpetcu/alaveteli,Br3nda/alaveteli,4bic/alaveteli,andreicristianpetcu/alaveteli_old,Br3nda/alaveteli,4bic/alaveteli,andreicristianpetcu/alaveteli_old,andreicristianpetcu/alaveteli_old,andreicristianpetcu/alaveteli_old,andreicristianpetcu/alaveteli,nzherald/alaveteli,4bic/alaveteli,andreicristianpetcu/alaveteli,nzherald/alaveteli,Br3nda/alaveteli,Br3nda/alaveteli,4bic/alaveteli,andreicristianpetcu/alaveteli,andreicristianpetcu/alaveteli,andreicristianpetcu/alaveteli_old,4bic/alaveteli,nzherald/alaveteli,Br3nda/alaveteli,nzherald/alaveteli
|
coffeescript
|
## Code Before:
jQuery ->
$('.locales a:first').tab('show')
$('.accordion-body').on('hidden', ->
$(@).prev().find('i').first().removeClass().addClass('icon-chevron-right')
)
$('.accordion-body').on('shown', ->
$(@).prev().find('i').first().removeClass().addClass('icon-chevron-down'))
$('body').on('.toggle-hidden', 'click', ->
$(@).parents('td').find('div:hidden').show()
false)
$('#request_hidden_user_explanation_reasons').on('click', 'input', ->
$('#request_hidden_user_subject, #request_hidden_user_explanation, #request_hide_button').show()
info_request_id = $('#hide_request_form').attr('data-info-request-id')
reason = $(this).val()
$('#request_hidden_user_explanation_field').val("[loading default text...]")
$.ajax "/hidden_user_explanation?reason=" + reason + "&info_request_id=" + info_request_id,
type: "GET"
dataType: "text"
error: (data, textStatus, jqXHR) ->
$('#request_hidden_user_explanation_field').val("Error: #{textStatus}")
success: (data, textStatus, jqXHR) ->
$('#request_hidden_user_explanation_field').val(data)
)
## Instruction:
Fix syntax error in on() method.
Looks like this was a mistake in ec2999ef8c233d30c46dd5181e246916b0145606
## Code After:
jQuery ->
$('.locales a:first').tab('show')
$('.accordion-body').on('hidden', ->
$(@).prev().find('i').first().removeClass().addClass('icon-chevron-right')
)
$('.accordion-body').on('shown', ->
$(@).prev().find('i').first().removeClass().addClass('icon-chevron-down'))
$('.toggle-hidden').on('click', ->
$(@).parents('td').find('div:hidden').show()
false)
$('#request_hidden_user_explanation_reasons').on('click', 'input', ->
$('#request_hidden_user_subject, #request_hidden_user_explanation, #request_hide_button').show()
info_request_id = $('#hide_request_form').attr('data-info-request-id')
reason = $(this).val()
$('#request_hidden_user_explanation_field').val("[loading default text...]")
$.ajax "/hidden_user_explanation?reason=" + reason + "&info_request_id=" + info_request_id,
type: "GET"
dataType: "text"
error: (data, textStatus, jqXHR) ->
$('#request_hidden_user_explanation_field').val("Error: #{textStatus}")
success: (data, textStatus, jqXHR) ->
$('#request_hidden_user_explanation_field').val(data)
)
|
43ae00206a8c53e5b87c814e6b41e0e711d62bb5
|
scripts/run-all.sh
|
scripts/run-all.sh
|
mkdir -p log
function cleanUp() {
kill `cat log/mongodb.pid`
}
trap cleanUp EXIT
mkdir -p mongodb
mongod --dbpath mongodb --pidfilepath log/mongodb.pid > log/mongodb.log 2>&1 &
scripts/web-server.js > log/webserver.log 2>&1 &
cd ../monkey-tail
supervisor app.js > ../monkey-face/log/app.log 2>&1 &
cd ../monkey-face
echo "Go to http://localhost:8000/app/index.html"
wait
|
mkdir -p log
function cleanUp() {
kill `cat log/mongodb.pid`
}
trap cleanUp EXIT
mkdir -p mongodb
mongod --dbpath mongodb --pidfilepath log/mongodb.pid > log/mongodb.log 2>&1 &
scripts/web-server.js > log/webserver.log 2>&1 &
cd ../monkey-tail
supervisor app.js > ../monkey-face/log/app.log 2>&1 &
supervisor e2eBridge.js > ../monkey-face/log/e2eBridge.log 2>&1 &
cd ../monkey-face
echo "Go to http://localhost:8000/app/index.html"
wait
|
Add e2eBridge to started processes
|
Add e2eBridge to started processes
|
Shell
|
mit
|
veganaut/veganaut,veganaut/veganaut,veganaut/veganaut
|
shell
|
## Code Before:
mkdir -p log
function cleanUp() {
kill `cat log/mongodb.pid`
}
trap cleanUp EXIT
mkdir -p mongodb
mongod --dbpath mongodb --pidfilepath log/mongodb.pid > log/mongodb.log 2>&1 &
scripts/web-server.js > log/webserver.log 2>&1 &
cd ../monkey-tail
supervisor app.js > ../monkey-face/log/app.log 2>&1 &
cd ../monkey-face
echo "Go to http://localhost:8000/app/index.html"
wait
## Instruction:
Add e2eBridge to started processes
## Code After:
mkdir -p log
function cleanUp() {
kill `cat log/mongodb.pid`
}
trap cleanUp EXIT
mkdir -p mongodb
mongod --dbpath mongodb --pidfilepath log/mongodb.pid > log/mongodb.log 2>&1 &
scripts/web-server.js > log/webserver.log 2>&1 &
cd ../monkey-tail
supervisor app.js > ../monkey-face/log/app.log 2>&1 &
supervisor e2eBridge.js > ../monkey-face/log/e2eBridge.log 2>&1 &
cd ../monkey-face
echo "Go to http://localhost:8000/app/index.html"
wait
|
b9a1e215e2ce93daf684dfc1e3b5588352cea375
|
admin/server/routes/signout.js
|
admin/server/routes/signout.js
|
var keystone = require('../../../');
var session = require('../../../lib/session');
module.exports = function (req, res) {
session.signout(req, res, function () {
if (typeof keystone.get('signout redirect') === 'string') {
return res.redirect(keystone.get('signout redirect'));
} else if (typeof keystone.get('signout redirect') === 'function') {
return keystone.get('signout redirect')(req, res);
} else {
return res.redirect('/' + keystone.get('admin path') + '/signin?signedout');
}
});
};
|
var keystone = require('../../../');
var session = require('../../../lib/session');
module.exports = function (req, res) {
session.signout(req, res, function () {
if (typeof keystone.get('signout redirect') === 'string') {
return res.redirect(keystone.get('signout redirect'));
} else if (typeof keystone.get('signout redirect') === 'function') {
return keystone.get('signout redirect')(req, res);
} else {
return res.redirect('/' + keystone.get('admin path') + '/signin?signedout');
// After logging out, the user will be redirected to /signin?signedout
// It shows a bar on top of the sign in panel saying "You have been signed out".
}
});
};
|
Comment for signin?signedout version added
|
Comment for signin?signedout version added
|
JavaScript
|
mit
|
creynders/keystone,creynders/keystone
|
javascript
|
## Code Before:
var keystone = require('../../../');
var session = require('../../../lib/session');
module.exports = function (req, res) {
session.signout(req, res, function () {
if (typeof keystone.get('signout redirect') === 'string') {
return res.redirect(keystone.get('signout redirect'));
} else if (typeof keystone.get('signout redirect') === 'function') {
return keystone.get('signout redirect')(req, res);
} else {
return res.redirect('/' + keystone.get('admin path') + '/signin?signedout');
}
});
};
## Instruction:
Comment for signin?signedout version added
## Code After:
var keystone = require('../../../');
var session = require('../../../lib/session');
module.exports = function (req, res) {
session.signout(req, res, function () {
if (typeof keystone.get('signout redirect') === 'string') {
return res.redirect(keystone.get('signout redirect'));
} else if (typeof keystone.get('signout redirect') === 'function') {
return keystone.get('signout redirect')(req, res);
} else {
return res.redirect('/' + keystone.get('admin path') + '/signin?signedout');
// After logging out, the user will be redirected to /signin?signedout
// It shows a bar on top of the sign in panel saying "You have been signed out".
}
});
};
|
05f151a026bcdc5f671af23025687dd40098e644
|
app/controllers/concerns/webhook_validations.rb
|
app/controllers/concerns/webhook_validations.rb
|
module WebhookValidations
extend ActiveSupport::Concern
def verify_incoming_webhook_address!
if valid_incoming_webhook_address?
true
else
render :status => 404, :json => "{}"
end
end
def valid_incoming_webhook_address?
if Octokit.api_endpoint == "https://api.github.com/"
GithubSourceValidator.new(request.ip).valid?
else
true
end
end
end
|
module WebhookValidations
extend ActiveSupport::Concern
def verify_incoming_webhook_address!
if valid_incoming_webhook_address?
true
else
render :json => {}, :status => :not_found
end
end
def valid_incoming_webhook_address?
if Octokit.api_endpoint == "https://api.github.com/"
GithubSourceValidator.new(request.ip).valid?
else
true
end
end
end
|
Use :not_found instead of 404
|
Use :not_found instead of 404
|
Ruby
|
mit
|
ResultadosDigitais/newrelic_notifier,flowdock/heaven,ngpestelos/heaven,cloudy9101/heaven,kidaa/heaven,digideskio/heaven,cloudy9101/heaven,flowdock/heaven,waysact/heaven,digideskio/heaven,digideskio/heaven,waysact/heaven,eLobato/heaven,ackimwilliams/heaven,flowdock/heaven,LoveMondays/heaven,dLobatog/heaven,TailorDev/heaven,atmos/heaven,rnaveiras/heaven,pulibrary/heaven,shift/heaven,markpundsack/heaven,atmos/heaven,rothsa/heaven,waysact/heaven,sharetribe/heaven,maletor/heaven,markpundsack/heaven,n3tr/heaven,LoveMondays/heaven,sharetribe/heaven,kidaa/heaven,n3tr/heaven,shift/heaven,travis-ci/heaven,jaisonerick/heaven,LoveMondays/heaven,ResultadosDigitais/newrelic_notifier,eLobato/heaven,dLobatog/heaven,ResultadosDigitais/heaven,rnaveiras/heaven,ackimwilliams/heaven,ngpestelos/heaven,rothsa/heaven,ngpestelos/heaven,rnaveiras/heaven,jaisonerick/heaven,TailorDev/heaven,shift/heaven,ackimwilliams/heaven,pulibrary/heaven,travis-ci/heaven,atmos/heaven,maletor/heaven,jaisonerick/heaven,TailorDev/heaven,travis-ci/heaven,maletor/heaven,pulibrary/heaven,n3tr/heaven,ResultadosDigitais/heaven,eLobato/heaven,kidaa/heaven,sharetribe/heaven,cloudy9101/heaven,markpundsack/heaven,ResultadosDigitais/heaven,dLobatog/heaven,ResultadosDigitais/newrelic_notifier,rothsa/heaven
|
ruby
|
## Code Before:
module WebhookValidations
extend ActiveSupport::Concern
def verify_incoming_webhook_address!
if valid_incoming_webhook_address?
true
else
render :status => 404, :json => "{}"
end
end
def valid_incoming_webhook_address?
if Octokit.api_endpoint == "https://api.github.com/"
GithubSourceValidator.new(request.ip).valid?
else
true
end
end
end
## Instruction:
Use :not_found instead of 404
## Code After:
module WebhookValidations
extend ActiveSupport::Concern
def verify_incoming_webhook_address!
if valid_incoming_webhook_address?
true
else
render :json => {}, :status => :not_found
end
end
def valid_incoming_webhook_address?
if Octokit.api_endpoint == "https://api.github.com/"
GithubSourceValidator.new(request.ip).valid?
else
true
end
end
end
|
988e89245f6f06303406a7589908f4a13dc2e03c
|
lib/mixins.js
|
lib/mixins.js
|
"use strict";
const P = require('bluebird');
const redis = require('redis');
const HyperSwitch = require('hyperswitch');
const Redis = superclass => class extends superclass {
constructor(options) {
super(options);
if (!options.redis) {
throw new Error('Redis options not provided to the rate_limiter');
}
if (!(options.redis.host && options.redis.port)
&& !options.redis.path) {
throw new Error('Redis host:port or unix socket path must be specified');
}
options.redis = Object.assign(options.redis, {
no_ready_check: true // Prevents sending unsupported info command to nutcracker
});
this._redis = P.promisifyAll(redis.createClient(options.redis));
this._redis.on('error', (e) => {
// If we can't connect to redis - don't worry and don't fail,
// just log it and ignore.
options.log('error/redis', e);
});
HyperSwitch.lifecycle.on('close', () => this._redis.quit());
}
};
class MixinBuilder {
constructor(superclass) {
this.superclass = superclass;
}
with(...mixins) {
return mixins.reduce((c, mixin) => mixin(c), this.superclass);
}
}
module.exports = {
mix: superclass => new MixinBuilder(superclass),
Redis
};
|
"use strict";
const P = require('bluebird');
const redis = require('redis');
const HyperSwitch = require('hyperswitch');
const Redis = superclass => class extends superclass {
constructor(options) {
super(options);
if (!options.redis) {
throw new Error('Redis options not provided to the rate_limiter');
}
if (!(options.redis.host && options.redis.port)
&& !options.redis.path) {
throw new Error('Redis host:port or unix socket path must be specified');
}
options.redis = Object.assign(options.redis, {
no_ready_check: true // Prevents sending unsupported info command to nutcracker
});
this._redis = P.promisifyAll(redis.createClient(options.redis));
this._redis.on('error', (e) => {
// If we can't connect to redis - don't worry and don't fail,
// just log it and ignore.
options.log('error/redis', e);
});
HyperSwitch.lifecycle.on('close', () => this._redis.quit());
}
};
class MixinBuilder {
constructor(superclass) {
this.superclass = superclass;
}
with() {
return Array.prototype.slice.call(arguments)
.reduce((c, mixin) => mixin(c), this.superclass);
}
}
module.exports = {
mix: superclass => new MixinBuilder(superclass),
Redis
};
|
Use arguments instead of the spread operator
|
Use arguments instead of the spread operator
|
JavaScript
|
apache-2.0
|
wikimedia/change-propagation,Pchelolo/change-propagation,wikimedia/change-propagation,Pchelolo/change-propagation,d00rman/restbase-mod-queue-kafka
|
javascript
|
## Code Before:
"use strict";
const P = require('bluebird');
const redis = require('redis');
const HyperSwitch = require('hyperswitch');
const Redis = superclass => class extends superclass {
constructor(options) {
super(options);
if (!options.redis) {
throw new Error('Redis options not provided to the rate_limiter');
}
if (!(options.redis.host && options.redis.port)
&& !options.redis.path) {
throw new Error('Redis host:port or unix socket path must be specified');
}
options.redis = Object.assign(options.redis, {
no_ready_check: true // Prevents sending unsupported info command to nutcracker
});
this._redis = P.promisifyAll(redis.createClient(options.redis));
this._redis.on('error', (e) => {
// If we can't connect to redis - don't worry and don't fail,
// just log it and ignore.
options.log('error/redis', e);
});
HyperSwitch.lifecycle.on('close', () => this._redis.quit());
}
};
class MixinBuilder {
constructor(superclass) {
this.superclass = superclass;
}
with(...mixins) {
return mixins.reduce((c, mixin) => mixin(c), this.superclass);
}
}
module.exports = {
mix: superclass => new MixinBuilder(superclass),
Redis
};
## Instruction:
Use arguments instead of the spread operator
## Code After:
"use strict";
const P = require('bluebird');
const redis = require('redis');
const HyperSwitch = require('hyperswitch');
const Redis = superclass => class extends superclass {
constructor(options) {
super(options);
if (!options.redis) {
throw new Error('Redis options not provided to the rate_limiter');
}
if (!(options.redis.host && options.redis.port)
&& !options.redis.path) {
throw new Error('Redis host:port or unix socket path must be specified');
}
options.redis = Object.assign(options.redis, {
no_ready_check: true // Prevents sending unsupported info command to nutcracker
});
this._redis = P.promisifyAll(redis.createClient(options.redis));
this._redis.on('error', (e) => {
// If we can't connect to redis - don't worry and don't fail,
// just log it and ignore.
options.log('error/redis', e);
});
HyperSwitch.lifecycle.on('close', () => this._redis.quit());
}
};
class MixinBuilder {
constructor(superclass) {
this.superclass = superclass;
}
with() {
return Array.prototype.slice.call(arguments)
.reduce((c, mixin) => mixin(c), this.superclass);
}
}
module.exports = {
mix: superclass => new MixinBuilder(superclass),
Redis
};
|
59a2c8b686b428ead95eb5a00c68b68f1dca67df
|
test_images.sh
|
test_images.sh
|
for D_s in 0.001 0.005 0.01 0.02 0.1; do
for D_a in 0.1 0.2 0.25 0.3; do
for D_b in 0.02 0.03 0.05 0.2; do
for beta_i in 12; do
./PyMorphogenesis.py -r -s $D_s -a $D_a -b $D_b -d $beta_i
done
done
done
|
for D_s in 0.001 0.005 0.01 0.02 0.1; do
for D_a in 0.1 0.2 0.25 0.3; do
for D_b in 0.02 0.03 0.05 0.2; do
for beta_i in 12; do
./PyMorphogenesis.py -r -p images -s $D_s -a $D_a -b $D_b -d $beta_i
done
done
done
|
Use dumpAtEndPath in the test script
|
Use dumpAtEndPath in the test script
|
Shell
|
bsd-3-clause
|
thomasdeniau/pyfauxfur,thomasdeniau/pyfauxfur
|
shell
|
## Code Before:
for D_s in 0.001 0.005 0.01 0.02 0.1; do
for D_a in 0.1 0.2 0.25 0.3; do
for D_b in 0.02 0.03 0.05 0.2; do
for beta_i in 12; do
./PyMorphogenesis.py -r -s $D_s -a $D_a -b $D_b -d $beta_i
done
done
done
## Instruction:
Use dumpAtEndPath in the test script
## Code After:
for D_s in 0.001 0.005 0.01 0.02 0.1; do
for D_a in 0.1 0.2 0.25 0.3; do
for D_b in 0.02 0.03 0.05 0.2; do
for beta_i in 12; do
./PyMorphogenesis.py -r -p images -s $D_s -a $D_a -b $D_b -d $beta_i
done
done
done
|
0744e0610df59e9d091edeea0698178b37603782
|
src/interface/modals/Modal.scss
|
src/interface/modals/Modal.scss
|
@import 'interface/layout/Theme.scss';
.modal {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
z-index: 2;
> .container {
padding: 50px;
> .close {
float: right;
background: none;
border: 0;
color: $primaryColor;
font-size: 55px;
line-height: 1;
padding: 5px;
margin-bottom: 30px;
.icon {
margin-top: 0;
vertical-align: top;
filter: drop-shadow(0 0 2px $primaryColor);
&:hover {
color: lighten($primaryColor, 30%);
}
}
}
> .content {
clear: both;
margin-top: 30px;
}
}
}
|
@import 'interface/layout/Theme.scss';
.modal {
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
overflow-y: auto;
z-index: 2;
> .container {
padding: 50px;
> .close {
float: right;
background: none;
border: 0;
color: $primaryColor;
font-size: 55px;
line-height: 1;
padding: 5px;
margin-bottom: 30px;
.icon {
margin-top: 0;
vertical-align: top;
filter: drop-shadow(0 0 2px $primaryColor);
&:hover {
color: lighten($primaryColor, 30%);
}
}
}
> .content {
clear: both;
margin-top: 30px;
}
}
}
|
Make the modal scrollable and appear anywhere on screen
|
Make the modal scrollable and appear anywhere on screen
|
SCSS
|
agpl-3.0
|
yajinni/WoWAnalyzer,ronaldpereira/WoWAnalyzer,Juko8/WoWAnalyzer,WoWAnalyzer/WoWAnalyzer,fyruna/WoWAnalyzer,Juko8/WoWAnalyzer,Juko8/WoWAnalyzer,sMteX/WoWAnalyzer,fyruna/WoWAnalyzer,ronaldpereira/WoWAnalyzer,anom0ly/WoWAnalyzer,anom0ly/WoWAnalyzer,yajinni/WoWAnalyzer,WoWAnalyzer/WoWAnalyzer,sMteX/WoWAnalyzer,anom0ly/WoWAnalyzer,anom0ly/WoWAnalyzer,fyruna/WoWAnalyzer,yajinni/WoWAnalyzer,WoWAnalyzer/WoWAnalyzer,yajinni/WoWAnalyzer,sMteX/WoWAnalyzer,ronaldpereira/WoWAnalyzer
|
scss
|
## Code Before:
@import 'interface/layout/Theme.scss';
.modal {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
z-index: 2;
> .container {
padding: 50px;
> .close {
float: right;
background: none;
border: 0;
color: $primaryColor;
font-size: 55px;
line-height: 1;
padding: 5px;
margin-bottom: 30px;
.icon {
margin-top: 0;
vertical-align: top;
filter: drop-shadow(0 0 2px $primaryColor);
&:hover {
color: lighten($primaryColor, 30%);
}
}
}
> .content {
clear: both;
margin-top: 30px;
}
}
}
## Instruction:
Make the modal scrollable and appear anywhere on screen
## Code After:
@import 'interface/layout/Theme.scss';
.modal {
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
overflow-y: auto;
z-index: 2;
> .container {
padding: 50px;
> .close {
float: right;
background: none;
border: 0;
color: $primaryColor;
font-size: 55px;
line-height: 1;
padding: 5px;
margin-bottom: 30px;
.icon {
margin-top: 0;
vertical-align: top;
filter: drop-shadow(0 0 2px $primaryColor);
&:hover {
color: lighten($primaryColor, 30%);
}
}
}
> .content {
clear: both;
margin-top: 30px;
}
}
}
|
de8482c0b03cc2d2e8b975862476babfe83641f4
|
src/Oro/Bundle/WorkflowBundle/Resources/views/Widget/widget/steps.html.twig
|
src/Oro/Bundle/WorkflowBundle/Resources/views/Widget/widget/steps.html.twig
|
<div class="widget-content">
{% set stepsCount = steps|length %}
{% if stepsCount > 0 %}
<ul class="workflow-step-list nav {% if stepsCount == 1 %}single-step{% endif %}">
{% set isProcessed = true %}
{% for step in steps %}
{% set isCurrent = currentStep and step.name == currentStep.name %}
<li class="{% if isCurrent %}current{% elseif isProcessed %}processed{% endif %}">
{{ step.label|trans }}
</li>
{% if isCurrent %}
{% set isProcessed = false %}
{% endif %}
{% endfor %}
</ul>
{% endif %}
</div>
|
<div class="widget-content">
{% set stepsCount = steps|length %}
{% set minStepsCount = 1 %}
{% if stepsCount > minStepsCount %}
<ul class="workflow-step-list nav {% if stepsCount == 1 %}single-step{% endif %}">
{% set isProcessed = true %}
{% for step in steps %}
{% set isCurrent = currentStep and step.name == currentStep.name %}
<li class="{% if isCurrent %}current{% elseif isProcessed %}processed{% endif %}">
{{ step.label|trans }}
</li>
{% if isCurrent %}
{% set isProcessed = false %}
{% endif %}
{% endfor %}
</ul>
{% endif %}
</div>
|
Hide steps widget if there is only one step
|
BAP-2978: Hide steps widget if there is only one step
|
Twig
|
mit
|
mszajner/platform,orocrm/platform,morontt/platform,trustify/oroplatform,northdakota/platform,ramunasd/platform,morontt/platform,ramunasd/platform,hugeval/platform,orocrm/platform,2ndkauboy/platform,hugeval/platform,geoffroycochard/platform,2ndkauboy/platform,Djamy/platform,northdakota/platform,morontt/platform,mszajner/platform,trustify/oroplatform,northdakota/platform,geoffroycochard/platform,Djamy/platform,mszajner/platform,2ndkauboy/platform,hugeval/platform,orocrm/platform,trustify/oroplatform,geoffroycochard/platform,Djamy/platform,ramunasd/platform
|
twig
|
## Code Before:
<div class="widget-content">
{% set stepsCount = steps|length %}
{% if stepsCount > 0 %}
<ul class="workflow-step-list nav {% if stepsCount == 1 %}single-step{% endif %}">
{% set isProcessed = true %}
{% for step in steps %}
{% set isCurrent = currentStep and step.name == currentStep.name %}
<li class="{% if isCurrent %}current{% elseif isProcessed %}processed{% endif %}">
{{ step.label|trans }}
</li>
{% if isCurrent %}
{% set isProcessed = false %}
{% endif %}
{% endfor %}
</ul>
{% endif %}
</div>
## Instruction:
BAP-2978: Hide steps widget if there is only one step
## Code After:
<div class="widget-content">
{% set stepsCount = steps|length %}
{% set minStepsCount = 1 %}
{% if stepsCount > minStepsCount %}
<ul class="workflow-step-list nav {% if stepsCount == 1 %}single-step{% endif %}">
{% set isProcessed = true %}
{% for step in steps %}
{% set isCurrent = currentStep and step.name == currentStep.name %}
<li class="{% if isCurrent %}current{% elseif isProcessed %}processed{% endif %}">
{{ step.label|trans }}
</li>
{% if isCurrent %}
{% set isProcessed = false %}
{% endif %}
{% endfor %}
</ul>
{% endif %}
</div>
|
f368f54aa406f3bda333f8135516f8c23dec31a6
|
circle.yml
|
circle.yml
|
machine:
pre:
- curl -sSL https://s3.amazonaws.com/circle-downloads/install-circleci-docker.sh | bash -s -- 1.10.0
services:
- docker
python:
version: 2.7.11
dependencies:
pre:
- pip install ansible
- pip install invoke
- pip install docker-compose
- docker info
test:
pre:
- docker-compose build
override:
- docker-compose run backend bash -c "/tmp/wait-for-it.sh -h db -p 5432 && ./manage.py test"
deployment:
hub:
branch: master
commands:
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
- docker push banjocat/calorie_find
- echo "---" > ./ansible/vars/docker_env.yml
- ansible-playbook -i ./ansible/staging_inventory -u root --tags "deploy" --extra-vars="docker_user=$DOCKER_USER docker_password=$DOCKER_PASS docker_email=$DOCKER_EMAIL" ./ansible/playbook.yml
|
machine:
pre:
- curl -sSL https://s3.amazonaws.com/circle-downloads/install-circleci-docker.sh | bash -s -- 1.10.0
services:
- docker
python:
version: 2.7.11
dependencies:
pre:
- pip install ansible
- pip install docker-compose
- docker info
test:
pre:
- docker-compose build
override:
- docker-compose run backend bash -c "/tmp/wait-for-it.sh -h db -p 5432 && ./manage.py test"
deployment:
hub:
branch: master
commands:
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
- docker push banjocat/calorie_find
- echo "---" > ./ansible/vars/docker_env.yml
- ansible-playbook -i ./ansible/staging_inventory -u root --tags "deploy" --extra-vars="docker_user=$DOCKER_USER docker_password=$DOCKER_PASS docker_email=$DOCKER_EMAIL" ./ansible/playbook.yml
|
Remove invoke - not needed
|
Remove invoke - not needed
|
YAML
|
bsd-2-clause
|
banjocat/calorie-find,banjocat/calorie-find
|
yaml
|
## Code Before:
machine:
pre:
- curl -sSL https://s3.amazonaws.com/circle-downloads/install-circleci-docker.sh | bash -s -- 1.10.0
services:
- docker
python:
version: 2.7.11
dependencies:
pre:
- pip install ansible
- pip install invoke
- pip install docker-compose
- docker info
test:
pre:
- docker-compose build
override:
- docker-compose run backend bash -c "/tmp/wait-for-it.sh -h db -p 5432 && ./manage.py test"
deployment:
hub:
branch: master
commands:
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
- docker push banjocat/calorie_find
- echo "---" > ./ansible/vars/docker_env.yml
- ansible-playbook -i ./ansible/staging_inventory -u root --tags "deploy" --extra-vars="docker_user=$DOCKER_USER docker_password=$DOCKER_PASS docker_email=$DOCKER_EMAIL" ./ansible/playbook.yml
## Instruction:
Remove invoke - not needed
## Code After:
machine:
pre:
- curl -sSL https://s3.amazonaws.com/circle-downloads/install-circleci-docker.sh | bash -s -- 1.10.0
services:
- docker
python:
version: 2.7.11
dependencies:
pre:
- pip install ansible
- pip install docker-compose
- docker info
test:
pre:
- docker-compose build
override:
- docker-compose run backend bash -c "/tmp/wait-for-it.sh -h db -p 5432 && ./manage.py test"
deployment:
hub:
branch: master
commands:
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
- docker push banjocat/calorie_find
- echo "---" > ./ansible/vars/docker_env.yml
- ansible-playbook -i ./ansible/staging_inventory -u root --tags "deploy" --extra-vars="docker_user=$DOCKER_USER docker_password=$DOCKER_PASS docker_email=$DOCKER_EMAIL" ./ansible/playbook.yml
|
ceb491a81d2751fbe60068451f8cf900ef95e397
|
TodUni/spec/factories.rb
|
TodUni/spec/factories.rb
|
FactoryGirl.define do
factory :user do
email "[email protected]"
name "Example"
password "12345678"
password_confirmation "12345678"
birth_date Date.today - 20.year
end
end
|
FactoryGirl.define do
factory :user do
name "Example"
email { "#{name}@example.com" }
password "12345678"
password_confirmation "12345678"
date_birth Date.today - 20.year
end
factory :project do
sequence(:name) { |n| "TEST_PROJECT_#{n}" }
description "This project is a test"
factory :pre_project do
status 0
end
factory :approved_project do
status 1
end
factory :finished_project do
status 2
end
factory :canceled_project do
status 3
end
end
end
|
Add projects factory, edit users factory
|
Add projects factory, edit users factory
|
Ruby
|
apache-2.0
|
lalo2302/TodUni,lalo2302/TodUni,lalo2302/TodUni
|
ruby
|
## Code Before:
FactoryGirl.define do
factory :user do
email "[email protected]"
name "Example"
password "12345678"
password_confirmation "12345678"
birth_date Date.today - 20.year
end
end
## Instruction:
Add projects factory, edit users factory
## Code After:
FactoryGirl.define do
factory :user do
name "Example"
email { "#{name}@example.com" }
password "12345678"
password_confirmation "12345678"
date_birth Date.today - 20.year
end
factory :project do
sequence(:name) { |n| "TEST_PROJECT_#{n}" }
description "This project is a test"
factory :pre_project do
status 0
end
factory :approved_project do
status 1
end
factory :finished_project do
status 2
end
factory :canceled_project do
status 3
end
end
end
|
2044e5ed29fd356b17e437fb360c3c5311f701b9
|
src/forager/server/ListManager.java
|
src/forager/server/ListManager.java
|
package forager.server;
import java.io.BufferedOutputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintWriter;
/**
* Handles the active and completed task lists and allows them to be flushed
* and synced to disk.
*
* @author malensek
*/
public class ListManager {
public static final String DEFAULT_LIST_NAME = "tasklist";
private FileOutputStream taskListOut;
private PrintWriter taskListWriter;
private FileOutputStream completedListOut;
private PrintWriter completedListWriter;
public ListManager() throws IOException {
this(DEFAULT_LIST_NAME);
}
public ListManager(String taskListName) throws IOException {
taskListOut = new FileOutputStream(taskListName, true);
taskListWriter = new PrintWriter(
new BufferedOutputStream(taskListOut));
String completedName = taskListName + ".done";
completedListOut = new FileOutputStream(completedName, true);
completedListWriter = new PrintWriter(
new BufferedOutputStream(completedListOut));
}
public void addTask(String command) {
taskListWriter.println(command);
}
public void addCompletedTask(String command) {
completedListWriter.println(command);
}
public void sync() throws IOException {
taskListWriter.flush();
taskListOut.getFD().sync();
}
}
|
package forager.server;
import java.io.BufferedOutputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintWriter;
/**
* Handles the active and completed task lists and allows them to be flushed
* and synced to disk.
*
* @author malensek
*/
public class ListManager {
public static final String DEFAULT_LIST_NAME = "tasklist";
private FileOutputStream taskListOut;
private PrintWriter taskListWriter;
private FileOutputStream completedListOut;
private PrintWriter completedListWriter;
public ListManager() throws IOException {
this(DEFAULT_LIST_NAME);
}
public ListManager(String taskListName) throws IOException {
taskListOut = new FileOutputStream(taskListName, true);
taskListWriter = new PrintWriter(
new BufferedOutputStream(taskListOut));
String completedName = taskListName + ".done";
completedListOut = new FileOutputStream(completedName, true);
completedListWriter = new PrintWriter(
new BufferedOutputStream(completedListOut));
}
public void addTask(String command) {
taskListWriter.println(command);
}
public void addCompletedTask(String command) {
completedListWriter.println(command);
}
public void sync() throws IOException {
taskListWriter.flush();
taskListOut.getFD().sync();
}
public static boolean listsExist() {
return listsExist(DEFAULT_LIST_NAME);
}
public static boolean listsExist(String taskListName) {
File listFile = new File(taskListName);
File doneFile = new File(taskListName + ".done");
return (listFile.exists() || doneFile.exists());
}
}
|
Add checks for list files
|
Add checks for list files
|
Java
|
bsd-2-clause
|
malensek/forager,malensek/forager
|
java
|
## Code Before:
package forager.server;
import java.io.BufferedOutputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintWriter;
/**
* Handles the active and completed task lists and allows them to be flushed
* and synced to disk.
*
* @author malensek
*/
public class ListManager {
public static final String DEFAULT_LIST_NAME = "tasklist";
private FileOutputStream taskListOut;
private PrintWriter taskListWriter;
private FileOutputStream completedListOut;
private PrintWriter completedListWriter;
public ListManager() throws IOException {
this(DEFAULT_LIST_NAME);
}
public ListManager(String taskListName) throws IOException {
taskListOut = new FileOutputStream(taskListName, true);
taskListWriter = new PrintWriter(
new BufferedOutputStream(taskListOut));
String completedName = taskListName + ".done";
completedListOut = new FileOutputStream(completedName, true);
completedListWriter = new PrintWriter(
new BufferedOutputStream(completedListOut));
}
public void addTask(String command) {
taskListWriter.println(command);
}
public void addCompletedTask(String command) {
completedListWriter.println(command);
}
public void sync() throws IOException {
taskListWriter.flush();
taskListOut.getFD().sync();
}
}
## Instruction:
Add checks for list files
## Code After:
package forager.server;
import java.io.BufferedOutputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintWriter;
/**
* Handles the active and completed task lists and allows them to be flushed
* and synced to disk.
*
* @author malensek
*/
public class ListManager {
public static final String DEFAULT_LIST_NAME = "tasklist";
private FileOutputStream taskListOut;
private PrintWriter taskListWriter;
private FileOutputStream completedListOut;
private PrintWriter completedListWriter;
public ListManager() throws IOException {
this(DEFAULT_LIST_NAME);
}
public ListManager(String taskListName) throws IOException {
taskListOut = new FileOutputStream(taskListName, true);
taskListWriter = new PrintWriter(
new BufferedOutputStream(taskListOut));
String completedName = taskListName + ".done";
completedListOut = new FileOutputStream(completedName, true);
completedListWriter = new PrintWriter(
new BufferedOutputStream(completedListOut));
}
public void addTask(String command) {
taskListWriter.println(command);
}
public void addCompletedTask(String command) {
completedListWriter.println(command);
}
public void sync() throws IOException {
taskListWriter.flush();
taskListOut.getFD().sync();
}
public static boolean listsExist() {
return listsExist(DEFAULT_LIST_NAME);
}
public static boolean listsExist(String taskListName) {
File listFile = new File(taskListName);
File doneFile = new File(taskListName + ".done");
return (listFile.exists() || doneFile.exists());
}
}
|
494905d41e71709e811a646372843a886fe15ba8
|
recipes/locale.rb
|
recipes/locale.rb
|
require 'dbus/systemd/localed'
require 'set'
ruby_block 'set-locale' do
locale = node['systemd']['locale'].to_kv_pairs
localed = DBus::Systemd::Localed.new
block do
localed.SetLocale(locale, false)
end
not_if do
localed.properties['Locale'].to_set == locale.to_set
end
end
|
locale = node['systemd']['locale']
file '/etc/locale.conf' do
content locale.to_h.to_kv_pairs.join("\n")
not_if { locale.empty? }
notifies :restart, 'service[systemd-localed]', :immediately
end
# oneshot service that runs at boot
service 'systemd-localed' do
action :nothing
end
|
Revert "Revert "revert for now""
|
Revert "Revert "revert for now""
This reverts commit b3d8b368e08507fe4e1cae43d4a699ba58d7cafe.
|
Ruby
|
apache-2.0
|
nathwill/chef-systemd
|
ruby
|
## Code Before:
require 'dbus/systemd/localed'
require 'set'
ruby_block 'set-locale' do
locale = node['systemd']['locale'].to_kv_pairs
localed = DBus::Systemd::Localed.new
block do
localed.SetLocale(locale, false)
end
not_if do
localed.properties['Locale'].to_set == locale.to_set
end
end
## Instruction:
Revert "Revert "revert for now""
This reverts commit b3d8b368e08507fe4e1cae43d4a699ba58d7cafe.
## Code After:
locale = node['systemd']['locale']
file '/etc/locale.conf' do
content locale.to_h.to_kv_pairs.join("\n")
not_if { locale.empty? }
notifies :restart, 'service[systemd-localed]', :immediately
end
# oneshot service that runs at boot
service 'systemd-localed' do
action :nothing
end
|
8b5546052efe14ef61167475ae76b1d3faf43179
|
src/sas/perspectives/fitting/media/fitting.rst
|
src/sas/perspectives/fitting/media/fitting.rst
|
Fitting Documentation
=====================
.. toctree::
:maxdepth: 1
Fitting Perspective <fitting_help>
Polydispersity Distributions <pd_help>
Smearing Computation <sm_help>
Polarisation/Magnetic Scattering <mag_help>
SasView Optimisers <Bumps/doc/guide/index>
|
Fitting Documentation
=====================
.. toctree::
:maxdepth: 1
Fitting Perspective <fitting_help>
Polydispersity Distributions <pd_help>
Smearing Computation <sm_help>
Polarisation/Magnetic Scattering <mag_help>
SasView Optimisers <https://github.com/bumps/bumps/blob/master/doc/guide/optimizer.rst>
|
Include trial link to Bumps documentation
|
Include trial link to Bumps documentation
|
reStructuredText
|
bsd-3-clause
|
SasView/sasview,SasView/sasview,SasView/sasview,lewisodriscoll/sasview,SasView/sasview,SasView/sasview,lewisodriscoll/sasview,lewisodriscoll/sasview,lewisodriscoll/sasview,SasView/sasview,lewisodriscoll/sasview
|
restructuredtext
|
## Code Before:
Fitting Documentation
=====================
.. toctree::
:maxdepth: 1
Fitting Perspective <fitting_help>
Polydispersity Distributions <pd_help>
Smearing Computation <sm_help>
Polarisation/Magnetic Scattering <mag_help>
SasView Optimisers <Bumps/doc/guide/index>
## Instruction:
Include trial link to Bumps documentation
## Code After:
Fitting Documentation
=====================
.. toctree::
:maxdepth: 1
Fitting Perspective <fitting_help>
Polydispersity Distributions <pd_help>
Smearing Computation <sm_help>
Polarisation/Magnetic Scattering <mag_help>
SasView Optimisers <https://github.com/bumps/bumps/blob/master/doc/guide/optimizer.rst>
|
b3b4200d9dcc41efcd1400393d399603b766f431
|
app/helpers/application_helper/button/generic_feature_button_with_disable.rb
|
app/helpers/application_helper/button/generic_feature_button_with_disable.rb
|
class ApplicationHelper::Button::GenericFeatureButtonWithDisable < ApplicationHelper::Button::GenericFeatureButton
needs :@record
def disabled?
@error_message = begin
@record.unsupported_reason(@feature) unless @record.supports?(@feature)
rescue SupportsFeatureMixin::UnknownFeatureError
# TODO: remove with deleting AvailabilityMixin module
@record.is_available_now_error_message(@feature) unless @record.is_available?(@feature)
end
@error_message.present?
end
def visible?
true
end
end
|
class ApplicationHelper::Button::GenericFeatureButtonWithDisable < ApplicationHelper::Button::GenericFeatureButton
needs :@record
def disabled?
@error_message =
# Feature supported via SupportsFeatureMixin
if @record.respond_to?("supports_#{@feature}?")
@record.unsupported_reason(@feature) unless @record.supports?(@feature)
else # Feature supported via AvailabilityMixin
@record.is_available_now_error_message(@feature) unless @record.is_available?(@feature)
end
@error_message.present?
end
def visible?
true
end
end
|
Rework to not use SupportsFeatureMixin::UnknownFeatureError which no longer exists
|
Rework to not use SupportsFeatureMixin::UnknownFeatureError which no longer exists
|
Ruby
|
apache-2.0
|
ManageIQ/manageiq-ui-classic,ManageIQ/manageiq-ui-classic,ManageIQ/manageiq-ui-classic,ManageIQ/manageiq-ui-classic
|
ruby
|
## Code Before:
class ApplicationHelper::Button::GenericFeatureButtonWithDisable < ApplicationHelper::Button::GenericFeatureButton
needs :@record
def disabled?
@error_message = begin
@record.unsupported_reason(@feature) unless @record.supports?(@feature)
rescue SupportsFeatureMixin::UnknownFeatureError
# TODO: remove with deleting AvailabilityMixin module
@record.is_available_now_error_message(@feature) unless @record.is_available?(@feature)
end
@error_message.present?
end
def visible?
true
end
end
## Instruction:
Rework to not use SupportsFeatureMixin::UnknownFeatureError which no longer exists
## Code After:
class ApplicationHelper::Button::GenericFeatureButtonWithDisable < ApplicationHelper::Button::GenericFeatureButton
needs :@record
def disabled?
@error_message =
# Feature supported via SupportsFeatureMixin
if @record.respond_to?("supports_#{@feature}?")
@record.unsupported_reason(@feature) unless @record.supports?(@feature)
else # Feature supported via AvailabilityMixin
@record.is_available_now_error_message(@feature) unless @record.is_available?(@feature)
end
@error_message.present?
end
def visible?
true
end
end
|
084bc03c8f2438d773e673dbe760592e036ffca5
|
.github/workflows/auto-update.yml
|
.github/workflows/auto-update.yml
|
name: Auto Update
on:
# schedule:
# - cron: '*/5 * * * *'
workflow_dispatch:
jobs:
nix:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- uses: cachix/install-nix-action@v8
- uses: cachix/cachix-action@v6
with:
name: vulkan-haskell
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
- name: Init git
run: |
git config user.name 'Joe Hermaszewski'
git config user.email '[email protected]'
- run: ./update.sh
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
|
name: Auto Update
on:
# schedule:
# - cron: '*/5 * * * *'
workflow_dispatch:
jobs:
nix:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- uses: cachix/install-nix-action@v8
- uses: cachix/cachix-action@v6
with:
name: vulkan-haskell
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
- uses: tibdex/github-app-token@v1
id: generate-token
with:
app_id: '${{ secrets.APP_ID }}'
private_key: '${{ secrets.APP_PRIVATE_KEY }}'
- name: Init git
run: |
git config user.name 'Three Of Twelve'
git config user.email '[email protected]'
- run: ./update.sh
- run: export VULKAN_VERSION=$(git -C generate-new/Vulkan-Docs describe --tags | head -n1)
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
token: ${{ steps.generate-token.outputs.token }}
delete-branch: true
branch: vulkan-updates-${{ env.VULKAN_VERSION }}
title: Update Vulkan to ${{ env.VULKAN_VERSION }}
|
Use bot to open update PR
|
Use bot to open update PR
|
YAML
|
bsd-3-clause
|
expipiplus1/vulkan,expipiplus1/vulkan,expipiplus1/vulkan
|
yaml
|
## Code Before:
name: Auto Update
on:
# schedule:
# - cron: '*/5 * * * *'
workflow_dispatch:
jobs:
nix:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- uses: cachix/install-nix-action@v8
- uses: cachix/cachix-action@v6
with:
name: vulkan-haskell
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
- name: Init git
run: |
git config user.name 'Joe Hermaszewski'
git config user.email '[email protected]'
- run: ./update.sh
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
## Instruction:
Use bot to open update PR
## Code After:
name: Auto Update
on:
# schedule:
# - cron: '*/5 * * * *'
workflow_dispatch:
jobs:
nix:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- uses: cachix/install-nix-action@v8
- uses: cachix/cachix-action@v6
with:
name: vulkan-haskell
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
- uses: tibdex/github-app-token@v1
id: generate-token
with:
app_id: '${{ secrets.APP_ID }}'
private_key: '${{ secrets.APP_PRIVATE_KEY }}'
- name: Init git
run: |
git config user.name 'Three Of Twelve'
git config user.email '[email protected]'
- run: ./update.sh
- run: export VULKAN_VERSION=$(git -C generate-new/Vulkan-Docs describe --tags | head -n1)
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
token: ${{ steps.generate-token.outputs.token }}
delete-branch: true
branch: vulkan-updates-${{ env.VULKAN_VERSION }}
title: Update Vulkan to ${{ env.VULKAN_VERSION }}
|
90c42dc28ff91180914d5d5a0fa12f94f480523e
|
src/examples/worker/index.ts
|
src/examples/worker/index.ts
|
import { runWorker } from '../../utils/worker'
import { viewHandler } from '../../interfaces/view'
import { logFns } from '../../utils/log'
// all communicatios are transfered via postMessage
runWorker({
worker: new (<any> require('worker-loader!./worker')),
interfaces: {
view: viewHandler('#app'),
},
/* NOTE: this would be defined in the module (worker.ts)
if your run the module over a webworker
is implemented this way for showing how you can communicate over any workerAPI
you can run worket.ts in the server via websockets or even remotely in a client via webRTC!!
*/
// DEV ONLY (you can handle it manually)
...logFns,
})
|
import { runWorker } from '../../utils/worker'
import { viewHandler } from '../../interfaces/view'
import { logFns } from '../../utils/log'
// all communicatios are transfered via postMessage
runWorker({
worker: new (<any> require('worker-loader!./worker')),
interfaces: {
view: viewHandler('#app'),
},
// DEV ONLY (you can handle it manually)
...logFns,
})
|
Remove note on worker implementation
|
Remove note on worker implementation
|
TypeScript
|
mit
|
FractalBlocks/Fractal,FractalBlocks/Fractal,FractalBlocks/Fractal
|
typescript
|
## Code Before:
import { runWorker } from '../../utils/worker'
import { viewHandler } from '../../interfaces/view'
import { logFns } from '../../utils/log'
// all communicatios are transfered via postMessage
runWorker({
worker: new (<any> require('worker-loader!./worker')),
interfaces: {
view: viewHandler('#app'),
},
/* NOTE: this would be defined in the module (worker.ts)
if your run the module over a webworker
is implemented this way for showing how you can communicate over any workerAPI
you can run worket.ts in the server via websockets or even remotely in a client via webRTC!!
*/
// DEV ONLY (you can handle it manually)
...logFns,
})
## Instruction:
Remove note on worker implementation
## Code After:
import { runWorker } from '../../utils/worker'
import { viewHandler } from '../../interfaces/view'
import { logFns } from '../../utils/log'
// all communicatios are transfered via postMessage
runWorker({
worker: new (<any> require('worker-loader!./worker')),
interfaces: {
view: viewHandler('#app'),
},
// DEV ONLY (you can handle it manually)
...logFns,
})
|
7788edff9108cafc593759e9e406d6da6509c799
|
test/tstnmem.c
|
test/tstnmem.c
|
/*
* Copyright (c) 2002-2004, Index Data
* See the file LICENSE for details.
*
* $Id: tstnmem.c,v 1.2 2004-09-29 20:15:48 adam Exp $
*/
#if HAVE_CONFIG_H
#include <config.h>
#endif
#include <errno.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include <yaz/nmem.h>
int main (int argc, char **argv)
{
void *cp;
NMEM n;
int j;
nmem_init();
n = nmem_create();
if (!n)
exit (1);
for (j = 1; j<500; j++)
{
cp = nmem_malloc(n, j);
if (!cp)
exit(2);
}
for (j = 2000; j<20000; j+= 2000)
{
cp = nmem_malloc(n, j);
if (!cp)
exit(3);
}
nmem_destroy(n);
nmem_exit();
exit(0);
}
|
/*
* Copyright (c) 2002-2004, Index Data
* See the file LICENSE for details.
*
* $Id: tstnmem.c,v 1.3 2005-01-05 10:29:42 adam Exp $
*/
#if HAVE_CONFIG_H
#include <config.h>
#endif
#include <errno.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include <yaz/nmem.h>
int main (int argc, char **argv)
{
void *cp;
NMEM n;
int j;
nmem_init();
n = nmem_create();
if (!n)
exit (1);
for (j = 1; j<500; j++)
{
cp = nmem_malloc(n, j);
if (!cp)
exit(2);
if (sizeof(long) >= j)
*(long*) cp = 123L;
#if HAVE_LONG_LONG
if (sizeof(long long) >= j)
*(long long*) cp = 123L;
#endif
if (sizeof(double) >= j)
*(double*) cp = 12.2;
}
for (j = 2000; j<20000; j+= 2000)
{
cp = nmem_malloc(n, j);
if (!cp)
exit(3);
}
nmem_destroy(n);
nmem_exit();
exit(0);
}
|
Check that assignments to NMEM memory for some basic types
|
Check that assignments to NMEM memory for some basic types
|
C
|
bsd-3-clause
|
dcrossleyau/yaz,nla/yaz,dcrossleyau/yaz,nla/yaz,nla/yaz,dcrossleyau/yaz,nla/yaz
|
c
|
## Code Before:
/*
* Copyright (c) 2002-2004, Index Data
* See the file LICENSE for details.
*
* $Id: tstnmem.c,v 1.2 2004-09-29 20:15:48 adam Exp $
*/
#if HAVE_CONFIG_H
#include <config.h>
#endif
#include <errno.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include <yaz/nmem.h>
int main (int argc, char **argv)
{
void *cp;
NMEM n;
int j;
nmem_init();
n = nmem_create();
if (!n)
exit (1);
for (j = 1; j<500; j++)
{
cp = nmem_malloc(n, j);
if (!cp)
exit(2);
}
for (j = 2000; j<20000; j+= 2000)
{
cp = nmem_malloc(n, j);
if (!cp)
exit(3);
}
nmem_destroy(n);
nmem_exit();
exit(0);
}
## Instruction:
Check that assignments to NMEM memory for some basic types
## Code After:
/*
* Copyright (c) 2002-2004, Index Data
* See the file LICENSE for details.
*
* $Id: tstnmem.c,v 1.3 2005-01-05 10:29:42 adam Exp $
*/
#if HAVE_CONFIG_H
#include <config.h>
#endif
#include <errno.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include <yaz/nmem.h>
int main (int argc, char **argv)
{
void *cp;
NMEM n;
int j;
nmem_init();
n = nmem_create();
if (!n)
exit (1);
for (j = 1; j<500; j++)
{
cp = nmem_malloc(n, j);
if (!cp)
exit(2);
if (sizeof(long) >= j)
*(long*) cp = 123L;
#if HAVE_LONG_LONG
if (sizeof(long long) >= j)
*(long long*) cp = 123L;
#endif
if (sizeof(double) >= j)
*(double*) cp = 12.2;
}
for (j = 2000; j<20000; j+= 2000)
{
cp = nmem_malloc(n, j);
if (!cp)
exit(3);
}
nmem_destroy(n);
nmem_exit();
exit(0);
}
|
0a907442eee18d0b30ca4ad2c6a5ef1fabb90684
|
pelicanconf.py
|
pelicanconf.py
|
from __future__ import unicode_literals
AUTHOR = u'Lex Toumbourou'
SITENAME = u'LexToumbourou.com'
SITEURL = 'http://lextoumbourou.com'
TIMEZONE = 'Australia/Melbourne'
DEFAULT_LANG = u'en'
ARTICLE_URL = 'blog/posts/{slug}/'
ARTICLE_SAVE_AS = 'blog/posts/{slug}/index.html'
# Feed generation is usually not desired when developing
FEED_DOMAIN = SITEURL
FEED_ATOM = 'atom.xml'
# Social widget
SOCIAL = (('You can add links in your config file', '#'),
('Another social link', '#'),)
DEFAULT_PAGINATION = None
THEME = "themes/lextoumbourou-theme"
STATIC_PATHS = ['images']
FILES_TO_COPY = (
('extra/robots.txt', 'robots.txt'),
('extra/favicon.ico', 'favicon.ico'),
)
DISQUS_SITENAME = 'lextoumbouroucom'
|
from __future__ import unicode_literals
AUTHOR = u'Lex Toumbourou'
SITENAME = u'LexToumbourou.com'
SITEURL = 'http://lextoumbourou.com'
TIMEZONE = 'Australia/Melbourne'
DEFAULT_LANG = u'en'
ARTICLE_URL = 'blog/posts/{slug}/'
ARTICLE_SAVE_AS = 'blog/posts/{slug}/index.html'
# Feed generation is usually not desired when developing
FEED_DOMAIN = SITEURL
FEED_ATOM = 'atom.xml'
# Social widget
SOCIAL = (('You can add links in your config file', '#'),
('Another social link', '#'),)
DEFAULT_PAGINATION = None
THEME = "themes/lextoumbourou-theme"
STATIC_PATHS = ['images', 'extra']
EXTRA_PATH_METADATA = {
'extra/robots.txt': {'path': 'robots.txt'},
'extra/favicon.ico': {'path': 'favicon.ico'},
}
DISQUS_SITENAME = 'lextoumbouroucom'
|
Support static files via new Pelican API
|
Support static files via new Pelican API
|
Python
|
mit
|
lextoumbourou/lextoumbourou.github.io,lextoumbourou/lextoumbourou.github.io,lextoumbourou/lextoumbourou.github.io,lextoumbourou/lextoumbourou.github.io
|
python
|
## Code Before:
from __future__ import unicode_literals
AUTHOR = u'Lex Toumbourou'
SITENAME = u'LexToumbourou.com'
SITEURL = 'http://lextoumbourou.com'
TIMEZONE = 'Australia/Melbourne'
DEFAULT_LANG = u'en'
ARTICLE_URL = 'blog/posts/{slug}/'
ARTICLE_SAVE_AS = 'blog/posts/{slug}/index.html'
# Feed generation is usually not desired when developing
FEED_DOMAIN = SITEURL
FEED_ATOM = 'atom.xml'
# Social widget
SOCIAL = (('You can add links in your config file', '#'),
('Another social link', '#'),)
DEFAULT_PAGINATION = None
THEME = "themes/lextoumbourou-theme"
STATIC_PATHS = ['images']
FILES_TO_COPY = (
('extra/robots.txt', 'robots.txt'),
('extra/favicon.ico', 'favicon.ico'),
)
DISQUS_SITENAME = 'lextoumbouroucom'
## Instruction:
Support static files via new Pelican API
## Code After:
from __future__ import unicode_literals
AUTHOR = u'Lex Toumbourou'
SITENAME = u'LexToumbourou.com'
SITEURL = 'http://lextoumbourou.com'
TIMEZONE = 'Australia/Melbourne'
DEFAULT_LANG = u'en'
ARTICLE_URL = 'blog/posts/{slug}/'
ARTICLE_SAVE_AS = 'blog/posts/{slug}/index.html'
# Feed generation is usually not desired when developing
FEED_DOMAIN = SITEURL
FEED_ATOM = 'atom.xml'
# Social widget
SOCIAL = (('You can add links in your config file', '#'),
('Another social link', '#'),)
DEFAULT_PAGINATION = None
THEME = "themes/lextoumbourou-theme"
STATIC_PATHS = ['images', 'extra']
EXTRA_PATH_METADATA = {
'extra/robots.txt': {'path': 'robots.txt'},
'extra/favicon.ico': {'path': 'favicon.ico'},
}
DISQUS_SITENAME = 'lextoumbouroucom'
|
940323b0c0dc9526e087e68fc1fd9af8d3c4682b
|
src/php/lib/includes/globals.php
|
src/php/lib/includes/globals.php
|
<?php
/* Escape a string for interpolation in HTML. Note that this does NOT encode
* double quotes (`"`). */
function html($str) {
return htmlspecialchars($str, ENT_NOQUOTES | ENT_HTML5, 'UTF-8');
}
/* Escape a string for interpolation inside a double-quoted HTML attribute. */
function htmlattr($str) {
return htmlspecialchars($str, ENT_COMPAT | ENT_HTML5, 'UTF-8');
}
/* Return a PHP-code representation of a value as a string. */
function repr($x) {
return var_export($x, true);
}
?>
|
<?php
/* Escape a string for interpolation in HTML text. Note that this does NOT
* encode double quotes (`"`). */
function html($str) {
return htmlspecialchars($str, ENT_NOQUOTES | ENT_HTML5, 'UTF-8');
}
/* Escape a string for interpolation inside a double-quoted HTML attribute. */
function htmlattr($str) {
return htmlspecialchars($str, ENT_COMPAT | ENT_HTML5, 'UTF-8');
}
/* Return a PHP-code representation of a value as a string. */
function repr($x) {
return var_export($x, true);
}
/* Wrap a string in an `XString` object. */
function xstring($s) {
return new XString($s);
}
/* Wrap an array in an `XArray` object. */
function xarray($a) {
return new XArray($a);
}
/* Create an `XRegex` object. */
function xregex(/* $pat [, $flags [, $start [, $end ]]] */) {
return MetaUtil::apply_constructor('XRegex', func_get_args());
}
?>
|
Add wrapper functions for "X" classes.
|
Add wrapper functions for "X" classes.
|
PHP
|
mit
|
bdusell/phrame,bdusell/phrame,bdusell/jitsu,bdusell/jitsu,bdusell/phrame
|
php
|
## Code Before:
<?php
/* Escape a string for interpolation in HTML. Note that this does NOT encode
* double quotes (`"`). */
function html($str) {
return htmlspecialchars($str, ENT_NOQUOTES | ENT_HTML5, 'UTF-8');
}
/* Escape a string for interpolation inside a double-quoted HTML attribute. */
function htmlattr($str) {
return htmlspecialchars($str, ENT_COMPAT | ENT_HTML5, 'UTF-8');
}
/* Return a PHP-code representation of a value as a string. */
function repr($x) {
return var_export($x, true);
}
?>
## Instruction:
Add wrapper functions for "X" classes.
## Code After:
<?php
/* Escape a string for interpolation in HTML text. Note that this does NOT
* encode double quotes (`"`). */
function html($str) {
return htmlspecialchars($str, ENT_NOQUOTES | ENT_HTML5, 'UTF-8');
}
/* Escape a string for interpolation inside a double-quoted HTML attribute. */
function htmlattr($str) {
return htmlspecialchars($str, ENT_COMPAT | ENT_HTML5, 'UTF-8');
}
/* Return a PHP-code representation of a value as a string. */
function repr($x) {
return var_export($x, true);
}
/* Wrap a string in an `XString` object. */
function xstring($s) {
return new XString($s);
}
/* Wrap an array in an `XArray` object. */
function xarray($a) {
return new XArray($a);
}
/* Create an `XRegex` object. */
function xregex(/* $pat [, $flags [, $start [, $end ]]] */) {
return MetaUtil::apply_constructor('XRegex', func_get_args());
}
?>
|
c2d7f4c6ae9042d1cc7f11fa82d7133e9b506ad7
|
src/main/scripts/data_exports/export_json.py
|
src/main/scripts/data_exports/export_json.py
|
from lib.harvester import Harvester
from lib.cli_helper import is_writable_directory
import argparse
import logging
import json
logger = logging.getLogger(__name__)
logger.setLevel(logging.INFO)
formatter = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s")
logging.basicConfig(format="%(asctime)s-%(levelname)s-%(name)s - %(message)s")
parser = argparse.ArgumentParser(description="Export all publicly available Gazetteer data as one JSON file.")
parser.add_argument('-t', '--target', type=is_writable_directory, nargs='?', default="./gazetteer_export.json",
help="specify output file, default: './gazetteer_export.json'")
parser.add_argument('-p', '--polygons', action='store_true',
help="export place shape polygons, this will increase the file size significantly")
if __name__ == "__main__":
options = vars(parser.parse_args())
harvester = Harvester(options['polygons'])
places = harvester.get_data()
with open(options['target'], 'w') as outfile:
json.dump(places, outfile)
|
from lib.harvester import Harvester
from lib.cli_helper import is_writable_directory
import argparse
import logging
import json
logger = logging.getLogger(__name__)
logger.setLevel(logging.INFO)
formatter = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s")
logging.basicConfig(format="%(asctime)s-%(levelname)s-%(name)s - %(message)s")
parser = argparse.ArgumentParser(description="Export all publicly available Gazetteer data as one JSON file.")
parser.add_argument('-t', '--target', type=is_writable_directory, nargs='?', default="./gazetteer_export.json",
help="specify output file, default: './gazetteer_export.json'")
parser.add_argument('-p', '--polygons', action='store_true',
help="export place shape polygons, this will increase the file size significantly")
if __name__ == "__main__":
options = vars(parser.parse_args())
harvester = Harvester(options['polygons'])
places = harvester.get_data()
with open(options['target'], 'w', encoding='utf-8') as outfile:
json.dump(places, outfile, ensure_ascii=False)
|
Fix UTF-8 encoding for json exports
|
Fix UTF-8 encoding for json exports
|
Python
|
apache-2.0
|
dainst/gazetteer,dainst/gazetteer,dainst/gazetteer,dainst/gazetteer,dainst/gazetteer,dainst/gazetteer
|
python
|
## Code Before:
from lib.harvester import Harvester
from lib.cli_helper import is_writable_directory
import argparse
import logging
import json
logger = logging.getLogger(__name__)
logger.setLevel(logging.INFO)
formatter = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s")
logging.basicConfig(format="%(asctime)s-%(levelname)s-%(name)s - %(message)s")
parser = argparse.ArgumentParser(description="Export all publicly available Gazetteer data as one JSON file.")
parser.add_argument('-t', '--target', type=is_writable_directory, nargs='?', default="./gazetteer_export.json",
help="specify output file, default: './gazetteer_export.json'")
parser.add_argument('-p', '--polygons', action='store_true',
help="export place shape polygons, this will increase the file size significantly")
if __name__ == "__main__":
options = vars(parser.parse_args())
harvester = Harvester(options['polygons'])
places = harvester.get_data()
with open(options['target'], 'w') as outfile:
json.dump(places, outfile)
## Instruction:
Fix UTF-8 encoding for json exports
## Code After:
from lib.harvester import Harvester
from lib.cli_helper import is_writable_directory
import argparse
import logging
import json
logger = logging.getLogger(__name__)
logger.setLevel(logging.INFO)
formatter = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s")
logging.basicConfig(format="%(asctime)s-%(levelname)s-%(name)s - %(message)s")
parser = argparse.ArgumentParser(description="Export all publicly available Gazetteer data as one JSON file.")
parser.add_argument('-t', '--target', type=is_writable_directory, nargs='?', default="./gazetteer_export.json",
help="specify output file, default: './gazetteer_export.json'")
parser.add_argument('-p', '--polygons', action='store_true',
help="export place shape polygons, this will increase the file size significantly")
if __name__ == "__main__":
options = vars(parser.parse_args())
harvester = Harvester(options['polygons'])
places = harvester.get_data()
with open(options['target'], 'w', encoding='utf-8') as outfile:
json.dump(places, outfile, ensure_ascii=False)
|
56f0701602342c69052ef9a88d49187aa96540cc
|
us_ignite/templates/search/event_list.html
|
us_ignite/templates/search/event_list.html
|
{% extends "base.html" %}
{% block title %}Search events - {{ block.super }}{% endblock title %}
{% block content %}
<h1>Search: Events</h1>
<p><a href="{% url 'event_add' %}">Add an event</a></p>
{% if page.object_list %}
{% for object in page.object_list %}
{% include "events/object_block.html" with object=object %}
{% endfor%}
{% else %}
<p>No events found.</p>
{% endif %}
{% include "includes/pagination.html" %}
{% endblock content %}
|
{% extends "base.html" %}
{% block title %}Search events - {{ block.super }}{% endblock title %}
{% block content %}
<h1>Search: Events</h1>
<form method="get" action="{% url 'search_events' %}">
{{ form.as_p }}
<p><button type="submit">Submit</button></p>
</form>
{% if page.object_list %}
{% for object in page.object_list %}
{% include "events/object_block.html" with object=object %}
{% endfor%}
{% else %}
<p>No events found.</p>
{% endif %}
{% include "includes/pagination.html" %}
{% endblock content %}
|
Add search form to the ``Event`` search tag page.
|
Add search form to the ``Event`` search tag page.
|
HTML
|
bsd-3-clause
|
us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite
|
html
|
## Code Before:
{% extends "base.html" %}
{% block title %}Search events - {{ block.super }}{% endblock title %}
{% block content %}
<h1>Search: Events</h1>
<p><a href="{% url 'event_add' %}">Add an event</a></p>
{% if page.object_list %}
{% for object in page.object_list %}
{% include "events/object_block.html" with object=object %}
{% endfor%}
{% else %}
<p>No events found.</p>
{% endif %}
{% include "includes/pagination.html" %}
{% endblock content %}
## Instruction:
Add search form to the ``Event`` search tag page.
## Code After:
{% extends "base.html" %}
{% block title %}Search events - {{ block.super }}{% endblock title %}
{% block content %}
<h1>Search: Events</h1>
<form method="get" action="{% url 'search_events' %}">
{{ form.as_p }}
<p><button type="submit">Submit</button></p>
</form>
{% if page.object_list %}
{% for object in page.object_list %}
{% include "events/object_block.html" with object=object %}
{% endfor%}
{% else %}
<p>No events found.</p>
{% endif %}
{% include "includes/pagination.html" %}
{% endblock content %}
|
3f89014b9caddebc1b293112edcb80a7ff3a2341
|
SmartKitchenApp/SmartKitchenApp/js/source/templates/dashboard/members.html
|
SmartKitchenApp/SmartKitchenApp/js/source/templates/dashboard/members.html
|
<div data-ng-controller="members" class="container">
<h1 class="text-center">Who's in the kitchen?</h1><br/>
<div class="row" ng-init="allMembers">
<div ng-repeat="member in allMembers">
<div class="col-sm-4" style="margin-bottom: 20px;">
<button style="width: 100%;" class="btn btn-info" type="submit" ng-click="selectMember($index)">
<img src="img/icons/male3-256.png" height="150px" class="img-circle" style="display: block; margin: auto;" />
<h3 class="text-center">{{member.Firstname}}</h3>
</button>
</div>
</div>
<div class="col-sm-4" style="margin-bottom: 20px;">
<button style="width: 100%;" class="btn btn-info" type="submit" ng-click="addMember()">
<img src="img/icons/add.png" height="150px" class="img-circle" style="display: block; margin: auto;"/>
<h3 class="text-center">Add Person</h3>
</button>
</div>
</div>
</div>
|
<div data-ng-controller="members" class="container">
<h1 class="text-center">Who's in the kitchen?</h1><br/>
<div class="row" ng-init="allMembers">
<div ng-repeat="member in allMembers">
<div class="col-sm-4" style="margin-bottom: 20px;">
<button style="width: 100%;" class="btn btn-info" type="submit" ng-click="selectMember($index)">
<img src="img/icons/male3-256.png" height="150px" class="img-circle" style="display: block; margin: auto;" />
<h3 class="text-center" style="display: inline;">{{member.Firstname}}</h3><span style="margin-left: 10px;" ng-show="member.Admin == 'true'" class="label label-primary">The Boss</span>
</button>
</div>
</div>
<div class="col-sm-4" style="margin-bottom: 20px;">
<button style="width: 100%;" class="btn btn-info" type="submit" ng-click="addMember()">
<img src="img/icons/add.png" height="150px" class="img-circle" style="display: block; margin: auto;"/>
<h3 class="text-center" style="display: inline;">Add Person</h3>
</button>
</div>
</div>
</div>
|
Make the admin visible in the memberlist
|
Make the admin visible in the memberlist
|
HTML
|
mit
|
OAMK-Smart-Kitchen/Smart-Fridge-OAMK,OAMK-Smart-Kitchen/Smart-Fridge-OAMK,OAMK-Smart-Kitchen/Smart-Fridge-OAMK,OAMK-Smart-Kitchen/Smart-Fridge-OAMK,OAMK-Smart-Kitchen/Smart-Fridge-OAMK,OAMK-Smart-Kitchen/Smart-Fridge-OAMK,OAMK-Smart-Kitchen/Smart-Fridge-OAMK,OAMK-Smart-Kitchen/Smart-Fridge-OAMK,OAMK-Smart-Kitchen/Smart-Fridge-OAMK,OAMK-Smart-Kitchen/Smart-Fridge-OAMK
|
html
|
## Code Before:
<div data-ng-controller="members" class="container">
<h1 class="text-center">Who's in the kitchen?</h1><br/>
<div class="row" ng-init="allMembers">
<div ng-repeat="member in allMembers">
<div class="col-sm-4" style="margin-bottom: 20px;">
<button style="width: 100%;" class="btn btn-info" type="submit" ng-click="selectMember($index)">
<img src="img/icons/male3-256.png" height="150px" class="img-circle" style="display: block; margin: auto;" />
<h3 class="text-center">{{member.Firstname}}</h3>
</button>
</div>
</div>
<div class="col-sm-4" style="margin-bottom: 20px;">
<button style="width: 100%;" class="btn btn-info" type="submit" ng-click="addMember()">
<img src="img/icons/add.png" height="150px" class="img-circle" style="display: block; margin: auto;"/>
<h3 class="text-center">Add Person</h3>
</button>
</div>
</div>
</div>
## Instruction:
Make the admin visible in the memberlist
## Code After:
<div data-ng-controller="members" class="container">
<h1 class="text-center">Who's in the kitchen?</h1><br/>
<div class="row" ng-init="allMembers">
<div ng-repeat="member in allMembers">
<div class="col-sm-4" style="margin-bottom: 20px;">
<button style="width: 100%;" class="btn btn-info" type="submit" ng-click="selectMember($index)">
<img src="img/icons/male3-256.png" height="150px" class="img-circle" style="display: block; margin: auto;" />
<h3 class="text-center" style="display: inline;">{{member.Firstname}}</h3><span style="margin-left: 10px;" ng-show="member.Admin == 'true'" class="label label-primary">The Boss</span>
</button>
</div>
</div>
<div class="col-sm-4" style="margin-bottom: 20px;">
<button style="width: 100%;" class="btn btn-info" type="submit" ng-click="addMember()">
<img src="img/icons/add.png" height="150px" class="img-circle" style="display: block; margin: auto;"/>
<h3 class="text-center" style="display: inline;">Add Person</h3>
</button>
</div>
</div>
</div>
|
979ec05ed34cec2af0d45dc76b84921af85f84e9
|
script/compile-coffee.py
|
script/compile-coffee.py
|
import os
import subprocess
import sys
from lib.util import *
SOURCE_ROOT = os.path.dirname(os.path.dirname(__file__))
def main():
input_file = sys.argv[1]
output_dir = os.path.dirname(sys.argv[2])
coffee = os.path.join(SOURCE_ROOT, 'node_modules', 'coffee-script', 'bin',
'coffee')
subprocess.check_call(['node', coffee, '-c', '-o', output_dir, input_file])
if __name__ == '__main__':
sys.exit(main())
|
import os
import subprocess
import sys
from lib.util import *
SOURCE_ROOT = os.path.dirname(os.path.dirname(__file__))
def main():
input_file = sys.argv[1]
output_dir = os.path.dirname(sys.argv[2])
coffee = os.path.join(SOURCE_ROOT, 'node_modules', 'coffee-script', 'bin',
'coffee')
if sys.platform in ['win32', 'cygwin']:
subprocess.check_call(['node', coffee, '-c', '-o', output_dir, input_file],
executable='C:/Program Files/nodejs/node.exe')
else:
subprocess.check_call(['node', coffee, '-c', '-o', output_dir, input_file])
if __name__ == '__main__':
sys.exit(main())
|
Fix running node from python.
|
[Win] Fix running node from python.
There is a mysterious "WindowsError [error 5] Access is denied" error is
the "executable" is not specified under Windows.
|
Python
|
mit
|
mjaniszew/electron,meowlab/electron,rreimann/electron,eriser/electron,tonyganch/electron,nicholasess/electron,wolfflow/electron,thingsinjars/electron,dongjoon-hyun/electron,rhencke/electron,Evercoder/electron,yan-foto/electron,mattdesl/electron,pirafrank/electron,nagyistoce/electron-atom-shell,bitemyapp/electron,Andrey-Pavlov/electron,sshiting/electron,maxogden/atom-shell,aliib/electron,robinvandernoord/electron,anko/electron,ankitaggarwal011/electron,RobertJGabriel/electron,gerhardberger/electron,jonatasfreitasv/electron,gbn972/electron,noikiy/electron,the-ress/electron,tylergibson/electron,minggo/electron,MaxGraey/electron,renaesop/electron,trigrass2/electron,benweissmann/electron,aliib/electron,jhen0409/electron,trigrass2/electron,RobertJGabriel/electron,saronwei/electron,shaundunne/electron,leolujuyi/electron,tincan24/electron,shockone/electron,dongjoon-hyun/electron,fritx/electron,darwin/electron,preco21/electron,RobertJGabriel/electron,beni55/electron,nagyistoce/electron-atom-shell,thingsinjars/electron,astoilkov/electron,jhen0409/electron,edulan/electron,kokdemo/electron,BionicClick/electron,jiaz/electron,RIAEvangelist/electron,Evercoder/electron,jtburke/electron,chrisswk/electron,jtburke/electron,kazupon/electron,renaesop/electron,fffej/electron,bruce/electron,darwin/electron,tonyganch/electron,mhkeller/electron,sircharleswatson/electron,BionicClick/electron,chriskdon/electron,kokdemo/electron,wan-qy/electron,davazp/electron,trigrass2/electron,minggo/electron,Neron-X5/electron,tinydew4/electron,Zagorakiss/electron,Zagorakiss/electron,leftstick/electron,leolujuyi/electron,tincan24/electron,destan/electron,miniak/electron,sshiting/electron,oiledCode/electron,benweissmann/electron,jjz/electron,jlord/electron,cos2004/electron,voidbridge/electron,seanchas116/electron,mubassirhayat/electron,darwin/electron,IonicaBizauKitchen/electron,kcrt/electron,xiruibing/electron,kazupon/electron,gerhardberger/electron,tomashanacek/electron,RIAEvangelist/electron,shiftkey/electron,nekuz0r/electron,adcentury/electron,rajatsingla28/electron,d-salas/electron,dongjoon-hyun/electron,stevekinney/electron,sircharleswatson/electron,christian-bromann/electron,gabrielPeart/electron,sky7sea/electron,dahal/electron,dkfiresky/electron,oiledCode/electron,gabrielPeart/electron,leethomas/electron,joneit/electron,jannishuebl/electron,thingsinjars/electron,michaelchiche/electron,deepak1556/atom-shell,renaesop/electron,nagyistoce/electron-atom-shell,gabrielPeart/electron,eric-seekas/electron,yalexx/electron,joneit/electron,rprichard/electron,xiruibing/electron,biblerule/UMCTelnetHub,rprichard/electron,lzpfmh/electron,xiruibing/electron,coderhaoxin/electron,fffej/electron,bitemyapp/electron,bobwol/electron,ervinb/electron,stevekinney/electron,eriser/electron,twolfson/electron,Rokt33r/electron,cqqccqc/electron,medixdev/electron,aichingm/electron,Faiz7412/electron,pandoraui/electron,jonatasfreitasv/electron,RIAEvangelist/electron,systembugtj/electron,bruce/electron,sky7sea/electron,nicobot/electron,preco21/electron,joaomoreno/atom-shell,deepak1556/atom-shell,simonfork/electron,beni55/electron,GoooIce/electron,Andrey-Pavlov/electron,joneit/electron,felixrieseberg/electron,RIAEvangelist/electron,medixdev/electron,Zagorakiss/electron,wolfflow/electron,rhencke/electron,subblue/electron,jacksondc/electron,mrwizard82d1/electron,neutrous/electron,Neron-X5/electron,subblue/electron,adamjgray/electron,micalan/electron,Floato/electron,aliib/electron,leolujuyi/electron,simonfork/electron,LadyNaggaga/electron,jiaz/electron,rhencke/electron,ankitaggarwal011/electron,natgolov/electron,kostia/electron,astoilkov/electron,SufianHassan/electron,wan-qy/electron,webmechanicx/electron,tinydew4/electron,abhishekgahlot/electron,LadyNaggaga/electron,jacksondc/electron,simongregory/electron,DivyaKMenon/electron,bobwol/electron,thomsonreuters/electron,miniak/electron,aaron-goshine/electron,etiktin/electron,tincan24/electron,systembugtj/electron,systembugtj/electron,davazp/electron,oiledCode/electron,zhakui/electron,leethomas/electron,tomashanacek/electron,mubassirhayat/electron,fomojola/electron,webmechanicx/electron,bruce/electron,medixdev/electron,oiledCode/electron,takashi/electron,vaginessa/electron,kostia/electron,fritx/electron,ianscrivener/electron,MaxWhere/electron,zhakui/electron,joaomoreno/atom-shell,davazp/electron,mattdesl/electron,nekuz0r/electron,wolfflow/electron,etiktin/electron,gamedevsam/electron,timruffles/electron,Gerhut/electron,JesselJohn/electron,rajatsingla28/electron,jlhbaseball15/electron,bbondy/electron,leolujuyi/electron,rajatsingla28/electron,iftekeriba/electron,DivyaKMenon/electron,etiktin/electron,mubassirhayat/electron,rajatsingla28/electron,SufianHassan/electron,jaanus/electron,jiaz/electron,mjaniszew/electron,sshiting/electron,anko/electron,natgolov/electron,egoist/electron,maxogden/atom-shell,eric-seekas/electron,stevekinney/electron,carsonmcdonald/electron,aliib/electron,minggo/electron,saronwei/electron,gerhardberger/electron,sky7sea/electron,wolfflow/electron,eric-seekas/electron,pombredanne/electron,edulan/electron,mrwizard82d1/electron,Zagorakiss/electron,matiasinsaurralde/electron,zhakui/electron,gstack/infinium-shell,sshiting/electron,vHanda/electron,digideskio/electron,pirafrank/electron,preco21/electron,gstack/infinium-shell,medixdev/electron,jcblw/electron,rprichard/electron,pandoraui/electron,faizalpribadi/electron,JussMee15/electron,shennushi/electron,micalan/electron,kostia/electron,arusakov/electron,thompsonemerson/electron,stevekinney/electron,mhkeller/electron,jcblw/electron,edulan/electron,jhen0409/electron,pandoraui/electron,benweissmann/electron,neutrous/electron,rhencke/electron,Gerhut/electron,maxogden/atom-shell,John-Lin/electron,eriser/electron,Faiz7412/electron,jannishuebl/electron,tinydew4/electron,kokdemo/electron,destan/electron,DivyaKMenon/electron,oiledCode/electron,meowlab/electron,gerhardberger/electron,yan-foto/electron,gabriel/electron,dahal/electron,voidbridge/electron,DivyaKMenon/electron,roadev/electron,gabrielPeart/electron,pandoraui/electron,mirrh/electron,vaginessa/electron,greyhwndz/electron,mattdesl/electron,coderhaoxin/electron,xfstudio/electron,timruffles/electron,coderhaoxin/electron,lrlna/electron,farmisen/electron,jtburke/electron,meowlab/electron,neutrous/electron,natgolov/electron,jjz/electron,kikong/electron,jacksondc/electron,shennushi/electron,edulan/electron,bobwol/electron,nicholasess/electron,darwin/electron,nicholasess/electron,vipulroxx/electron,Rokt33r/electron,eric-seekas/electron,coderhaoxin/electron,gbn972/electron,fabien-d/electron,systembugtj/electron,jcblw/electron,voidbridge/electron,icattlecoder/electron,lzpfmh/electron,Andrey-Pavlov/electron,mhkeller/electron,adcentury/electron,dahal/electron,yan-foto/electron,systembugtj/electron,lzpfmh/electron,kikong/electron,Andrey-Pavlov/electron,adcentury/electron,Andrey-Pavlov/electron,aecca/electron,soulteary/electron,simonfork/electron,noikiy/electron,Jacobichou/electron,BionicClick/electron,lzpfmh/electron,simongregory/electron,aecca/electron,jsutcodes/electron,vHanda/electron,bbondy/electron,digideskio/electron,brenca/electron,lrlna/electron,yan-foto/electron,Gerhut/electron,miniak/electron,xfstudio/electron,lzpfmh/electron,smczk/electron,sircharleswatson/electron,posix4e/electron,jannishuebl/electron,rreimann/electron,kcrt/electron,kenmozi/electron,sircharleswatson/electron,xfstudio/electron,lzpfmh/electron,fffej/electron,tomashanacek/electron,aaron-goshine/electron,gbn972/electron,kcrt/electron,vipulroxx/electron,deed02392/electron,deed02392/electron,ianscrivener/electron,mjaniszew/electron,faizalpribadi/electron,michaelchiche/electron,benweissmann/electron,jlhbaseball15/electron,xiruibing/electron,icattlecoder/electron,renaesop/electron,dkfiresky/electron,rhencke/electron,trankmichael/electron,kenmozi/electron,beni55/electron,farmisen/electron,shennushi/electron,Ivshti/electron,ianscrivener/electron,trankmichael/electron,chrisswk/electron,rsvip/electron,noikiy/electron,destan/electron,bitemyapp/electron,sky7sea/electron,cos2004/electron,bright-sparks/electron,kcrt/electron,fffej/electron,leethomas/electron,vaginessa/electron,thomsonreuters/electron,pombredanne/electron,leolujuyi/electron,thompsonemerson/electron,bpasero/electron,aliib/electron,brave/electron,posix4e/electron,hokein/atom-shell,eriser/electron,brenca/electron,seanchas116/electron,gamedevsam/electron,mhkeller/electron,mrwizard82d1/electron,LadyNaggaga/electron,neutrous/electron,fomojola/electron,chriskdon/electron,kikong/electron,jonatasfreitasv/electron,bright-sparks/electron,roadev/electron,bitemyapp/electron,d-salas/electron,brave/electron,bruce/electron,synaptek/electron,seanchas116/electron,gstack/infinium-shell,tylergibson/electron,gamedevsam/electron,vaginessa/electron,wan-qy/electron,digideskio/electron,astoilkov/electron,sky7sea/electron,beni55/electron,adamjgray/electron,brave/electron,Faiz7412/electron,Jacobichou/electron,fabien-d/electron,stevekinney/electron,John-Lin/electron,BionicClick/electron,adamjgray/electron,deepak1556/atom-shell,arturts/electron,Jonekee/electron,voidbridge/electron,icattlecoder/electron,jjz/electron,MaxWhere/electron,felixrieseberg/electron,bobwol/electron,Floato/electron,brave/muon,greyhwndz/electron,tomashanacek/electron,tincan24/electron,eriser/electron,jlhbaseball15/electron,jjz/electron,electron/electron,Zagorakiss/electron,evgenyzinoviev/electron,tonyganch/electron,bpasero/electron,dongjoon-hyun/electron,michaelchiche/electron,baiwyc119/electron,JussMee15/electron,carsonmcdonald/electron,BionicClick/electron,jlhbaseball15/electron,deed02392/electron,roadev/electron,mhkeller/electron,Jonekee/electron,biblerule/UMCTelnetHub,rreimann/electron,seanchas116/electron,matiasinsaurralde/electron,JussMee15/electron,brave/muon,Zagorakiss/electron,pirafrank/electron,mattotodd/electron,baiwyc119/electron,oiledCode/electron,GoooIce/electron,arturts/electron,renaesop/electron,aichingm/electron,jacksondc/electron,LadyNaggaga/electron,jlord/electron,nicholasess/electron,bwiggs/electron,miniak/electron,Floato/electron,Ivshti/electron,thomsonreuters/electron,shockone/electron,dongjoon-hyun/electron,mattdesl/electron,pombredanne/electron,mubassirhayat/electron,stevemao/electron,fomojola/electron,micalan/electron,cqqccqc/electron,jlhbaseball15/electron,nicholasess/electron,GoooIce/electron,trankmichael/electron,leethomas/electron,MaxGraey/electron,sshiting/electron,chriskdon/electron,kcrt/electron,subblue/electron,nekuz0r/electron,smczk/electron,natgolov/electron,joaomoreno/atom-shell,gerhardberger/electron,subblue/electron,greyhwndz/electron,Evercoder/electron,greyhwndz/electron,brave/electron,setzer777/electron,dkfiresky/electron,chrisswk/electron,beni55/electron,hokein/atom-shell,yalexx/electron,adamjgray/electron,arturts/electron,JussMee15/electron,shaundunne/electron,joaomoreno/atom-shell,posix4e/electron,icattlecoder/electron,jsutcodes/electron,faizalpribadi/electron,edulan/electron,jtburke/electron,pombredanne/electron,gabriel/electron,LadyNaggaga/electron,kenmozi/electron,kazupon/electron,joneit/electron,twolfson/electron,destan/electron,icattlecoder/electron,gbn972/electron,jsutcodes/electron,michaelchiche/electron,joneit/electron,pandoraui/electron,timruffles/electron,gamedevsam/electron,shaundunne/electron,abhishekgahlot/electron,anko/electron,robinvandernoord/electron,tomashanacek/electron,biblerule/UMCTelnetHub,brave/electron,systembugtj/electron,noikiy/electron,hokein/atom-shell,bitemyapp/electron,synaptek/electron,arusakov/electron,gerhardberger/electron,the-ress/electron,jlord/electron,GoooIce/electron,robinvandernoord/electron,synaptek/electron,rsvip/electron,darwin/electron,baiwyc119/electron,simongregory/electron,ervinb/electron,thompsonemerson/electron,brenca/electron,Evercoder/electron,wolfflow/electron,egoist/electron,mrwizard82d1/electron,rreimann/electron,stevekinney/electron,adamjgray/electron,bwiggs/electron,gabriel/electron,digideskio/electron,mirrh/electron,Faiz7412/electron,yalexx/electron,jiaz/electron,jsutcodes/electron,fritx/electron,wolfflow/electron,miniak/electron,carsonmcdonald/electron,noikiy/electron,bruce/electron,rprichard/electron,stevemao/electron,kazupon/electron,iftekeriba/electron,Floato/electron,IonicaBizauKitchen/electron,egoist/electron,leftstick/electron,digideskio/electron,thingsinjars/electron,gerhardberger/electron,jjz/electron,JesselJohn/electron,minggo/electron,jlord/electron,adamjgray/electron,felixrieseberg/electron,Faiz7412/electron,trankmichael/electron,shockone/electron,leftstick/electron,stevemao/electron,iftekeriba/electron,leftstick/electron,shaundunne/electron,xfstudio/electron,setzer777/electron,Rokt33r/electron,d-salas/electron,RobertJGabriel/electron,Ivshti/electron,jcblw/electron,tincan24/electron,maxogden/atom-shell,tinydew4/electron,dkfiresky/electron,howmuchcomputer/electron,jtburke/electron,abhishekgahlot/electron,howmuchcomputer/electron,farmisen/electron,simongregory/electron,IonicaBizauKitchen/electron,SufianHassan/electron,voidbridge/electron,leethomas/electron,arturts/electron,vipulroxx/electron,jsutcodes/electron,fritx/electron,BionicClick/electron,etiktin/electron,webmechanicx/electron,trankmichael/electron,vipulroxx/electron,neutrous/electron,ianscrivener/electron,bwiggs/electron,smczk/electron,arturts/electron,xfstudio/electron,simongregory/electron,vipulroxx/electron,tylergibson/electron,John-Lin/electron,mrwizard82d1/electron,michaelchiche/electron,aaron-goshine/electron,MaxGraey/electron,leethomas/electron,fabien-d/electron,smczk/electron,Rokt33r/electron,astoilkov/electron,rsvip/electron,soulteary/electron,mubassirhayat/electron,twolfson/electron,mhkeller/electron,sky7sea/electron,astoilkov/electron,nicobot/electron,bright-sparks/electron,deed02392/electron,bwiggs/electron,jannishuebl/electron,roadev/electron,electron/electron,bobwol/electron,MaxWhere/electron,adcentury/electron,kokdemo/electron,tylergibson/electron,subblue/electron,thingsinjars/electron,roadev/electron,ervinb/electron,evgenyzinoviev/electron,nicobot/electron,meowlab/electron,wan-qy/electron,saronwei/electron,fomojola/electron,Jacobichou/electron,pandoraui/electron,bright-sparks/electron,pirafrank/electron,carsonmcdonald/electron,GoooIce/electron,nicobot/electron,hokein/atom-shell,rreimann/electron,Ivshti/electron,abhishekgahlot/electron,pombredanne/electron,Ivshti/electron,baiwyc119/electron,fireball-x/atom-shell,meowlab/electron,natgolov/electron,trankmichael/electron,fomojola/electron,cqqccqc/electron,MaxGraey/electron,kostia/electron,nekuz0r/electron,coderhaoxin/electron,mjaniszew/electron,tomashanacek/electron,edulan/electron,arturts/electron,Neron-X5/electron,mirrh/electron,simonfork/electron,shaundunne/electron,preco21/electron,gstack/infinium-shell,noikiy/electron,twolfson/electron,pombredanne/electron,jlhbaseball15/electron,SufianHassan/electron,fireball-x/atom-shell,kostia/electron,takashi/electron,mirrh/electron,joaomoreno/atom-shell,biblerule/UMCTelnetHub,felixrieseberg/electron,saronwei/electron,egoist/electron,seanchas116/electron,farmisen/electron,bpasero/electron,mattdesl/electron,kokdemo/electron,brave/electron,electron/electron,lrlna/electron,d-salas/electron,Jacobichou/electron,felixrieseberg/electron,ankitaggarwal011/electron,nicobot/electron,fritx/electron,brenca/electron,jcblw/electron,miniak/electron,tincan24/electron,baiwyc119/electron,bruce/electron,IonicaBizauKitchen/electron,RIAEvangelist/electron,yalexx/electron,icattlecoder/electron,nagyistoce/electron-atom-shell,cos2004/electron,MaxGraey/electron,SufianHassan/electron,jacksondc/electron,bbondy/electron,setzer777/electron,leftstick/electron,gbn972/electron,electron/electron,dahal/electron,thompsonemerson/electron,LadyNaggaga/electron,the-ress/electron,shennushi/electron,abhishekgahlot/electron,DivyaKMenon/electron,bpasero/electron,JesselJohn/electron,lrlna/electron,Gerhut/electron,chrisswk/electron,matiasinsaurralde/electron,evgenyzinoviev/electron,mattdesl/electron,shiftkey/electron,fabien-d/electron,jonatasfreitasv/electron,jaanus/electron,setzer777/electron,aecca/electron,arusakov/electron,digideskio/electron,rsvip/electron,fomojola/electron,Floato/electron,Gerhut/electron,soulteary/electron,carsonmcdonald/electron,mattotodd/electron,aecca/electron,arusakov/electron,jonatasfreitasv/electron,RIAEvangelist/electron,davazp/electron,bitemyapp/electron,davazp/electron,trigrass2/electron,gbn972/electron,bbondy/electron,Neron-X5/electron,mattotodd/electron,aaron-goshine/electron,twolfson/electron,rajatsingla28/electron,greyhwndz/electron,Rokt33r/electron,farmisen/electron,yan-foto/electron,simongregory/electron,yan-foto/electron,tonyganch/electron,jonatasfreitasv/electron,ankitaggarwal011/electron,eric-seekas/electron,aecca/electron,jacksondc/electron,deepak1556/atom-shell,synaptek/electron,mirrh/electron,carsonmcdonald/electron,ervinb/electron,tylergibson/electron,jlord/electron,JussMee15/electron,joaomoreno/atom-shell,Gerhut/electron,soulteary/electron,bwiggs/electron,takashi/electron,chriskdon/electron,kenmozi/electron,hokein/atom-shell,brave/muon,fireball-x/atom-shell,howmuchcomputer/electron,vHanda/electron,mjaniszew/electron,aaron-goshine/electron,felixrieseberg/electron,shaundunne/electron,thomsonreuters/electron,fritx/electron,dkfiresky/electron,vaginessa/electron,IonicaBizauKitchen/electron,soulteary/electron,coderhaoxin/electron,nicobot/electron,michaelchiche/electron,takashi/electron,Jonekee/electron,jhen0409/electron,takashi/electron,kazupon/electron,tinydew4/electron,iftekeriba/electron,brenca/electron,kazupon/electron,bpasero/electron,christian-bromann/electron,sircharleswatson/electron,eriser/electron,ianscrivener/electron,mrwizard82d1/electron,webmechanicx/electron,chrisswk/electron,SufianHassan/electron,anko/electron,Rokt33r/electron,trigrass2/electron,adcentury/electron,cos2004/electron,zhakui/electron,shiftkey/electron,ervinb/electron,bwiggs/electron,jtburke/electron,mirrh/electron,the-ress/electron,jcblw/electron,GoooIce/electron,bobwol/electron,timruffles/electron,arusakov/electron,bright-sparks/electron,maxogden/atom-shell,fabien-d/electron,cqqccqc/electron,egoist/electron,biblerule/UMCTelnetHub,meowlab/electron,kostia/electron,wan-qy/electron,joneit/electron,davazp/electron,IonicaBizauKitchen/electron,nagyistoce/electron-atom-shell,electron/electron,farmisen/electron,John-Lin/electron,fffej/electron,medixdev/electron,baiwyc119/electron,gabriel/electron,shennushi/electron,brave/muon,aliib/electron,benweissmann/electron,Andrey-Pavlov/electron,etiktin/electron,posix4e/electron,zhakui/electron,smczk/electron,cqqccqc/electron,faizalpribadi/electron,JesselJohn/electron,fireball-x/atom-shell,John-Lin/electron,Evercoder/electron,howmuchcomputer/electron,pirafrank/electron,rhencke/electron,nekuz0r/electron,roadev/electron,mattotodd/electron,dahal/electron,kcrt/electron,takashi/electron,arusakov/electron,Jonekee/electron,greyhwndz/electron,d-salas/electron,thomsonreuters/electron,jiaz/electron,jaanus/electron,gstack/infinium-shell,adcentury/electron,anko/electron,RobertJGabriel/electron,JesselJohn/electron,smczk/electron,micalan/electron,robinvandernoord/electron,MaxWhere/electron,renaesop/electron,deepak1556/atom-shell,leftstick/electron,xiruibing/electron,sircharleswatson/electron,thingsinjars/electron,Evercoder/electron,cos2004/electron,iftekeriba/electron,howmuchcomputer/electron,bpasero/electron,xfstudio/electron,gabrielPeart/electron,thompsonemerson/electron,chriskdon/electron,brave/muon,stevemao/electron,robinvandernoord/electron,evgenyzinoviev/electron,christian-bromann/electron,egoist/electron,vHanda/electron,astoilkov/electron,setzer777/electron,RobertJGabriel/electron,cqqccqc/electron,bpasero/electron,jhen0409/electron,wan-qy/electron,tylergibson/electron,preco21/electron,Jacobichou/electron,preco21/electron,abhishekgahlot/electron,tinydew4/electron,DivyaKMenon/electron,jhen0409/electron,gabriel/electron,shiftkey/electron,gabrielPeart/electron,timruffles/electron,saronwei/electron,electron/electron,robinvandernoord/electron,dkfiresky/electron,Neron-X5/electron,subblue/electron,zhakui/electron,shennushi/electron,Jonekee/electron,tonyganch/electron,John-Lin/electron,deed02392/electron,leolujuyi/electron,tonyganch/electron,nicholasess/electron,mattotodd/electron,kokdemo/electron,christian-bromann/electron,JesselJohn/electron,gamedevsam/electron,the-ress/electron,christian-bromann/electron,stevemao/electron,etiktin/electron,seanchas116/electron,bbondy/electron,synaptek/electron,jaanus/electron,webmechanicx/electron,kikong/electron,rajatsingla28/electron,shockone/electron,twolfson/electron,MaxWhere/electron,chriskdon/electron,thompsonemerson/electron,kenmozi/electron,mattotodd/electron,minggo/electron,biblerule/UMCTelnetHub,aecca/electron,brave/muon,shockone/electron,Jacobichou/electron,destan/electron,natgolov/electron,ankitaggarwal011/electron,kenmozi/electron,minggo/electron,MaxWhere/electron,deed02392/electron,posix4e/electron,rreimann/electron,matiasinsaurralde/electron,posix4e/electron,voidbridge/electron,medixdev/electron,jannishuebl/electron,matiasinsaurralde/electron,christian-bromann/electron,gabriel/electron,eric-seekas/electron,micalan/electron,Neron-X5/electron,aichingm/electron,lrlna/electron,the-ress/electron,mjaniszew/electron,saronwei/electron,anko/electron,dongjoon-hyun/electron,faizalpribadi/electron,jsutcodes/electron,soulteary/electron,synaptek/electron,shockone/electron,kikong/electron,faizalpribadi/electron,bright-sparks/electron,brenca/electron,JussMee15/electron,shiftkey/electron,shiftkey/electron,jannishuebl/electron,yalexx/electron,bbondy/electron,jiaz/electron,micalan/electron,d-salas/electron,fireball-x/atom-shell,evgenyzinoviev/electron,rsvip/electron,simonfork/electron,vipulroxx/electron,ianscrivener/electron,jjz/electron,nekuz0r/electron,neutrous/electron,Jonekee/electron,destan/electron,cos2004/electron,jaanus/electron,evgenyzinoviev/electron,electron/electron,benweissmann/electron,beni55/electron,aichingm/electron,xiruibing/electron,vHanda/electron,aichingm/electron,howmuchcomputer/electron,ervinb/electron,pirafrank/electron,dahal/electron,vaginessa/electron,stevemao/electron,Floato/electron,fffej/electron,simonfork/electron,lrlna/electron,trigrass2/electron,webmechanicx/electron,vHanda/electron,yalexx/electron,ankitaggarwal011/electron,sshiting/electron,matiasinsaurralde/electron,iftekeriba/electron,thomsonreuters/electron,the-ress/electron,setzer777/electron,aichingm/electron,gamedevsam/electron,jaanus/electron,aaron-goshine/electron
|
python
|
## Code Before:
import os
import subprocess
import sys
from lib.util import *
SOURCE_ROOT = os.path.dirname(os.path.dirname(__file__))
def main():
input_file = sys.argv[1]
output_dir = os.path.dirname(sys.argv[2])
coffee = os.path.join(SOURCE_ROOT, 'node_modules', 'coffee-script', 'bin',
'coffee')
subprocess.check_call(['node', coffee, '-c', '-o', output_dir, input_file])
if __name__ == '__main__':
sys.exit(main())
## Instruction:
[Win] Fix running node from python.
There is a mysterious "WindowsError [error 5] Access is denied" error is
the "executable" is not specified under Windows.
## Code After:
import os
import subprocess
import sys
from lib.util import *
SOURCE_ROOT = os.path.dirname(os.path.dirname(__file__))
def main():
input_file = sys.argv[1]
output_dir = os.path.dirname(sys.argv[2])
coffee = os.path.join(SOURCE_ROOT, 'node_modules', 'coffee-script', 'bin',
'coffee')
if sys.platform in ['win32', 'cygwin']:
subprocess.check_call(['node', coffee, '-c', '-o', output_dir, input_file],
executable='C:/Program Files/nodejs/node.exe')
else:
subprocess.check_call(['node', coffee, '-c', '-o', output_dir, input_file])
if __name__ == '__main__':
sys.exit(main())
|
a615c8028cb1f6821dbe7590e7044182d1d8672c
|
Kwc/Statistics/OptBox/Component.js
|
Kwc/Statistics/OptBox/Component.js
|
Kwf.onContentReady(function statisticsOptBox(body, param) {
if (!param.newRender) return;
if (Kwf.Statistics.defaultOptValue == 'out' && Kwf.Statistics.optBoxHtml
&& !Kwf.Statistics.issetUserOptValue() && !$('body').data().optbox
) {
$('body').prepend(Kwf.Statistics.optBoxHtml);
$('body').data('optbox', true);
Kwf.callOnContentReady(document.body, { action: 'render' });
}
}, {priority: -2}); // before Kwf.Utils.ResponsiveEl
Kwf.onElementReady('.kwcStatisticsOptBox a.accept', function statisticsOptBox(link) {
link.on('click', function(e, el) {
e.preventDefault();
e.stopEvent();
Kwf.Statistics.setUserOptValue('in');
Kwf.fireComponentEvent('cookieOptChanged', 'in');
return false;
});
}, {priority: 10});
Kwf.onJElementReady('.kwcStatisticsOptBox a.decline', function(el) {
el.on('click', function(e, el) {
e.preventDefault();
Kwf.Statistics.setUserOptValue('out');
Kwf.fireComponentEvent('cookieOptChanged', 'out');
});
}, {priority: 10});
Kwf.onComponentEvent('cookieOptChanged', function(value) {
$('body').find('.cssClass').hide();
if (Kwf.Statistics.reloadOnOptChanged) {
document.location.reload();
}
});
|
Kwf.onContentReady(function statisticsOptBox(body, param) {
if (!param.newRender) return;
if (Kwf.Statistics.defaultOptValue == 'out' && Kwf.Statistics.optBoxHtml
&& !Kwf.Statistics.issetUserOptValue() && !$('body').data().optbox
) {
$('body').prepend(Kwf.Statistics.optBoxHtml);
$('body').data('optbox', true);
Kwf.callOnContentReady(document.body, { action: 'render' });
}
}, {priority: -2}); // before Kwf.Utils.ResponsiveEl
Kwf.onJElementReady('.kwcStatisticsOptBox a.accept', function statisticsOptBox(link) {
link.on('click', function(e, el) {
e.preventDefault();
Kwf.Statistics.setUserOptValue('in');
Kwf.fireComponentEvent('cookieOptChanged', 'in');
});
}, {priority: 10});
Kwf.onJElementReady('.kwcStatisticsOptBox a.decline', function(el) {
el.on('click', function(e, el) {
e.preventDefault();
Kwf.Statistics.setUserOptValue('out');
Kwf.fireComponentEvent('cookieOptChanged', 'out');
});
}, {priority: 10});
Kwf.onComponentEvent('cookieOptChanged', function(value) {
$('body').find('.cssClass').hide();
if (Kwf.Statistics.reloadOnOptChanged) {
document.location.reload();
}
});
|
Use jQuery instead of ext.
|
OptBox: Use jQuery instead of ext.
Simplifies code, step forward to remove ext from frontend.
|
JavaScript
|
bsd-2-clause
|
yacon/koala-framework,koala-framework/koala-framework,Ben-Ho/koala-framework,nsams/koala-framework,kaufmo/koala-framework,nsams/koala-framework,kaufmo/koala-framework,nsams/koala-framework,Sogl/koala-framework,yacon/koala-framework,yacon/koala-framework,koala-framework/koala-framework,Sogl/koala-framework,Ben-Ho/koala-framework,kaufmo/koala-framework
|
javascript
|
## Code Before:
Kwf.onContentReady(function statisticsOptBox(body, param) {
if (!param.newRender) return;
if (Kwf.Statistics.defaultOptValue == 'out' && Kwf.Statistics.optBoxHtml
&& !Kwf.Statistics.issetUserOptValue() && !$('body').data().optbox
) {
$('body').prepend(Kwf.Statistics.optBoxHtml);
$('body').data('optbox', true);
Kwf.callOnContentReady(document.body, { action: 'render' });
}
}, {priority: -2}); // before Kwf.Utils.ResponsiveEl
Kwf.onElementReady('.kwcStatisticsOptBox a.accept', function statisticsOptBox(link) {
link.on('click', function(e, el) {
e.preventDefault();
e.stopEvent();
Kwf.Statistics.setUserOptValue('in');
Kwf.fireComponentEvent('cookieOptChanged', 'in');
return false;
});
}, {priority: 10});
Kwf.onJElementReady('.kwcStatisticsOptBox a.decline', function(el) {
el.on('click', function(e, el) {
e.preventDefault();
Kwf.Statistics.setUserOptValue('out');
Kwf.fireComponentEvent('cookieOptChanged', 'out');
});
}, {priority: 10});
Kwf.onComponentEvent('cookieOptChanged', function(value) {
$('body').find('.cssClass').hide();
if (Kwf.Statistics.reloadOnOptChanged) {
document.location.reload();
}
});
## Instruction:
OptBox: Use jQuery instead of ext.
Simplifies code, step forward to remove ext from frontend.
## Code After:
Kwf.onContentReady(function statisticsOptBox(body, param) {
if (!param.newRender) return;
if (Kwf.Statistics.defaultOptValue == 'out' && Kwf.Statistics.optBoxHtml
&& !Kwf.Statistics.issetUserOptValue() && !$('body').data().optbox
) {
$('body').prepend(Kwf.Statistics.optBoxHtml);
$('body').data('optbox', true);
Kwf.callOnContentReady(document.body, { action: 'render' });
}
}, {priority: -2}); // before Kwf.Utils.ResponsiveEl
Kwf.onJElementReady('.kwcStatisticsOptBox a.accept', function statisticsOptBox(link) {
link.on('click', function(e, el) {
e.preventDefault();
Kwf.Statistics.setUserOptValue('in');
Kwf.fireComponentEvent('cookieOptChanged', 'in');
});
}, {priority: 10});
Kwf.onJElementReady('.kwcStatisticsOptBox a.decline', function(el) {
el.on('click', function(e, el) {
e.preventDefault();
Kwf.Statistics.setUserOptValue('out');
Kwf.fireComponentEvent('cookieOptChanged', 'out');
});
}, {priority: 10});
Kwf.onComponentEvent('cookieOptChanged', function(value) {
$('body').find('.cssClass').hide();
if (Kwf.Statistics.reloadOnOptChanged) {
document.location.reload();
}
});
|
dc87229eeeef35325d72a1b97e0790204673a5aa
|
main.py
|
main.py
|
from curses import wrapper
from ui import ChatUI
from client import Client
import ConfigParser
def main(stdscr):
cp = ConfigParser.ConfigParser()
cp.read('config.cfg')
username = cp.get('credentials', 'username')
password = cp.get('credentials', 'password')
stdscr.clear()
ui = ChatUI(stdscr)
client = Client(username, password, ui)
client.subscribe_to_channel('main')
client.subscribe_to_users()
message = ''
while message != '/quit':
message = ui.wait_input()
if message[0:6] == '/join ':
client.subscribe_to_channel(message[6:])
else:
client.client.insert('messages', {'channel': client.current_channel, 'text': message})
wrapper(main)
|
from curses import wrapper
from ui import ChatUI
from client import Client
import configparser
def main(stdscr):
cp = configparser.ConfigParser()
cp.read('config.cfg')
username = cp.get('credentials', 'username')
password = cp.get('credentials', 'password').encode('utf-8')
stdscr.clear()
ui = ChatUI(stdscr)
client = Client(username, password, ui)
client.subscribe_to_channel('main')
client.subscribe_to_users()
message = ''
while message != '/quit':
message = ui.wait_input()
if message[0:6] == '/join ':
client.subscribe_to_channel(message[6:])
else:
client.client.insert('messages', {'channel': client.current_channel, 'text': message})
wrapper(main)
|
Make it work with Py3
|
Make it work with Py3
|
Python
|
mit
|
vhf/kwak_cli
|
python
|
## Code Before:
from curses import wrapper
from ui import ChatUI
from client import Client
import ConfigParser
def main(stdscr):
cp = ConfigParser.ConfigParser()
cp.read('config.cfg')
username = cp.get('credentials', 'username')
password = cp.get('credentials', 'password')
stdscr.clear()
ui = ChatUI(stdscr)
client = Client(username, password, ui)
client.subscribe_to_channel('main')
client.subscribe_to_users()
message = ''
while message != '/quit':
message = ui.wait_input()
if message[0:6] == '/join ':
client.subscribe_to_channel(message[6:])
else:
client.client.insert('messages', {'channel': client.current_channel, 'text': message})
wrapper(main)
## Instruction:
Make it work with Py3
## Code After:
from curses import wrapper
from ui import ChatUI
from client import Client
import configparser
def main(stdscr):
cp = configparser.ConfigParser()
cp.read('config.cfg')
username = cp.get('credentials', 'username')
password = cp.get('credentials', 'password').encode('utf-8')
stdscr.clear()
ui = ChatUI(stdscr)
client = Client(username, password, ui)
client.subscribe_to_channel('main')
client.subscribe_to_users()
message = ''
while message != '/quit':
message = ui.wait_input()
if message[0:6] == '/join ':
client.subscribe_to_channel(message[6:])
else:
client.client.insert('messages', {'channel': client.current_channel, 'text': message})
wrapper(main)
|
d53ecdef139bb4e1457c89f1db023a3b708f0dbc
|
docs/cpanratings/rate/rate_submitted.html
|
docs/cpanratings/rate/rate_submitted.html
|
<h2>Thanks</h2>
<p>
Thank you for submitting a review of [% review.distribution %].
</p>
<p>
<pre>
[% review.review | html %]
</pre>
</p>
<a href="/">Go back to the front page</a>
|
<h2>Thanks</h2>
<p>
Thank you for submitting a review of [% review.distribution %].
</p>
<p>
[% PROCESS display/short_review.html %]
</p>
<a href="/">Go back to the front page</a>
|
Make 'thank you for rating' page show the properly formatted review
|
Make 'thank you for rating' page show the properly formatted review
|
HTML
|
apache-2.0
|
PeterMartini/perlweb,ajolma/perlweb,Abigail/perlweb,Abigail/perlweb,ajolma/perlweb,autarch/perlweb,briandfoy/perlweb,Abigail/perlweb,dagolden/perlweb,alcy/perlweb,alcy/perlweb,dagolden/perlweb,PeterMartini/perlweb,autarch/perlweb,bjakubski/perlweb,briandfoy/perlweb,dagolden/perlweb,autarch/perlweb,alcy/perlweb,briandfoy/perlweb,bjakubski/perlweb,PeterMartini/perlweb,ajolma/perlweb,bjakubski/perlweb
|
html
|
## Code Before:
<h2>Thanks</h2>
<p>
Thank you for submitting a review of [% review.distribution %].
</p>
<p>
<pre>
[% review.review | html %]
</pre>
</p>
<a href="/">Go back to the front page</a>
## Instruction:
Make 'thank you for rating' page show the properly formatted review
## Code After:
<h2>Thanks</h2>
<p>
Thank you for submitting a review of [% review.distribution %].
</p>
<p>
[% PROCESS display/short_review.html %]
</p>
<a href="/">Go back to the front page</a>
|
ce02ec025ab6d0ace3b07628049095a62815683b
|
lib/stompede.rb
|
lib/stompede.rb
|
require "stomp_parser"
require "celluloid"
require "celluloid/io"
require "delegate"
require "securerandom"
require "stompede/version"
require "stompede/error"
require "stompede/base"
require "stompede/connector"
require "stompede/frame"
require "stompede/error_frame"
require "stompede/session"
require "stompede/subscription"
module Stompede
STOMP_VERSION = "1.2" # version of the STOMP protocol we support
class TCPServer
def initialize(app_klass)
@app_klass = app_klass
end
def listen(*args)
server = ::TCPServer.new(*args)
loop do
socket = server.accept
@app_klass.new(Celluloid::IO::TCPSocket.new(socket))
end
end
end
class WebsocketServer
def initialize(app_klass)
@app_klass = app_klass
end
class Socket < SimpleDelegator
def initialize(websocket)
super(websocket)
end
def readpartial(*args)
read
end
end
def listen(*args)
require "reel"
Reel::Server.run(*args) do |connection|
connection.each_request do |request|
if request.websocket?
@app_klass.new(Socket.new(request.websocket))
else
request.respond :ok, "Stompede"
end
end
end
end
end
end
|
require "stomp_parser"
require "celluloid"
require "celluloid/io"
require "delegate"
require "securerandom"
require "stompede/version"
require "stompede/error"
require "stompede/base"
require "stompede/connector"
require "stompede/frame"
require "stompede/error_frame"
require "stompede/session"
require "stompede/subscription"
module Stompede
STOMP_VERSION = "1.2" # version of the STOMP protocol we support
class TCPServer
def initialize(app_klass)
@connector = Connector.new(app_klass)
end
def listen(*args)
server = ::TCPServer.new(*args)
loop do
socket = server.accept
@connector.async.connect(Celluloid::IO::TCPSocket.new(socket))
end
end
end
class WebsocketServer
def initialize(app_klass)
@app_klass = app_klass
end
class Socket < SimpleDelegator
def initialize(websocket)
super(websocket)
end
def readpartial(*args)
read
end
end
def listen(*args)
require "reel"
Reel::Server.run(*args) do |connection|
connection.each_request do |request|
if request.websocket?
@app_klass.new(Socket.new(request.websocket))
else
request.respond :ok, "Stompede"
end
end
end
end
end
end
|
Fix TCP server to work with Connector
|
Fix TCP server to work with Connector
|
Ruby
|
mit
|
elabs/stompede,elabs/stompede
|
ruby
|
## Code Before:
require "stomp_parser"
require "celluloid"
require "celluloid/io"
require "delegate"
require "securerandom"
require "stompede/version"
require "stompede/error"
require "stompede/base"
require "stompede/connector"
require "stompede/frame"
require "stompede/error_frame"
require "stompede/session"
require "stompede/subscription"
module Stompede
STOMP_VERSION = "1.2" # version of the STOMP protocol we support
class TCPServer
def initialize(app_klass)
@app_klass = app_klass
end
def listen(*args)
server = ::TCPServer.new(*args)
loop do
socket = server.accept
@app_klass.new(Celluloid::IO::TCPSocket.new(socket))
end
end
end
class WebsocketServer
def initialize(app_klass)
@app_klass = app_klass
end
class Socket < SimpleDelegator
def initialize(websocket)
super(websocket)
end
def readpartial(*args)
read
end
end
def listen(*args)
require "reel"
Reel::Server.run(*args) do |connection|
connection.each_request do |request|
if request.websocket?
@app_klass.new(Socket.new(request.websocket))
else
request.respond :ok, "Stompede"
end
end
end
end
end
end
## Instruction:
Fix TCP server to work with Connector
## Code After:
require "stomp_parser"
require "celluloid"
require "celluloid/io"
require "delegate"
require "securerandom"
require "stompede/version"
require "stompede/error"
require "stompede/base"
require "stompede/connector"
require "stompede/frame"
require "stompede/error_frame"
require "stompede/session"
require "stompede/subscription"
module Stompede
STOMP_VERSION = "1.2" # version of the STOMP protocol we support
class TCPServer
def initialize(app_klass)
@connector = Connector.new(app_klass)
end
def listen(*args)
server = ::TCPServer.new(*args)
loop do
socket = server.accept
@connector.async.connect(Celluloid::IO::TCPSocket.new(socket))
end
end
end
class WebsocketServer
def initialize(app_klass)
@app_klass = app_klass
end
class Socket < SimpleDelegator
def initialize(websocket)
super(websocket)
end
def readpartial(*args)
read
end
end
def listen(*args)
require "reel"
Reel::Server.run(*args) do |connection|
connection.each_request do |request|
if request.websocket?
@app_klass.new(Socket.new(request.websocket))
else
request.respond :ok, "Stompede"
end
end
end
end
end
end
|
bc4fb3e9c85d9ada2b7c336b427d550d0615e8ce
|
metadata.rb
|
metadata.rb
|
name 'rstudio'
maintainer 'Sprint.ly, Inc.'
maintainer_email '[email protected]'
license 'All rights reserved'
description 'Installs/Configures rstudio'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '0.2.0'
depends "apt"
depends "nginx"
depends "r"
|
name 'rstudio'
maintainer 'Sprint.ly, Inc.'
maintainer_email '[email protected]'
license 'All rights reserved'
description 'Installs/Configures rstudio'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '0.2.0'
depends "apt"
depends "nginx"
depends "r"
depends "users"
|
Make sure we depends on users cookbook.
|
Make sure we depends on users cookbook.
|
Ruby
|
bsd-3-clause
|
sprintly/rstudio-chef,sprintly/rstudio-chef
|
ruby
|
## Code Before:
name 'rstudio'
maintainer 'Sprint.ly, Inc.'
maintainer_email '[email protected]'
license 'All rights reserved'
description 'Installs/Configures rstudio'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '0.2.0'
depends "apt"
depends "nginx"
depends "r"
## Instruction:
Make sure we depends on users cookbook.
## Code After:
name 'rstudio'
maintainer 'Sprint.ly, Inc.'
maintainer_email '[email protected]'
license 'All rights reserved'
description 'Installs/Configures rstudio'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '0.2.0'
depends "apt"
depends "nginx"
depends "r"
depends "users"
|
25e6e9949e99ae485568ed238d0a2595cc290882
|
test/Feature/varargs.ll
|
test/Feature/varargs.ll
|
; Demonstrate all of the variable argument handling intrinsic functions plus
; the va_arg instruction.
implementation
declare void %llvm.va_start(sbyte**, ...)
declare void %llvm.va_copy(sbyte**, sbyte*)
declare void %llvm.va_end(sbyte**)
int %test(int %X, ...) {
%ap = alloca sbyte*
%aq = alloca sbyte*
call void (sbyte**, ...)* %llvm.va_start(sbyte** %ap, int %X)
%apv = load sbyte** %ap
call void %llvm.va_copy(sbyte** %aq, sbyte* %apv)
call void %llvm.va_end(sbyte** %aq)
%tmp = va_arg sbyte** %ap, int
call void %llvm.va_end(sbyte** %ap)
ret int %tmp
}
|
; Demonstrate all of the variable argument handling intrinsic functions plus
; the va_arg instruction.
implementation
declare sbyte* %llvm.va_start()
declare sbyte* %llvm.va_copy(sbyte*)
declare void %llvm.va_end(sbyte*)
int %test(int %X, ...) {
%ap = call sbyte* %llvm.va_start()
%aq = call sbyte* %llvm.va_copy(sbyte* %ap)
call void %llvm.va_end(sbyte* %aq)
%tmp = vaarg sbyte* %ap, int
%ap2 = vanext sbyte* %ap, int
call void %llvm.va_end(sbyte* %ap2)
ret int %tmp
}
|
Update test to new style
|
Update test to new style
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@9327 91177308-0d34-0410-b5e6-96231b3b80d8
|
LLVM
|
apache-2.0
|
GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,dslab-epfl/asap,chubbymaggie/asap,dslab-epfl/asap,dslab-epfl/asap,chubbymaggie/asap,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mirror/llvm,chubbymaggie/asap,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,apple/swift-llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm,dslab-epfl/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,dslab-epfl/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,dslab-epfl/asap,chubbymaggie/asap,llvm-mirror/llvm
|
llvm
|
## Code Before:
; Demonstrate all of the variable argument handling intrinsic functions plus
; the va_arg instruction.
implementation
declare void %llvm.va_start(sbyte**, ...)
declare void %llvm.va_copy(sbyte**, sbyte*)
declare void %llvm.va_end(sbyte**)
int %test(int %X, ...) {
%ap = alloca sbyte*
%aq = alloca sbyte*
call void (sbyte**, ...)* %llvm.va_start(sbyte** %ap, int %X)
%apv = load sbyte** %ap
call void %llvm.va_copy(sbyte** %aq, sbyte* %apv)
call void %llvm.va_end(sbyte** %aq)
%tmp = va_arg sbyte** %ap, int
call void %llvm.va_end(sbyte** %ap)
ret int %tmp
}
## Instruction:
Update test to new style
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@9327 91177308-0d34-0410-b5e6-96231b3b80d8
## Code After:
; Demonstrate all of the variable argument handling intrinsic functions plus
; the va_arg instruction.
implementation
declare sbyte* %llvm.va_start()
declare sbyte* %llvm.va_copy(sbyte*)
declare void %llvm.va_end(sbyte*)
int %test(int %X, ...) {
%ap = call sbyte* %llvm.va_start()
%aq = call sbyte* %llvm.va_copy(sbyte* %ap)
call void %llvm.va_end(sbyte* %aq)
%tmp = vaarg sbyte* %ap, int
%ap2 = vanext sbyte* %ap, int
call void %llvm.va_end(sbyte* %ap2)
ret int %tmp
}
|
0399263d648fca5103f3067ad0dcd84ae6cb71a8
|
.eslintrc.js
|
.eslintrc.js
|
module.exports = {
presets: [
['env', {
targets: {
node: 'current'
}
}]
];
}
|
module.exports = {
parserOptions: {
ecmaVersion: 8,
sourceType: 'module'
},
env: {
node: true
}
};
|
Fix eslint config (copied babel conf on accident)
|
Fix eslint config (copied babel conf on accident)
|
JavaScript
|
mit
|
joshperry/carwings
|
javascript
|
## Code Before:
module.exports = {
presets: [
['env', {
targets: {
node: 'current'
}
}]
];
}
## Instruction:
Fix eslint config (copied babel conf on accident)
## Code After:
module.exports = {
parserOptions: {
ecmaVersion: 8,
sourceType: 'module'
},
env: {
node: true
}
};
|
44dc97d358930f37dedbac919f1b488603043793
|
spec/spec_helper.rb
|
spec/spec_helper.rb
|
require 'simplecov'
SimpleCov.start 'rails'
ENV['RAILS_ENV'] ||= 'test'
begin
require File.expand_path('../dummy/config/environment', __FILE__)
rescue LoadError
puts 'Could not load dummy application. Please ensure you have run `bundle exec rake test_app`'
exit
end
require 'rspec/rails'
require 'ffaker'
require 'shoulda-matchers'
require 'pry'
RSpec.configure do |config|
config.fail_fast = false
config.filter_run focus: true
config.run_all_when_everything_filtered = true
config.mock_with :rspec
config.use_transactional_fixtures = false
config.raise_errors_for_deprecations!
config.infer_spec_type_from_file_location!
config.expect_with :rspec do |expectations|
expectations.syntax = :expect
end
end
# From: https://github.com/thoughtbot/shoulda-matchers/issues/384
Shoulda::Matchers.configure do |config|
config.integrate do |with|
with.test_framework :rspec
with.library :rails
end
end
Dir[File.join(File.dirname(__FILE__), 'support/**/*.rb')].each { |file| require file }
|
require 'simplecov'
SimpleCov.start 'rails' do
add_filter "/lib/generators"
add_filter "/lib/solidus_volume_pricing"
end
ENV['RAILS_ENV'] ||= 'test'
begin
require File.expand_path('../dummy/config/environment', __FILE__)
rescue LoadError
puts 'Could not load dummy application. Please ensure you have run `bundle exec rake test_app`'
exit
end
require 'rspec/rails'
require 'ffaker'
require 'shoulda-matchers'
require 'pry'
RSpec.configure do |config|
config.fail_fast = false
config.filter_run focus: true
config.run_all_when_everything_filtered = true
config.mock_with :rspec
config.use_transactional_fixtures = false
config.raise_errors_for_deprecations!
config.infer_spec_type_from_file_location!
config.expect_with :rspec do |expectations|
expectations.syntax = :expect
end
end
# From: https://github.com/thoughtbot/shoulda-matchers/issues/384
Shoulda::Matchers.configure do |config|
config.integrate do |with|
with.test_framework :rspec
with.library :rails
end
end
Dir[File.join(File.dirname(__FILE__), 'support/**/*.rb')].each { |file| require file }
|
Remove from generators and engine.rb from coverage
|
Remove from generators and engine.rb from coverage
The generators, the engine.rb class and the version file has no code relevant to coverage.
|
Ruby
|
bsd-3-clause
|
solidusio-contrib/solidus_volume_pricing,solidusio-contrib/solidus_volume_pricing,solidusio-contrib/solidus_volume_pricing,solidusio-contrib/solidus_volume_pricing
|
ruby
|
## Code Before:
require 'simplecov'
SimpleCov.start 'rails'
ENV['RAILS_ENV'] ||= 'test'
begin
require File.expand_path('../dummy/config/environment', __FILE__)
rescue LoadError
puts 'Could not load dummy application. Please ensure you have run `bundle exec rake test_app`'
exit
end
require 'rspec/rails'
require 'ffaker'
require 'shoulda-matchers'
require 'pry'
RSpec.configure do |config|
config.fail_fast = false
config.filter_run focus: true
config.run_all_when_everything_filtered = true
config.mock_with :rspec
config.use_transactional_fixtures = false
config.raise_errors_for_deprecations!
config.infer_spec_type_from_file_location!
config.expect_with :rspec do |expectations|
expectations.syntax = :expect
end
end
# From: https://github.com/thoughtbot/shoulda-matchers/issues/384
Shoulda::Matchers.configure do |config|
config.integrate do |with|
with.test_framework :rspec
with.library :rails
end
end
Dir[File.join(File.dirname(__FILE__), 'support/**/*.rb')].each { |file| require file }
## Instruction:
Remove from generators and engine.rb from coverage
The generators, the engine.rb class and the version file has no code relevant to coverage.
## Code After:
require 'simplecov'
SimpleCov.start 'rails' do
add_filter "/lib/generators"
add_filter "/lib/solidus_volume_pricing"
end
ENV['RAILS_ENV'] ||= 'test'
begin
require File.expand_path('../dummy/config/environment', __FILE__)
rescue LoadError
puts 'Could not load dummy application. Please ensure you have run `bundle exec rake test_app`'
exit
end
require 'rspec/rails'
require 'ffaker'
require 'shoulda-matchers'
require 'pry'
RSpec.configure do |config|
config.fail_fast = false
config.filter_run focus: true
config.run_all_when_everything_filtered = true
config.mock_with :rspec
config.use_transactional_fixtures = false
config.raise_errors_for_deprecations!
config.infer_spec_type_from_file_location!
config.expect_with :rspec do |expectations|
expectations.syntax = :expect
end
end
# From: https://github.com/thoughtbot/shoulda-matchers/issues/384
Shoulda::Matchers.configure do |config|
config.integrate do |with|
with.test_framework :rspec
with.library :rails
end
end
Dir[File.join(File.dirname(__FILE__), 'support/**/*.rb')].each { |file| require file }
|
c8db46552b7dc7f385ec70e38ccd904fffaeb4be
|
core/admin/home.inc.php
|
core/admin/home.inc.php
|
<?php
/***********************************************************************
Elf Web App
Copyright (C) 2013-2015 Kazuichi Takashiro
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
[email protected]
************************************************************************/
if(!defined('IN_ADMINCP')) exit('access denied');
class HomeModule extends AdminControlPanelModule{
public function getAlias(){
return 'public';
}
public function defaultAction(){
global $_G;
foreach(Administrator::$Permissions as $perm => $v){
if($perm == 'home' || $perm == 'cp')
continue;
if($_G['admin']->hasPermission($perm)){
redirect('admin.php?mod='.$perm);
}
}
redirect('admin.php?mod=cp');
}
}
?>
|
<?php
/***********************************************************************
Elf Web App
Copyright (C) 2013-2015 Kazuichi Takashiro
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
[email protected]
************************************************************************/
if(!defined('IN_ADMINCP')) exit('access denied');
class HomeModule extends AdminControlPanelModule{
public function getAlias(){
return 'public';
}
public function defaultAction(){
global $_G, $cpmenu_list;
foreach($cpmenu_list as $module){
if(!empty($module['admin_modules']) && $_G['admin']->hasPermission($module['name'])){
redirect('admin.php?mod='.$module['name']);
}
}
redirect('admin.php?mod=cp');
}
}
?>
|
Update home page redirecting (ordered by header menu list)
|
Update home page redirecting (ordered by header menu list)
|
PHP
|
agpl-3.0
|
takashiro/Elf,takashiro/Elf,takashiro/Elf,takashiro/Elf
|
php
|
## Code Before:
<?php
/***********************************************************************
Elf Web App
Copyright (C) 2013-2015 Kazuichi Takashiro
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
[email protected]
************************************************************************/
if(!defined('IN_ADMINCP')) exit('access denied');
class HomeModule extends AdminControlPanelModule{
public function getAlias(){
return 'public';
}
public function defaultAction(){
global $_G;
foreach(Administrator::$Permissions as $perm => $v){
if($perm == 'home' || $perm == 'cp')
continue;
if($_G['admin']->hasPermission($perm)){
redirect('admin.php?mod='.$perm);
}
}
redirect('admin.php?mod=cp');
}
}
?>
## Instruction:
Update home page redirecting (ordered by header menu list)
## Code After:
<?php
/***********************************************************************
Elf Web App
Copyright (C) 2013-2015 Kazuichi Takashiro
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
[email protected]
************************************************************************/
if(!defined('IN_ADMINCP')) exit('access denied');
class HomeModule extends AdminControlPanelModule{
public function getAlias(){
return 'public';
}
public function defaultAction(){
global $_G, $cpmenu_list;
foreach($cpmenu_list as $module){
if(!empty($module['admin_modules']) && $_G['admin']->hasPermission($module['name'])){
redirect('admin.php?mod='.$module['name']);
}
}
redirect('admin.php?mod=cp');
}
}
?>
|
566240674c3aca64d16ba13fb8bca80ae7ad2018
|
config_staging.php
|
config_staging.php
|
<?php
if (file_exists($this->DocPath()."/config.php")){
$defaultConfig = include($this->DocPath()."/config.php");
}else {
$defaultConfig = array();
}
$stagingConfig = array(
'db' => array_merge($defaultConfig["db"],array(
'dbname' => $defaultConfig["custom"]["staging_cache_general"]
)),
'custom' => array_merge($defaultConfig["custom"],array(
'is_staging' => true,
)),
'cache' => array(
'backendOptions' => array("cache_dir" => $this->DocPath('staging_cache_general')),
'frontendOptions' => array()
),
'httpCache' => array(
'cache_dir' => $this->DocPath('staging_cache_templates_html')
),
'template' => array(
'cacheDir' => $this->DocPath('staging_cache_templates'),
'compileDir' => $this->DocPath('staging_cache_templates')
),
'hook' => array(
'proxyDir' => $this->DocPath('staging_cache_proxies'),
'proxyNamespace' => $this->App() . '_ProxiesStaging'
),
'model' => array(
'fileCacheDir' => $this->DocPath('staging_cache_doctrine_filecache'),
'attributeDir' => $this->DocPath('staging_cache_doctrine_attributes'),
'proxyDir' => $this->DocPath('staging_cache_doctrine_proxies'),
'proxyNamespace' => $this->App() . '\ProxiesStaging'
)
);
return $stagingConfig;
|
<?php
if (file_exists($this->DocPath()."/config.php")){
$defaultConfig = include($this->DocPath()."/config.php");
}else {
$defaultConfig = array();
}
$stagingConfig = array(
'db' => array_merge($defaultConfig["db"],array(
'dbname' => $defaultConfig["custom"]["staging_database"]
)),
'custom' => array_merge($defaultConfig["custom"],array(
'is_staging' => true,
)),
'cache' => array(
'backendOptions' => array("cache_dir" => $this->DocPath('staging_cache_general')),
'frontendOptions' => array()
),
'httpCache' => array(
'cache_dir' => $this->DocPath('staging_cache_templates_html')
),
'template' => array(
'cacheDir' => $this->DocPath('staging_cache_templates'),
'compileDir' => $this->DocPath('staging_cache_templates')
),
'hook' => array(
'proxyDir' => $this->DocPath('staging_cache_proxies'),
'proxyNamespace' => $this->App() . '_ProxiesStaging'
),
'model' => array(
'fileCacheDir' => $this->DocPath('staging_cache_doctrine_filecache'),
'attributeDir' => $this->DocPath('staging_cache_doctrine_attributes'),
'proxyDir' => $this->DocPath('staging_cache_doctrine_proxies'),
'proxyNamespace' => $this->App() . '\ProxiesStaging'
)
);
return $stagingConfig;
|
Fix typo in default staging config
|
Fix typo in default staging config
|
PHP
|
agpl-3.0
|
philippmahlow/shopware,ShopwareHackathon/shopware-ajax-variant,NetInventors/shopware,bcremer/shopware,philippmahlow/shopware,ShopwareHackathon/shopware_media,jhit/shopware,Zwilla/shopware,Sunchairs/shopware,Pttde/shopware,ShopwareHackathon/shopware_media,zeroseven/shopware,t2oh4e/shopware,NetInventors/shopware,ShopwareHackathon/scale-commerce-ongr-bundle,k10r/shopware,ShopwareHackathon/scale-commerce-ongr-bundle,xabbuh/shopware,ShopwareHackathon/dompdf,ShopwareHackathon/shopware_search_optimization,egoistIT/shopware,giginos/shopware,fegoulart/shopware,jochenmanz/shopware,Zwilla/shopware,ShopwareHackathon/shopware-ajax-variant,cyberid41/shopware,kayyyy/shopware-4,JonidBendo/shopware,oktupol/shopware,NetInventors/shopware,giginos/shopware,egoistIT/shopware,ShopwareHackathon/shopware_search_optimization,JonidBendo/shopware,DerRidda/shopware,jochenmanz/shopware,cyberid41/shopware,cyberid41/shopware,ShopwareHackathon/shopware-ajax-variant,xabbuh/shopware,Sunchairs/shopware,patricktreiber/shopware_test,dnoegel/shopware-aop,patricktreiber/shopware_test,wesolowski/shopware,jochenmanz/shopware,patricktreiber/shopware_test,VIISON/shopware-4,VIISON/shopware-4,FiveDigital/shopware,jenalgit/shopware,DerRidda/shopware,DerRidda/shopware,k10r/shopware,wesolowski/shopware,mreiss/shopware,FiveDigital/shopware,bcremer/shopware,patricktreiber/shopware_test,egoistIT/shopware,dNovo/shopware,fegoulart/shopware,DerRidda/shopware,kayyyy/shopware-4,SvenHerrmann/shopware,egoistIT/shopware,ShopwareHackathon/shopware_media,DerRidda/shopware,oktupol/shopware,fegoulart/shopware,dnoegel/shopware-aop,FiveDigital/shopware,jhit/shopware,wesolowski/shopware,Zwilla/shopware,arvatis/shopware,VIISON/shopware-4,simkli/shopware,zeroseven/shopware,ShopwareHackathon/scale-commerce-ongr-bundle,ShopwareHackathon/shopware_media,s-haase/shopware,kayyyy/shopware-4,arvatis/shopware,jochenmanz/shopware,bcremer/shopware,wesolowski/shopware,s-haase/shopware,ShopwareHackathon/scale-commerce-ongr-bundle,xabbuh/shopware,wesolowski/shopware,simkli/shopware,Pttde/shopware,fegoulart/shopware,t2oh4e/shopware,mreiss/shopware,NetInventors/shopware,dnoegel/shopware-aop,zeroseven/shopware,ShopwareHackathon/shopware-ajax-variant,mreiss/shopware,wolv-dev/shopware,Zwilla/shopware,mreiss/shopware,oktupol/shopware,k10r/shopware,xabbuh/shopware,zeroseven/shopware,JonidBendo/shopware,giginos/shopware,JonidBendo/shopware,wolv-dev/shopware,jhit/shopware,bcremer/shopware,k10r/shopware,ShopwareHackathon/dompdf,ShopwareHackathon/shopware_media,ShopwareHackathon/shopware_search_optimization,s-haase/shopware,SvenHerrmann/shopware,jenalgit/shopware,arvatis/shopware,dnoegel/shopware-aop,jhit/shopware,k10r/shopware,SvenHerrmann/shopware,Pttde/shopware,philippmahlow/shopware,wolv-dev/shopware,Pttde/shopware,ShopwareHackathon/dompdf,Pttde/shopware,arvatis/shopware,wolv-dev/shopware,jhit/shopware,s-haase/shopware,ShopwareHackathon/dompdf,JonidBendo/shopware,simkli/shopware,Zwilla/shopware,arvatis/shopware,dNovo/shopware,simkli/shopware,philippmahlow/shopware,s-haase/shopware,dNovo/shopware,FiveDigital/shopware,wolv-dev/shopware,kayyyy/shopware-4,giginos/shopware,ShopwareHackathon/shopware_search_optimization,t2oh4e/shopware,xabbuh/shopware,jenalgit/shopware,FiveDigital/shopware,zeroseven/shopware,dNovo/shopware,patricktreiber/shopware_test,oktupol/shopware,jenalgit/shopware,SvenHerrmann/shopware,philippmahlow/shopware,Sunchairs/shopware,dNovo/shopware,oktupol/shopware,t2oh4e/shopware,SvenHerrmann/shopware,jenalgit/shopware,ShopwareHackathon/scale-commerce-ongr-bundle,ShopwareHackathon/dompdf,VIISON/shopware-4,Sunchairs/shopware,egoistIT/shopware,kayyyy/shopware-4,cyberid41/shopware,giginos/shopware,simkli/shopware,VIISON/shopware-4,jochenmanz/shopware,NetInventors/shopware,Sunchairs/shopware,dnoegel/shopware-aop,fegoulart/shopware,bcremer/shopware,ShopwareHackathon/shopware-ajax-variant,ShopwareHackathon/shopware_search_optimization,cyberid41/shopware,t2oh4e/shopware,mreiss/shopware
|
php
|
## Code Before:
<?php
if (file_exists($this->DocPath()."/config.php")){
$defaultConfig = include($this->DocPath()."/config.php");
}else {
$defaultConfig = array();
}
$stagingConfig = array(
'db' => array_merge($defaultConfig["db"],array(
'dbname' => $defaultConfig["custom"]["staging_cache_general"]
)),
'custom' => array_merge($defaultConfig["custom"],array(
'is_staging' => true,
)),
'cache' => array(
'backendOptions' => array("cache_dir" => $this->DocPath('staging_cache_general')),
'frontendOptions' => array()
),
'httpCache' => array(
'cache_dir' => $this->DocPath('staging_cache_templates_html')
),
'template' => array(
'cacheDir' => $this->DocPath('staging_cache_templates'),
'compileDir' => $this->DocPath('staging_cache_templates')
),
'hook' => array(
'proxyDir' => $this->DocPath('staging_cache_proxies'),
'proxyNamespace' => $this->App() . '_ProxiesStaging'
),
'model' => array(
'fileCacheDir' => $this->DocPath('staging_cache_doctrine_filecache'),
'attributeDir' => $this->DocPath('staging_cache_doctrine_attributes'),
'proxyDir' => $this->DocPath('staging_cache_doctrine_proxies'),
'proxyNamespace' => $this->App() . '\ProxiesStaging'
)
);
return $stagingConfig;
## Instruction:
Fix typo in default staging config
## Code After:
<?php
if (file_exists($this->DocPath()."/config.php")){
$defaultConfig = include($this->DocPath()."/config.php");
}else {
$defaultConfig = array();
}
$stagingConfig = array(
'db' => array_merge($defaultConfig["db"],array(
'dbname' => $defaultConfig["custom"]["staging_database"]
)),
'custom' => array_merge($defaultConfig["custom"],array(
'is_staging' => true,
)),
'cache' => array(
'backendOptions' => array("cache_dir" => $this->DocPath('staging_cache_general')),
'frontendOptions' => array()
),
'httpCache' => array(
'cache_dir' => $this->DocPath('staging_cache_templates_html')
),
'template' => array(
'cacheDir' => $this->DocPath('staging_cache_templates'),
'compileDir' => $this->DocPath('staging_cache_templates')
),
'hook' => array(
'proxyDir' => $this->DocPath('staging_cache_proxies'),
'proxyNamespace' => $this->App() . '_ProxiesStaging'
),
'model' => array(
'fileCacheDir' => $this->DocPath('staging_cache_doctrine_filecache'),
'attributeDir' => $this->DocPath('staging_cache_doctrine_attributes'),
'proxyDir' => $this->DocPath('staging_cache_doctrine_proxies'),
'proxyNamespace' => $this->App() . '\ProxiesStaging'
)
);
return $stagingConfig;
|
7507134d83163d38f489ca24de039c8ba5048b31
|
.travis.yml
|
.travis.yml
|
language: php
php:
- 5.6
- 5.5
- hhvm
- hhvm-nightly
sudo: false
env:
matrix:
- PREFER_LOWEST="--prefer-lowest --prefer-stable"
- PREFER_LOWEST=""
before_install:
- composer self-update
install:
- composer update --prefer-source $PREFER_LOWEST
|
language: php
php:
- 5.6
- 5.5
- hhvm
sudo: false
env:
matrix:
- PREFER_LOWEST="--prefer-lowest --prefer-stable"
- PREFER_LOWEST=""
before_install:
- composer self-update
install:
- composer update --prefer-source $PREFER_LOWEST
|
Remove HHVM-nightly from Travis as it's no longer supported
|
Remove HHVM-nightly from Travis as it's no longer supported
|
YAML
|
mit
|
dchesterton/image
|
yaml
|
## Code Before:
language: php
php:
- 5.6
- 5.5
- hhvm
- hhvm-nightly
sudo: false
env:
matrix:
- PREFER_LOWEST="--prefer-lowest --prefer-stable"
- PREFER_LOWEST=""
before_install:
- composer self-update
install:
- composer update --prefer-source $PREFER_LOWEST
## Instruction:
Remove HHVM-nightly from Travis as it's no longer supported
## Code After:
language: php
php:
- 5.6
- 5.5
- hhvm
sudo: false
env:
matrix:
- PREFER_LOWEST="--prefer-lowest --prefer-stable"
- PREFER_LOWEST=""
before_install:
- composer self-update
install:
- composer update --prefer-source $PREFER_LOWEST
|
609ea24357e85e0f2d974c56e285ec954e694224
|
app/controllers/setup_controller.rb
|
app/controllers/setup_controller.rb
|
class SetupController < ApplicationController
layout "setup"
skip_before_action :require_login
skip_before_action :run_first_time_setup
def first_project
@project = Project.new
end
def create_project
@project = current_user.created_projects.build(project_params)
if @project.save
@project.users << current_user
redirect_to setup_invite_team_path
else
render :first_project
end
end
def invite_team
@team_invites = TeamInvitesForm.new(current_team, current_user)
end
def send_invites
@team_invites = TeamInvitesForm.new(current_team, current_user, project_ids: current_team.project_ids)
if @team_invites.submit(invite_params)
flash[:notice] = "Your team members have been invited!"
redirect_to project_path(Project.first)
else
render :invite_team
end
end
private
def project_params
params.require(:project).permit(:name)
end
def invite_params
params.require(:team_invites_form).permit(:members)
end
end
|
class SetupController < ApplicationController
layout "setup"
skip_before_action :require_login
skip_before_action :run_first_time_setup
def first_project
@project = Project.new
end
def create_project
@project = current_user.created_projects.build(project_params)
if @project.save
@project.users << current_user
redirect_to setup_invite_team_path
else
render :first_project
end
end
def invite_team
@team_invites = TeamInvitesForm.new(current_team, current_user)
end
def send_invites
@team_invites = TeamInvitesForm.new(current_team, current_user, project_ids: current_team.project_ids)
if @team_invites.submit(invite_params)
flash[:notice] = "Your team members have been invited!"
redirect_to "/projects/#{Project.first.try(:slug)}"
else
render :invite_team
end
end
private
def project_params
params.require(:project).permit(:name)
end
def invite_params
params.require(:team_invites_form).permit(:members)
end
end
|
Fix another bug with new urls
|
Fix another bug with new urls
|
Ruby
|
mit
|
openhq/openhq,openhq/openhq,openhq/openhq,openhq/openhq
|
ruby
|
## Code Before:
class SetupController < ApplicationController
layout "setup"
skip_before_action :require_login
skip_before_action :run_first_time_setup
def first_project
@project = Project.new
end
def create_project
@project = current_user.created_projects.build(project_params)
if @project.save
@project.users << current_user
redirect_to setup_invite_team_path
else
render :first_project
end
end
def invite_team
@team_invites = TeamInvitesForm.new(current_team, current_user)
end
def send_invites
@team_invites = TeamInvitesForm.new(current_team, current_user, project_ids: current_team.project_ids)
if @team_invites.submit(invite_params)
flash[:notice] = "Your team members have been invited!"
redirect_to project_path(Project.first)
else
render :invite_team
end
end
private
def project_params
params.require(:project).permit(:name)
end
def invite_params
params.require(:team_invites_form).permit(:members)
end
end
## Instruction:
Fix another bug with new urls
## Code After:
class SetupController < ApplicationController
layout "setup"
skip_before_action :require_login
skip_before_action :run_first_time_setup
def first_project
@project = Project.new
end
def create_project
@project = current_user.created_projects.build(project_params)
if @project.save
@project.users << current_user
redirect_to setup_invite_team_path
else
render :first_project
end
end
def invite_team
@team_invites = TeamInvitesForm.new(current_team, current_user)
end
def send_invites
@team_invites = TeamInvitesForm.new(current_team, current_user, project_ids: current_team.project_ids)
if @team_invites.submit(invite_params)
flash[:notice] = "Your team members have been invited!"
redirect_to "/projects/#{Project.first.try(:slug)}"
else
render :invite_team
end
end
private
def project_params
params.require(:project).permit(:name)
end
def invite_params
params.require(:team_invites_form).permit(:members)
end
end
|
f25189fc749f3ec9d00a3a0095215d4e47ccb63e
|
util/nconfig.php
|
util/nconfig.php
|
<?php
/**
* set channel email notifications utility
* This is a preliminary solution using the existing functions from include/channel.php.
* More options would be nice.
**/
if(! file_exists('include/cli_startup.php')) {
echo 'Run from the top level $Projectname web directory, as util/nconfig <args>' . PHP_EOL;
exit(1);
}
require_once('include/cli_startup.php');
require_once('include/channel.php');
cli_startup();
if($argc != 2) {
echo 'Usage: util/nconfig channel_id|channel_address off|on' . PHP_EOL;
exit(1);
}
if(ctype_digit($argv[1])) {
$c = channelx_by_n($argv[1]);
}
else {
$c = channelx_by_nick($argv[1]);
}
if(! $c) {
echo t('Source channel not found.');
exit(1);
}
switch ($argv[2]) {
case 'off':
$result = notifications_off($c['channel_id']);
break;
case 'on':
$result = notifications_on($c['channel_id']);
break;
default:
echo 'Only on or off in lower cases are allowed' . PHP_EOL;
exit(1);
}
if($result['success'] == false) {
echo $result['message'];
exit(1);
}
exit(0);
|
<?php
/**
* switch off channel email notifications utility
* This is a preliminary solution using the existing functions from include/channel.php.
* More options would be nice.
**/
if(! file_exists('include/cli_startup.php')) {
echo 'Run from the top level $Projectname web directory, as util/nconfig <args>' . PHP_EOL;
exit(1);
}
require_once('include/cli_startup.php');
require_once('include/channel.php');
cli_startup();
if($argc != 2) {
echo 'Usage: util/nconfig channel_id|channel_address off' . PHP_EOL;
exit(1);
}
if(ctype_digit($argv[1])) {
$c = channelx_by_n($argv[1]);
}
else {
$c = channelx_by_nick($argv[1]);
}
if(! $c) {
echo t('Source channel not found.');
exit(1);
}
switch ($argv[2]) {
case 'off':
$result = notifications_off($c['channel_id']);
break;
default:
echo 'Only on or off in lower cases are allowed' . PHP_EOL;
exit(1);
}
if($result['success'] == false) {
echo $result['message'];
exit(1);
}
exit(0);
|
Drop on switch for notifications
|
Drop on switch for notifications
|
PHP
|
mit
|
redmatrix/hubzilla,mjfriaza/hubzilla,anaqreon/hubzilla,redmatrix/hubzilla,phellmes/hubzilla,mjfriaza/hubzilla,sasiflo/hubzilla,mrjive/hubzilla,sasiflo/hubzilla,redmatrix/hubzilla,phellmes/hubzilla,anaqreon/hubzilla,dawnbreak/hubzilla,mjfriaza/hubzilla,mjfriaza/hubzilla,mrjive/hubzilla,sasiflo/hubzilla,dawnbreak/hubzilla,anaqreon/hubzilla,mrjive/hubzilla,redmatrix/hubzilla,anaqreon/hubzilla,mrjive/hubzilla,sasiflo/hubzilla,dawnbreak/hubzilla,phellmes/hubzilla,phellmes/hubzilla,mjfriaza/hubzilla,sasiflo/hubzilla,sasiflo/hubzilla,mjfriaza/hubzilla,dawnbreak/hubzilla,phellmes/hubzilla,redmatrix/hubzilla,mrjive/hubzilla,anaqreon/hubzilla,mrjive/hubzilla,anaqreon/hubzilla,phellmes/hubzilla,redmatrix/hubzilla,dawnbreak/hubzilla,mjfriaza/hubzilla,dawnbreak/hubzilla,phellmes/hubzilla
|
php
|
## Code Before:
<?php
/**
* set channel email notifications utility
* This is a preliminary solution using the existing functions from include/channel.php.
* More options would be nice.
**/
if(! file_exists('include/cli_startup.php')) {
echo 'Run from the top level $Projectname web directory, as util/nconfig <args>' . PHP_EOL;
exit(1);
}
require_once('include/cli_startup.php');
require_once('include/channel.php');
cli_startup();
if($argc != 2) {
echo 'Usage: util/nconfig channel_id|channel_address off|on' . PHP_EOL;
exit(1);
}
if(ctype_digit($argv[1])) {
$c = channelx_by_n($argv[1]);
}
else {
$c = channelx_by_nick($argv[1]);
}
if(! $c) {
echo t('Source channel not found.');
exit(1);
}
switch ($argv[2]) {
case 'off':
$result = notifications_off($c['channel_id']);
break;
case 'on':
$result = notifications_on($c['channel_id']);
break;
default:
echo 'Only on or off in lower cases are allowed' . PHP_EOL;
exit(1);
}
if($result['success'] == false) {
echo $result['message'];
exit(1);
}
exit(0);
## Instruction:
Drop on switch for notifications
## Code After:
<?php
/**
* switch off channel email notifications utility
* This is a preliminary solution using the existing functions from include/channel.php.
* More options would be nice.
**/
if(! file_exists('include/cli_startup.php')) {
echo 'Run from the top level $Projectname web directory, as util/nconfig <args>' . PHP_EOL;
exit(1);
}
require_once('include/cli_startup.php');
require_once('include/channel.php');
cli_startup();
if($argc != 2) {
echo 'Usage: util/nconfig channel_id|channel_address off' . PHP_EOL;
exit(1);
}
if(ctype_digit($argv[1])) {
$c = channelx_by_n($argv[1]);
}
else {
$c = channelx_by_nick($argv[1]);
}
if(! $c) {
echo t('Source channel not found.');
exit(1);
}
switch ($argv[2]) {
case 'off':
$result = notifications_off($c['channel_id']);
break;
default:
echo 'Only on or off in lower cases are allowed' . PHP_EOL;
exit(1);
}
if($result['success'] == false) {
echo $result['message'];
exit(1);
}
exit(0);
|
b18a98b3740896bec6e7e55b4a2bd4430aced0fb
|
spec/resty/openssl/bio_spec.lua
|
spec/resty/openssl/bio_spec.lua
|
local _M = require('resty.openssl.bio')
describe('OpenSSL BIO', function()
describe('.new', function()
it('returns cdata', function()
assert.equal('cdata', type(_M.new()))
end)
end)
describe(':write', function()
it('writes data to bio', function()
local bio = _M.new()
local str = 'foobar'
assert(bio:write(str))
assert.equal(str, bio:read())
end)
it('requires a string', function()
local bio = _M.new()
assert.has_error(function () bio:write() end, 'expected string')
end)
it('requires non empty string', function()
local bio = _M.new()
assert.has_error(function () bio:write('') end, 'expected value, got nil')
end)
end)
end)
|
local _M = require('resty.openssl.bio')
describe('OpenSSL BIO', function()
describe('.new', function()
it('returns cdata', function()
assert.equal('cdata', type(_M.new()))
end)
end)
describe(':write', function()
it('writes data to bio', function()
local bio = _M.new()
local str = 'foobar'
assert(bio:write(str))
assert.equal(str, bio:read())
end)
it('requires a string', function()
local bio = _M.new()
assert.has_error(function () bio:write() end, 'expected string')
end)
it('requires non empty string', function()
local bio = _M.new()
assert.same(bio:write(""), 0)
end)
end)
end)
|
Fix ssl test due library change
|
[test] Fix ssl test due library change
Due to the update on the image the ssl library return 0 instead of
error.
Signed-off-by: Eloy Coto <[email protected]>
|
Lua
|
mit
|
3scale/apicast,3scale/apicast,3scale/apicast,3scale/docker-gateway,3scale/apicast,3scale/docker-gateway
|
lua
|
## Code Before:
local _M = require('resty.openssl.bio')
describe('OpenSSL BIO', function()
describe('.new', function()
it('returns cdata', function()
assert.equal('cdata', type(_M.new()))
end)
end)
describe(':write', function()
it('writes data to bio', function()
local bio = _M.new()
local str = 'foobar'
assert(bio:write(str))
assert.equal(str, bio:read())
end)
it('requires a string', function()
local bio = _M.new()
assert.has_error(function () bio:write() end, 'expected string')
end)
it('requires non empty string', function()
local bio = _M.new()
assert.has_error(function () bio:write('') end, 'expected value, got nil')
end)
end)
end)
## Instruction:
[test] Fix ssl test due library change
Due to the update on the image the ssl library return 0 instead of
error.
Signed-off-by: Eloy Coto <[email protected]>
## Code After:
local _M = require('resty.openssl.bio')
describe('OpenSSL BIO', function()
describe('.new', function()
it('returns cdata', function()
assert.equal('cdata', type(_M.new()))
end)
end)
describe(':write', function()
it('writes data to bio', function()
local bio = _M.new()
local str = 'foobar'
assert(bio:write(str))
assert.equal(str, bio:read())
end)
it('requires a string', function()
local bio = _M.new()
assert.has_error(function () bio:write() end, 'expected string')
end)
it('requires non empty string', function()
local bio = _M.new()
assert.same(bio:write(""), 0)
end)
end)
end)
|
9d4f87b885465c2010f53cfecbbd5d8f24811521
|
src/client/scripts/pages/authentification.react.js
|
src/client/scripts/pages/authentification.react.js
|
const React = require('react');
const Utils = require('../utils');
const AuthentificationPage = React.createClass({
getInitialState() { return { loading: false }; },
openAuthWindow() {
this.setState({ loading: true });
Utils.Socket.emit('youtube/auth');
},
render() {
if (this.state.loading) {
return (
<div className="text-page">
<div className="jumbotron">
<h1 className="display-3">YouWatch</h1>
<p className="lead">Please fulfill the informations on the other window</p>
<p className="lead">
<button className="btn btn-primary btn-lg disabled">Logging in...</button>
</p>
</div>
</div>
);
}
return (
<div className="text-page">
<div className="jumbotron">
<h1 className="display-3">YouWatch</h1>
<p className="lead">{'Let\'s connect to your YouTube Account'}</p>
<p className="lead">
<button className="btn btn-primary btn-lg" onClick={this.openAuthWindow}>Log in</button>
</p>
</div>
</div>
);
},
});
module.exports = AuthentificationPage;
|
const React = require('react');
const Utils = require('../utils');
const AuthentificationPage = React.createClass({
getInitialState() { return { loading: false }; },
openAuthWindow() {
this.setState({ loading: true });
Utils.Socket.emit('youtube/auth');
},
render() {
if (this.state.loading) {
return (
<div className="text-page">
<div className="jumbotron">
<h1 className="display-3">YouWatch</h1>
<p className="lead">Please fulfill the informations on the other window</p>
<p className="lead">
<button className="btn btn-primary btn-lg disabled"><i className="fa fa-spinner fa-pulse" /> Logging in...</button>
</p>
</div>
</div>
);
}
return (
<div className="text-page">
<div className="jumbotron">
<h1 className="display-3">YouWatch</h1>
<p className="lead">{'Let\'s connect to your YouTube Account'}</p>
<p className="lead">
<button className="btn btn-primary btn-lg" onClick={this.openAuthWindow}>Log in</button>
</p>
</div>
</div>
);
},
});
module.exports = AuthentificationPage;
|
Add a loading indicator on the auth page
|
Add a loading indicator on the auth page
|
JavaScript
|
mit
|
YannBertrand/Youtube,YannBertrand/Youtube
|
javascript
|
## Code Before:
const React = require('react');
const Utils = require('../utils');
const AuthentificationPage = React.createClass({
getInitialState() { return { loading: false }; },
openAuthWindow() {
this.setState({ loading: true });
Utils.Socket.emit('youtube/auth');
},
render() {
if (this.state.loading) {
return (
<div className="text-page">
<div className="jumbotron">
<h1 className="display-3">YouWatch</h1>
<p className="lead">Please fulfill the informations on the other window</p>
<p className="lead">
<button className="btn btn-primary btn-lg disabled">Logging in...</button>
</p>
</div>
</div>
);
}
return (
<div className="text-page">
<div className="jumbotron">
<h1 className="display-3">YouWatch</h1>
<p className="lead">{'Let\'s connect to your YouTube Account'}</p>
<p className="lead">
<button className="btn btn-primary btn-lg" onClick={this.openAuthWindow}>Log in</button>
</p>
</div>
</div>
);
},
});
module.exports = AuthentificationPage;
## Instruction:
Add a loading indicator on the auth page
## Code After:
const React = require('react');
const Utils = require('../utils');
const AuthentificationPage = React.createClass({
getInitialState() { return { loading: false }; },
openAuthWindow() {
this.setState({ loading: true });
Utils.Socket.emit('youtube/auth');
},
render() {
if (this.state.loading) {
return (
<div className="text-page">
<div className="jumbotron">
<h1 className="display-3">YouWatch</h1>
<p className="lead">Please fulfill the informations on the other window</p>
<p className="lead">
<button className="btn btn-primary btn-lg disabled"><i className="fa fa-spinner fa-pulse" /> Logging in...</button>
</p>
</div>
</div>
);
}
return (
<div className="text-page">
<div className="jumbotron">
<h1 className="display-3">YouWatch</h1>
<p className="lead">{'Let\'s connect to your YouTube Account'}</p>
<p className="lead">
<button className="btn btn-primary btn-lg" onClick={this.openAuthWindow}>Log in</button>
</p>
</div>
</div>
);
},
});
module.exports = AuthentificationPage;
|
0f9d1e4d0e1eb6a69eb5715cb8e034e7541e1dc0
|
packages/mw/mwc-probability-transition.yaml
|
packages/mw/mwc-probability-transition.yaml
|
homepage: https://github.com/ocramz/mwc-probability-transition
changelog-type: ''
hash: 6ca7d08242fd8be14f37a6fa33bb44324d996aca0e4b25653a201ee0b4cf0072
test-bench-deps:
base: -any
hspec: -any
mwc-probability-transition: -any
QuickCheck: -any
mwc-probability: -any
maintainer: zocca.marco gmail
synopsis: A Markov stochastic transition operator with logging
changelog: ''
basic-deps:
base: ! '>=4.7 && <5'
logging-effect: -any
ghc-prim: -any
mtl: -any
transformers: -any
mwc-probability: -any
primitive: -any
all-versions:
- '0.1.0.0'
- '0.2.0.0'
author: Marco Zocca
latest: '0.2.0.0'
description-type: markdown
description: ! '# mwc-probability-transition
[](https://travis-ci.org/ocramz/mwc-probability-transition)
Types and primitives for stochastic simulation (e.g. integration of SDE, random
walks, Markov Chain Monte Carlo algorithms etc.)
'
license-name: BSD3
|
homepage: https://github.com/ocramz/mwc-probability-transition
changelog-type: ''
hash: 42d82dd5cb90933637d7e247e88f0935fc75f8ea3e968e6abd1cec469ba9be8e
test-bench-deps:
base: -any
hspec: -any
mwc-probability-transition: -any
QuickCheck: -any
mwc-probability: -any
maintainer: zocca.marco gmail
synopsis: A Markov stochastic transition operator with logging
changelog: ''
basic-deps:
base: ! '>=4.7 && <5'
logging-effect: -any
ghc-prim: -any
mtl: -any
transformers: -any
mwc-probability: -any
primitive: -any
all-versions:
- '0.1.0.0'
- '0.2.0.0'
- '0.3.0.0'
author: Marco Zocca
latest: '0.3.0.0'
description-type: markdown
description: ! '# mwc-probability-transition
[](https://travis-ci.org/ocramz/mwc-probability-transition)
Types and primitives for stochastic simulation (e.g. integration of SDE, random
walks, Markov Chain Monte Carlo algorithms etc.)
'
license-name: BSD3
|
Update from Hackage at 2018-04-21T09:03:40Z
|
Update from Hackage at 2018-04-21T09:03:40Z
|
YAML
|
mit
|
commercialhaskell/all-cabal-metadata
|
yaml
|
## Code Before:
homepage: https://github.com/ocramz/mwc-probability-transition
changelog-type: ''
hash: 6ca7d08242fd8be14f37a6fa33bb44324d996aca0e4b25653a201ee0b4cf0072
test-bench-deps:
base: -any
hspec: -any
mwc-probability-transition: -any
QuickCheck: -any
mwc-probability: -any
maintainer: zocca.marco gmail
synopsis: A Markov stochastic transition operator with logging
changelog: ''
basic-deps:
base: ! '>=4.7 && <5'
logging-effect: -any
ghc-prim: -any
mtl: -any
transformers: -any
mwc-probability: -any
primitive: -any
all-versions:
- '0.1.0.0'
- '0.2.0.0'
author: Marco Zocca
latest: '0.2.0.0'
description-type: markdown
description: ! '# mwc-probability-transition
[](https://travis-ci.org/ocramz/mwc-probability-transition)
Types and primitives for stochastic simulation (e.g. integration of SDE, random
walks, Markov Chain Monte Carlo algorithms etc.)
'
license-name: BSD3
## Instruction:
Update from Hackage at 2018-04-21T09:03:40Z
## Code After:
homepage: https://github.com/ocramz/mwc-probability-transition
changelog-type: ''
hash: 42d82dd5cb90933637d7e247e88f0935fc75f8ea3e968e6abd1cec469ba9be8e
test-bench-deps:
base: -any
hspec: -any
mwc-probability-transition: -any
QuickCheck: -any
mwc-probability: -any
maintainer: zocca.marco gmail
synopsis: A Markov stochastic transition operator with logging
changelog: ''
basic-deps:
base: ! '>=4.7 && <5'
logging-effect: -any
ghc-prim: -any
mtl: -any
transformers: -any
mwc-probability: -any
primitive: -any
all-versions:
- '0.1.0.0'
- '0.2.0.0'
- '0.3.0.0'
author: Marco Zocca
latest: '0.3.0.0'
description-type: markdown
description: ! '# mwc-probability-transition
[](https://travis-ci.org/ocramz/mwc-probability-transition)
Types and primitives for stochastic simulation (e.g. integration of SDE, random
walks, Markov Chain Monte Carlo algorithms etc.)
'
license-name: BSD3
|
ca47d26c302eb95864c6655473f00398b98e03b3
|
homebrew/install.sh
|
homebrew/install.sh
|
if [[ "$OSTYPE" == "darwin"* ]]; then
echo 'Installing homebrew'
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install hub
fi
|
if [[ "$OSTYPE" == "darwin"* ]]; then
echo 'Installing homebrew'
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install hub
fi
|
Use new homebrew sh script
|
fix(setup): Use new homebrew sh script
|
Shell
|
mit
|
cmckni3/dotfiles,cmckni3/dotfiles,cmckni3/dotfiles
|
shell
|
## Code Before:
if [[ "$OSTYPE" == "darwin"* ]]; then
echo 'Installing homebrew'
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install hub
fi
## Instruction:
fix(setup): Use new homebrew sh script
## Code After:
if [[ "$OSTYPE" == "darwin"* ]]; then
echo 'Installing homebrew'
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install hub
fi
|
1781d10b1cc0f010da094fbd8e647d0e0355dcbe
|
manifest.template.json
|
manifest.template.json
|
{
"schema_version": 2,
"image": "maestro.png",
"name": "Built-In Images",
"description": "Images for the standard built-in tasks in Maestro",
"author": "Doug Henderson <[email protected]>",
"version": "0.01",
"type": "images",
"tags": ["maestro"],
"tasks": [{
"name": "fork compositions",
"tags": ["maestro", "fork", "schedule"],
"task":{
"image": "fork-multiple.png"
}
},
{
"name": "join compositions",
"tags": ["maestro", "fork", "schedule"],
"task":{
"image": "join.png"
}
},
{
"name": "schedule",
"tags": ["maestro", "fork", "schedule"],
"task":{
"image": "fork.png"
}
},
{
"name": "schedule multiple",
"tags": ["maestro", "fork", "schedule"],
"task":{
"image": "fork-multiple.png"
}
},
{
"name": "confirmation",
"tags": ["maestro", "user", "continue", "pause"],
"task":{
"image": "confirm.png"
}
},
{
"name": "email",
"task":{
"image": "email.png"
}
} ]
}
|
{
"schema_version": 2,
"image": "maestro.png",
"name": "Built-In Images",
"description": "Images for the standard built-in tasks in Maestro",
"author": "Doug Henderson <[email protected]>",
"type": "images",
"tags": [
"maestro"
],
"tasks": [
{
"name": "fork compositions",
"tags": [
"maestro",
"fork",
"schedule"
],
"task": {
"image": "fork-multiple.png"
}
},
{
"name": "join compositions",
"tags": [
"maestro",
"fork",
"schedule"
],
"task": {
"image": "join.png"
}
},
{
"name": "schedule",
"tags": [
"maestro",
"fork",
"schedule"
],
"task": {
"image": "fork.png"
}
},
{
"name": "schedule multiple",
"tags": [
"maestro",
"fork",
"schedule"
],
"task": {
"image": "fork-multiple.png"
}
},
{
"name": "confirmation",
"tags": [
"maestro",
"user",
"continue",
"pause"
],
"task": {
"image": "confirm.png"
}
},
{
"name": "email",
"task": {
"image": "email.png"
}
}
]
}
|
Remove unused version and reformat
|
Remove unused version and reformat
|
JSON
|
apache-2.0
|
maestrodev/maestro-builtin-images-plugin
|
json
|
## Code Before:
{
"schema_version": 2,
"image": "maestro.png",
"name": "Built-In Images",
"description": "Images for the standard built-in tasks in Maestro",
"author": "Doug Henderson <[email protected]>",
"version": "0.01",
"type": "images",
"tags": ["maestro"],
"tasks": [{
"name": "fork compositions",
"tags": ["maestro", "fork", "schedule"],
"task":{
"image": "fork-multiple.png"
}
},
{
"name": "join compositions",
"tags": ["maestro", "fork", "schedule"],
"task":{
"image": "join.png"
}
},
{
"name": "schedule",
"tags": ["maestro", "fork", "schedule"],
"task":{
"image": "fork.png"
}
},
{
"name": "schedule multiple",
"tags": ["maestro", "fork", "schedule"],
"task":{
"image": "fork-multiple.png"
}
},
{
"name": "confirmation",
"tags": ["maestro", "user", "continue", "pause"],
"task":{
"image": "confirm.png"
}
},
{
"name": "email",
"task":{
"image": "email.png"
}
} ]
}
## Instruction:
Remove unused version and reformat
## Code After:
{
"schema_version": 2,
"image": "maestro.png",
"name": "Built-In Images",
"description": "Images for the standard built-in tasks in Maestro",
"author": "Doug Henderson <[email protected]>",
"type": "images",
"tags": [
"maestro"
],
"tasks": [
{
"name": "fork compositions",
"tags": [
"maestro",
"fork",
"schedule"
],
"task": {
"image": "fork-multiple.png"
}
},
{
"name": "join compositions",
"tags": [
"maestro",
"fork",
"schedule"
],
"task": {
"image": "join.png"
}
},
{
"name": "schedule",
"tags": [
"maestro",
"fork",
"schedule"
],
"task": {
"image": "fork.png"
}
},
{
"name": "schedule multiple",
"tags": [
"maestro",
"fork",
"schedule"
],
"task": {
"image": "fork-multiple.png"
}
},
{
"name": "confirmation",
"tags": [
"maestro",
"user",
"continue",
"pause"
],
"task": {
"image": "confirm.png"
}
},
{
"name": "email",
"task": {
"image": "email.png"
}
}
]
}
|
9cbb23d3b9591d2094165ab0d9ad70fe2381dba8
|
app/views/reservation_mailer/_style.erb
|
app/views/reservation_mailer/_style.erb
|
<style type="text/css">
div.custom-message p, div.followup p {
margin-top: 1em;
margin-bottom: 1em;
}
div.reservationCard {
background-color: #eeeeaa;
color: #000000;
padding: 1em;
margin-bottom: 1em;
}
div.reservationCard h2 {
font-family: Palatino, serif;
font-style: italic;
text-align: center;
margin-top: 0px;
font-size: 200%;
font-weight: bold;
}
div.reservationCard dd {
padding-bottom: 0.5em;
}
div.reservationContainer {
margin-top: 1em;
margin-left: 0.1em;
margin-right: 0.1em;
}
div.reservationContainer input {
width: 100%;
height: 3em;
color: white;
font-weight: bold;
margin-bottom: 1em;
font-size: 1em;
font-weight: bold;
border: 3px outset black;
cursor: pointer;
}
dd.topic-description p {
margin-bottom: 1em;
}
</style>
|
<style type="text/css">
div.custom-message p, div.followup p {
margin-top: 1em;
margin-bottom: 1em;
}
div.reservationCard {
color: #000000;
padding: 1em;
margin-bottom: 1em;
}
div.reservationCard h2 {
background-color: #eeeeaa;
font-family: Palatino, serif;
font-style: italic;
text-align: center;
margin-top: 0px;
font-size: 200%;
font-weight: bold;
}
div.reservationCard dd {
padding-bottom: 0.5em;
}
div.reservationContainer {
margin-top: 1em;
margin-left: 0.1em;
margin-right: 0.1em;
}
div.reservationContainer input {
width: 100%;
height: 3em;
color: white;
font-weight: bold;
margin-bottom: 1em;
font-size: 1em;
font-weight: bold;
border: 3px outset black;
cursor: pointer;
}
dd.topic-description p {
margin-bottom: 1em;
}
</style>
|
Remove email body background color, only apply to header line
|
Remove email body background color, only apply to header line
|
HTML+ERB
|
apache-2.0
|
txstate-etc/txst-signup,txstate-etc/txst-signup,txstate-etc/txst-signup
|
html+erb
|
## Code Before:
<style type="text/css">
div.custom-message p, div.followup p {
margin-top: 1em;
margin-bottom: 1em;
}
div.reservationCard {
background-color: #eeeeaa;
color: #000000;
padding: 1em;
margin-bottom: 1em;
}
div.reservationCard h2 {
font-family: Palatino, serif;
font-style: italic;
text-align: center;
margin-top: 0px;
font-size: 200%;
font-weight: bold;
}
div.reservationCard dd {
padding-bottom: 0.5em;
}
div.reservationContainer {
margin-top: 1em;
margin-left: 0.1em;
margin-right: 0.1em;
}
div.reservationContainer input {
width: 100%;
height: 3em;
color: white;
font-weight: bold;
margin-bottom: 1em;
font-size: 1em;
font-weight: bold;
border: 3px outset black;
cursor: pointer;
}
dd.topic-description p {
margin-bottom: 1em;
}
</style>
## Instruction:
Remove email body background color, only apply to header line
## Code After:
<style type="text/css">
div.custom-message p, div.followup p {
margin-top: 1em;
margin-bottom: 1em;
}
div.reservationCard {
color: #000000;
padding: 1em;
margin-bottom: 1em;
}
div.reservationCard h2 {
background-color: #eeeeaa;
font-family: Palatino, serif;
font-style: italic;
text-align: center;
margin-top: 0px;
font-size: 200%;
font-weight: bold;
}
div.reservationCard dd {
padding-bottom: 0.5em;
}
div.reservationContainer {
margin-top: 1em;
margin-left: 0.1em;
margin-right: 0.1em;
}
div.reservationContainer input {
width: 100%;
height: 3em;
color: white;
font-weight: bold;
margin-bottom: 1em;
font-size: 1em;
font-weight: bold;
border: 3px outset black;
cursor: pointer;
}
dd.topic-description p {
margin-bottom: 1em;
}
</style>
|
3fcd05764683ae0c39685f1b60f6bd88564e27fa
|
README.md
|
README.md
|
Leaf-snowflake
=============
Last Modified: 2017-06-28
Introduction
============
Leaf-snowflake is a distributed ID maker.
Based on http://tech.meituan.com/MT_Leaf.html leaf-snowflake.
Steps:
============
1. mvn package
2. Set ${LEAF_HOME} environment variable
3. Config leaf.yaml at ${LEAF_HOME}/conf
4. Exec ${LEAF_HOME}/bin/start.sh
5. Communicate to the RPC server and get the uniqiue , monotonic increase ID like startClient() in /rpc/rpcClient.java shows,just for test!
# Author
weizhenyi
Github: https://github.com/weizhenyi
# Getting help
Email: [email protected]
QQ:632155186
|
Leaf-snowflake
=============
Last Modified: 2017-06-28
Introduction
============
Leaf-snowflake is a distributed ID maker.
Based on http://tech.meituan.com/MT_Leaf.html leaf-snowflake.
Steps:
============
1. mvn package
2. Set ${LEAF_HOME} environment variable
3. Config leaf.yaml at ${LEAF_HOME}/conf
4. Exec ${LEAF_HOME}/bin/start.sh
5. Communicate to the RPC server and get the uniqiue , monotonic increase ID like startClient() in /rpc/rpcClient.java shows,just for test!
Commond line tools
============
1.List the content of a znode dir:
/bin/leaf.py zktool list /leaf2/server-forever
2.Read the content of a znode:
/bin/leaf.py zktool read /leaf2/server-forever/172.21.0.190:2182-0000000008
# Author
weizhenyi
Github: https://github.com/weizhenyi
# Getting help
Email: [email protected]
QQ:632155186
|
Add Command line tools: zktool how to use
|
Add Command line tools: zktool how to use
|
Markdown
|
apache-2.0
|
weizhenyi/leaf-snowflake,weizhenyi/leaf-snowflake,weizhenyi/leaf-snowflake
|
markdown
|
## Code Before:
Leaf-snowflake
=============
Last Modified: 2017-06-28
Introduction
============
Leaf-snowflake is a distributed ID maker.
Based on http://tech.meituan.com/MT_Leaf.html leaf-snowflake.
Steps:
============
1. mvn package
2. Set ${LEAF_HOME} environment variable
3. Config leaf.yaml at ${LEAF_HOME}/conf
4. Exec ${LEAF_HOME}/bin/start.sh
5. Communicate to the RPC server and get the uniqiue , monotonic increase ID like startClient() in /rpc/rpcClient.java shows,just for test!
# Author
weizhenyi
Github: https://github.com/weizhenyi
# Getting help
Email: [email protected]
QQ:632155186
## Instruction:
Add Command line tools: zktool how to use
## Code After:
Leaf-snowflake
=============
Last Modified: 2017-06-28
Introduction
============
Leaf-snowflake is a distributed ID maker.
Based on http://tech.meituan.com/MT_Leaf.html leaf-snowflake.
Steps:
============
1. mvn package
2. Set ${LEAF_HOME} environment variable
3. Config leaf.yaml at ${LEAF_HOME}/conf
4. Exec ${LEAF_HOME}/bin/start.sh
5. Communicate to the RPC server and get the uniqiue , monotonic increase ID like startClient() in /rpc/rpcClient.java shows,just for test!
Commond line tools
============
1.List the content of a znode dir:
/bin/leaf.py zktool list /leaf2/server-forever
2.Read the content of a znode:
/bin/leaf.py zktool read /leaf2/server-forever/172.21.0.190:2182-0000000008
# Author
weizhenyi
Github: https://github.com/weizhenyi
# Getting help
Email: [email protected]
QQ:632155186
|
7d9b58fcb4e3eb4c1350295eb6d8e4816a380862
|
src/Conduit/Middleware/ApplicationMiddleware.php
|
src/Conduit/Middleware/ApplicationMiddleware.php
|
<?php
namespace Conduit\Middleware;
use Phly\Conduit\MiddlewareInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Message\ResponseInterface;
use Aura\Router\Router;
use Aura\Dispatcher\Dispatcher;
use Aura\Di\Container;
class ApplicationMiddleware implements MiddlewareInterface
{
private $container;
public function __construct(Container $container)
{
$this->container = $container;
}
public function __invoke(ServerRequestInterface $request, ResponseInterface $response, callable $next = null)
{
$router = $this->container->get('router');
$dispatcher = $this->container->get('dispatcher');
$server = $request->getServerParams();
$path = parse_url($server['REQUEST_URI'], PHP_URL_PATH);
$route = $router->match($path, $server);
if (! $route) {
return $next($request, $response);
}
$params = $route->params;
if (is_string($params['controller'])) {
// create the controller object
$params['controller'] = $this->container->newInstance($params['controller']);
}
$params['request'] = $request;
$params['response'] = $response;
$result = $dispatcher->__invoke($params);
if ($result instanceof ResponseInterface) {
return $result;
}
if (is_string($result)) {
return $response->write($result);
}
return $response;
}
}
|
<?php
namespace Conduit\Middleware;
use Phly\Conduit\MiddlewareInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Message\ResponseInterface;
use Aura\Router\Router;
use Aura\Dispatcher\Dispatcher;
use Aura\Di\Container;
class ApplicationMiddleware implements MiddlewareInterface
{
private $container;
public function __construct(Container $container)
{
$this->container = $container;
}
public function __invoke(ServerRequestInterface $request, ResponseInterface $response, callable $next = null)
{
$router = $this->container->get('router');
$dispatcher = $this->container->get('dispatcher');
$server = $request->getServerParams();
$path = parse_url($server['REQUEST_URI'], PHP_URL_PATH);
$route = $router->match($path, $server);
if (! $route) {
return $next($request, $response);
}
$params = $route->params;
if (is_string($params['controller']) &&
! $this->dispatcher->hasObject($params['controller'])
) {
// create the controller object
$params['controller'] = $this->container->newInstance($params['controller']);
}
$params['request'] = $request;
$params['response'] = $response;
$result = $dispatcher->__invoke($params);
if ($result instanceof ResponseInterface) {
return $result;
}
if (is_string($result)) {
return $response->write($result);
}
return $response;
}
}
|
Check and makse sure we have no dispatcher object
|
Check and makse sure we have no dispatcher object
|
PHP
|
mit
|
harikt/conduit-skelton,harikt/conduit-skelton
|
php
|
## Code Before:
<?php
namespace Conduit\Middleware;
use Phly\Conduit\MiddlewareInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Message\ResponseInterface;
use Aura\Router\Router;
use Aura\Dispatcher\Dispatcher;
use Aura\Di\Container;
class ApplicationMiddleware implements MiddlewareInterface
{
private $container;
public function __construct(Container $container)
{
$this->container = $container;
}
public function __invoke(ServerRequestInterface $request, ResponseInterface $response, callable $next = null)
{
$router = $this->container->get('router');
$dispatcher = $this->container->get('dispatcher');
$server = $request->getServerParams();
$path = parse_url($server['REQUEST_URI'], PHP_URL_PATH);
$route = $router->match($path, $server);
if (! $route) {
return $next($request, $response);
}
$params = $route->params;
if (is_string($params['controller'])) {
// create the controller object
$params['controller'] = $this->container->newInstance($params['controller']);
}
$params['request'] = $request;
$params['response'] = $response;
$result = $dispatcher->__invoke($params);
if ($result instanceof ResponseInterface) {
return $result;
}
if (is_string($result)) {
return $response->write($result);
}
return $response;
}
}
## Instruction:
Check and makse sure we have no dispatcher object
## Code After:
<?php
namespace Conduit\Middleware;
use Phly\Conduit\MiddlewareInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Message\ResponseInterface;
use Aura\Router\Router;
use Aura\Dispatcher\Dispatcher;
use Aura\Di\Container;
class ApplicationMiddleware implements MiddlewareInterface
{
private $container;
public function __construct(Container $container)
{
$this->container = $container;
}
public function __invoke(ServerRequestInterface $request, ResponseInterface $response, callable $next = null)
{
$router = $this->container->get('router');
$dispatcher = $this->container->get('dispatcher');
$server = $request->getServerParams();
$path = parse_url($server['REQUEST_URI'], PHP_URL_PATH);
$route = $router->match($path, $server);
if (! $route) {
return $next($request, $response);
}
$params = $route->params;
if (is_string($params['controller']) &&
! $this->dispatcher->hasObject($params['controller'])
) {
// create the controller object
$params['controller'] = $this->container->newInstance($params['controller']);
}
$params['request'] = $request;
$params['response'] = $response;
$result = $dispatcher->__invoke($params);
if ($result instanceof ResponseInterface) {
return $result;
}
if (is_string($result)) {
return $response->write($result);
}
return $response;
}
}
|
381b54073efdfe910f4cf5a0f06226d74f18be9d
|
models/ospatch/entities.go
|
models/ospatch/entities.go
|
package ospatch
import "time"
type PatchInfo struct {
Execution_id string
Status string
Start_time time.Time
End_time time.Time
Init_messages []map[string]interface{}
}
|
package ospatch
import "github.com/centurylinkcloud/clc-go-cli/base"
type PatchInfo struct {
Execution_id string
Status string
Start_time base.Time
End_time base.Time
Init_messages []map[string]interface{}
}
|
Use base.Time for displaying times
|
Use base.Time for displaying times
|
Go
|
apache-2.0
|
CenturyLinkCloud/clc-go-cli,CenturyLinkCloud/clc-go-cli
|
go
|
## Code Before:
package ospatch
import "time"
type PatchInfo struct {
Execution_id string
Status string
Start_time time.Time
End_time time.Time
Init_messages []map[string]interface{}
}
## Instruction:
Use base.Time for displaying times
## Code After:
package ospatch
import "github.com/centurylinkcloud/clc-go-cli/base"
type PatchInfo struct {
Execution_id string
Status string
Start_time base.Time
End_time base.Time
Init_messages []map[string]interface{}
}
|
4ccf029c868647085b5a726ef27a270d206b33a7
|
app/views/version_4/google/results.html
|
app/views/version_4/google/results.html
|
{% extends "layout_unbranded.html" %}
{% set imgpath="/public/images/google/" %}
{% block page_title %}
Search results
{% endblock %}
{% block proposition_header %}
<!-- blank to remove the proposition header -->
{% endblock %}
{% block header_class %}
<!-- blank to remove the proposition header -->
{% endblock %}
{% block content %}
<div id="google">
<div id="g_results">
<a href="/version_4/guidance/flood-risk-activities-environmental-permits"><img border="0" src="{{ imgpath }}google_serp.png" alt="" /></a>
</div>
<form method="get" action="{{form_action}}">
<input id="results_box" name="search-text" type="text" value="{{search_query}}">
</form>
</div><!-- // end #google -->
{% endblock %}
|
{% extends "layout_unbranded.html" %}
{% set imgpath="/public/images/google/" %}
{% block page_title %}
Search results
{% endblock %}
{% block proposition_header %}
<!-- blank to remove the proposition header -->
{% endblock %}
{% block header_class %}
<!-- blank to remove the proposition header -->
{% endblock %}
{% block content %}
<div id="google">
<div id="g_results">
<a href="/version_4/guidance/check-need-permission-mainstream"><img border="0" src="{{ imgpath }}google_serp.png" alt="" /></a>
</div>
<form method="get" action="{{form_action}}">
<input id="results_box" name="search-text" type="text" value="{{search_query}}">
</form>
</div><!-- // end #google -->
{% endblock %}
|
Fix link to guidance from Google
|
Fix link to guidance from Google
|
HTML
|
mit
|
EnvironmentAgency/river-permissions-prototype,EnvironmentAgency/river-permissions-prototype,EnvironmentAgency/river-permissions-prototype
|
html
|
## Code Before:
{% extends "layout_unbranded.html" %}
{% set imgpath="/public/images/google/" %}
{% block page_title %}
Search results
{% endblock %}
{% block proposition_header %}
<!-- blank to remove the proposition header -->
{% endblock %}
{% block header_class %}
<!-- blank to remove the proposition header -->
{% endblock %}
{% block content %}
<div id="google">
<div id="g_results">
<a href="/version_4/guidance/flood-risk-activities-environmental-permits"><img border="0" src="{{ imgpath }}google_serp.png" alt="" /></a>
</div>
<form method="get" action="{{form_action}}">
<input id="results_box" name="search-text" type="text" value="{{search_query}}">
</form>
</div><!-- // end #google -->
{% endblock %}
## Instruction:
Fix link to guidance from Google
## Code After:
{% extends "layout_unbranded.html" %}
{% set imgpath="/public/images/google/" %}
{% block page_title %}
Search results
{% endblock %}
{% block proposition_header %}
<!-- blank to remove the proposition header -->
{% endblock %}
{% block header_class %}
<!-- blank to remove the proposition header -->
{% endblock %}
{% block content %}
<div id="google">
<div id="g_results">
<a href="/version_4/guidance/check-need-permission-mainstream"><img border="0" src="{{ imgpath }}google_serp.png" alt="" /></a>
</div>
<form method="get" action="{{form_action}}">
<input id="results_box" name="search-text" type="text" value="{{search_query}}">
</form>
</div><!-- // end #google -->
{% endblock %}
|
5fb08d025253520bb0e44a5a6af3801659833f7f
|
Cargo.toml
|
Cargo.toml
|
[package]
name = "rust-sqlite"
version = "0.3.0"
authors = [
"Dan Connolly <[email protected]>",
"Peter Reid <[email protected]>"
]
keywords = ["database", "sql"]
exclude = [
".hg/*",
"*.orig",
"*~",
]
description = "Rustic bindings for sqlite3"
repository = "https://github.com/dckc/rust-sqlite3"
readme = "README.md"
documentation = "http://dckc.github.io/rust-sqlite3"
license = "MIT"
[lib]
name = "sqlite3"
[dependencies]
bitflags = "^0.1.0"
enum_primitive = "0.1.0"
libc = "0.2.5"
[dependencies.time]
time = "^0.1.5"
|
[package]
name = "rust-sqlite"
version = "0.3.0"
authors = [
"Dan Connolly <[email protected]>",
"Peter Reid <[email protected]>"
]
keywords = ["database", "sql", "sqlite"]
exclude = [
".hg/*",
"*.orig",
"*~",
]
description = "Rustic bindings for sqlite3"
repository = "https://github.com/dckc/rust-sqlite3"
readme = "README.md"
documentation = "http://dckc.github.io/rust-sqlite3"
license = "MIT"
[lib]
name = "sqlite3"
[dependencies]
bitflags = "^0.1.0"
enum_primitive = "0.1.0"
libc = "0.2.5"
[dependencies.time]
time = "^0.1.5"
|
Add keyword to improve linkability on crates.io
|
Add keyword to improve linkability on crates.io
|
TOML
|
mit
|
dckc/rust-sqlite3
|
toml
|
## Code Before:
[package]
name = "rust-sqlite"
version = "0.3.0"
authors = [
"Dan Connolly <[email protected]>",
"Peter Reid <[email protected]>"
]
keywords = ["database", "sql"]
exclude = [
".hg/*",
"*.orig",
"*~",
]
description = "Rustic bindings for sqlite3"
repository = "https://github.com/dckc/rust-sqlite3"
readme = "README.md"
documentation = "http://dckc.github.io/rust-sqlite3"
license = "MIT"
[lib]
name = "sqlite3"
[dependencies]
bitflags = "^0.1.0"
enum_primitive = "0.1.0"
libc = "0.2.5"
[dependencies.time]
time = "^0.1.5"
## Instruction:
Add keyword to improve linkability on crates.io
## Code After:
[package]
name = "rust-sqlite"
version = "0.3.0"
authors = [
"Dan Connolly <[email protected]>",
"Peter Reid <[email protected]>"
]
keywords = ["database", "sql", "sqlite"]
exclude = [
".hg/*",
"*.orig",
"*~",
]
description = "Rustic bindings for sqlite3"
repository = "https://github.com/dckc/rust-sqlite3"
readme = "README.md"
documentation = "http://dckc.github.io/rust-sqlite3"
license = "MIT"
[lib]
name = "sqlite3"
[dependencies]
bitflags = "^0.1.0"
enum_primitive = "0.1.0"
libc = "0.2.5"
[dependencies.time]
time = "^0.1.5"
|
6167b90964d8d89afdcdd27b192ea71205868694
|
src/ui/mod.rs
|
src/ui/mod.rs
|
extern crate sdl2;
pub use self::screen::Screen;
mod screen;
/// Abstract object that can be created to initialize and access the UI
pub struct UI;
impl UI {
/// Create an abstract UI object (initializes SDL2 until dropped)
pub fn new () -> UI {
match sdl2::init([sdl2::InitVideo]) {
false => fail!("ui: Failed to initialize SDL2: {}", sdl2::get_error()),
true => UI,
}
}
/// Runs the UI loop and the given closure. Must be called from
/// the main thread (SDL2 requirement)
pub fn run (&mut self, f: ||) {
loop {
match sdl2::event::poll_event() {
sdl2::event::QuitEvent(..) => break,
sdl2::event::KeyDownEvent(_, _, sdl2::keycode::EscapeKey, _, _) => break,
_ => { },
}
f()
}
}
}
impl Drop for UI {
fn drop (&mut self) {
sdl2::quit();
}
}
#[cfg(test)]
mod test {
use super::UI;
#[test]
fn smoke () {
let mut ui = UI::new();
ui.run(|| { });
}
}
|
extern crate sdl2;
pub use self::screen::Screen;
mod screen;
/// Abstract object that can be created to initialize and access the UI
pub struct UI;
impl UI {
/// Create an abstract UI object (initializes SDL2 until dropped)
pub fn new () -> UI {
match sdl2::init([sdl2::InitVideo]) {
false => fail!("ui: Failed to initialize SDL2: {}", sdl2::get_error()),
true => UI,
}
}
/// Runs the UI loop and the given closure. Must be called from
/// the main thread (SDL2 requirement)
pub fn run (&mut self, f: || -> bool) {
loop {
match sdl2::event::poll_event() {
sdl2::event::QuitEvent(..) => break,
sdl2::event::KeyDownEvent(_, _, sdl2::keycode::EscapeKey, _, _) => break,
_ => { },
}
if !f() { break; }
}
}
}
impl Drop for UI {
fn drop (&mut self) {
sdl2::quit();
}
}
#[cfg(test)]
mod test {
use super::UI;
#[test]
fn smoke () {
let mut ui = UI::new();
ui.run(|| { false });
}
}
|
Allow closure for UI loop to return false to break the loop
|
Allow closure for UI loop to return false to break the loop
|
Rust
|
mit
|
zargony/rusty64,zargony/rusty64
|
rust
|
## Code Before:
extern crate sdl2;
pub use self::screen::Screen;
mod screen;
/// Abstract object that can be created to initialize and access the UI
pub struct UI;
impl UI {
/// Create an abstract UI object (initializes SDL2 until dropped)
pub fn new () -> UI {
match sdl2::init([sdl2::InitVideo]) {
false => fail!("ui: Failed to initialize SDL2: {}", sdl2::get_error()),
true => UI,
}
}
/// Runs the UI loop and the given closure. Must be called from
/// the main thread (SDL2 requirement)
pub fn run (&mut self, f: ||) {
loop {
match sdl2::event::poll_event() {
sdl2::event::QuitEvent(..) => break,
sdl2::event::KeyDownEvent(_, _, sdl2::keycode::EscapeKey, _, _) => break,
_ => { },
}
f()
}
}
}
impl Drop for UI {
fn drop (&mut self) {
sdl2::quit();
}
}
#[cfg(test)]
mod test {
use super::UI;
#[test]
fn smoke () {
let mut ui = UI::new();
ui.run(|| { });
}
}
## Instruction:
Allow closure for UI loop to return false to break the loop
## Code After:
extern crate sdl2;
pub use self::screen::Screen;
mod screen;
/// Abstract object that can be created to initialize and access the UI
pub struct UI;
impl UI {
/// Create an abstract UI object (initializes SDL2 until dropped)
pub fn new () -> UI {
match sdl2::init([sdl2::InitVideo]) {
false => fail!("ui: Failed to initialize SDL2: {}", sdl2::get_error()),
true => UI,
}
}
/// Runs the UI loop and the given closure. Must be called from
/// the main thread (SDL2 requirement)
pub fn run (&mut self, f: || -> bool) {
loop {
match sdl2::event::poll_event() {
sdl2::event::QuitEvent(..) => break,
sdl2::event::KeyDownEvent(_, _, sdl2::keycode::EscapeKey, _, _) => break,
_ => { },
}
if !f() { break; }
}
}
}
impl Drop for UI {
fn drop (&mut self) {
sdl2::quit();
}
}
#[cfg(test)]
mod test {
use super::UI;
#[test]
fn smoke () {
let mut ui = UI::new();
ui.run(|| { false });
}
}
|
eb5e3d416a4a9da2ea2f06498683a095d6c5c7cd
|
spec/presenters/sufia/select_type_list_presenter_spec.rb
|
spec/presenters/sufia/select_type_list_presenter_spec.rb
|
require 'spec_helper'
describe Sufia::SelectTypeListPresenter do
let(:instance) { described_class.new(user) }
let(:user) { create(:user) }
describe "#many?" do
subject { instance.many? }
it { is_expected.to be false }
context "if user is nil" do
it { is_expected.to be false }
end
context "if authorized_models returns more than one" do
before do
allow(instance).to receive(:authorized_models).and_return([double, double])
end
it { is_expected.to be true }
end
end
end
|
require 'spec_helper'
describe Sufia::SelectTypeListPresenter do
let(:instance) { described_class.new(user) }
let(:user) { create(:user) }
describe "#many?" do
subject { instance.many? }
context "if authorized_models returns one" do
before do
allow(instance).to receive(:authorized_models).and_return([double])
end
it { is_expected.to be false }
context "if user is nil" do
it { is_expected.to be false }
end
end
context "if authorized_models returns more than one" do
before do
allow(instance).to receive(:authorized_models).and_return([double, double])
end
it { is_expected.to be true }
end
end
end
|
Refactor SelectTypeListPresenter spec so it isn't affected by works being generated
|
Refactor SelectTypeListPresenter spec so it isn't affected by works being generated
|
Ruby
|
apache-2.0
|
samvera/hyrax,samvera/hyrax,samvera/hyrax,samvera/hyrax
|
ruby
|
## Code Before:
require 'spec_helper'
describe Sufia::SelectTypeListPresenter do
let(:instance) { described_class.new(user) }
let(:user) { create(:user) }
describe "#many?" do
subject { instance.many? }
it { is_expected.to be false }
context "if user is nil" do
it { is_expected.to be false }
end
context "if authorized_models returns more than one" do
before do
allow(instance).to receive(:authorized_models).and_return([double, double])
end
it { is_expected.to be true }
end
end
end
## Instruction:
Refactor SelectTypeListPresenter spec so it isn't affected by works being generated
## Code After:
require 'spec_helper'
describe Sufia::SelectTypeListPresenter do
let(:instance) { described_class.new(user) }
let(:user) { create(:user) }
describe "#many?" do
subject { instance.many? }
context "if authorized_models returns one" do
before do
allow(instance).to receive(:authorized_models).and_return([double])
end
it { is_expected.to be false }
context "if user is nil" do
it { is_expected.to be false }
end
end
context "if authorized_models returns more than one" do
before do
allow(instance).to receive(:authorized_models).and_return([double, double])
end
it { is_expected.to be true }
end
end
end
|
20e8a4757610dc78858c13d854b109e1477ec757
|
app/components/job-log.js
|
app/components/job-log.js
|
import Ember from 'ember';
export default Ember.Component.extend({
logBinding: 'job.log',
didReceiveAttrs: function(options) {
this._super(...arguments);
if(options.oldAttrs && options.oldAttrs.job && options.oldAttrs.job.value) {
this.teardownLog(options.oldAttrs.job.value);
}
if(options.newAttrs && options.newAttrs.job && options.newAttrs.job.value) {
this.setupLog(options.newAttrs.job.value);
}
},
teardownLog(job) {
job.unsubscribe();
},
setupLog(job) {
job.get('log').fetch();
job.subscribe();
}
});
|
import Ember from 'ember';
export default Ember.Component.extend({
logBinding: 'job.log',
didReceiveAttrs: function(options) {
this._super(...arguments);
let oldJob = options.oldAttrs && options.oldAttrs.job && options.oldAttrs.job.value,
newJob = options.newAttrs && options.newAttrs.job && options.newAttrs.job.value;
if(newJob !== oldJob) {
if(newJob) {
this.setupLog(newJob);
}
if(oldJob) {
this.teardownLog(oldJob);
}
}
},
teardownLog(job) {
job.unsubscribe();
},
setupLog(job) {
job.get('log').fetch();
job.subscribe();
}
});
|
Fix logs displaying when a restart happens
|
Fix logs displaying when a restart happens
When a user restarts a job, we should not try fetching the log again. In
order to do this I added a guard in job-log component, which checks if
attributes changed in didReceiveAttrs callback. If the old job value is
the same as the new value, we don't need to do anything.
|
JavaScript
|
mit
|
fotinakis/travis-web,fotinakis/travis-web,travis-ci/travis-web,travis-ci/travis-web,fauxton/travis-web,fotinakis/travis-web,fauxton/travis-web,fauxton/travis-web,travis-ci/travis-web,travis-ci/travis-web,fotinakis/travis-web,fauxton/travis-web
|
javascript
|
## Code Before:
import Ember from 'ember';
export default Ember.Component.extend({
logBinding: 'job.log',
didReceiveAttrs: function(options) {
this._super(...arguments);
if(options.oldAttrs && options.oldAttrs.job && options.oldAttrs.job.value) {
this.teardownLog(options.oldAttrs.job.value);
}
if(options.newAttrs && options.newAttrs.job && options.newAttrs.job.value) {
this.setupLog(options.newAttrs.job.value);
}
},
teardownLog(job) {
job.unsubscribe();
},
setupLog(job) {
job.get('log').fetch();
job.subscribe();
}
});
## Instruction:
Fix logs displaying when a restart happens
When a user restarts a job, we should not try fetching the log again. In
order to do this I added a guard in job-log component, which checks if
attributes changed in didReceiveAttrs callback. If the old job value is
the same as the new value, we don't need to do anything.
## Code After:
import Ember from 'ember';
export default Ember.Component.extend({
logBinding: 'job.log',
didReceiveAttrs: function(options) {
this._super(...arguments);
let oldJob = options.oldAttrs && options.oldAttrs.job && options.oldAttrs.job.value,
newJob = options.newAttrs && options.newAttrs.job && options.newAttrs.job.value;
if(newJob !== oldJob) {
if(newJob) {
this.setupLog(newJob);
}
if(oldJob) {
this.teardownLog(oldJob);
}
}
},
teardownLog(job) {
job.unsubscribe();
},
setupLog(job) {
job.get('log').fetch();
job.subscribe();
}
});
|
f3cf637ca71c2bf65a56f9a1ab81407e94732786
|
hello/hello.asd
|
hello/hello.asd
|
;;;; -*- Mode: Lisp; -*-
(defsystem "hello"
:description "Example Bazel Hello World application"
:class program-system
:entry-point "hello:main"
:depends-on (:alexandria)
:components ((:file "hello")))
(defsystem "hello/chello"
:description "Example Bazel Hello World application, using C"
:class program-system
:entry-point "chello:main"
:defsystem-depends-on (:cffi-toolchain)
:depends-on (:cffi)
:serial t
:components
((:c-file "chello_lib")
(:file "chello")))
|
;;;; -*- Mode: Lisp; -*-
(defsystem "hello"
:description "Example Bazel Hello World application"
:class program-system
:entry-point "hello:main"
:depends-on (:alexandria)
:components ((:file "hello")))
(defsystem "hello/chello"
:description "Example Bazel Hello World application, using C"
:class program-system
:entry-point "chello:main"
:defsystem-depends-on (:cffi-toolchain)
:depends-on (:cffi-toolchain)
:serial t
:components
((:c-file "chello_lib")
(:file "chello")))
|
Make cffi-toolchain a runtime dependency, too.
|
Make cffi-toolchain a runtime dependency, too.
This resolves a load-time dependency on ASDF and
allows chello to be built as a statically linked executable with ECL.
|
Common Lisp
|
mit
|
qitab/bazelisp,qitab/bazelisp,qitab/bazelisp
|
common-lisp
|
## Code Before:
;;;; -*- Mode: Lisp; -*-
(defsystem "hello"
:description "Example Bazel Hello World application"
:class program-system
:entry-point "hello:main"
:depends-on (:alexandria)
:components ((:file "hello")))
(defsystem "hello/chello"
:description "Example Bazel Hello World application, using C"
:class program-system
:entry-point "chello:main"
:defsystem-depends-on (:cffi-toolchain)
:depends-on (:cffi)
:serial t
:components
((:c-file "chello_lib")
(:file "chello")))
## Instruction:
Make cffi-toolchain a runtime dependency, too.
This resolves a load-time dependency on ASDF and
allows chello to be built as a statically linked executable with ECL.
## Code After:
;;;; -*- Mode: Lisp; -*-
(defsystem "hello"
:description "Example Bazel Hello World application"
:class program-system
:entry-point "hello:main"
:depends-on (:alexandria)
:components ((:file "hello")))
(defsystem "hello/chello"
:description "Example Bazel Hello World application, using C"
:class program-system
:entry-point "chello:main"
:defsystem-depends-on (:cffi-toolchain)
:depends-on (:cffi-toolchain)
:serial t
:components
((:c-file "chello_lib")
(:file "chello")))
|
a5d269d758a67ef1019d82cc74b2392ab45404e8
|
README.md
|
README.md
|
This repository contains TmLanguage files that are consumed by TypeScript editors and plugins such as [Visual Studio Code](https://github.com/Microsoft/vscode), [The TypeScript Sublime Plugin](https://github.com/Microsoft/TypeScript-Sublime-Plugin), [Atom TypeScript](https://github.com/TypeStrong/atom-typescript), and possibly others.
# Contributing
The XML files are generated from the YAML files, so contributors should hand-modify the YAML files, and XML files should only be generated by the [AAAPackageDev](https://github.com/SublimeText/AAAPackageDev) plugin.
## Tests
Test are run from within the ```tests``` folder
``` sh
cd tests
npm install # Installs dependencies required for testing
npm test # Compiles & runs tests
```
|
[](https://ci.appveyor.com/project/zhengbli/typescript-tmlanguage)
This repository contains TmLanguage files that are consumed by TypeScript editors and plugins such as [Visual Studio Code](https://github.com/Microsoft/vscode), [The TypeScript Sublime Plugin](https://github.com/Microsoft/TypeScript-Sublime-Plugin), [Atom TypeScript](https://github.com/TypeStrong/atom-typescript), and possibly others.
# Contributing
The XML files are generated from the YAML files, so contributors should hand-modify the YAML files, and XML files should only be generated by the [AAAPackageDev](https://github.com/SublimeText/AAAPackageDev) plugin.
## Tests
Test are run from within the ```tests``` folder
``` sh
cd tests
npm install # Installs dependencies required for testing
npm test # Compiles & runs tests
```
|
Add build status badge in readme
|
Add build status badge in readme
|
Markdown
|
mit
|
Microsoft/TypeScript-TmLanguage
|
markdown
|
## Code Before:
This repository contains TmLanguage files that are consumed by TypeScript editors and plugins such as [Visual Studio Code](https://github.com/Microsoft/vscode), [The TypeScript Sublime Plugin](https://github.com/Microsoft/TypeScript-Sublime-Plugin), [Atom TypeScript](https://github.com/TypeStrong/atom-typescript), and possibly others.
# Contributing
The XML files are generated from the YAML files, so contributors should hand-modify the YAML files, and XML files should only be generated by the [AAAPackageDev](https://github.com/SublimeText/AAAPackageDev) plugin.
## Tests
Test are run from within the ```tests``` folder
``` sh
cd tests
npm install # Installs dependencies required for testing
npm test # Compiles & runs tests
```
## Instruction:
Add build status badge in readme
## Code After:
[](https://ci.appveyor.com/project/zhengbli/typescript-tmlanguage)
This repository contains TmLanguage files that are consumed by TypeScript editors and plugins such as [Visual Studio Code](https://github.com/Microsoft/vscode), [The TypeScript Sublime Plugin](https://github.com/Microsoft/TypeScript-Sublime-Plugin), [Atom TypeScript](https://github.com/TypeStrong/atom-typescript), and possibly others.
# Contributing
The XML files are generated from the YAML files, so contributors should hand-modify the YAML files, and XML files should only be generated by the [AAAPackageDev](https://github.com/SublimeText/AAAPackageDev) plugin.
## Tests
Test are run from within the ```tests``` folder
``` sh
cd tests
npm install # Installs dependencies required for testing
npm test # Compiles & runs tests
```
|
c63bff7d566508be31bbad3d42c7a2f2381ae0b9
|
backup_s3.bash
|
backup_s3.bash
|
source venv/bin/activate
python manage.py backup_data_to_s3
|
source $HOME/.bashrc
source $HOME/trackercise/venv/bin/activate
python manage.py backup_data_to_s3
deactivate
|
Use home var to make the script simpler
|
Use home var to make the script simpler
|
Shell
|
mit
|
pbraunstein/trackercise,pbraunstein/trackercise,pbraunstein/trackercise,pbraunstein/trackercise,pbraunstein/trackercise
|
shell
|
## Code Before:
source venv/bin/activate
python manage.py backup_data_to_s3
## Instruction:
Use home var to make the script simpler
## Code After:
source $HOME/.bashrc
source $HOME/trackercise/venv/bin/activate
python manage.py backup_data_to_s3
deactivate
|
455e018320d68b4dcc9f182de2ba93e6388acebf
|
test/trash_test.rb
|
test/trash_test.rb
|
require 'test/unit'
require 'rubygems'
require 'active_record'
require 'trash'
ActiveRecord::Base.establish_connection(:adapter => "sqlite3", :database => ":memory:")
def setup_db
silence_stream(STDOUT) do
ActiveRecord::Schema.define(:version => 1) do
create_table :entries do |t|
t.string :title
t.datetime :deleted_at
end
end
end
end
def teardown_db
ActiveRecord::Base.connection.tables.each do |table|
ActiveRecord::Base.connection.drop_table(table)
end
end
class Entry < ActiveRecord::Base
default_scope where(:deleted_at => nil)
has_trash
end
class TrashTest < Test::Unit::TestCase
def setup
setup_db
@entry = Entry.create :title => "Hello World"
end
def teardown
teardown_db
end
def test_deleted
@entry.destroy
assert_equal 0, Entry.count
assert_equal 1, Entry.deleted.count
end
def test_restore
@entry.destroy
Entry.deleted.first.restore
assert_equal 0, Entry.deleted.count
assert_equal 1, Entry.count
end
def test_wipe
@entry.destroy
assert_equal 1, Entry.deleted.count
entry = Entry.deleted.first
entry.disable_trash { entry.destroy }
assert_equal 0, Entry.deleted.count
end
end
|
require 'test/unit'
require 'rubygems'
require 'active_record'
require 'trash'
require 'factory_girl'
ActiveRecord::Base.establish_connection(:adapter => "sqlite3", :database => ":memory:")
def setup_db
silence_stream(STDOUT) do
ActiveRecord::Schema.define(:version => 1) do
create_table :entries do |t|
t.string :title
t.datetime :deleted_at
end
end
end
end
def teardown_db
ActiveRecord::Base.connection.tables.each do |table|
ActiveRecord::Base.connection.drop_table(table)
end
end
##
# Model definitions
#
class Entry < ActiveRecord::Base
default_scope where(:deleted_at => nil)
has_trash
end
##
# Factories
#
Factory.define :entry do |f|
f.sequence(:title) { |n| "Entry##{n}" }
end
##
# And finally the test itself.
#
class TrashTest < Test::Unit::TestCase
def setup
setup_db
@entry = Factory(:entry)
end
def teardown
teardown_db
end
def test_deleted
@entry.destroy
assert_equal 0, Entry.count
assert_equal 1, Entry.deleted.count
end
def test_restore
@entry.destroy
Entry.deleted.first.restore
assert_equal 0, Entry.deleted.count
assert_equal 1, Entry.count
end
def test_wipe
@entry.destroy
assert_equal 1, Entry.deleted.count
entry = Entry.deleted.first
entry.disable_trash { entry.destroy }
assert_equal 0, Entry.deleted.count
end
end
|
Use factories to create data
|
Use factories to create data
|
Ruby
|
mit
|
trilogyinteractive/rails-trash,Kangou/rails-trash
|
ruby
|
## Code Before:
require 'test/unit'
require 'rubygems'
require 'active_record'
require 'trash'
ActiveRecord::Base.establish_connection(:adapter => "sqlite3", :database => ":memory:")
def setup_db
silence_stream(STDOUT) do
ActiveRecord::Schema.define(:version => 1) do
create_table :entries do |t|
t.string :title
t.datetime :deleted_at
end
end
end
end
def teardown_db
ActiveRecord::Base.connection.tables.each do |table|
ActiveRecord::Base.connection.drop_table(table)
end
end
class Entry < ActiveRecord::Base
default_scope where(:deleted_at => nil)
has_trash
end
class TrashTest < Test::Unit::TestCase
def setup
setup_db
@entry = Entry.create :title => "Hello World"
end
def teardown
teardown_db
end
def test_deleted
@entry.destroy
assert_equal 0, Entry.count
assert_equal 1, Entry.deleted.count
end
def test_restore
@entry.destroy
Entry.deleted.first.restore
assert_equal 0, Entry.deleted.count
assert_equal 1, Entry.count
end
def test_wipe
@entry.destroy
assert_equal 1, Entry.deleted.count
entry = Entry.deleted.first
entry.disable_trash { entry.destroy }
assert_equal 0, Entry.deleted.count
end
end
## Instruction:
Use factories to create data
## Code After:
require 'test/unit'
require 'rubygems'
require 'active_record'
require 'trash'
require 'factory_girl'
ActiveRecord::Base.establish_connection(:adapter => "sqlite3", :database => ":memory:")
def setup_db
silence_stream(STDOUT) do
ActiveRecord::Schema.define(:version => 1) do
create_table :entries do |t|
t.string :title
t.datetime :deleted_at
end
end
end
end
def teardown_db
ActiveRecord::Base.connection.tables.each do |table|
ActiveRecord::Base.connection.drop_table(table)
end
end
##
# Model definitions
#
class Entry < ActiveRecord::Base
default_scope where(:deleted_at => nil)
has_trash
end
##
# Factories
#
Factory.define :entry do |f|
f.sequence(:title) { |n| "Entry##{n}" }
end
##
# And finally the test itself.
#
class TrashTest < Test::Unit::TestCase
def setup
setup_db
@entry = Factory(:entry)
end
def teardown
teardown_db
end
def test_deleted
@entry.destroy
assert_equal 0, Entry.count
assert_equal 1, Entry.deleted.count
end
def test_restore
@entry.destroy
Entry.deleted.first.restore
assert_equal 0, Entry.deleted.count
assert_equal 1, Entry.count
end
def test_wipe
@entry.destroy
assert_equal 1, Entry.deleted.count
entry = Entry.deleted.first
entry.disable_trash { entry.destroy }
assert_equal 0, Entry.deleted.count
end
end
|
fc80a4b350782b49504b87ebfb11265e02f1870a
|
.travis.yml
|
.travis.yml
|
language: node_js
node_js:
- '8.2.1'
os:
- linux
dist: trusty
install:
- yarn install --frozen-lockfile
script:
- yarn transpile
- yarn lint
- yarn test-node
- yarn nsp check
- yarn generate
- yarn prepare-beta-build
- $(yarn bin)/build --config.extraMetadata.environment=$SIGNAL_ENV --config.mac.bundleVersion='$TRAVIS_BUILD_NUMBER' --publish=never
- ./travis.sh
env:
global:
- SIGNAL_ENV: production
- secure: LeXDynRSyeHXR9KdmhYuP/zsc8uFsnYoOWI3fqg8x5SLOilfDyQ766idkT9NTRrdSR8WY7wP4DPs3hrBWGmcVq7BhytI9Q34YSgGS/Sds0jlm5AzSpYfAHpSQ+9ufQXNKN6lgxTkupdsWlc2Em20wUd5EfluDSOoeWVMlqHmKrw=
- secure: WzXjaiy6BmEyKI3uXeanjbAlmzadlwIWxJbC7Mff2duIl/nsaOTK6ElYu23IfeBCvK1DxXV8DVUfTIZXkeFeqHKPtgq2t3HcS12YiNnb7ToGpgOpzElYY4wAOPxRbqPE/ZcthbSxo1x/thgDeWNWxqK1X4XJ3qEIRoE+tPsGKG8=
sudo: false
notifications:
email: false
addons:
artifacts:
paths:
- $(ls ./dist/*.* | tr "\n" ":")
|
language: node_js
node_js:
- '8.2.1'
os:
- linux
dist: trusty
install:
- yarn install --frozen-lockfile
script:
- yarn transpile
- yarn lint
- yarn test-node
- yarn nsp check
- yarn generate
- yarn prepare-beta-build
- $(yarn bin)/build --config.extraMetadata.environment=$SIGNAL_ENV --config.mac.bundleVersion='$TRAVIS_BUILD_NUMBER' --publish=never
- ./travis.sh
env:
global:
- SIGNAL_ENV: production
sudo: false
notifications:
email: false
|
Stop uploading linux build assets; no longer used in build
|
Stop uploading linux build assets; no longer used in build
|
YAML
|
agpl-3.0
|
nrizzio/Signal-Desktop,nrizzio/Signal-Desktop,nrizzio/Signal-Desktop,nrizzio/Signal-Desktop
|
yaml
|
## Code Before:
language: node_js
node_js:
- '8.2.1'
os:
- linux
dist: trusty
install:
- yarn install --frozen-lockfile
script:
- yarn transpile
- yarn lint
- yarn test-node
- yarn nsp check
- yarn generate
- yarn prepare-beta-build
- $(yarn bin)/build --config.extraMetadata.environment=$SIGNAL_ENV --config.mac.bundleVersion='$TRAVIS_BUILD_NUMBER' --publish=never
- ./travis.sh
env:
global:
- SIGNAL_ENV: production
- secure: LeXDynRSyeHXR9KdmhYuP/zsc8uFsnYoOWI3fqg8x5SLOilfDyQ766idkT9NTRrdSR8WY7wP4DPs3hrBWGmcVq7BhytI9Q34YSgGS/Sds0jlm5AzSpYfAHpSQ+9ufQXNKN6lgxTkupdsWlc2Em20wUd5EfluDSOoeWVMlqHmKrw=
- secure: WzXjaiy6BmEyKI3uXeanjbAlmzadlwIWxJbC7Mff2duIl/nsaOTK6ElYu23IfeBCvK1DxXV8DVUfTIZXkeFeqHKPtgq2t3HcS12YiNnb7ToGpgOpzElYY4wAOPxRbqPE/ZcthbSxo1x/thgDeWNWxqK1X4XJ3qEIRoE+tPsGKG8=
sudo: false
notifications:
email: false
addons:
artifacts:
paths:
- $(ls ./dist/*.* | tr "\n" ":")
## Instruction:
Stop uploading linux build assets; no longer used in build
## Code After:
language: node_js
node_js:
- '8.2.1'
os:
- linux
dist: trusty
install:
- yarn install --frozen-lockfile
script:
- yarn transpile
- yarn lint
- yarn test-node
- yarn nsp check
- yarn generate
- yarn prepare-beta-build
- $(yarn bin)/build --config.extraMetadata.environment=$SIGNAL_ENV --config.mac.bundleVersion='$TRAVIS_BUILD_NUMBER' --publish=never
- ./travis.sh
env:
global:
- SIGNAL_ENV: production
sudo: false
notifications:
email: false
|
d72b383a9d6ba2c94d72ccabf48771b4664ce2d1
|
partials/postheader.hbs
|
partials/postheader.hbs
|
<header class="main-header post-head {{#if image}}" style="background-image: url({{image}}){{else}}no-cover{{/if}}">
<nav class="main-nav {{#if image}}overlay{{/if}} clearfix">
<a class="back-button icon-arrow-left" href="{{@blog.url}}"> Home</a>
<a class="subscribe-button icon-feed" href="{{@blog.url}}/rss/"> Subscribe</a>
</nav>
</header>
|
<header class="main-header post-head {{#if image}}" style="background-image: url({{image}}){{else}}{{#if @blog.cover}}" style="background-image: url({{@blog.cover}}){{else}}no-cover{{/if}}{{/if}}">
<nav class="main-nav {{#if image}}overlay{{/if}} clearfix">
<a class="back-button icon-arrow-left" href="{{@blog.url}}"> Home</a>
<a class="subscribe-button icon-feed" href="{{@blog.url}}/rss/"> Subscribe</a>
</nav>
</header>
|
Add header image to post pages
|
Add header image to post pages
|
Handlebars
|
mit
|
eddielee6/SleepyMoon,eddielee6/SleepyMoon
|
handlebars
|
## Code Before:
<header class="main-header post-head {{#if image}}" style="background-image: url({{image}}){{else}}no-cover{{/if}}">
<nav class="main-nav {{#if image}}overlay{{/if}} clearfix">
<a class="back-button icon-arrow-left" href="{{@blog.url}}"> Home</a>
<a class="subscribe-button icon-feed" href="{{@blog.url}}/rss/"> Subscribe</a>
</nav>
</header>
## Instruction:
Add header image to post pages
## Code After:
<header class="main-header post-head {{#if image}}" style="background-image: url({{image}}){{else}}{{#if @blog.cover}}" style="background-image: url({{@blog.cover}}){{else}}no-cover{{/if}}{{/if}}">
<nav class="main-nav {{#if image}}overlay{{/if}} clearfix">
<a class="back-button icon-arrow-left" href="{{@blog.url}}"> Home</a>
<a class="subscribe-button icon-feed" href="{{@blog.url}}/rss/"> Subscribe</a>
</nav>
</header>
|
afacbbe516783cf2889ece0cc10a15c1353c3704
|
lib/partitioned.rb
|
lib/partitioned.rb
|
require 'monkey_patch_activerecord'
require 'monkey_patch_postgres'
require 'monkey_patch_redshift'
require 'partitioned/active_record_overrides'
require 'partitioned/partitioned_base/configurator.rb'
require 'partitioned/partitioned_base/configurator/data'
require 'partitioned/partitioned_base/configurator/dsl'
require 'partitioned/partitioned_base.rb'
require 'partitioned/partitioned_base/configurator/reader'
require 'partitioned/partitioned_base/partition_manager'
require 'partitioned/partitioned_base/sql_adapter'
require 'partitioned/partitioned_base/redshift_sql_adapter'
require 'partitioned/by_time_field'
require 'partitioned/by_yearly_time_field'
require 'partitioned/by_monthly_time_field'
require 'partitioned/by_weekly_time_field'
require 'partitioned/by_created_at'
require 'partitioned/by_integer_field'
require 'partitioned/by_id'
require 'partitioned/by_foreign_key'
require 'partitioned/multi_level'
require 'partitioned/multi_level/configurator/data'
require 'partitioned/multi_level/configurator/dsl'
require 'partitioned/multi_level/configurator/reader'
require 'partitioned/multi_level/partition_manager'
|
require 'monkey_patch_activerecord'
require 'monkey_patch_postgres'
require 'monkey_patch_redshift'
require 'partitioned/active_record_overrides'
require 'partitioned/partitioned_base/configurator.rb'
require 'partitioned/partitioned_base/configurator/data'
require 'partitioned/partitioned_base/configurator/dsl'
require 'partitioned/partitioned_base.rb'
require 'partitioned/partitioned_base/configurator/reader'
require 'partitioned/partitioned_base/partition_manager'
require 'partitioned/partitioned_base/sql_adapter'
require 'partitioned/partitioned_base/redshift_sql_adapter'
require 'partitioned/by_time_field'
require 'partitioned/by_yearly_time_field'
require 'partitioned/by_monthly_time_field'
require 'partitioned/by_weekly_time_field'
require 'partitioned/by_daily_time_field'
require 'partitioned/by_created_at'
require 'partitioned/by_integer_field'
require 'partitioned/by_id'
require 'partitioned/by_foreign_key'
require 'partitioned/multi_level'
require 'partitioned/multi_level/configurator/data'
require 'partitioned/multi_level/configurator/dsl'
require 'partitioned/multi_level/configurator/reader'
require 'partitioned/multi_level/partition_manager'
|
Add a require of by_daily_time_field
|
Add a require of by_daily_time_field
|
Ruby
|
bsd-3-clause
|
fiksu/partitioned,fiksu/partitioned,fiksu/partitioned,fiksu/partitioned
|
ruby
|
## Code Before:
require 'monkey_patch_activerecord'
require 'monkey_patch_postgres'
require 'monkey_patch_redshift'
require 'partitioned/active_record_overrides'
require 'partitioned/partitioned_base/configurator.rb'
require 'partitioned/partitioned_base/configurator/data'
require 'partitioned/partitioned_base/configurator/dsl'
require 'partitioned/partitioned_base.rb'
require 'partitioned/partitioned_base/configurator/reader'
require 'partitioned/partitioned_base/partition_manager'
require 'partitioned/partitioned_base/sql_adapter'
require 'partitioned/partitioned_base/redshift_sql_adapter'
require 'partitioned/by_time_field'
require 'partitioned/by_yearly_time_field'
require 'partitioned/by_monthly_time_field'
require 'partitioned/by_weekly_time_field'
require 'partitioned/by_created_at'
require 'partitioned/by_integer_field'
require 'partitioned/by_id'
require 'partitioned/by_foreign_key'
require 'partitioned/multi_level'
require 'partitioned/multi_level/configurator/data'
require 'partitioned/multi_level/configurator/dsl'
require 'partitioned/multi_level/configurator/reader'
require 'partitioned/multi_level/partition_manager'
## Instruction:
Add a require of by_daily_time_field
## Code After:
require 'monkey_patch_activerecord'
require 'monkey_patch_postgres'
require 'monkey_patch_redshift'
require 'partitioned/active_record_overrides'
require 'partitioned/partitioned_base/configurator.rb'
require 'partitioned/partitioned_base/configurator/data'
require 'partitioned/partitioned_base/configurator/dsl'
require 'partitioned/partitioned_base.rb'
require 'partitioned/partitioned_base/configurator/reader'
require 'partitioned/partitioned_base/partition_manager'
require 'partitioned/partitioned_base/sql_adapter'
require 'partitioned/partitioned_base/redshift_sql_adapter'
require 'partitioned/by_time_field'
require 'partitioned/by_yearly_time_field'
require 'partitioned/by_monthly_time_field'
require 'partitioned/by_weekly_time_field'
require 'partitioned/by_daily_time_field'
require 'partitioned/by_created_at'
require 'partitioned/by_integer_field'
require 'partitioned/by_id'
require 'partitioned/by_foreign_key'
require 'partitioned/multi_level'
require 'partitioned/multi_level/configurator/data'
require 'partitioned/multi_level/configurator/dsl'
require 'partitioned/multi_level/configurator/reader'
require 'partitioned/multi_level/partition_manager'
|
611834461556dd10f3f4663c20cfabc4043dd5ce
|
src/OVAL/probes/SEAP/CMakeLists.txt
|
src/OVAL/probes/SEAP/CMakeLists.txt
|
add_subdirectory("generic/rbt")
file(GLOB_RECURSE SEAP_SOURCES "*.c")
file(GLOB_RECURSE SEAP_HEADERS "*.h")
file(GLOB_RECURSE RBT_SOURCES "generic/rbt/*.c")
file(GLOB_RECURSE RBT_HEADERS "generic/rbt/*.h")
file(GLOB_RECURSE SEAP_SOURCES_TO_REMOVE "sexp-handler.c" "sexp-template.c")
list(REMOVE_ITEM SEAP_SOURCES ${SEAP_SOURCES_TO_REMOVE} ${RBT_SOURCES} ${RBT_HEADERS})
add_library(seap_object OBJECT ${SEAP_SOURCES} ${SEAP_HEADERS})
add_library(seap $<TARGET_OBJECTS:seap_object>)
target_include_directories(seap_object PRIVATE
"../../../../"
"public"
)
target_link_libraries(seap rbt)
set_oscap_generic_properties(seap_object)
|
add_subdirectory("generic/rbt")
file(GLOB_RECURSE SEAP_SOURCES "*.c")
file(GLOB_RECURSE SEAP_HEADERS "*.h")
file(GLOB_RECURSE RBT_SOURCES "generic/rbt/*.c")
file(GLOB_RECURSE RBT_HEADERS "generic/rbt/*.h")
file(GLOB_RECURSE SEAP_SOURCES_TO_REMOVE "sexp-handler.c" "sexp-template.c")
list(REMOVE_ITEM SEAP_SOURCES ${SEAP_SOURCES_TO_REMOVE} ${RBT_SOURCES} ${RBT_HEADERS})
add_library(seap_object OBJECT ${SEAP_SOURCES} ${SEAP_HEADERS})
add_library(seap $<TARGET_OBJECTS:seap_object>)
target_include_directories(seap_object PRIVATE
${CMAKE_SOURCE_DIR}
"public"
)
target_link_libraries(seap rbt)
set_oscap_generic_properties(seap_object)
|
Use CMAKE_SOURCE_DIR instead of a relative path
|
Use CMAKE_SOURCE_DIR instead of a relative path
It's way more readable. This commit also fixes indentation.
|
Text
|
lgpl-2.1
|
mpreisler/openscap,redhatrises/openscap,mpreisler/openscap,jan-cerny/openscap,OpenSCAP/openscap,OpenSCAP/openscap,mpreisler/openscap,redhatrises/openscap,OpenSCAP/openscap,jan-cerny/openscap,OpenSCAP/openscap,redhatrises/openscap,jan-cerny/openscap,jan-cerny/openscap,mpreisler/openscap,redhatrises/openscap,redhatrises/openscap,mpreisler/openscap,OpenSCAP/openscap,jan-cerny/openscap,jan-cerny/openscap,OpenSCAP/openscap,mpreisler/openscap,redhatrises/openscap
|
text
|
## Code Before:
add_subdirectory("generic/rbt")
file(GLOB_RECURSE SEAP_SOURCES "*.c")
file(GLOB_RECURSE SEAP_HEADERS "*.h")
file(GLOB_RECURSE RBT_SOURCES "generic/rbt/*.c")
file(GLOB_RECURSE RBT_HEADERS "generic/rbt/*.h")
file(GLOB_RECURSE SEAP_SOURCES_TO_REMOVE "sexp-handler.c" "sexp-template.c")
list(REMOVE_ITEM SEAP_SOURCES ${SEAP_SOURCES_TO_REMOVE} ${RBT_SOURCES} ${RBT_HEADERS})
add_library(seap_object OBJECT ${SEAP_SOURCES} ${SEAP_HEADERS})
add_library(seap $<TARGET_OBJECTS:seap_object>)
target_include_directories(seap_object PRIVATE
"../../../../"
"public"
)
target_link_libraries(seap rbt)
set_oscap_generic_properties(seap_object)
## Instruction:
Use CMAKE_SOURCE_DIR instead of a relative path
It's way more readable. This commit also fixes indentation.
## Code After:
add_subdirectory("generic/rbt")
file(GLOB_RECURSE SEAP_SOURCES "*.c")
file(GLOB_RECURSE SEAP_HEADERS "*.h")
file(GLOB_RECURSE RBT_SOURCES "generic/rbt/*.c")
file(GLOB_RECURSE RBT_HEADERS "generic/rbt/*.h")
file(GLOB_RECURSE SEAP_SOURCES_TO_REMOVE "sexp-handler.c" "sexp-template.c")
list(REMOVE_ITEM SEAP_SOURCES ${SEAP_SOURCES_TO_REMOVE} ${RBT_SOURCES} ${RBT_HEADERS})
add_library(seap_object OBJECT ${SEAP_SOURCES} ${SEAP_HEADERS})
add_library(seap $<TARGET_OBJECTS:seap_object>)
target_include_directories(seap_object PRIVATE
${CMAKE_SOURCE_DIR}
"public"
)
target_link_libraries(seap rbt)
set_oscap_generic_properties(seap_object)
|
3207ced1281fd992c3888769cfbe3b72a728056c
|
sh/update_production.sh
|
sh/update_production.sh
|
KEYSLOADED=`ssh-add -l | grep -v "The agent has no identities." | wc -l`
if [ $KEYSLOADED -lt 1 ]; then
ssh-add
fi
pushd $( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
pushd ../../myplaceonline_posixcubes
../../../posixcube/posixcube.sh -u root -w ~/production.pwd -h web*.myplaceonline.com -o "cubevar_app_web_servers=web*" -c core_begin -c web -c core_end
popd
popd
|
KEYSLOADED=`ssh-add -l | grep -v "The agent has no identities." | wc -l`
if [ $KEYSLOADED -lt 1 ]; then
ssh-add
fi
pushd $( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
pushd ../../myplaceonline_posixcubes
../../../posixcube/posixcube.sh -u root -h web*.myplaceonline.com -o "cubevar_app_web_servers=web*" -c core_begin -c web -c core_end
popd
popd
|
Remove unneeded pwd file reference
|
Remove unneeded pwd file reference
|
Shell
|
agpl-3.0
|
myplaceonline/myplaceonline_scripts
|
shell
|
## Code Before:
KEYSLOADED=`ssh-add -l | grep -v "The agent has no identities." | wc -l`
if [ $KEYSLOADED -lt 1 ]; then
ssh-add
fi
pushd $( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
pushd ../../myplaceonline_posixcubes
../../../posixcube/posixcube.sh -u root -w ~/production.pwd -h web*.myplaceonline.com -o "cubevar_app_web_servers=web*" -c core_begin -c web -c core_end
popd
popd
## Instruction:
Remove unneeded pwd file reference
## Code After:
KEYSLOADED=`ssh-add -l | grep -v "The agent has no identities." | wc -l`
if [ $KEYSLOADED -lt 1 ]; then
ssh-add
fi
pushd $( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
pushd ../../myplaceonline_posixcubes
../../../posixcube/posixcube.sh -u root -h web*.myplaceonline.com -o "cubevar_app_web_servers=web*" -c core_begin -c web -c core_end
popd
popd
|
da20a079ae72de4bbc156009e751a39c11926e76
|
src/resources/fresh-site/src/documentation/translations/menu_es.xml
|
src/resources/fresh-site/src/documentation/translations/menu_es.xml
|
<?xml version="1.0" encoding="UTF-8"?>
<catalogue
xml:lang="es"
><message
key="About"
>Sobre</message
><message
key="Index"
>Indice</message
><message
key="Changes"
>Cambios</message
><message
key="Todo"
>Cosas que hacer</message
><message
key="Samples"
>Ejemplos</message
><message
key="Apache document page"
>Página documento Apache</message
><message
key="Static content"
>Contenido Estatico</message
><message
key="Wiki page"
>Página Wiki</message
><message
key="ihtml page"
>Página ihtml</message
><message
key="ehtml page"
>Página ehtml</message
><message
key="FAQ"
>Preguntas Frecuentes</message
><message
key="Simplifed Docbook page"
>Página Simplifed Docbook</message
><message
key="XSP page"
>Página XSP</message
></catalogue
>
|
<?xml version="1.0" encoding="UTF-8"?>
<catalogue xml:lang="es" >
<message key="About">Sobre</message >
<message key="Index">Indice</message >
<message key="Changes">Cambios</message>
<message key="Todo" >Cosas que hacer</message>
<message key="Samples" >Ejemplos</message>
<message key="Apache document page" >Página documento Apache</message>
<message key="Static content" >Contenido Estatico</message>
<message key="Wiki page" >Página Wiki</message>
<message key="ihtml page" >Página ihtml</message>
<message key="ehtml page" >Página ehtml</message>
<message key="FAQ" >Preguntas Frecuentes</message>
<message key="Simplifed Docbook page" >Página Simplifed Docbook</message>
<message key="XSP page" >Página XSP</message>
</catalogue >
|
Remove eol and tidy up as it was wrong format.
|
Remove eol and tidy up as it was wrong format.
git-svn-id: fea306228a0c821168c534b698c8fa2a33280b3b@8759 13f79535-47bb-0310-9956-ffa450edef68
|
XML
|
apache-2.0
|
apache/forrest,apache/forrest,apache/forrest,apache/forrest,apache/forrest,apache/forrest
|
xml
|
## Code Before:
<?xml version="1.0" encoding="UTF-8"?>
<catalogue
xml:lang="es"
><message
key="About"
>Sobre</message
><message
key="Index"
>Indice</message
><message
key="Changes"
>Cambios</message
><message
key="Todo"
>Cosas que hacer</message
><message
key="Samples"
>Ejemplos</message
><message
key="Apache document page"
>Página documento Apache</message
><message
key="Static content"
>Contenido Estatico</message
><message
key="Wiki page"
>Página Wiki</message
><message
key="ihtml page"
>Página ihtml</message
><message
key="ehtml page"
>Página ehtml</message
><message
key="FAQ"
>Preguntas Frecuentes</message
><message
key="Simplifed Docbook page"
>Página Simplifed Docbook</message
><message
key="XSP page"
>Página XSP</message
></catalogue
>
## Instruction:
Remove eol and tidy up as it was wrong format.
git-svn-id: fea306228a0c821168c534b698c8fa2a33280b3b@8759 13f79535-47bb-0310-9956-ffa450edef68
## Code After:
<?xml version="1.0" encoding="UTF-8"?>
<catalogue xml:lang="es" >
<message key="About">Sobre</message >
<message key="Index">Indice</message >
<message key="Changes">Cambios</message>
<message key="Todo" >Cosas que hacer</message>
<message key="Samples" >Ejemplos</message>
<message key="Apache document page" >Página documento Apache</message>
<message key="Static content" >Contenido Estatico</message>
<message key="Wiki page" >Página Wiki</message>
<message key="ihtml page" >Página ihtml</message>
<message key="ehtml page" >Página ehtml</message>
<message key="FAQ" >Preguntas Frecuentes</message>
<message key="Simplifed Docbook page" >Página Simplifed Docbook</message>
<message key="XSP page" >Página XSP</message>
</catalogue >
|
86a1b886b9282765392fec8e10c55d9d2892359a
|
docker-compose.yaml
|
docker-compose.yaml
|
version: '3'
services:
repoxplorer:
image: morucci/repoxplorer
container_name: repoxplorer
ports:
- 51000:51000
volumes:
- repoxplorer-data:/repoxplorer-data
- elasticsearch-data:/var/lib/elasticsearch
- $PWD/docker-data/conf:/etc/repoxplorer/defs:z
volumes:
elasticsearch-data:
repoxplorer-data:
|
version: '3'
services:
repoxplorer:
image: morucci/repoxplorer
container_name: repoxplorer
ports:
- 51000:51000
volumes:
- repoxplorer-data:/usr/local/share/repoxplorer
- elasticsearch-data:/var/lib/elasticsearch
- $PWD/docker-data/conf:/etc/repoxplorer/defs:z
volumes:
elasticsearch-data:
repoxplorer-data:
|
Fix path for docker container data
|
Fix path for docker container data
Change-Id: I9312ebbe6b70c89027d8efce5f2fce762a704e60
|
YAML
|
apache-2.0
|
morucci/repoxplorer,morucci/repoxplorer,morucci/repoxplorer,morucci/repoxplorer
|
yaml
|
## Code Before:
version: '3'
services:
repoxplorer:
image: morucci/repoxplorer
container_name: repoxplorer
ports:
- 51000:51000
volumes:
- repoxplorer-data:/repoxplorer-data
- elasticsearch-data:/var/lib/elasticsearch
- $PWD/docker-data/conf:/etc/repoxplorer/defs:z
volumes:
elasticsearch-data:
repoxplorer-data:
## Instruction:
Fix path for docker container data
Change-Id: I9312ebbe6b70c89027d8efce5f2fce762a704e60
## Code After:
version: '3'
services:
repoxplorer:
image: morucci/repoxplorer
container_name: repoxplorer
ports:
- 51000:51000
volumes:
- repoxplorer-data:/usr/local/share/repoxplorer
- elasticsearch-data:/var/lib/elasticsearch
- $PWD/docker-data/conf:/etc/repoxplorer/defs:z
volumes:
elasticsearch-data:
repoxplorer-data:
|
4528d4fdf564860fe2cd345135710e42a86f3884
|
requirements.txt
|
requirements.txt
|
Flask==0.10
Pillow==2.3
numpy==1.8
|
Flask==0.10
Pillow==2.3
numpy==1.8
pylibmc==1.2
|
Add pylibmc requirement for memcached.
|
Add pylibmc requirement for memcached.
modified: requirements.txt
|
Text
|
bsd-3-clause
|
lenards/pretty-doge
|
text
|
## Code Before:
Flask==0.10
Pillow==2.3
numpy==1.8
## Instruction:
Add pylibmc requirement for memcached.
modified: requirements.txt
## Code After:
Flask==0.10
Pillow==2.3
numpy==1.8
pylibmc==1.2
|
182b94f777b1743671b706c939ce14f89c31efca
|
lint/queue.py
|
lint/queue.py
|
from . import persist
import time
import threading
# Map from view_id to threading.Timer objects
timers = {}
# For compatibility this is a class with unchanged API from SL3.
class Daemon:
def start(self, callback):
self._callback = callback
def hit(self, view):
assert self._callback, "Queue: Can't hit before start."
vid = view.id()
delay = get_delay() # [seconds]
return queue_lint(vid, delay, self._callback)
def queue_lint(vid, delay, callback):
hit_time = time.monotonic()
def worker():
callback(vid, hit_time)
try:
timers[vid].cancel()
except KeyError:
pass
timers[vid] = timer = threading.Timer(delay, worker)
timer.start()
return hit_time
MIN_DELAY = 0.1
def get_delay():
"""Return the delay between a lint request and when it will be processed.
If the lint mode is not background, there is no delay. Otherwise, if
a "delay" setting is not available in any of the settings, MIN_DELAY is used.
"""
if persist.settings.get('lint_mode') != 'background':
return 0
return persist.settings.get('delay', MIN_DELAY)
queue = Daemon()
|
from . import persist
import time
import threading
# Map from view_id to threading.Timer objects
timers = {}
# For compatibility this is a class with unchanged API from SL3.
class Daemon:
def start(self, callback):
self._callback = callback
def hit(self, view):
assert self._callback, "Queue: Can't hit before start."
vid = view.id()
delay = get_delay() # [seconds]
return queue_lint(vid, delay, self._callback)
def queue_lint(vid, delay, callback):
hit_time = time.monotonic()
def worker():
callback(vid, hit_time)
try:
timers[vid].cancel()
except KeyError:
pass
timers[vid] = timer = threading.Timer(delay, worker)
timer.start()
return hit_time
def get_delay():
"""Return the delay between a lint request and when it will be processed.
If the lint mode is not background, there is no delay. Otherwise, if
a "delay" setting is not available in any of the settings, MIN_DELAY is used.
"""
if persist.settings.get('lint_mode') != 'background':
return 0
return persist.settings.get('delay')
queue = Daemon()
|
Remove MIN_DELAY bc a default setting is guaranteed
|
Remove MIN_DELAY bc a default setting is guaranteed
|
Python
|
mit
|
SublimeLinter/SublimeLinter3,SublimeLinter/SublimeLinter3
|
python
|
## Code Before:
from . import persist
import time
import threading
# Map from view_id to threading.Timer objects
timers = {}
# For compatibility this is a class with unchanged API from SL3.
class Daemon:
def start(self, callback):
self._callback = callback
def hit(self, view):
assert self._callback, "Queue: Can't hit before start."
vid = view.id()
delay = get_delay() # [seconds]
return queue_lint(vid, delay, self._callback)
def queue_lint(vid, delay, callback):
hit_time = time.monotonic()
def worker():
callback(vid, hit_time)
try:
timers[vid].cancel()
except KeyError:
pass
timers[vid] = timer = threading.Timer(delay, worker)
timer.start()
return hit_time
MIN_DELAY = 0.1
def get_delay():
"""Return the delay between a lint request and when it will be processed.
If the lint mode is not background, there is no delay. Otherwise, if
a "delay" setting is not available in any of the settings, MIN_DELAY is used.
"""
if persist.settings.get('lint_mode') != 'background':
return 0
return persist.settings.get('delay', MIN_DELAY)
queue = Daemon()
## Instruction:
Remove MIN_DELAY bc a default setting is guaranteed
## Code After:
from . import persist
import time
import threading
# Map from view_id to threading.Timer objects
timers = {}
# For compatibility this is a class with unchanged API from SL3.
class Daemon:
def start(self, callback):
self._callback = callback
def hit(self, view):
assert self._callback, "Queue: Can't hit before start."
vid = view.id()
delay = get_delay() # [seconds]
return queue_lint(vid, delay, self._callback)
def queue_lint(vid, delay, callback):
hit_time = time.monotonic()
def worker():
callback(vid, hit_time)
try:
timers[vid].cancel()
except KeyError:
pass
timers[vid] = timer = threading.Timer(delay, worker)
timer.start()
return hit_time
def get_delay():
"""Return the delay between a lint request and when it will be processed.
If the lint mode is not background, there is no delay. Otherwise, if
a "delay" setting is not available in any of the settings, MIN_DELAY is used.
"""
if persist.settings.get('lint_mode') != 'background':
return 0
return persist.settings.get('delay')
queue = Daemon()
|
24d6f8483ac5460552dc51767132ffb2882b3f02
|
docs-to-pdf-converter/src/DocToPDFConverter.java
|
docs-to-pdf-converter/src/DocToPDFConverter.java
|
import java.io.FileInputStream;
import org.docx4j.convert.in.Doc;
import org.docx4j.openpackaging.packages.WordprocessingMLPackage;
public class DocToPDFConverter extends DocxToPDFConverter {
public DocToPDFConverter(String inputFilePath, String outputFilePath) {
super(inputFilePath, outputFilePath);
}
@Override
protected WordprocessingMLPackage getMLPackage(FileInputStream iStream) throws Exception{
WordprocessingMLPackage mlPackage = Doc.convert(iStream);
return mlPackage;
}
}
|
import java.io.FileInputStream;
import java.io.OutputStream;
import java.io.PrintStream;
import org.docx4j.convert.in.Doc;
import org.docx4j.openpackaging.packages.WordprocessingMLPackage;
public class DocToPDFConverter extends DocxToPDFConverter {
public DocToPDFConverter(String inputFilePath, String outputFilePath) {
super(inputFilePath, outputFilePath);
}
@Override
protected WordprocessingMLPackage getMLPackage(FileInputStream iStream) throws Exception{
PrintStream originalStdout = System.out;
//Disable stdout temporarily as Doc convert produces alot of output
System.setOut(new PrintStream(new OutputStream() {
public void write(int b) {
//DO NOTHING
}
}));
WordprocessingMLPackage mlPackage = Doc.convert(iStream);
System.setOut(originalStdout);
return mlPackage;
}
}
|
Disable stdout when convert doc to docx
|
Disable stdout when convert doc to docx
|
Java
|
mit
|
dvijeshpatel/docs-to-pdf-converter,yeokm1/docs-to-pdf-converter
|
java
|
## Code Before:
import java.io.FileInputStream;
import org.docx4j.convert.in.Doc;
import org.docx4j.openpackaging.packages.WordprocessingMLPackage;
public class DocToPDFConverter extends DocxToPDFConverter {
public DocToPDFConverter(String inputFilePath, String outputFilePath) {
super(inputFilePath, outputFilePath);
}
@Override
protected WordprocessingMLPackage getMLPackage(FileInputStream iStream) throws Exception{
WordprocessingMLPackage mlPackage = Doc.convert(iStream);
return mlPackage;
}
}
## Instruction:
Disable stdout when convert doc to docx
## Code After:
import java.io.FileInputStream;
import java.io.OutputStream;
import java.io.PrintStream;
import org.docx4j.convert.in.Doc;
import org.docx4j.openpackaging.packages.WordprocessingMLPackage;
public class DocToPDFConverter extends DocxToPDFConverter {
public DocToPDFConverter(String inputFilePath, String outputFilePath) {
super(inputFilePath, outputFilePath);
}
@Override
protected WordprocessingMLPackage getMLPackage(FileInputStream iStream) throws Exception{
PrintStream originalStdout = System.out;
//Disable stdout temporarily as Doc convert produces alot of output
System.setOut(new PrintStream(new OutputStream() {
public void write(int b) {
//DO NOTHING
}
}));
WordprocessingMLPackage mlPackage = Doc.convert(iStream);
System.setOut(originalStdout);
return mlPackage;
}
}
|
6192ff29aeff277fce10b27d9b81b3ebe0d0bdf0
|
src/loader.cpp
|
src/loader.cpp
|
GridManager* Loader::Load()
{
size_t size;
char* buffer;
File::Load(_fileName.c_str(), buffer, size);
ByteBuffer bb(size);
bb.WriteBuffer(buffer, size);
delete[] buffer;
return GridManager::Load(bb);
}
|
GridManager* Loader::Load()
{
size_t size;
char* buffer;
if (!File::Load(_fileName.c_str(), buffer, size))
{
delete[] buffer;
return NULL;
}
ByteBuffer bb(size);
bb.WriteBuffer(buffer, size);
delete[] buffer;
return GridManager::Load(bb);
}
|
Fix a crash when loading unexisting file
|
Fix a crash when loading unexisting file
|
C++
|
mit
|
DDuarte/feup-aeda-grid,DDuarte/feup-aeda-grid
|
c++
|
## Code Before:
GridManager* Loader::Load()
{
size_t size;
char* buffer;
File::Load(_fileName.c_str(), buffer, size);
ByteBuffer bb(size);
bb.WriteBuffer(buffer, size);
delete[] buffer;
return GridManager::Load(bb);
}
## Instruction:
Fix a crash when loading unexisting file
## Code After:
GridManager* Loader::Load()
{
size_t size;
char* buffer;
if (!File::Load(_fileName.c_str(), buffer, size))
{
delete[] buffer;
return NULL;
}
ByteBuffer bb(size);
bb.WriteBuffer(buffer, size);
delete[] buffer;
return GridManager::Load(bb);
}
|
25d3ac3fbb5921a1452a48da6ef77e5cce149a1a
|
hiera/data/role/bootstrap.yaml
|
hiera/data/role/bootstrap.yaml
|
rjil::jiocloud::consul_role: bootstrapserver
# etcd serves as the ntp server
rjil::system::ntp::server: true
ntp::servers: "%{lookup_array('upstream_ntp_servers')}"
ntp::udlc: yes
|
rjil::jiocloud::consul_role: bootstrapserver
# etcd serves as the ntp server
rjil::system::ntp::server: true
rjil::system::ntp::run_ntpdate: false
ntp::servers: "%{lookup_array('upstream_ntp_servers')}"
ntp::udlc: yes
|
Disable execution of ntpdate on ntp server
|
Disable execution of ntpdate on ntp server
Sometimes ntpdate to pool.ntp.org is keep on failing, which is causing the
entire build failing, This patch is to disable ntpdate on local ntp server which
should not cause any issues as other nodes are syncing the time from this
server and until ntp server get the time from remote clock, it will use local
clock, so still all nodes in the build will have clock synced.
This solve issue #663.
|
YAML
|
apache-2.0
|
akash1808/puppet-rjil,rahul1aggarwal/puppet-rjil,upadhyay-prashant/puppet-rjil,JioCloud/puppet-rjil,JioCloud/puppet-rjil-keystone,rohit-k/puppet-rjil,rohit-k/puppet-rjil,jiocloudDSS/puppet-dss,rakeshmi/puppet-rjil,swamireddy/puppet-rjil,anshprat/puppet-rjil,roopali8/puppet-rjil,JioCloud/puppet-rjil-keystone,rakeshmi/puppet-rjil,ajayaa/puppet-rjil,bafna/puppet-rjil,punituee/puppet-rjil,rahul1aggarwal/puppet-rjil,rohit-k/puppet-rjil,swamireddy/puppet-rjil,sajuptpm/puppet-rjil-temp,JioCloud/puppet-rjil,bafna/try-dss,rohit-k/puppet-rjil,devendermishrajio/puppet-rjil,amar266/puppet-rjil,sajuptpm/puppet-rjil,amar266/puppet-rjil,punituee/puppet-rjil,punituee/puppet-rjil,d4devops/puppet-openstack_cloud,ajayaa/puppet-rjil,devendermishrajio/puppet-rjil,roopali8/puppet-rjil,JioCloud/puppet-rjil,sajuptpm/puppet-rjil-temp,rahul1aggarwal/puppet-rjil,rahul1aggarwal/puppet-rjil,bafna/try-dss,amar266/puppet-rjil,swamireddy/puppet-rjil,anshprat/puppet-rjil,bafna/try-dss,d4devops/puppet-openstack_cloud,rakeshmi/puppet-rjil,roopali8/puppet-rjil,ajayaa/puppet-rjil,akash1808/puppet-rjil,vpramo/puppet-rjil,bafna/puppet-rjil,akash1808/puppet-rjil,sajuptpm/puppet-rjil,roopali8/puppet-rjil,jiocloudDSS/puppet-dss,amar266/puppet-rjil,vpramo/puppet-rjil,bafna/puppet-rjil,akash1808/puppet-rjil,rakeshmi/puppet-rjil,punituee/puppet-rjil,sajuptpm/puppet-rjil-temp,sajuptpm/puppet-rjil,jiocloudDSS/puppet-dss,vpramo/puppet-rjil,anshprat/puppet-rjil,sajuptpm/puppet-rjil,jiocloudDSS/puppet-dss,d4devops/puppet-openstack_cloud,ajayaa/puppet-rjil,JioCloud/puppet-rjil-keystone,JioCloud/puppet-rjil,upadhyay-prashant/puppet-rjil,swamireddy/puppet-rjil,d4devops/puppet-openstack_cloud,devendermishrajio/puppet-rjil,bafna/try-dss,upadhyay-prashant/puppet-rjil,JioCloud/puppet-rjil-keystone,bafna/puppet-rjil,vpramo/puppet-rjil,upadhyay-prashant/puppet-rjil,devendermishrajio/puppet-rjil,sajuptpm/puppet-rjil-temp,anshprat/puppet-rjil
|
yaml
|
## Code Before:
rjil::jiocloud::consul_role: bootstrapserver
# etcd serves as the ntp server
rjil::system::ntp::server: true
ntp::servers: "%{lookup_array('upstream_ntp_servers')}"
ntp::udlc: yes
## Instruction:
Disable execution of ntpdate on ntp server
Sometimes ntpdate to pool.ntp.org is keep on failing, which is causing the
entire build failing, This patch is to disable ntpdate on local ntp server which
should not cause any issues as other nodes are syncing the time from this
server and until ntp server get the time from remote clock, it will use local
clock, so still all nodes in the build will have clock synced.
This solve issue #663.
## Code After:
rjil::jiocloud::consul_role: bootstrapserver
# etcd serves as the ntp server
rjil::system::ntp::server: true
rjil::system::ntp::run_ntpdate: false
ntp::servers: "%{lookup_array('upstream_ntp_servers')}"
ntp::udlc: yes
|
e449390926c5e7ad731036f2f691b9ccc80edc6c
|
compiler-plugin/src/main/scala/com/trueaccord/scalapb/compiler/ProtoValidation.scala
|
compiler-plugin/src/main/scala/com/trueaccord/scalapb/compiler/ProtoValidation.scala
|
package com.trueaccord.scalapb.compiler
import com.google.protobuf.Descriptors._
import scala.collection.JavaConverters._
class ProtoValidation(val params: GeneratorParams) extends DescriptorPimps {
val ForbiddenFieldNames = Set(
"hashCode", "equals", "clone", "finalize", "getClass", "notify", "notifyAll", "toString", "wait")
def validateFile(fd: FileDescriptor): Unit = {
fd.getEnumTypes.asScala.foreach(validateEnum)
fd.getMessageTypes.asScala.foreach(validateMessage)
}
def validateEnum(e: EnumDescriptor): Unit = {
if (e.getValues.asScala.exists(_.getName.toUpperCase == "UNRECOGNIZED")) {
throw new GeneratorException(
s"The enum value 'UNRECOGNIZED' in ${e.getName} is not allowed due to conflict with the catch-all " +
"Unrecognized(v: Int) value.")
}
}
def validateMessage(m: Descriptor): Unit = {
m.getEnumTypes.asScala.foreach(validateEnum)
m.getNestedTypes.asScala.foreach(validateMessage)
m.getFields.asScala.foreach(validateField)
}
def validateField(fd: FieldDescriptor): Unit = {
if (ForbiddenFieldNames.contains(fd.scalaName))
throw new GeneratorException(
s"Field named '${fd.getName}' in message '${fd.getFullName}' is not allowed.")
}
}
|
package com.trueaccord.scalapb.compiler
import com.google.protobuf.Descriptors._
import scala.collection.JavaConverters._
class ProtoValidation(val params: GeneratorParams) extends DescriptorPimps {
val ForbiddenFieldNames = Set(
"hashCode", "equals", "clone", "finalize", "getClass", "notify", "notifyAll", "toString", "wait")
def validateFile(fd: FileDescriptor): Unit = {
fd.getEnumTypes.asScala.foreach(validateEnum)
fd.getMessageTypes.asScala.foreach(validateMessage)
}
def validateEnum(e: EnumDescriptor): Unit = {
if (e.getValues.asScala.exists(_.getName.toUpperCase == "UNRECOGNIZED")) {
throw new GeneratorException(
s"The enum value 'UNRECOGNIZED' in ${e.getName} is not allowed due to conflict with the catch-all " +
"Unrecognized(v: Int) value.")
}
}
def validateMessage(m: Descriptor): Unit = {
m.getEnumTypes.asScala.foreach(validateEnum)
m.getNestedTypes.asScala.foreach(validateMessage)
m.getFields.asScala.foreach(validateField)
}
def validateField(fd: FieldDescriptor): Unit = {
if (ForbiddenFieldNames.contains(fd.scalaName))
throw new GeneratorException(
s"Field named '${fd.getName}' in message '${fd.getFullName}' is not allowed. See https://scalapb.github.io/customizations.html#custom-names")
}
}
|
Add reference to how to use custom names.
|
Add reference to how to use custom names.
|
Scala
|
apache-2.0
|
scalapb/ScalaPB,scalapb/ScalaPB,scalapb/ScalaPB,dotty-staging/ScalaPB,scalapb/ScalaPB,trueaccord/ScalaPB
|
scala
|
## Code Before:
package com.trueaccord.scalapb.compiler
import com.google.protobuf.Descriptors._
import scala.collection.JavaConverters._
class ProtoValidation(val params: GeneratorParams) extends DescriptorPimps {
val ForbiddenFieldNames = Set(
"hashCode", "equals", "clone", "finalize", "getClass", "notify", "notifyAll", "toString", "wait")
def validateFile(fd: FileDescriptor): Unit = {
fd.getEnumTypes.asScala.foreach(validateEnum)
fd.getMessageTypes.asScala.foreach(validateMessage)
}
def validateEnum(e: EnumDescriptor): Unit = {
if (e.getValues.asScala.exists(_.getName.toUpperCase == "UNRECOGNIZED")) {
throw new GeneratorException(
s"The enum value 'UNRECOGNIZED' in ${e.getName} is not allowed due to conflict with the catch-all " +
"Unrecognized(v: Int) value.")
}
}
def validateMessage(m: Descriptor): Unit = {
m.getEnumTypes.asScala.foreach(validateEnum)
m.getNestedTypes.asScala.foreach(validateMessage)
m.getFields.asScala.foreach(validateField)
}
def validateField(fd: FieldDescriptor): Unit = {
if (ForbiddenFieldNames.contains(fd.scalaName))
throw new GeneratorException(
s"Field named '${fd.getName}' in message '${fd.getFullName}' is not allowed.")
}
}
## Instruction:
Add reference to how to use custom names.
## Code After:
package com.trueaccord.scalapb.compiler
import com.google.protobuf.Descriptors._
import scala.collection.JavaConverters._
class ProtoValidation(val params: GeneratorParams) extends DescriptorPimps {
val ForbiddenFieldNames = Set(
"hashCode", "equals", "clone", "finalize", "getClass", "notify", "notifyAll", "toString", "wait")
def validateFile(fd: FileDescriptor): Unit = {
fd.getEnumTypes.asScala.foreach(validateEnum)
fd.getMessageTypes.asScala.foreach(validateMessage)
}
def validateEnum(e: EnumDescriptor): Unit = {
if (e.getValues.asScala.exists(_.getName.toUpperCase == "UNRECOGNIZED")) {
throw new GeneratorException(
s"The enum value 'UNRECOGNIZED' in ${e.getName} is not allowed due to conflict with the catch-all " +
"Unrecognized(v: Int) value.")
}
}
def validateMessage(m: Descriptor): Unit = {
m.getEnumTypes.asScala.foreach(validateEnum)
m.getNestedTypes.asScala.foreach(validateMessage)
m.getFields.asScala.foreach(validateField)
}
def validateField(fd: FieldDescriptor): Unit = {
if (ForbiddenFieldNames.contains(fd.scalaName))
throw new GeneratorException(
s"Field named '${fd.getName}' in message '${fd.getFullName}' is not allowed. See https://scalapb.github.io/customizations.html#custom-names")
}
}
|
970af68b59cb444fe28656cf5a9bde54fb9a5c19
|
src/main/scala-2.11/com/sageserpent/plutonium/AbstractPatch.scala
|
src/main/scala-2.11/com/sageserpent/plutonium/AbstractPatch.scala
|
package com.sageserpent.plutonium
import java.lang.reflect.Method
import scala.reflect.runtime.universe._
/**
* Created by Gerard on 10/01/2016.
*/
object AbstractPatch {
def patchesAreRelated(lhs: AbstractPatch[_], rhs: AbstractPatch[_]): Boolean = {
val bothReferToTheSameItem = lhs.id == rhs.id && (lhs.capturedTypeTag.tpe <:< rhs.capturedTypeTag.tpe || rhs.capturedTypeTag.tpe <:< lhs.capturedTypeTag.tpe)
val bothReferToTheSameMethod = lhs.method == rhs.method
bothReferToTheSameItem && bothReferToTheSameMethod
}
}
abstract class AbstractPatch[Raw <: Identified: TypeTag](val id: Raw#Id, val method: Method){
val capturedTypeTag = typeTag[Raw]
def apply(identifiedItemFactory: IdentifiedItemAccess): Unit
def checkInvariant(scope: Scope): Unit
}
|
package com.sageserpent.plutonium
import java.lang.reflect.Method
import scala.reflect.runtime.universe._
/**
* Created by Gerard on 10/01/2016.
*/
object AbstractPatch {
def patchesAreRelated(lhs: AbstractPatch[_], rhs: AbstractPatch[_]): Boolean = {
val bothReferToTheSameItem = lhs.id == rhs.id && (lhs.capturedTypeTag.tpe <:< rhs.capturedTypeTag.tpe || rhs.capturedTypeTag.tpe <:< lhs.capturedTypeTag.tpe)
val bothReferToTheSameMethod = WorldReferenceImplementation.firstMethodIsOverrideCompatibleWithSecond(lhs.method, rhs.method) ||
WorldReferenceImplementation.firstMethodIsOverrideCompatibleWithSecond(rhs.method, lhs.method)
bothReferToTheSameItem && bothReferToTheSameMethod
}
}
abstract class AbstractPatch[Raw <: Identified: TypeTag](val id: Raw#Id, val method: Method){
val capturedTypeTag = typeTag[Raw]
def apply(identifiedItemFactory: IdentifiedItemAccess): Unit
def checkInvariant(scope: Scope): Unit
}
|
Fix test breakage revealed by previous commit. All tests pass now.
|
Fix test breakage revealed by previous commit. All tests pass now.
|
Scala
|
mit
|
sageserpent-open/open-plutonium
|
scala
|
## Code Before:
package com.sageserpent.plutonium
import java.lang.reflect.Method
import scala.reflect.runtime.universe._
/**
* Created by Gerard on 10/01/2016.
*/
object AbstractPatch {
def patchesAreRelated(lhs: AbstractPatch[_], rhs: AbstractPatch[_]): Boolean = {
val bothReferToTheSameItem = lhs.id == rhs.id && (lhs.capturedTypeTag.tpe <:< rhs.capturedTypeTag.tpe || rhs.capturedTypeTag.tpe <:< lhs.capturedTypeTag.tpe)
val bothReferToTheSameMethod = lhs.method == rhs.method
bothReferToTheSameItem && bothReferToTheSameMethod
}
}
abstract class AbstractPatch[Raw <: Identified: TypeTag](val id: Raw#Id, val method: Method){
val capturedTypeTag = typeTag[Raw]
def apply(identifiedItemFactory: IdentifiedItemAccess): Unit
def checkInvariant(scope: Scope): Unit
}
## Instruction:
Fix test breakage revealed by previous commit. All tests pass now.
## Code After:
package com.sageserpent.plutonium
import java.lang.reflect.Method
import scala.reflect.runtime.universe._
/**
* Created by Gerard on 10/01/2016.
*/
object AbstractPatch {
def patchesAreRelated(lhs: AbstractPatch[_], rhs: AbstractPatch[_]): Boolean = {
val bothReferToTheSameItem = lhs.id == rhs.id && (lhs.capturedTypeTag.tpe <:< rhs.capturedTypeTag.tpe || rhs.capturedTypeTag.tpe <:< lhs.capturedTypeTag.tpe)
val bothReferToTheSameMethod = WorldReferenceImplementation.firstMethodIsOverrideCompatibleWithSecond(lhs.method, rhs.method) ||
WorldReferenceImplementation.firstMethodIsOverrideCompatibleWithSecond(rhs.method, lhs.method)
bothReferToTheSameItem && bothReferToTheSameMethod
}
}
abstract class AbstractPatch[Raw <: Identified: TypeTag](val id: Raw#Id, val method: Method){
val capturedTypeTag = typeTag[Raw]
def apply(identifiedItemFactory: IdentifiedItemAccess): Unit
def checkInvariant(scope: Scope): Unit
}
|
a88748469678a8fcacc1b11ffe18b6b1b65278e6
|
app/views/sermons/_most_recent.html.haml
|
app/views/sermons/_most_recent.html.haml
|
.section
%h1 Latest Sermon
%h3= @last_sermon.title
%small= "#{@last_sermon.speaker} - #{@last_sermon.date_string} - #{@last_sermon.verses}"
.sermon-audio-container
= audio_tag @last_sermon.audio_file.url, controls: true, class: 'sermon-audio'
%hr
%ul.list-inline
%li
=link_to "Direct Link", @last_sermon
%li
=link_to "All Sermons", "sermons"
|
.section
%h1 Latest Sermon
%h3= @last_sermon.title
%small= "#{@last_sermon.speaker} - #{@last_sermon.date_string}"
.sermon-audio-container
= audio_tag @last_sermon.audio_file.url, controls: true, class: 'sermon-audio'
%hr
%ul.list-inline
%li
=link_to "Direct Link", @last_sermon
%li
=link_to "All Sermons", "sermons"
|
Remove verse ref from homepage sermon summary
|
Remove verse ref from homepage sermon summary
The verse list could get long, or may be missing. Other times there may
not be one central text, such that listing the verses wouldn't help much
immediately with describing this content.
Could work around to only show verses if present, only show primary verse
reference, or only show verses if sermon is flagged to do so. Not worth
jumping through the extra hoops for now.
|
Haml
|
mit
|
embell/CGBC-web,embell/CGBC-web,embell/CGBC-web
|
haml
|
## Code Before:
.section
%h1 Latest Sermon
%h3= @last_sermon.title
%small= "#{@last_sermon.speaker} - #{@last_sermon.date_string} - #{@last_sermon.verses}"
.sermon-audio-container
= audio_tag @last_sermon.audio_file.url, controls: true, class: 'sermon-audio'
%hr
%ul.list-inline
%li
=link_to "Direct Link", @last_sermon
%li
=link_to "All Sermons", "sermons"
## Instruction:
Remove verse ref from homepage sermon summary
The verse list could get long, or may be missing. Other times there may
not be one central text, such that listing the verses wouldn't help much
immediately with describing this content.
Could work around to only show verses if present, only show primary verse
reference, or only show verses if sermon is flagged to do so. Not worth
jumping through the extra hoops for now.
## Code After:
.section
%h1 Latest Sermon
%h3= @last_sermon.title
%small= "#{@last_sermon.speaker} - #{@last_sermon.date_string}"
.sermon-audio-container
= audio_tag @last_sermon.audio_file.url, controls: true, class: 'sermon-audio'
%hr
%ul.list-inline
%li
=link_to "Direct Link", @last_sermon
%li
=link_to "All Sermons", "sermons"
|
a24469a92d187342ff3186d93d2af0a10d0237c9
|
recipes/sympy/meta.yaml
|
recipes/sympy/meta.yaml
|
{% set version="1.0" %}
package:
name: sympy
version: {{ version }}
source:
fn: sympy-{{ version }}.tar.gz
url: https://pypi.python.org/packages/source/s/sympy/sympy-{{ version }}.tar.gz
md5: 43e797de799f00f9e8fd2307dba9fab1
build:
number: 0
script: python setup.py install
requirements:
build:
- fastcache
- mpmath
- python
run:
- fastcache
- mpmath >=0.19
- python
test:
commands:
- isympy -help
imports:
- sympy
about:
home: http://sympy.org
license: 3-clause BSD
license_family: BSD
license_file: LICENSE
summary: Python library for symbolic mathematics
description: |
SymPy is a Python library for symbolic mathematics. It aims to become a
full-featured computer algebra system (CAS) while keeping the code as
simple as possible in order to be comprehensible and easily extensible.
doc_url: http://docs.sympy.org/latest/index.html
dev_url: https://github.com/sympy/sympy
|
{% set version = "1.1" %}
package:
name: sympy
version: {{ version }}
source:
fn: sympy-{{ version }}.tar.gz
url: https://pypi.io/packages/source/s/sympy/sympy-{{ version }}.tar.gz
md5: e1b7a2b14066fc99c1cf22cedba56be8
build:
number: 0
script: python setup.py install
requirements:
build:
- fastcache
- mpmath
- python
run:
- fastcache
- mpmath >=0.19
- python
test:
commands:
- isympy -help
imports:
- sympy
about:
home: http://sympy.org
license: 3-clause BSD
license_family: BSD
license_file: LICENSE
summary: Python library for symbolic mathematics
description: |
SymPy is a Python library for symbolic mathematics. It aims to become a
full-featured computer algebra system (CAS) while keeping the code as
simple as possible in order to be comprehensible and easily extensible.
doc_url: http://docs.sympy.org/latest/index.html
dev_url: https://github.com/sympy/sympy
|
Update sympy recipe to version 1.1
|
Update sympy recipe to version 1.1
|
YAML
|
bsd-3-clause
|
jjhelmus/berryconda,jjhelmus/berryconda,jjhelmus/berryconda,jjhelmus/berryconda,jjhelmus/berryconda
|
yaml
|
## Code Before:
{% set version="1.0" %}
package:
name: sympy
version: {{ version }}
source:
fn: sympy-{{ version }}.tar.gz
url: https://pypi.python.org/packages/source/s/sympy/sympy-{{ version }}.tar.gz
md5: 43e797de799f00f9e8fd2307dba9fab1
build:
number: 0
script: python setup.py install
requirements:
build:
- fastcache
- mpmath
- python
run:
- fastcache
- mpmath >=0.19
- python
test:
commands:
- isympy -help
imports:
- sympy
about:
home: http://sympy.org
license: 3-clause BSD
license_family: BSD
license_file: LICENSE
summary: Python library for symbolic mathematics
description: |
SymPy is a Python library for symbolic mathematics. It aims to become a
full-featured computer algebra system (CAS) while keeping the code as
simple as possible in order to be comprehensible and easily extensible.
doc_url: http://docs.sympy.org/latest/index.html
dev_url: https://github.com/sympy/sympy
## Instruction:
Update sympy recipe to version 1.1
## Code After:
{% set version = "1.1" %}
package:
name: sympy
version: {{ version }}
source:
fn: sympy-{{ version }}.tar.gz
url: https://pypi.io/packages/source/s/sympy/sympy-{{ version }}.tar.gz
md5: e1b7a2b14066fc99c1cf22cedba56be8
build:
number: 0
script: python setup.py install
requirements:
build:
- fastcache
- mpmath
- python
run:
- fastcache
- mpmath >=0.19
- python
test:
commands:
- isympy -help
imports:
- sympy
about:
home: http://sympy.org
license: 3-clause BSD
license_family: BSD
license_file: LICENSE
summary: Python library for symbolic mathematics
description: |
SymPy is a Python library for symbolic mathematics. It aims to become a
full-featured computer algebra system (CAS) while keeping the code as
simple as possible in order to be comprehensible and easily extensible.
doc_url: http://docs.sympy.org/latest/index.html
dev_url: https://github.com/sympy/sympy
|
56c798c98761c11e98875240d7df2bd46c9afdfe
|
circle.yml
|
circle.yml
|
machine:
node:
version: 4.4.5
dependencies:
cache_directories:
- /home/ubuntu/nvm/versions/node/v4.4.5/bin
- /home/ubuntu/nvm/versions/node/v4.4.5/lib/node_modules
- node_modules
- bower_components
override:
- npm install -g bower
- npm install --cache-min Infinity
- bower install
- npm rebuild node-sass
deployment:
production:
branch: master
commands:
- 'node_modules/.bin/ember deploy production --activate'
staging:
branch: develop
commands:
- 'node_modules/.bin/ember deploy staging --activate'
|
machine:
node:
version: 4.4.5
dependencies:
cache_directories:
- /home/ubuntu/nvm/versions/node/v4.4.5/bin
- /home/ubuntu/nvm/versions/node/v4.4.5/lib/node_modules
- node_modules
- bower_components
override:
- npm install -g bower
- npm install
- bower install
- npm rebuild node-sass
deployment:
production:
branch: master
commands:
- 'node_modules/.bin/ember deploy production --activate'
staging:
branch: develop
commands:
- 'node_modules/.bin/ember deploy staging --activate'
|
Revert "Circle CI script changes for faster build times"
|
Revert "Circle CI script changes for faster build times"
|
YAML
|
mit
|
jderr-mx/code-corps-ember,code-corps/code-corps-ember,jderr-mx/code-corps-ember,code-corps/code-corps-ember
|
yaml
|
## Code Before:
machine:
node:
version: 4.4.5
dependencies:
cache_directories:
- /home/ubuntu/nvm/versions/node/v4.4.5/bin
- /home/ubuntu/nvm/versions/node/v4.4.5/lib/node_modules
- node_modules
- bower_components
override:
- npm install -g bower
- npm install --cache-min Infinity
- bower install
- npm rebuild node-sass
deployment:
production:
branch: master
commands:
- 'node_modules/.bin/ember deploy production --activate'
staging:
branch: develop
commands:
- 'node_modules/.bin/ember deploy staging --activate'
## Instruction:
Revert "Circle CI script changes for faster build times"
## Code After:
machine:
node:
version: 4.4.5
dependencies:
cache_directories:
- /home/ubuntu/nvm/versions/node/v4.4.5/bin
- /home/ubuntu/nvm/versions/node/v4.4.5/lib/node_modules
- node_modules
- bower_components
override:
- npm install -g bower
- npm install
- bower install
- npm rebuild node-sass
deployment:
production:
branch: master
commands:
- 'node_modules/.bin/ember deploy production --activate'
staging:
branch: develop
commands:
- 'node_modules/.bin/ember deploy staging --activate'
|
07db4df0b7e928622a46cd50dae5034d283d2781
|
composer.json
|
composer.json
|
{
"name": "milsdev/sarcofag",
"description": "Wordpress MU plugin which add to wp support for DI and MVC",
"type": "wordpress-muplugin",
"license": "GPL",
"authors": [
{
"name": "Mil's",
"email": "[email protected]"
}
],
"minimum-stability": "dev",
"require": {
"composer/installers": "~1.0",
"php-di/php-di": "5.2.2",
"slim/slim": "3.1",
"slim/php-view": "2.0.6",
"mobiledetect/mobiledetectlib": "2.8"
}
}
|
{
"name": "milsdev/sarcofag",
"description": "Wordpress MU plugin which add to wp support for DI and MVC",
"type": "wordpress-muplugin",
"license": "GPL",
"authors": [
{
"name": "Mil's",
"email": "[email protected]"
}
],
"require": {
"composer/installers": "~1.0",
"php-di/php-di": "5.2.2",
"slim/slim": "3.1",
"slim/php-view": "2.0.6",
"mobiledetect/mobiledetectlib": "2.8"
}
}
|
Add support for sarcofag to be installed in plugins dir.
|
Add support for sarcofag to be installed in plugins dir.
|
JSON
|
mit
|
milsdev/wordpress-plugin-sarcofag,milsdev/wordpress-plugin-sarcofag
|
json
|
## Code Before:
{
"name": "milsdev/sarcofag",
"description": "Wordpress MU plugin which add to wp support for DI and MVC",
"type": "wordpress-muplugin",
"license": "GPL",
"authors": [
{
"name": "Mil's",
"email": "[email protected]"
}
],
"minimum-stability": "dev",
"require": {
"composer/installers": "~1.0",
"php-di/php-di": "5.2.2",
"slim/slim": "3.1",
"slim/php-view": "2.0.6",
"mobiledetect/mobiledetectlib": "2.8"
}
}
## Instruction:
Add support for sarcofag to be installed in plugins dir.
## Code After:
{
"name": "milsdev/sarcofag",
"description": "Wordpress MU plugin which add to wp support for DI and MVC",
"type": "wordpress-muplugin",
"license": "GPL",
"authors": [
{
"name": "Mil's",
"email": "[email protected]"
}
],
"require": {
"composer/installers": "~1.0",
"php-di/php-di": "5.2.2",
"slim/slim": "3.1",
"slim/php-view": "2.0.6",
"mobiledetect/mobiledetectlib": "2.8"
}
}
|
2dccf1d9368e28d651f7a0aed6dd50171d90a456
|
api/app/views/spree/api/addresses/show.v1.rabl
|
api/app/views/spree/api/addresses/show.v1.rabl
|
object @address
attributes :id, :firstname, :lastname, :address1, :address2,
:city, :zipcode, :phone,
:company, :alternative_phone, :country_id, :state_id,
:state_name
child(:country) do |address|
attributes :id, :iso_name, :iso, :iso3, :name, :numcode
end
child(:state) do |address|
attributes :abbr, :country_id, :id, :name
end
|
object @address
attributes :id, :firstname, :lastname, :address1, :address2,
:city, :zipcode, :phone,
:company, :alternative_phone, :country_id, :state_id,
:state_name
child(:country) do |address|
attributes *country_attributes
end
child(:state) do |address|
attributes *state_attributes
end
|
Clean up addresses show rabl
|
Clean up addresses show rabl
|
Ruby
|
bsd-3-clause
|
gautamsawhney/spree,lsirivong/spree,JuandGirald/spree,shioyama/spree,LBRapid/spree,surfdome/spree,builtbybuffalo/spree,JuandGirald/spree,brchristian/spree,pjmj777/spree,omarsar/spree,TrialGuides/spree,project-eutopia/spree,imella/spree,CiscoCloud/spree,Nevensoft/spree,reinaris/spree,karlitxo/spree,shekibobo/spree,priyank-gupta/spree,Ropeney/spree,DynamoMTL/spree,ahmetabdi/spree,Lostmyname/spree,HealthWave/spree,tomash/spree,siddharth28/spree,edgward/spree,yomishra/pce,bjornlinder/Spree,keatonrow/spree,trigrass2/spree,tancnle/spree,jimblesm/spree,odk211/spree,welitonfreitas/spree,rakibulislam/spree,biagidp/spree,wolfieorama/spree,ujai/spree,yomishra/pce,lsirivong/solidus,yiqing95/spree,ramkumar-kr/spree,jsurdilla/solidus,calvinl/spree,scottcrawford03/solidus,SadTreeFriends/spree,adaddeo/spree,imella/spree,sideci-sample/sideci-sample-spree,odk211/spree,dafontaine/spree,ayb/spree,lsirivong/solidus,Senjai/spree,hoanghiep90/spree,project-eutopia/spree,bjornlinder/Spree,dafontaine/spree,CJMrozek/spree,NerdsvilleCEO/spree,tancnle/spree,reinaris/spree,Hawaiideveloper/shoppingcart,rbngzlv/spree,dandanwei/spree,sfcgeorge/spree,jparr/spree,softr8/spree,alejandromangione/spree,pulkit21/spree,bonobos/solidus,reidblomquist/spree,Arpsara/solidus,Hates/spree,bonobos/solidus,priyank-gupta/spree,bonobos/solidus,Hawaiideveloper/shoppingcart,Kagetsuki/spree,tesserakt/clean_spree,lsirivong/spree,richardnuno/solidus,archSeer/spree,knuepwebdev/FloatTubeRodHolders,sliaquat/spree,jhawthorn/spree,rakibulislam/spree,madetech/spree,calvinl/spree,quentinuys/spree,welitonfreitas/spree,beni55/spree,NerdsvilleCEO/spree,LBRapid/spree,ahmetabdi/spree,reidblomquist/spree,alvinjean/spree,JDutil/spree,gautamsawhney/spree,joanblake/spree,surfdome/spree,DynamoMTL/spree,richardnuno/solidus,net2b/spree,moneyspyder/spree,SadTreeFriends/spree,locomotivapro/spree,assembledbrands/spree,ramkumar-kr/spree,jspizziri/spree,caiqinghua/spree,Hates/spree,builtbybuffalo/spree,alvinjean/spree,beni55/spree,joanblake/spree,yushine/spree,mindvolt/spree,KMikhaylovCTG/spree,richardnuno/solidus,project-eutopia/spree,abhishekjain16/spree,progsri/spree,robodisco/spree,ujai/spree,mindvolt/spree,Senjai/spree,project-eutopia/spree,patdec/spree,azclick/spree,shekibobo/spree,rajeevriitm/spree,azclick/spree,agient/agientstorefront,Nevensoft/spree,keatonrow/spree,athal7/solidus,zamiang/spree,scottcrawford03/solidus,pulkit21/spree,piousbox/spree,pervino/spree,caiqinghua/spree,quentinuys/spree,Antdesk/karpal-spree,berkes/spree,quentinuys/spree,urimikhli/spree,Kagetsuki/spree,archSeer/spree,pulkit21/spree,keatonrow/spree,jordan-brough/spree,Hawaiideveloper/shoppingcart,pjmj777/spree,builtbybuffalo/spree,jordan-brough/solidus,carlesjove/spree,raow/spree,ujai/spree,sunny2601/spree,knuepwebdev/FloatTubeRodHolders,madetech/spree,sunny2601/spree,Hates/spree,njerrywerry/spree,alepore/spree,dandanwei/spree,ayb/spree,abhishekjain16/spree,JDutil/spree,lsirivong/spree,scottcrawford03/solidus,watg/spree,softr8/spree,vinsol/spree,orenf/spree,Migweld/spree,priyank-gupta/spree,knuepwebdev/FloatTubeRodHolders,jspizziri/spree,Nevensoft/spree,vulk/spree,progsri/spree,bjornlinder/Spree,AgilTec/spree,tesserakt/clean_spree,delphsoft/spree-store-ballchair,shekibobo/spree,PhoenixTeam/spree_phoenix,piousbox/spree,kitwalker12/spree,alvinjean/spree,pervino/solidus,progsri/spree,bricesanchez/spree,cutefrank/spree,agient/agientstorefront,assembledbrands/spree,derekluo/spree,shaywood2/spree,camelmasa/spree,athal7/solidus,welitonfreitas/spree,tesserakt/clean_spree,DynamoMTL/spree,moneyspyder/spree,Ropeney/spree,CiscoCloud/spree,codesavvy/sandbox,APohio/spree,pervino/spree,RatioClothing/spree,mleglise/spree,vinsol/spree,TimurTarasenko/spree,gautamsawhney/spree,rbngzlv/spree,CiscoCloud/spree,softr8/spree,wolfieorama/spree,xuewenfei/solidus,vinsol/spree,miyazawatomoka/spree,StemboltHQ/spree,dafontaine/spree,omarsar/spree,jeffboulet/spree,robodisco/spree,forkata/solidus,shioyama/spree,njerrywerry/spree,alvinjean/spree,firman/spree,ckk-scratch/solidus,kewaunited/spree,forkata/solidus,codesavvy/sandbox,gautamsawhney/spree,reidblomquist/spree,moneyspyder/spree,quentinuys/spree,grzlus/solidus,Arpsara/solidus,LBRapid/spree,freerunningtech/spree,cutefrank/spree,thogg4/spree,APohio/spree,shaywood2/spree,berkes/spree,sfcgeorge/spree,xuewenfei/solidus,mleglise/spree,Engeltj/spree,adaddeo/spree,dafontaine/spree,Engeltj/spree,volpejoaquin/spree,nooysters/spree,pervino/solidus,degica/spree,omarsar/spree,devilcoders/solidus,vinsol/spree,keatonrow/spree,radarseesradar/spree,biagidp/spree,Kagetsuki/spree,brchristian/spree,camelmasa/spree,Boomkat/spree,jimblesm/spree,jordan-brough/solidus,gregoryrikson/spree-sample,Antdesk/karpal-spree,sfcgeorge/spree,RatioClothing/spree,Nevensoft/spree,rajeevriitm/spree,azranel/spree,adaddeo/spree,imella/spree,madetech/spree,zamiang/spree,trigrass2/spree,jsurdilla/solidus,PhoenixTeam/spree_phoenix,delphsoft/spree-store-ballchair,woboinc/spree,pjmj777/spree,mleglise/spree,derekluo/spree,odk211/spree,watg/spree,zamiang/spree,jeffboulet/spree,shioyama/spree,groundctrl/spree,Migweld/spree,ramkumar-kr/spree,volpejoaquin/spree,Kagetsuki/spree,Mayvenn/spree,yiqing95/spree,AgilTec/spree,ahmetabdi/spree,patdec/spree,shaywood2/spree,nooysters/spree,tancnle/spree,grzlus/spree,Senjai/solidus,pervino/spree,fahidnasir/spree,miyazawatomoka/spree,devilcoders/solidus,robodisco/spree,DarkoP/spree,codesavvy/sandbox,athal7/solidus,xuewenfei/solidus,jimblesm/spree,JDutil/spree,Mayvenn/spree,pulkit21/spree,Boomkat/spree,Lostmyname/spree,madetech/spree,patdec/spree,volpejoaquin/spree,agient/agientstorefront,shekibobo/spree,joanblake/spree,vcavallo/spree,tailic/spree,jparr/spree,forkata/solidus,urimikhli/spree,kitwalker12/spree,calvinl/spree,Senjai/solidus,jordan-brough/spree,locomotivapro/spree,JDutil/spree,SadTreeFriends/spree,forkata/solidus,lyzxsc/spree,sideci-sample/sideci-sample-spree,wolfieorama/spree,lsirivong/solidus,Machpowersystems/spree_mach,AgilTec/spree,yiqing95/spree,radarseesradar/spree,camelmasa/spree,NerdsvilleCEO/spree,azranel/spree,CJMrozek/spree,alepore/spree,Ropeney/spree,vulk/spree,grzlus/spree,gregoryrikson/spree-sample,FadliKun/spree,raow/spree,lsirivong/solidus,Boomkat/spree,azranel/spree,softr8/spree,raow/spree,devilcoders/solidus,grzlus/solidus,orenf/spree,zaeznet/spree,AgilTec/spree,sfcgeorge/spree,KMikhaylovCTG/spree,TimurTarasenko/spree,kitwalker12/spree,KMikhaylovCTG/spree,jspizziri/spree,yushine/spree,zaeznet/spree,jeffboulet/spree,lyzxsc/spree,shaywood2/spree,rbngzlv/spree,hifly/spree,miyazawatomoka/spree,karlitxo/spree,freerunningtech/spree,Migweld/spree,Mayvenn/spree,pervino/solidus,DarkoP/spree,brchristian/spree,sliaquat/spree,CJMrozek/spree,alejandromangione/spree,Mayvenn/spree,thogg4/spree,derekluo/spree,progsri/spree,ayb/spree,Antdesk/karpal-spree,groundctrl/spree,kewaunited/spree,JuandGirald/spree,vinayvinsol/spree,abhishekjain16/spree,ckk-scratch/solidus,Machpowersystems/spree_mach,lyzxsc/spree,jordan-brough/spree,cutefrank/spree,vulk/spree,assembledbrands/spree,Engeltj/spree,useiichi/spree,Hawaiideveloper/shoppingcart,richardnuno/solidus,Boomkat/spree,delphsoft/spree-store-ballchair,jasonfb/spree,carlesjove/spree,azclick/spree,vinayvinsol/spree,jhawthorn/spree,vinayvinsol/spree,groundctrl/spree,archSeer/spree,Lostmyname/spree,edgward/spree,HealthWave/spree,watg/spree,xuewenfei/solidus,grzlus/spree,firman/spree,siddharth28/spree,agient/agientstorefront,Hates/spree,azclick/spree,alejandromangione/spree,DarkoP/spree,APohio/spree,Senjai/spree,nooysters/spree,Migweld/spree,KMikhaylovCTG/spree,rakibulislam/spree,beni55/spree,moneyspyder/spree,fahidnasir/spree,useiichi/spree,zaeznet/spree,zamiang/spree,thogg4/spree,radarseesradar/spree,reinaris/spree,jordan-brough/solidus,hifly/spree,tomash/spree,jparr/spree,Arpsara/solidus,berkes/spree,dotandbo/spree,TrialGuides/spree,vulk/spree,trigrass2/spree,athal7/solidus,archSeer/spree,sunny2601/spree,orenf/spree,NerdsvilleCEO/spree,vmatekole/spree,woboinc/spree,jordan-brough/solidus,pervino/solidus,locomotivapro/spree,codesavvy/sandbox,tomash/spree,DynamoMTL/spree,adaddeo/spree,maybii/spree,PhoenixTeam/spree_phoenix,ahmetabdi/spree,firman/spree,groundctrl/spree,ckk-scratch/solidus,maybii/spree,jaspreet21anand/spree,biagidp/spree,reidblomquist/spree,jasonfb/spree,brchristian/spree,calvinl/spree,vcavallo/spree,maybii/spree,jasonfb/spree,nooysters/spree,camelmasa/spree,dandanwei/spree,SadTreeFriends/spree,kewaunited/spree,TimurTarasenko/spree,Machpowersystems/spree_mach,jsurdilla/solidus,Lostmyname/spree,zaeznet/spree,njerrywerry/spree,TrialGuides/spree,berkes/spree,gregoryrikson/spree-sample,njerrywerry/spree,Senjai/solidus,omarsar/spree,jspizziri/spree,dotandbo/spree,tancnle/spree,cutefrank/spree,lsirivong/spree,tomash/spree,jasonfb/spree,rajeevriitm/spree,scottcrawford03/solidus,PhoenixTeam/spree_phoenix,abhishekjain16/spree,CJMrozek/spree,wolfieorama/spree,surfdome/spree,hifly/spree,maybii/spree,alepore/spree,vmatekole/spree,Arpsara/solidus,tailic/spree,jaspreet21anand/spree,edgward/spree,yushine/spree,jaspreet21anand/spree,net2b/spree,karlitxo/spree,welitonfreitas/spree,rajeevriitm/spree,DarkoP/spree,CiscoCloud/spree,ramkumar-kr/spree,mindvolt/spree,joanblake/spree,carlesjove/spree,mindvolt/spree,reinaris/spree,yomishra/pce,HealthWave/spree,net2b/spree,grzlus/spree,vcavallo/spree,miyazawatomoka/spree,karlitxo/spree,bricesanchez/spree,piousbox/spree,useiichi/spree,derekluo/spree,vmatekole/spree,hoanghiep90/spree,pervino/spree,tesserakt/clean_spree,bonobos/solidus,net2b/spree,firman/spree,vcavallo/spree,tailic/spree,jhawthorn/spree,StemboltHQ/spree,hifly/spree,jparr/spree,piousbox/spree,hoanghiep90/spree,delphsoft/spree-store-ballchair,sideci-sample/sideci-sample-spree,dotandbo/spree,jsurdilla/solidus,rakibulislam/spree,bricesanchez/spree,radarseesradar/spree,hoanghiep90/spree,fahidnasir/spree,locomotivapro/spree,odk211/spree,Ropeney/spree,FadliKun/spree,surfdome/spree,thogg4/spree,urimikhli/spree,yushine/spree,sliaquat/spree,dandanwei/spree,raow/spree,builtbybuffalo/spree,FadliKun/spree,volpejoaquin/spree,siddharth28/spree,fahidnasir/spree,woboinc/spree,rbngzlv/spree,sunny2601/spree,yiqing95/spree,ckk-scratch/solidus,edgward/spree,APohio/spree,beni55/spree,sliaquat/spree,vmatekole/spree,gregoryrikson/spree-sample,StemboltHQ/spree,robodisco/spree,vinayvinsol/spree,trigrass2/spree,azranel/spree,caiqinghua/spree,TimurTarasenko/spree,devilcoders/solidus,TrialGuides/spree,grzlus/solidus,FadliKun/spree,ayb/spree,lyzxsc/spree,JuandGirald/spree,jaspreet21anand/spree,freerunningtech/spree,jimblesm/spree,caiqinghua/spree,degica/spree,Senjai/solidus,RatioClothing/spree,siddharth28/spree,dotandbo/spree,kewaunited/spree,degica/spree,priyank-gupta/spree,patdec/spree,useiichi/spree,grzlus/solidus,orenf/spree,jeffboulet/spree,carlesjove/spree,alejandromangione/spree,Engeltj/spree,mleglise/spree
|
ruby
|
## Code Before:
object @address
attributes :id, :firstname, :lastname, :address1, :address2,
:city, :zipcode, :phone,
:company, :alternative_phone, :country_id, :state_id,
:state_name
child(:country) do |address|
attributes :id, :iso_name, :iso, :iso3, :name, :numcode
end
child(:state) do |address|
attributes :abbr, :country_id, :id, :name
end
## Instruction:
Clean up addresses show rabl
## Code After:
object @address
attributes :id, :firstname, :lastname, :address1, :address2,
:city, :zipcode, :phone,
:company, :alternative_phone, :country_id, :state_id,
:state_name
child(:country) do |address|
attributes *country_attributes
end
child(:state) do |address|
attributes *state_attributes
end
|
ca97517795ba44e89ef71cf08768e461a1c49581
|
tests/integration/files/file/base/ssh_state_tests.sls
|
tests/integration/files/file/base/ssh_state_tests.sls
|
ssh-file-test:
file.managed:
- name: /tmp/test
- contents: 'test'
|
{% set jinja = 'test' %}
ssh-file-test:
file.managed:
- name: /tmp/{{ jinja }}
- contents: 'test'
|
Add jinja to ssh sls test file
|
Add jinja to ssh sls test file
|
SaltStack
|
apache-2.0
|
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
|
saltstack
|
## Code Before:
ssh-file-test:
file.managed:
- name: /tmp/test
- contents: 'test'
## Instruction:
Add jinja to ssh sls test file
## Code After:
{% set jinja = 'test' %}
ssh-file-test:
file.managed:
- name: /tmp/{{ jinja }}
- contents: 'test'
|
39fe09cf9cd85ad89af6c49d83ae9b84eabe6a53
|
src/server/controllers/userController.js
|
src/server/controllers/userController.js
|
const User = require('../../models/User');
const Elo = require('arpad');
function findUsersOfLeague(req, res) {
User.findAll({ where: { league: req.params.league } }).then((data) => {
console.log(data);
res.json(data)
});
}
function findUser(req, res) {
User.find({ where: { username: req.params.username } }).then((data) => {
console.log(data);
res.json(data)
});
}
function getNewElo(req, res) {
let user1;
let user2;
const elo = new Elo();
const user1Promise = User.findOne({ where: { username: req.params.username1 } }).then(data => { user1 = data; })
const user2Promise = User.findOne({ where: { username: req.params.username2 } }).then(data => { user2 = data; })
Promise.all([user1Promise, user2Promise]).then((fullfill, reject) => {
const newUser1Elo = elo.newRatingIfWon(user1.elo, user2.elo);
const newUser2Elo = elo.newRatingIfLost(user2.elo, user1.elo);
console.log({ yourNewElo: newUser1Elo, theirNewElo: newUser2Elo })
res.json({ yourNewElo: newUser1Elo, theirNewElo: newUser2Elo });
})
}
module.exports = { findUsersOfLeague, getNewElo };
|
const User = require('../../models/User');
const Elo = require('arpad');
function findUsersOfLeague(req, res) {
User.findAll({ where: { league: req.params.league } }).then((data) => {
console.log(data);
res.json(data)
});
}
function findUser(req, res) {
User.find({ where: { username: req.params.username } }).then((data) => {
console.log(data);
res.json(data)
});
}
function getNewElo(req, res) {
let user1;
let user2;
const elo = new Elo();
const user1Promise = User.findOne({ where: { username: req.params.username1 } }).then(data => { user1 = data; })
const user2Promise = User.findOne({ where: { username: req.params.username2 } }).then(data => { user2 = data; })
Promise.all([user1Promise, user2Promise]).then(() => {
user1.update({'elo': elo.newRatingIfWon(user1.elo, user2.elo)})
.then(user2.update({'elo': elo.newRatingIfLost(user2.elo, user1.elo)}))
.then(res.json('updated elo in postgres'));
})
}
module.exports = { findUsersOfLeague, getNewElo };
|
Update elo in database on click
|
Update elo in database on click
|
JavaScript
|
apache-2.0
|
wdavew/king-pong
|
javascript
|
## Code Before:
const User = require('../../models/User');
const Elo = require('arpad');
function findUsersOfLeague(req, res) {
User.findAll({ where: { league: req.params.league } }).then((data) => {
console.log(data);
res.json(data)
});
}
function findUser(req, res) {
User.find({ where: { username: req.params.username } }).then((data) => {
console.log(data);
res.json(data)
});
}
function getNewElo(req, res) {
let user1;
let user2;
const elo = new Elo();
const user1Promise = User.findOne({ where: { username: req.params.username1 } }).then(data => { user1 = data; })
const user2Promise = User.findOne({ where: { username: req.params.username2 } }).then(data => { user2 = data; })
Promise.all([user1Promise, user2Promise]).then((fullfill, reject) => {
const newUser1Elo = elo.newRatingIfWon(user1.elo, user2.elo);
const newUser2Elo = elo.newRatingIfLost(user2.elo, user1.elo);
console.log({ yourNewElo: newUser1Elo, theirNewElo: newUser2Elo })
res.json({ yourNewElo: newUser1Elo, theirNewElo: newUser2Elo });
})
}
module.exports = { findUsersOfLeague, getNewElo };
## Instruction:
Update elo in database on click
## Code After:
const User = require('../../models/User');
const Elo = require('arpad');
function findUsersOfLeague(req, res) {
User.findAll({ where: { league: req.params.league } }).then((data) => {
console.log(data);
res.json(data)
});
}
function findUser(req, res) {
User.find({ where: { username: req.params.username } }).then((data) => {
console.log(data);
res.json(data)
});
}
function getNewElo(req, res) {
let user1;
let user2;
const elo = new Elo();
const user1Promise = User.findOne({ where: { username: req.params.username1 } }).then(data => { user1 = data; })
const user2Promise = User.findOne({ where: { username: req.params.username2 } }).then(data => { user2 = data; })
Promise.all([user1Promise, user2Promise]).then(() => {
user1.update({'elo': elo.newRatingIfWon(user1.elo, user2.elo)})
.then(user2.update({'elo': elo.newRatingIfLost(user2.elo, user1.elo)}))
.then(res.json('updated elo in postgres'));
})
}
module.exports = { findUsersOfLeague, getNewElo };
|
b5aa0b900c8de79ab6a567600551e7ec33f9993a
|
src/packages/collaboration/lib/session-utils.coffee
|
src/packages/collaboration/lib/session-utils.coffee
|
Peer = require './peer'
Guid = require 'guid'
module.exports =
createPeer: ->
id = Guid.create().toString()
new Peer(id, host: 'ec2-54-218-51-127.us-west-2.compute.amazonaws.com', port: 8080)
connectDocument: (doc, connection) ->
doc.outputEvents.on 'changed', (event) ->
console.log 'sending event', event
connection.send(event)
connection.on 'data', (event) ->
console.log 'receiving event', event
doc.handleInputEvent(event)
|
Peer = require './peer'
Guid = require 'guid'
module.exports =
createPeer: ->
id = Guid.create().toString()
new Peer(id, host: 'ec2-54-218-51-127.us-west-2.compute.amazonaws.com', port: 8080)
connectDocument: (doc, connection) ->
outputListener = (event) ->
console.log 'sending event', event
connection.send(event)
doc.outputEvents.on('changed', outputListener)
connection.on 'data', (event) ->
console.log 'receiving event', event
doc.handleInputEvent(event)
connection.on 'close', ->
doc.outputEvents.removeListener('changed', outputListener)
|
Remove output listener when connection is closed
|
Remove output listener when connection is closed
|
CoffeeScript
|
mit
|
gisenberg/atom,vhutheesing/atom,gzzhanghao/atom,basarat/atom,jtrose2/atom,sebmck/atom,rsvip/aTom,dannyflax/atom,mdumrauf/atom,dannyflax/atom,johnrizzo1/atom,medovob/atom,yalexx/atom,Jandersolutions/atom,mnquintana/atom,rsvip/aTom,dijs/atom,kdheepak89/atom,Abdillah/atom,johnhaley81/atom,AlisaKiatkongkumthon/atom,me6iaton/atom,Jandersolutions/atom,champagnez/atom,dkfiresky/atom,targeter21/atom,synaptek/atom,nvoron23/atom,rxkit/atom,alexandergmann/atom,ilovezy/atom,xream/atom,Mokolea/atom,sillvan/atom,liuxiong332/atom,burodepeper/atom,rmartin/atom,sotayamashita/atom,chengky/atom,devoncarew/atom,Rodjana/atom,svanharmelen/atom,fedorov/atom,lovesnow/atom,RobinTec/atom,MjAbuz/atom,efatsi/atom,kdheepak89/atom,ilovezy/atom,champagnez/atom,jjz/atom,dsandstrom/atom,bcoe/atom,yomybaby/atom,rxkit/atom,harshdattani/atom,h0dgep0dge/atom,burodepeper/atom,transcranial/atom,fredericksilva/atom,jlord/atom,fang-yufeng/atom,batjko/atom,targeter21/atom,h0dgep0dge/atom,g2p/atom,Jandersoft/atom,PKRoma/atom,fredericksilva/atom,vjeux/atom,CraZySacX/atom,stinsonga/atom,ObviouslyGreen/atom,hellendag/atom,dkfiresky/atom,batjko/atom,xream/atom,cyzn/atom,boomwaiza/atom,chengky/atom,Galactix/atom,omarhuanca/atom,beni55/atom,rlugojr/atom,mertkahyaoglu/atom,AlbertoBarrago/atom,phord/atom,hagb4rd/atom,rjattrill/atom,hharchani/atom,basarat/atom,devoncarew/atom,erikhakansson/atom,beni55/atom,kjav/atom,hharchani/atom,Jandersolutions/atom,NunoEdgarGub1/atom,ilovezy/atom,deoxilix/atom,h0dgep0dge/atom,RobinTec/atom,sekcheong/atom,sillvan/atom,jeremyramin/atom,rlugojr/atom,deoxilix/atom,mnquintana/atom,kdheepak89/atom,sebmck/atom,mostafaeweda/atom,gisenberg/atom,Ju2ender/atom,brettle/atom,rjattrill/atom,crazyquark/atom,ironbox360/atom,gontadu/atom,Austen-G/BlockBuilder,Jandersolutions/atom,MjAbuz/atom,woss/atom,kjav/atom,Klozz/atom,ezeoleaf/atom,kdheepak89/atom,GHackAnonymous/atom,palita01/atom,ardeshirj/atom,andrewleverette/atom,mnquintana/atom,lpommers/atom,nvoron23/atom,GHackAnonymous/atom,nrodriguez13/atom,NunoEdgarGub1/atom,stinsonga/atom,pkdevbox/atom,lisonma/atom,tony612/atom,matthewclendening/atom,devoncarew/atom,paulcbetts/atom,abe33/atom,vcarrera/atom,lovesnow/atom,FoldingText/atom,liuxiong332/atom,AlexxNica/atom,sxgao3001/atom,G-Baby/atom,elkingtonmcb/atom,dannyflax/atom,hagb4rd/atom,Andrey-Pavlov/atom,bj7/atom,NunoEdgarGub1/atom,ali/atom,alfredxing/atom,yomybaby/atom,deepfox/atom,0x73/atom,targeter21/atom,PKRoma/atom,oggy/atom,hellendag/atom,Huaraz2/atom,basarat/atom,rsvip/aTom,ObviouslyGreen/atom,execjosh/atom,SlimeQ/atom,palita01/atom,Ju2ender/atom,originye/atom,jordanbtucker/atom,G-Baby/atom,tony612/atom,Huaraz2/atom,panuchart/atom,constanzaurzua/atom,gabrielPeart/atom,amine7536/atom,SlimeQ/atom,hellendag/atom,hagb4rd/atom,brumm/atom,YunchengLiao/atom,jeremyramin/atom,sxgao3001/atom,Neron-X5/atom,FoldingText/atom,paulcbetts/atom,dkfiresky/atom,FIT-CSE2410-A-Bombs/atom,rlugojr/atom,Jandersolutions/atom,fang-yufeng/atom,johnrizzo1/atom,scv119/atom,yangchenghu/atom,Austen-G/BlockBuilder,dsandstrom/atom,qiujuer/atom,hpham04/atom,rmartin/atom,Rychard/atom,dkfiresky/atom,folpindo/atom,qskycolor/atom,darwin/atom,fang-yufeng/atom,decaffeinate-examples/atom,batjko/atom,gabrielPeart/atom,codex8/atom,oggy/atom,YunchengLiao/atom,jordanbtucker/atom,Shekharrajak/atom,dsandstrom/atom,Hasimir/atom,ppamorim/atom,kaicataldo/atom,batjko/atom,fedorov/atom,pengshp/atom,githubteacher/atom,batjko/atom,jlord/atom,mertkahyaoglu/atom,Arcanemagus/atom,einarmagnus/atom,efatsi/atom,FoldingText/atom,gisenberg/atom,einarmagnus/atom,bcoe/atom,andrewleverette/atom,Dennis1978/atom,scippio/atom,constanzaurzua/atom,hagb4rd/atom,GHackAnonymous/atom,mrodalgaard/atom,lisonma/atom,dijs/atom,lisonma/atom,ReddTea/atom,mrodalgaard/atom,Rychard/atom,lisonma/atom,phord/atom,n-riesco/atom,tanin47/atom,ashneo76/atom,niklabh/atom,wiggzz/atom,sekcheong/atom,vhutheesing/atom,ivoadf/atom,gontadu/atom,champagnez/atom,woss/atom,PKRoma/atom,hagb4rd/atom,kandros/atom,vinodpanicker/atom,bolinfest/atom,bencolon/atom,ardeshirj/atom,elkingtonmcb/atom,FIT-CSE2410-A-Bombs/atom,KENJU/atom,jlord/atom,bryonwinger/atom,vinodpanicker/atom,erikhakansson/atom,tony612/atom,FIT-CSE2410-A-Bombs/atom,Jdesk/atom,john-kelly/atom,davideg/atom,florianb/atom,davideg/atom,tanin47/atom,phord/atom,helber/atom,synaptek/atom,bencolon/atom,SlimeQ/atom,crazyquark/atom,kjav/atom,toqz/atom,kc8wxm/atom,splodingsocks/atom,anuwat121/atom,0x73/atom,john-kelly/atom,ilovezy/atom,vinodpanicker/atom,KENJU/atom,kevinrenaers/atom,rjattrill/atom,mertkahyaoglu/atom,lovesnow/atom,decaffeinate-examples/atom,BogusCurry/atom,sekcheong/atom,ezeoleaf/atom,fscherwi/atom,bcoe/atom,ivoadf/atom,transcranial/atom,n-riesco/atom,sillvan/atom,dijs/atom,bcoe/atom,woss/atom,palita01/atom,pombredanne/atom,cyzn/atom,synaptek/atom,h0dgep0dge/atom,john-kelly/atom,charleswhchan/atom,rsvip/aTom,devmario/atom,bradgearon/atom,wiggzz/atom,isghe/atom,vcarrera/atom,jtrose2/atom,boomwaiza/atom,prembasumatary/atom,Ingramz/atom,gzzhanghao/atom,AdrianVovk/substance-ide,gisenberg/atom,isghe/atom,FoldingText/atom,cyzn/atom,helber/atom,qskycolor/atom,Sangaroonaom/atom,jlord/atom,hakatashi/atom,nvoron23/atom,AlisaKiatkongkumthon/atom,qiujuer/atom,johnrizzo1/atom,AdrianVovk/substance-ide,MjAbuz/atom,john-kelly/atom,ReddTea/atom,niklabh/atom,matthewclendening/atom,yalexx/atom,jacekkopecky/atom,Ju2ender/atom,alfredxing/atom,fredericksilva/atom,deepfox/atom,ykeisuke/atom,wiggzz/atom,darwin/atom,jacekkopecky/atom,jlord/atom,avdg/atom,paulcbetts/atom,lpommers/atom,mostafaeweda/atom,ykeisuke/atom,originye/atom,rjattrill/atom,devoncarew/atom,tmunro/atom,bj7/atom,constanzaurzua/atom,ironbox360/atom,DiogoXRP/atom,bryonwinger/atom,yalexx/atom,Abdillah/atom,Hasimir/atom,ezeoleaf/atom,kittens/atom,russlescai/atom,bsmr-x-script/atom,oggy/atom,prembasumatary/atom,rmartin/atom,Hasimir/atom,rmartin/atom,charleswhchan/atom,KENJU/atom,xream/atom,qiujuer/atom,githubteacher/atom,hharchani/atom,GHackAnonymous/atom,decaffeinate-examples/atom,lovesnow/atom,prembasumatary/atom,kittens/atom,ironbox360/atom,alexandergmann/atom,sillvan/atom,daxlab/atom,hpham04/atom,acontreras89/atom,sxgao3001/atom,deepfox/atom,YunchengLiao/atom,yamhon/atom,Sangaroonaom/atom,abcP9110/atom,Jdesk/atom,001szymon/atom,nrodriguez13/atom,vinodpanicker/atom,me6iaton/atom,me-benni/atom,dannyflax/atom,tmunro/atom,deepfox/atom,omarhuanca/atom,splodingsocks/atom,Rychard/atom,ashneo76/atom,toqz/atom,deoxilix/atom,isghe/atom,liuderchi/atom,fedorov/atom,Jandersoft/atom,sillvan/atom,dsandstrom/atom,targeter21/atom,tisu2tisu/atom,anuwat121/atom,tanin47/atom,mertkahyaoglu/atom,abe33/atom,svanharmelen/atom,AlexxNica/atom,RuiDGoncalves/atom,ralphtheninja/atom,john-kelly/atom,AlbertoBarrago/atom,Austen-G/BlockBuilder,Neron-X5/atom,synaptek/atom,jeremyramin/atom,fang-yufeng/atom,Abdillah/atom,hakatashi/atom,devmario/atom,t9md/atom,ali/atom,basarat/atom,decaffeinate-examples/atom,Huaraz2/atom,DiogoXRP/atom,harshdattani/atom,yomybaby/atom,ardeshirj/atom,t9md/atom,yalexx/atom,nvoron23/atom,isghe/atom,crazyquark/atom,elkingtonmcb/atom,jtrose2/atom,t9md/atom,medovob/atom,mdumrauf/atom,githubteacher/atom,florianb/atom,fredericksilva/atom,ashneo76/atom,ilovezy/atom,yamhon/atom,fscherwi/atom,hakatashi/atom,mnquintana/atom,florianb/atom,ppamorim/atom,toqz/atom,tisu2tisu/atom,G-Baby/atom,g2p/atom,0x73/atom,crazyquark/atom,bryonwinger/atom,SlimeQ/atom,lisonma/atom,chfritz/atom,bencolon/atom,NunoEdgarGub1/atom,davideg/atom,Locke23rus/atom,jjz/atom,gzzhanghao/atom,Dennis1978/atom,sebmck/atom,sxgao3001/atom,Shekharrajak/atom,einarmagnus/atom,daxlab/atom,Shekharrajak/atom,pengshp/atom,Jandersoft/atom,crazyquark/atom,jacekkopecky/atom,burodepeper/atom,bsmr-x-script/atom,tony612/atom,kevinrenaers/atom,pombredanne/atom,sebmck/atom,basarat/atom,matthewclendening/atom,woss/atom,acontreras89/atom,me6iaton/atom,Austen-G/BlockBuilder,omarhuanca/atom,chengky/atom,Hasimir/atom,scippio/atom,jacekkopecky/atom,bj7/atom,AlbertoBarrago/atom,Klozz/atom,BogusCurry/atom,devmario/atom,davideg/atom,scv119/atom,bradgearon/atom,atom/atom,bcoe/atom,Austen-G/BlockBuilder,mostafaeweda/atom,russlescai/atom,toqz/atom,tjkr/atom,rsvip/aTom,jacekkopecky/atom,vcarrera/atom,mrodalgaard/atom,Galactix/atom,Sangaroonaom/atom,seedtigo/atom,Jandersoft/atom,isghe/atom,devoncarew/atom,KENJU/atom,folpindo/atom,niklabh/atom,nrodriguez13/atom,Klozz/atom,RobinTec/atom,constanzaurzua/atom,kaicataldo/atom,einarmagnus/atom,Arcanemagus/atom,einarmagnus/atom,charleswhchan/atom,Mokolea/atom,gontadu/atom,sotayamashita/atom,stinsonga/atom,fscherwi/atom,erikhakansson/atom,gisenberg/atom,davideg/atom,Andrey-Pavlov/atom,stuartquin/atom,n-riesco/atom,deepfox/atom,MjAbuz/atom,mertkahyaoglu/atom,woss/atom,n-riesco/atom,Neron-X5/atom,execjosh/atom,ivoadf/atom,chfritz/atom,vjeux/atom,splodingsocks/atom,lpommers/atom,sxgao3001/atom,sotayamashita/atom,RobinTec/atom,Shekharrajak/atom,rmartin/atom,bolinfest/atom,charleswhchan/atom,darwin/atom,liuxiong332/atom,prembasumatary/atom,AdrianVovk/substance-ide,transcranial/atom,vjeux/atom,Hasimir/atom,ReddTea/atom,hpham04/atom,yangchenghu/atom,execjosh/atom,prembasumatary/atom,gabrielPeart/atom,basarat/atom,vcarrera/atom,targeter21/atom,Jonekee/atom,rookie125/atom,AlexxNica/atom,beni55/atom,matthewclendening/atom,Galactix/atom,tisu2tisu/atom,Abdillah/atom,mostafaeweda/atom,paulcbetts/atom,kandros/atom,hpham04/atom,nvoron23/atom,DiogoXRP/atom,bsmr-x-script/atom,YunchengLiao/atom,jtrose2/atom,chengky/atom,medovob/atom,Galactix/atom,amine7536/atom,florianb/atom,seedtigo/atom,abcP9110/atom,hharchani/atom,russlescai/atom,pombredanne/atom,stuartquin/atom,abcP9110/atom,ppamorim/atom,Ju2ender/atom,ykeisuke/atom,johnhaley81/atom,Dennis1978/atom,me6iaton/atom,Galactix/atom,oggy/atom,fedorov/atom,dsandstrom/atom,SlimeQ/atom,ali/atom,dannyflax/atom,ezeoleaf/atom,Jandersoft/atom,splodingsocks/atom,brettle/atom,Austen-G/BlockBuilder,tmunro/atom,yomybaby/atom,qiujuer/atom,ppamorim/atom,liuderchi/atom,ReddTea/atom,russlescai/atom,001szymon/atom,RuiDGoncalves/atom,kittens/atom,0x73/atom,hakatashi/atom,seedtigo/atom,Rodjana/atom,RuiDGoncalves/atom,russlescai/atom,abe33/atom,ralphtheninja/atom,atom/atom,abcP9110/atom,brumm/atom,tjkr/atom,vjeux/atom,kittens/atom,florianb/atom,Ingramz/atom,ObviouslyGreen/atom,harshdattani/atom,kc8wxm/atom,me-benni/atom,pkdevbox/atom,sebmck/atom,avdg/atom,Ju2ender/atom,dkfiresky/atom,matthewclendening/atom,pkdevbox/atom,toqz/atom,kaicataldo/atom,sekcheong/atom,amine7536/atom,nucked/atom,dannyflax/atom,yangchenghu/atom,Jdesk/atom,lovesnow/atom,g2p/atom,hpham04/atom,CraZySacX/atom,rookie125/atom,nucked/atom,kc8wxm/atom,jjz/atom,qskycolor/atom,alexandergmann/atom,mostafaeweda/atom,daxlab/atom,brumm/atom,Jdesk/atom,amine7536/atom,me-benni/atom,fredericksilva/atom,efatsi/atom,nucked/atom,codex8/atom,brettle/atom,omarhuanca/atom,amine7536/atom,originye/atom,synaptek/atom,mnquintana/atom,KENJU/atom,devmario/atom,Neron-X5/atom,chengky/atom,Jonekee/atom,johnhaley81/atom,Arcanemagus/atom,yalexx/atom,ali/atom,Andrey-Pavlov/atom,Shekharrajak/atom,mdumrauf/atom,devmario/atom,oggy/atom,codex8/atom,boomwaiza/atom,Rodjana/atom,constanzaurzua/atom,rxkit/atom,fedorov/atom,Jonekee/atom,acontreras89/atom,GHackAnonymous/atom,tony612/atom,BogusCurry/atom,codex8/atom,AlisaKiatkongkumthon/atom,ali/atom,pombredanne/atom,hharchani/atom,andrewleverette/atom,ralphtheninja/atom,atom/atom,acontreras89/atom,scv119/atom,kjav/atom,liuxiong332/atom,vcarrera/atom,CraZySacX/atom,yomybaby/atom,me6iaton/atom,qskycolor/atom,n-riesco/atom,kdheepak89/atom,liuderchi/atom,Abdillah/atom,liuderchi/atom,helber/atom,ReddTea/atom,kittens/atom,sekcheong/atom,001szymon/atom,kjav/atom,jtrose2/atom,Locke23rus/atom,chfritz/atom,vhutheesing/atom,vinodpanicker/atom,kc8wxm/atom,kandros/atom,scippio/atom,yamhon/atom,codex8/atom,fang-yufeng/atom,jacekkopecky/atom,jordanbtucker/atom,pengshp/atom,Mokolea/atom,bryonwinger/atom,panuchart/atom,NunoEdgarGub1/atom,stuartquin/atom,folpindo/atom,FoldingText/atom,bradgearon/atom,qiujuer/atom,bolinfest/atom,kevinrenaers/atom,abcP9110/atom,MjAbuz/atom,Andrey-Pavlov/atom,svanharmelen/atom,acontreras89/atom,qskycolor/atom,Andrey-Pavlov/atom,scv119/atom,Neron-X5/atom,panuchart/atom,RobinTec/atom,omarhuanca/atom,vjeux/atom,Locke23rus/atom,alfredxing/atom,rookie125/atom,kc8wxm/atom,charleswhchan/atom,Jdesk/atom,anuwat121/atom,pombredanne/atom,stinsonga/atom,liuxiong332/atom,avdg/atom,ppamorim/atom,tjkr/atom,YunchengLiao/atom,Ingramz/atom,jjz/atom,jjz/atom,FoldingText/atom
|
coffeescript
|
## Code Before:
Peer = require './peer'
Guid = require 'guid'
module.exports =
createPeer: ->
id = Guid.create().toString()
new Peer(id, host: 'ec2-54-218-51-127.us-west-2.compute.amazonaws.com', port: 8080)
connectDocument: (doc, connection) ->
doc.outputEvents.on 'changed', (event) ->
console.log 'sending event', event
connection.send(event)
connection.on 'data', (event) ->
console.log 'receiving event', event
doc.handleInputEvent(event)
## Instruction:
Remove output listener when connection is closed
## Code After:
Peer = require './peer'
Guid = require 'guid'
module.exports =
createPeer: ->
id = Guid.create().toString()
new Peer(id, host: 'ec2-54-218-51-127.us-west-2.compute.amazonaws.com', port: 8080)
connectDocument: (doc, connection) ->
outputListener = (event) ->
console.log 'sending event', event
connection.send(event)
doc.outputEvents.on('changed', outputListener)
connection.on 'data', (event) ->
console.log 'receiving event', event
doc.handleInputEvent(event)
connection.on 'close', ->
doc.outputEvents.removeListener('changed', outputListener)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.