Datasets:

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
af382dc21e57cc5b3f202a02512a9d8f0d70f7ad
tasks/main.yml
tasks/main.yml
--- - name: install/update vim homebrew: name=vim state=latest - name: install/update ctags homebrew: name=ctags state=latest - name: ensure spf13 is installed shell: curl https://j.mp/spf13-vim3 -L -o - | sh args: creates: ~/.spf13-vim-3/.vimrc notify: vim bundle install - name: update spf13 git: args: repo: https://github.com/spf13/spf13-vim.git dest: ~/.spf13-vim-3 notify: vim bundle install - name: add .fork shims for stack.d support copy: src={{ item }} dest=~/.{{ item }} with_items: - vimrc.bundles.fork - vimrc.before.fork - vimrc.fork - name: add configuration to stack.d copy: src={{ item }} dest={{ stack_d }} with_items: - vim.bundle - vim.vimrc.before - vim.vimrc - vim.zsh notify: vim bundle install
--- - name: install/update vim homebrew: name=vim state=latest install_options=with-lua - name: install/update ctags homebrew: name=ctags state=latest - name: ensure spf13 is installed shell: curl https://j.mp/spf13-vim3 -L -o - | sh args: creates: ~/.spf13-vim-3/.vimrc notify: vim bundle install - name: update spf13 git: args: repo: https://github.com/spf13/spf13-vim.git dest: ~/.spf13-vim-3 notify: vim bundle install - name: add .fork shims for stack.d support copy: src={{ item }} dest=~/.{{ item }} with_items: - vimrc.bundles.fork - vimrc.before.fork - vimrc.fork - name: add configuration to stack.d copy: src={{ item }} dest={{ stack_d }} with_items: - vim.bundle - vim.vimrc.before - vim.vimrc - vim.zsh notify: vim bundle install
Add lua support to vim to get rid of lua warnings.
Add lua support to vim to get rid of lua warnings.
YAML
mit
osxi/short-stack-vim,poetic/short-stack-vim
yaml
## Code Before: --- - name: install/update vim homebrew: name=vim state=latest - name: install/update ctags homebrew: name=ctags state=latest - name: ensure spf13 is installed shell: curl https://j.mp/spf13-vim3 -L -o - | sh args: creates: ~/.spf13-vim-3/.vimrc notify: vim bundle install - name: update spf13 git: args: repo: https://github.com/spf13/spf13-vim.git dest: ~/.spf13-vim-3 notify: vim bundle install - name: add .fork shims for stack.d support copy: src={{ item }} dest=~/.{{ item }} with_items: - vimrc.bundles.fork - vimrc.before.fork - vimrc.fork - name: add configuration to stack.d copy: src={{ item }} dest={{ stack_d }} with_items: - vim.bundle - vim.vimrc.before - vim.vimrc - vim.zsh notify: vim bundle install ## Instruction: Add lua support to vim to get rid of lua warnings. ## Code After: --- - name: install/update vim homebrew: name=vim state=latest install_options=with-lua - name: install/update ctags homebrew: name=ctags state=latest - name: ensure spf13 is installed shell: curl https://j.mp/spf13-vim3 -L -o - | sh args: creates: ~/.spf13-vim-3/.vimrc notify: vim bundle install - name: update spf13 git: args: repo: https://github.com/spf13/spf13-vim.git dest: ~/.spf13-vim-3 notify: vim bundle install - name: add .fork shims for stack.d support copy: src={{ item }} dest=~/.{{ item }} with_items: - vimrc.bundles.fork - vimrc.before.fork - vimrc.fork - name: add configuration to stack.d copy: src={{ item }} dest={{ stack_d }} with_items: - vim.bundle - vim.vimrc.before - vim.vimrc - vim.zsh notify: vim bundle install
2ec0998d8aeb3e7f296424eb004f79cafca7b278
emacs.d.symlink/scripts/evil.el
emacs.d.symlink/scripts/evil.el
(require 'evil) (evil-mode 1) ;; Use undo-tree so don't have to figure out the full undo/redo system atm. ;; Evil will detect this. (require 'undo-tree) ;; Remap ";" to ":" and "," to ";", like vimrc (define-key evil-motion-state-map ";" 'evil-ex) (define-key evil-motion-state-map "," 'evil-repeat-find-char) ;; Make <esc> cancel everything (define-key evil-normal-state-map [escape] 'keyboard-quit) (define-key evil-visual-state-map [escape] 'keyboard-quit) (define-key minibuffer-local-map [escape] 'minibuffer-keyboard-quit) (define-key minibuffer-local-ns-map [escape] 'minibuffer-keyboard-quit) (define-key minibuffer-local-completion-map [escape] 'minibuffer-keyboard-quit) (define-key minibuffer-local-must-match-map [escape] 'minibuffer-keyboard-quit) (define-key minibuffer-local-isearch-map [escape] 'minibuffer-keyboard-quit) ;; Closest thing to easymotion (require 'ace-jump-mode) (define-key evil-normal-state-map (kbd "SPC") 'ace-jump-char-mode)
(require 'evil) (evil-mode 1) ;; Use undo-tree so don't have to figure out the full undo/redo system atm. ;; Evil will detect this. (require 'undo-tree) ;; Remap ";" to ":" and "," to ";", like vimrc (define-key evil-motion-state-map ";" 'evil-ex) (define-key evil-motion-state-map "," 'evil-repeat-find-char) ;; Make <esc> cancel everything (define-key evil-normal-state-map [escape] 'keyboard-quit) (define-key evil-visual-state-map [escape] 'keyboard-quit) (define-key minibuffer-local-map [escape] 'minibuffer-keyboard-quit) (define-key minibuffer-local-ns-map [escape] 'minibuffer-keyboard-quit) (define-key minibuffer-local-completion-map [escape] 'minibuffer-keyboard-quit) (define-key minibuffer-local-must-match-map [escape] 'minibuffer-keyboard-quit) (define-key minibuffer-local-isearch-map [escape] 'minibuffer-keyboard-quit) ;; Closest thing to easymotion (require 'ace-jump-mode) (setq ace-jump-mode-scope 'window) ;; it's quicker this way (define-key evil-normal-state-map (kbd "SPC") 'ace-jump-line-mode)
Tidy emacs jump mode setup
Tidy emacs jump mode setup
Emacs Lisp
mit
mattduck/dotfiles,mattduck/dotfiles
emacs-lisp
## Code Before: (require 'evil) (evil-mode 1) ;; Use undo-tree so don't have to figure out the full undo/redo system atm. ;; Evil will detect this. (require 'undo-tree) ;; Remap ";" to ":" and "," to ";", like vimrc (define-key evil-motion-state-map ";" 'evil-ex) (define-key evil-motion-state-map "," 'evil-repeat-find-char) ;; Make <esc> cancel everything (define-key evil-normal-state-map [escape] 'keyboard-quit) (define-key evil-visual-state-map [escape] 'keyboard-quit) (define-key minibuffer-local-map [escape] 'minibuffer-keyboard-quit) (define-key minibuffer-local-ns-map [escape] 'minibuffer-keyboard-quit) (define-key minibuffer-local-completion-map [escape] 'minibuffer-keyboard-quit) (define-key minibuffer-local-must-match-map [escape] 'minibuffer-keyboard-quit) (define-key minibuffer-local-isearch-map [escape] 'minibuffer-keyboard-quit) ;; Closest thing to easymotion (require 'ace-jump-mode) (define-key evil-normal-state-map (kbd "SPC") 'ace-jump-char-mode) ## Instruction: Tidy emacs jump mode setup ## Code After: (require 'evil) (evil-mode 1) ;; Use undo-tree so don't have to figure out the full undo/redo system atm. ;; Evil will detect this. (require 'undo-tree) ;; Remap ";" to ":" and "," to ";", like vimrc (define-key evil-motion-state-map ";" 'evil-ex) (define-key evil-motion-state-map "," 'evil-repeat-find-char) ;; Make <esc> cancel everything (define-key evil-normal-state-map [escape] 'keyboard-quit) (define-key evil-visual-state-map [escape] 'keyboard-quit) (define-key minibuffer-local-map [escape] 'minibuffer-keyboard-quit) (define-key minibuffer-local-ns-map [escape] 'minibuffer-keyboard-quit) (define-key minibuffer-local-completion-map [escape] 'minibuffer-keyboard-quit) (define-key minibuffer-local-must-match-map [escape] 'minibuffer-keyboard-quit) (define-key minibuffer-local-isearch-map [escape] 'minibuffer-keyboard-quit) ;; Closest thing to easymotion (require 'ace-jump-mode) (setq ace-jump-mode-scope 'window) ;; it's quicker this way (define-key evil-normal-state-map (kbd "SPC") 'ace-jump-line-mode)
fe06ad7ba3200a528082c06281cc8ffcdbff0699
.travis.yml
.travis.yml
language: haskell install: # - cabal install hsc2hs cabal-dev # - cd engine && cabal install --only-dependencies --enable-tests - true script: # - cabal configure && cabal build && ./dist/build/shakefile/shakefile test - ./stir update && ./stir test env: CC=clang TOOLCHAIN_VARIANT=clang
language: haskell install: # - cabal install hsc2hs cabal-dev # - cd engine && cabal install --only-dependencies --enable-tests - true script: # - cabal configure && cabal build && ./dist/build/shakefile/shakefile test - cd engine && ./stir update && ./stir test env: CC=clang TOOLCHAIN_VARIANT=clang
Change to engine directory before building
Travis: Change to engine directory before building
YAML
apache-2.0
samplecount/methcla,samplecount/methcla,samplecount/methcla,samplecount/methcla,samplecount/methcla,samplecount/methcla
yaml
## Code Before: language: haskell install: # - cabal install hsc2hs cabal-dev # - cd engine && cabal install --only-dependencies --enable-tests - true script: # - cabal configure && cabal build && ./dist/build/shakefile/shakefile test - ./stir update && ./stir test env: CC=clang TOOLCHAIN_VARIANT=clang ## Instruction: Travis: Change to engine directory before building ## Code After: language: haskell install: # - cabal install hsc2hs cabal-dev # - cd engine && cabal install --only-dependencies --enable-tests - true script: # - cabal configure && cabal build && ./dist/build/shakefile/shakefile test - cd engine && ./stir update && ./stir test env: CC=clang TOOLCHAIN_VARIANT=clang
2aa240f1e7f612c60863a4ab15fa6f5669d96190
app/views/shared/dialogs/_reconfigure_dialog.html.haml
app/views/shared/dialogs/_reconfigure_dialog.html.haml
.row.wrapper{"ng-controller" => "dialogUserReconfigureController as vm"} .spinner{'ng-show' => "!vm.dialogLoaded"} .col-md-12.col-lg-12{'ng-if' => 'vm.dialog'} %dialog-user{"dialog" =>"vm.dialog", "refresh-field" => "vm.refreshField(field)", "on-update" => "vm.setDialogData(data)"} .clearfix .pull-right.button-group{'ng-show' => "vm.dialogLoaded"} %miq-button{:name => t = _("Submit"), :title => t, :alt => t, :enabled => 'vm.saveable()', 'on-click' => "vm.submitButtonClicked()", :primary => 'true'} %miq-button{:name => t = _("Cancel"), :title => t, :alt => t, :enabled => 'true', 'on-click' => "vm.cancelClicked($event)"} :javascript ManageIQ.angular.app.value('resourceActionId', '#{resource_action_id}'); ManageIQ.angular.app.value('targetId', '#{target_id}'); miq_bootstrap('.wrapper');
.row.wrapper{"ng-controller" => "dialogUserReconfigureController as vm"} .spinner{'ng-show' => "!vm.dialogLoaded"} .col-md-12.col-lg-12{'ng-if' => 'vm.dialog'} %dialog-user{"dialog" => "vm.dialog", "refresh-field" => "vm.refreshField(field)", "on-update" => "vm.setDialogData(data)", "reconfigure-mode" => true} .clearfix .pull-right.button-group{'ng-show' => "vm.dialogLoaded"} %miq-button{:name => t = _("Submit"), :title => t, :alt => t, :enabled => 'vm.saveable()', 'on-click' => "vm.submitButtonClicked()", :primary => 'true'} %miq-button{:name => t = _("Cancel"), :title => t, :alt => t, :enabled => 'true', 'on-click' => "vm.cancelClicked($event)"} :javascript ManageIQ.angular.app.value('resourceActionId', '#{resource_action_id}'); ManageIQ.angular.app.value('targetId', '#{target_id}'); miq_bootstrap('.wrapper');
Add reconfigureMode parameter to dialog-user
Add reconfigureMode parameter to dialog-user https://bugzilla.redhat.com/show_bug.cgi?id=1837410
Haml
apache-2.0
ManageIQ/manageiq-ui-classic,ManageIQ/manageiq-ui-classic,ManageIQ/manageiq-ui-classic,ManageIQ/manageiq-ui-classic
haml
## Code Before: .row.wrapper{"ng-controller" => "dialogUserReconfigureController as vm"} .spinner{'ng-show' => "!vm.dialogLoaded"} .col-md-12.col-lg-12{'ng-if' => 'vm.dialog'} %dialog-user{"dialog" =>"vm.dialog", "refresh-field" => "vm.refreshField(field)", "on-update" => "vm.setDialogData(data)"} .clearfix .pull-right.button-group{'ng-show' => "vm.dialogLoaded"} %miq-button{:name => t = _("Submit"), :title => t, :alt => t, :enabled => 'vm.saveable()', 'on-click' => "vm.submitButtonClicked()", :primary => 'true'} %miq-button{:name => t = _("Cancel"), :title => t, :alt => t, :enabled => 'true', 'on-click' => "vm.cancelClicked($event)"} :javascript ManageIQ.angular.app.value('resourceActionId', '#{resource_action_id}'); ManageIQ.angular.app.value('targetId', '#{target_id}'); miq_bootstrap('.wrapper'); ## Instruction: Add reconfigureMode parameter to dialog-user https://bugzilla.redhat.com/show_bug.cgi?id=1837410 ## Code After: .row.wrapper{"ng-controller" => "dialogUserReconfigureController as vm"} .spinner{'ng-show' => "!vm.dialogLoaded"} .col-md-12.col-lg-12{'ng-if' => 'vm.dialog'} %dialog-user{"dialog" => "vm.dialog", "refresh-field" => "vm.refreshField(field)", "on-update" => "vm.setDialogData(data)", "reconfigure-mode" => true} .clearfix .pull-right.button-group{'ng-show' => "vm.dialogLoaded"} %miq-button{:name => t = _("Submit"), :title => t, :alt => t, :enabled => 'vm.saveable()', 'on-click' => "vm.submitButtonClicked()", :primary => 'true'} %miq-button{:name => t = _("Cancel"), :title => t, :alt => t, :enabled => 'true', 'on-click' => "vm.cancelClicked($event)"} :javascript ManageIQ.angular.app.value('resourceActionId', '#{resource_action_id}'); ManageIQ.angular.app.value('targetId', '#{target_id}'); miq_bootstrap('.wrapper');
f739d95c5114631a8c82ddb8cba98a268f8ac9c4
lib/environment_detection.zsh
lib/environment_detection.zsh
function set_environment() { env_name=${1:-other} CR_ENVIRONMENT_SELECTION=$env_name export CR_ENVIRONMENT_SELECTION reload } function set_default_environment() { unset CR_ENVIRONMENT_SELECTION export CR_ENVIRONMENT_SELECTION reload } function get_env_name () { local forced_env=${CR_ENVIRONMENT_SELECTION:-xxx} if [ "$forced_env" != "xxx" ]; then echo $forced_env return fi hostname=${1:-`hostname`} case $hostname in void* | null*) loc='home.personal' ;; chris-rose.ims.advanis.ca | chris-rose.local) loc='work.personal' ;; d-*.advanis.ca | ferret.advanis.ca) loc='work.test' ;; qa-*.advanis.ca) loc='work.qa' ;; *.advanis.ca) loc='work.production' ;; *) loc='other' ;; esac echo $loc }
function set_environment() { env_name=${1:-other} CR_ENVIRONMENT_SELECTION=$env_name export CR_ENVIRONMENT_SELECTION reload } function set_default_environment() { unset CR_ENVIRONMENT_SELECTION export CR_ENVIRONMENT_SELECTION reload } function get_env_name () { local forced_env=${CR_ENVIRONMENT_SELECTION:-xxx} if [ "$forced_env" != "xxx" ]; then echo $forced_env return fi if [ -f $HOME/.zsh-env-name ]; then forced_env=$(cat $HOME/.zsh-env-name) echo $forced_env return fi hostname=${1:-`hostname`} case $hostname in void* | null*) loc='home.personal' ;; chris-rose.ims.advanis.ca | chris-rose.local) loc='work.personal' ;; d-*.advanis.ca | ferret.advanis.ca) loc='work.test' ;; qa-*.advanis.ca) loc='work.qa' ;; *.advanis.ca) loc='work.production' ;; *) loc='other' ;; esac echo $loc }
Add an environment override hook
Add an environment override hook
Shell
mit
offbyone/oh-my-zsh,offbyone/oh-my-zsh,offbyone/oh-my-zsh
shell
## Code Before: function set_environment() { env_name=${1:-other} CR_ENVIRONMENT_SELECTION=$env_name export CR_ENVIRONMENT_SELECTION reload } function set_default_environment() { unset CR_ENVIRONMENT_SELECTION export CR_ENVIRONMENT_SELECTION reload } function get_env_name () { local forced_env=${CR_ENVIRONMENT_SELECTION:-xxx} if [ "$forced_env" != "xxx" ]; then echo $forced_env return fi hostname=${1:-`hostname`} case $hostname in void* | null*) loc='home.personal' ;; chris-rose.ims.advanis.ca | chris-rose.local) loc='work.personal' ;; d-*.advanis.ca | ferret.advanis.ca) loc='work.test' ;; qa-*.advanis.ca) loc='work.qa' ;; *.advanis.ca) loc='work.production' ;; *) loc='other' ;; esac echo $loc } ## Instruction: Add an environment override hook ## Code After: function set_environment() { env_name=${1:-other} CR_ENVIRONMENT_SELECTION=$env_name export CR_ENVIRONMENT_SELECTION reload } function set_default_environment() { unset CR_ENVIRONMENT_SELECTION export CR_ENVIRONMENT_SELECTION reload } function get_env_name () { local forced_env=${CR_ENVIRONMENT_SELECTION:-xxx} if [ "$forced_env" != "xxx" ]; then echo $forced_env return fi if [ -f $HOME/.zsh-env-name ]; then forced_env=$(cat $HOME/.zsh-env-name) echo $forced_env return fi hostname=${1:-`hostname`} case $hostname in void* | null*) loc='home.personal' ;; chris-rose.ims.advanis.ca | chris-rose.local) loc='work.personal' ;; d-*.advanis.ca | ferret.advanis.ca) loc='work.test' ;; qa-*.advanis.ca) loc='work.qa' ;; *.advanis.ca) loc='work.production' ;; *) loc='other' ;; esac echo $loc }
60dd7f62a20bb3e1ea25e888f70ebbe7a32b3270
README.rst
README.rst
============= dicom2nifti ============= Python library for converting dicom files to nifti :Author: Arne Brys :Organization: `icometrix <https://www.icometrix.com>`_ :Repository: https://github.com/icometrix/dicom2nifti .. include:: ./documentation/README.rst
============= dicom2nifti ============= Python library for converting dicom files to nifti :Author: Arne Brys :Organization: `icometrix <https://www.icometrix.com>`_ :Repository: https://github.com/icometrix/dicom2nifti :API documentation: http://dicom2nifti.readthedocs.io/en/stable .. include:: ./documentation/rst/README.rst
Restructure readme so the readthedocs info is clearer
DCMTONII-31: Restructure readme so the readthedocs info is clearer
reStructuredText
mit
icometrix/dicom2nifti,icometrix/dicom2nifti
restructuredtext
## Code Before: ============= dicom2nifti ============= Python library for converting dicom files to nifti :Author: Arne Brys :Organization: `icometrix <https://www.icometrix.com>`_ :Repository: https://github.com/icometrix/dicom2nifti .. include:: ./documentation/README.rst ## Instruction: DCMTONII-31: Restructure readme so the readthedocs info is clearer ## Code After: ============= dicom2nifti ============= Python library for converting dicom files to nifti :Author: Arne Brys :Organization: `icometrix <https://www.icometrix.com>`_ :Repository: https://github.com/icometrix/dicom2nifti :API documentation: http://dicom2nifti.readthedocs.io/en/stable .. include:: ./documentation/rst/README.rst
79bce2c3929384c07b13690dabc38e6b2fde682f
src/main/java/org/cyclops/cyclopscore/client/gui/component/button/GuiButtonText.java
src/main/java/org/cyclops/cyclopscore/client/gui/component/button/GuiButtonText.java
package org.cyclops.cyclopscore.client.gui.component.button; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.FontRenderer; /** * An button with text. * @author rubensworks * */ public class GuiButtonText extends GuiButtonExtended { /** * Make a new instance. * @param id The ID. * @param x X * @param y Y * @param width Width * @param height Height * @param string The string to print. * @param background If the button background should be rendered. */ public GuiButtonText(int id, int x, int y, int width, int height, String string, boolean background) { super(id, x, y, width, height, string, background); } protected void drawButtonInner(Minecraft minecraft, int i, int j, boolean mouseOver) { FontRenderer fontrenderer = minecraft.fontRendererObj; int color = 0xe0e0e0; if(!enabled) { color = 0xffa0a0a0; } else if (mouseOver) { color = 0xffffa0; } drawCenteredString(fontrenderer, displayString, xPosition + width / 2, yPosition + (height - 8) / 2, color); } }
package org.cyclops.cyclopscore.client.gui.component.button; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.FontRenderer; /** * An button with text. * @author rubensworks * */ public class GuiButtonText extends GuiButtonExtended { /** * Make a new instance. * @param id The ID. * @param x X * @param y Y * @param string The string to print. */ public GuiButtonText(int id, int x, int y, String string) { this(id, x, y, Minecraft.getMinecraft().fontRendererObj.getStringWidth(string) + 6, 16, string, true); } /** * Make a new instance. * @param id The ID. * @param x X * @param y Y * @param width Width * @param height Height * @param string The string to print. * @param background If the button background should be rendered. */ public GuiButtonText(int id, int x, int y, int width, int height, String string, boolean background) { super(id, x, y, width, height, string, background); } protected void drawButtonInner(Minecraft minecraft, int i, int j, boolean mouseOver) { FontRenderer fontrenderer = minecraft.fontRendererObj; int color = 0xe0e0e0; if(!enabled) { color = 0xffa0a0a0; } else if (mouseOver) { color = 0xffffa0; } drawCenteredString(fontrenderer, displayString, xPosition + width / 2, yPosition + (height - 8) / 2, color); } }
Add simplified text button constructor
Add simplified text button constructor
Java
mit
CyclopsMC/CyclopsCore
java
## Code Before: package org.cyclops.cyclopscore.client.gui.component.button; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.FontRenderer; /** * An button with text. * @author rubensworks * */ public class GuiButtonText extends GuiButtonExtended { /** * Make a new instance. * @param id The ID. * @param x X * @param y Y * @param width Width * @param height Height * @param string The string to print. * @param background If the button background should be rendered. */ public GuiButtonText(int id, int x, int y, int width, int height, String string, boolean background) { super(id, x, y, width, height, string, background); } protected void drawButtonInner(Minecraft minecraft, int i, int j, boolean mouseOver) { FontRenderer fontrenderer = minecraft.fontRendererObj; int color = 0xe0e0e0; if(!enabled) { color = 0xffa0a0a0; } else if (mouseOver) { color = 0xffffa0; } drawCenteredString(fontrenderer, displayString, xPosition + width / 2, yPosition + (height - 8) / 2, color); } } ## Instruction: Add simplified text button constructor ## Code After: package org.cyclops.cyclopscore.client.gui.component.button; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.FontRenderer; /** * An button with text. * @author rubensworks * */ public class GuiButtonText extends GuiButtonExtended { /** * Make a new instance. * @param id The ID. * @param x X * @param y Y * @param string The string to print. */ public GuiButtonText(int id, int x, int y, String string) { this(id, x, y, Minecraft.getMinecraft().fontRendererObj.getStringWidth(string) + 6, 16, string, true); } /** * Make a new instance. * @param id The ID. * @param x X * @param y Y * @param width Width * @param height Height * @param string The string to print. * @param background If the button background should be rendered. */ public GuiButtonText(int id, int x, int y, int width, int height, String string, boolean background) { super(id, x, y, width, height, string, background); } protected void drawButtonInner(Minecraft minecraft, int i, int j, boolean mouseOver) { FontRenderer fontrenderer = minecraft.fontRendererObj; int color = 0xe0e0e0; if(!enabled) { color = 0xffa0a0a0; } else if (mouseOver) { color = 0xffffa0; } drawCenteredString(fontrenderer, displayString, xPosition + width / 2, yPosition + (height - 8) / 2, color); } }
a3e188f3283f2808d2e5c9f865676b9b3fba9de6
etc/relicense.txt
etc/relicense.txt
The relicense task is described at http://issues.cocoondev.org/jira/secure/ViewIssue.jspa?key=FOR-123 ------------------------------------------------------------------------ This is a list of files that we need to ensure do *not* get a new license accidently inserted. If you notice any more in your travels then please add them here. src/core/context/resources/schema/docbook/* src/core/context/resources/schema/open-office/* src/core/context/resources/schema/sdocbook/* src/core/context/resources/schema/w3c-dtd/* src/core/context/skins/common/xslt/html/split.xsl ------------------------------------------------------------------------
The relicense task is described at http://issues.cocoondev.org/jira/secure/ViewIssue.jspa?key=FOR-123 ------------------------------------------------------------------------ Here is one technique ... * Do the whole tree, a section at a time, using insert_license.pl script. * cd to a directory as high as you dare, e.g. src/documentation/ * In another window, do a practice run: insert_license.pl -p /path/to/svn/forrest/src/documentation 2002-2004 > relicense.log * Review the summary output and grep the relicence.log file. * Investigate the files that are listed as having problems. * When happy do a production run: insert_license.pl /path/to/svn/forrest/src/documentation 2002-2004 > relicense.log * Again review the summary output and grep the relicence.log file. * Note any files that need fixing by hand (see etc/relicense.log). * Do a 'svn diff' and make sure it is what you expected, then 'svn commit'. * At some stage, use the Java or Python "relicense" script. This only deals with the *.java files. * Tweak the insert_license.pl script to address new issues. ------------------------------------------------------------------------ This is a list of files that we need to ensure do *not* get a new license accidently inserted. If you notice any more in your travels then please add them here. src/core/context/resources/schema/docbook/* src/core/context/resources/schema/open-office/* src/core/context/resources/schema/sdocbook/* src/core/context/resources/schema/w3c-dtd/* src/core/context/skins/common/xslt/html/split.xsl ------------------------------------------------------------------------
Add some notes about how to do it.
Add some notes about how to do it. git-svn-id: fea306228a0c821168c534b698c8fa2a33280b3b@9355 13f79535-47bb-0310-9956-ffa450edef68
Text
apache-2.0
apache/forrest,apache/forrest,apache/forrest,apache/forrest,apache/forrest,apache/forrest
text
## Code Before: The relicense task is described at http://issues.cocoondev.org/jira/secure/ViewIssue.jspa?key=FOR-123 ------------------------------------------------------------------------ This is a list of files that we need to ensure do *not* get a new license accidently inserted. If you notice any more in your travels then please add them here. src/core/context/resources/schema/docbook/* src/core/context/resources/schema/open-office/* src/core/context/resources/schema/sdocbook/* src/core/context/resources/schema/w3c-dtd/* src/core/context/skins/common/xslt/html/split.xsl ------------------------------------------------------------------------ ## Instruction: Add some notes about how to do it. git-svn-id: fea306228a0c821168c534b698c8fa2a33280b3b@9355 13f79535-47bb-0310-9956-ffa450edef68 ## Code After: The relicense task is described at http://issues.cocoondev.org/jira/secure/ViewIssue.jspa?key=FOR-123 ------------------------------------------------------------------------ Here is one technique ... * Do the whole tree, a section at a time, using insert_license.pl script. * cd to a directory as high as you dare, e.g. src/documentation/ * In another window, do a practice run: insert_license.pl -p /path/to/svn/forrest/src/documentation 2002-2004 > relicense.log * Review the summary output and grep the relicence.log file. * Investigate the files that are listed as having problems. * When happy do a production run: insert_license.pl /path/to/svn/forrest/src/documentation 2002-2004 > relicense.log * Again review the summary output and grep the relicence.log file. * Note any files that need fixing by hand (see etc/relicense.log). * Do a 'svn diff' and make sure it is what you expected, then 'svn commit'. * At some stage, use the Java or Python "relicense" script. This only deals with the *.java files. * Tweak the insert_license.pl script to address new issues. ------------------------------------------------------------------------ This is a list of files that we need to ensure do *not* get a new license accidently inserted. If you notice any more in your travels then please add them here. src/core/context/resources/schema/docbook/* src/core/context/resources/schema/open-office/* src/core/context/resources/schema/sdocbook/* src/core/context/resources/schema/w3c-dtd/* src/core/context/skins/common/xslt/html/split.xsl ------------------------------------------------------------------------
66244c8a730a03e7da8178167dfcaf8c1ed571d8
app/views/days/_day.html.haml
app/views/days/_day.html.haml
%tr[day] %td= day.date %td.currency= currency_fmt(day.cash) %td.currency= currency_fmt(day.card_turnover) %td.currency= currency_fmt(day.gross_turnover) %td.currency= currency_fmt(day.net_turnover) %td.currency= currency_fmt(day.client_count) %td.currency= currency_fmt(day.expenses) %td.currency= currency_fmt(day.credit_turnover) %td.currency= currency_fmt(day.discount) %td.action-links = link_to image_tag('16x16/edit.png', :title => 'Edit'), edit_day_path(day), :method => :get = link_to image_tag('16x16/remove.png', :title => 'Destroy'), day_path(day), :remote => true, :method => :delete, :confirm => t_confirm_delete(day)
%tr[day] %td= day.date %td.currency= currency_fmt(day.cash) %td.currency= currency_fmt(day.card_turnover) %td.currency= currency_fmt(day.gross_turnover) %td.currency= currency_fmt(day.net_turnover) %td.currency= currency_fmt(day.client_count) %td.currency= currency_fmt(day.expenses) %td.currency= currency_fmt(day.credit_turnover) %td.currency= currency_fmt(day.discount) %td.action-links = link_to image_tag('16x16/edit.png', :title => 'Edit'), edit_day_path(day), :method => :get = link_to image_tag('16x16/remove.png', :title => 'Destroy'), day_path(day), :title => 'Destroy', :remote => true, :method => :delete, :confirm => t_confirm_delete(day)
Add title attribute to delete link in day list.
Add title attribute to delete link in day list.
Haml
agpl-3.0
gaapt/bookyt,gaapt/bookyt,gaapt/bookyt,xuewenfei/bookyt,huerlisi/bookyt,hauledev/bookyt,huerlisi/bookyt,silvermind/bookyt,gaapt/bookyt,silvermind/bookyt,wtag/bookyt,wtag/bookyt,hauledev/bookyt,hauledev/bookyt,huerlisi/bookyt,hauledev/bookyt,silvermind/bookyt,silvermind/bookyt,wtag/bookyt,xuewenfei/bookyt,xuewenfei/bookyt
haml
## Code Before: %tr[day] %td= day.date %td.currency= currency_fmt(day.cash) %td.currency= currency_fmt(day.card_turnover) %td.currency= currency_fmt(day.gross_turnover) %td.currency= currency_fmt(day.net_turnover) %td.currency= currency_fmt(day.client_count) %td.currency= currency_fmt(day.expenses) %td.currency= currency_fmt(day.credit_turnover) %td.currency= currency_fmt(day.discount) %td.action-links = link_to image_tag('16x16/edit.png', :title => 'Edit'), edit_day_path(day), :method => :get = link_to image_tag('16x16/remove.png', :title => 'Destroy'), day_path(day), :remote => true, :method => :delete, :confirm => t_confirm_delete(day) ## Instruction: Add title attribute to delete link in day list. ## Code After: %tr[day] %td= day.date %td.currency= currency_fmt(day.cash) %td.currency= currency_fmt(day.card_turnover) %td.currency= currency_fmt(day.gross_turnover) %td.currency= currency_fmt(day.net_turnover) %td.currency= currency_fmt(day.client_count) %td.currency= currency_fmt(day.expenses) %td.currency= currency_fmt(day.credit_turnover) %td.currency= currency_fmt(day.discount) %td.action-links = link_to image_tag('16x16/edit.png', :title => 'Edit'), edit_day_path(day), :method => :get = link_to image_tag('16x16/remove.png', :title => 'Destroy'), day_path(day), :title => 'Destroy', :remote => true, :method => :delete, :confirm => t_confirm_delete(day)
110b3b520682a59c382dc42c55c80a418b6b9b11
playbooks/release/pre.yaml
playbooks/release/pre.yaml
- hosts: all roles: - legacy-copy-project-config-scripts - add-sshkey - add-launchpad-credentials
- hosts: all pre_tasks: # This is tempoarary until v2 is gone and we can rework things - name: Add origin remote to enable notes fetching command: "git remote add origin https://{{ item.canonical_name }}" args: chdir: "{{ ansible_user_dir }}/src/{{ item.canonical_name }}" with_items: "{{ zuul.projects }}" roles: - legacy-copy-project-config-scripts - add-sshkey - add-launchpad-credentials
Add an origin remote for tag-releases for notes
Add an origin remote for tag-releases for notes tag-releases needs to fetch notes. To avoid touching the jenkins script too much while v2 and v3 co-exist, just add the origin remote for all projects in the pre-playbook. Once v3 is rolled out fully and there is breathing room, this should be reworked along with the contents of the script to meet all of the use cases in a more native manner. Change-Id: I8224ec098756874d5422fdb119d72ea1509b72a3
YAML
apache-2.0
openstack-infra/project-config,openstack-infra/project-config
yaml
## Code Before: - hosts: all roles: - legacy-copy-project-config-scripts - add-sshkey - add-launchpad-credentials ## Instruction: Add an origin remote for tag-releases for notes tag-releases needs to fetch notes. To avoid touching the jenkins script too much while v2 and v3 co-exist, just add the origin remote for all projects in the pre-playbook. Once v3 is rolled out fully and there is breathing room, this should be reworked along with the contents of the script to meet all of the use cases in a more native manner. Change-Id: I8224ec098756874d5422fdb119d72ea1509b72a3 ## Code After: - hosts: all pre_tasks: # This is tempoarary until v2 is gone and we can rework things - name: Add origin remote to enable notes fetching command: "git remote add origin https://{{ item.canonical_name }}" args: chdir: "{{ ansible_user_dir }}/src/{{ item.canonical_name }}" with_items: "{{ zuul.projects }}" roles: - legacy-copy-project-config-scripts - add-sshkey - add-launchpad-credentials
4f88b32cdec0c171d5360c91793bde7d4c5b3301
server/login/index.js
server/login/index.js
'use strict' var express = require('express') const querystring = require('querystring') const config = require('../config/environment') var router = express.Router() router.get('/github', (req, res) => { var params = querystring.stringify({ client_id: config.github.application.id, redirect_uri: config.github.application.redirectURI, state: '1234' }) res.redirect('https://github.com/login/oauth/authorize?' + params) }) router.get('/', (req, res) => { res.json({ github: config.session.cookie.signed ? req.signedCookies.github : req.cookies.github }) }) router.delete('/', (req, res) => { res.clearCookie('github') res.json({ github: true }) }) module.exports = router
'use strict' var express = require('express') const querystring = require('querystring') const config = require('../config/environment') var router = express.Router() router.get('/github', (req, res) => { var params = querystring.stringify({ client_id: config.github.application.id, redirect_uri: config.github.application.redirectURI, state: '1234', scopes: 'repo' }) res.redirect('https://github.com/login/oauth/authorize?' + params) }) router.get('/', (req, res) => { res.json({ github: config.session.cookie.signed ? req.signedCookies.github : req.cookies.github }) }) router.delete('/', (req, res) => { res.clearCookie('github') res.json({ github: true }) }) module.exports = router
Add repo scope in GitHub OAuth request
Add repo scope in GitHub OAuth request
JavaScript
agpl-3.0
sgmap/ludwig,sgmap/ludwig
javascript
## Code Before: 'use strict' var express = require('express') const querystring = require('querystring') const config = require('../config/environment') var router = express.Router() router.get('/github', (req, res) => { var params = querystring.stringify({ client_id: config.github.application.id, redirect_uri: config.github.application.redirectURI, state: '1234' }) res.redirect('https://github.com/login/oauth/authorize?' + params) }) router.get('/', (req, res) => { res.json({ github: config.session.cookie.signed ? req.signedCookies.github : req.cookies.github }) }) router.delete('/', (req, res) => { res.clearCookie('github') res.json({ github: true }) }) module.exports = router ## Instruction: Add repo scope in GitHub OAuth request ## Code After: 'use strict' var express = require('express') const querystring = require('querystring') const config = require('../config/environment') var router = express.Router() router.get('/github', (req, res) => { var params = querystring.stringify({ client_id: config.github.application.id, redirect_uri: config.github.application.redirectURI, state: '1234', scopes: 'repo' }) res.redirect('https://github.com/login/oauth/authorize?' + params) }) router.get('/', (req, res) => { res.json({ github: config.session.cookie.signed ? req.signedCookies.github : req.cookies.github }) }) router.delete('/', (req, res) => { res.clearCookie('github') res.json({ github: true }) }) module.exports = router
a69e8d0d179f12fd42eadd85eca8e0c968d67c91
tests/runTests.py
tests/runTests.py
import os import os.path import configparser import shutil import subprocess # Setup print("Setting up...") if os.path.isfile("../halite.ini"): shutil.copyfile("../halite.ini", "temp.ini") shutil.copyfile("tests.ini", "../halite.ini") parser = configparser.ConfigParser() parser.read("../halite.ini") # Website tests print("Beginning website backend tests") os.system("mysql -u "+parser["database"]["username"]+" -p"+parser["database"]["password"]+" < ../website/sql/Database.sql") subprocess.call(["phpunit", "--stderr", "website/"]) # Environment tests. print(subprocess.Popen('cd environment; python3 testenv.py', stdout=subprocess.PIPE, shell = True).stdout.read().decode('utf-8')) # Tear down print("Almost done...") if os.path.isfile("../temp.ini"): shutil.copyfile("temp.ini", "../halite.ini")
import os import os.path import configparser import shutil import subprocess # Setup print("Setting up...") if os.path.isfile("../halite.ini"): shutil.copyfile("../halite.ini", "temp.ini") shutil.copyfile("tests.ini", "../halite.ini") parser = configparser.ConfigParser() parser.read("../halite.ini") # Website tests print("Beginning website backend tests") passwordField = "" if parser["database"]["password"] == "" else "-p"+parser["database"]["password"] os.system("mysql -u "+parser["database"]["username"]+" "+passwordField+" < ../website/sql/Database.sql") subprocess.call(["phpunit", "--stderr", "website/"]) # Environment tests. print(subprocess.Popen('cd environment; python3 testenv.py', stdout=subprocess.PIPE, shell = True).stdout.read().decode('utf-8')) # Tear down print("Almost done...") if os.path.isfile("../temp.ini"): shutil.copyfile("temp.ini", "../halite.ini")
Make test runner work with blank mysql password
Make test runner work with blank mysql password
Python
mit
HaliteChallenge/Halite-II,yangle/HaliteIO,yangle/HaliteIO,HaliteChallenge/Halite,HaliteChallenge/Halite,yangle/HaliteIO,lanyudhy/Halite-II,HaliteChallenge/Halite-II,HaliteChallenge/Halite,yangle/HaliteIO,lanyudhy/Halite-II,HaliteChallenge/Halite-II,yangle/HaliteIO,lanyudhy/Halite-II,HaliteChallenge/Halite-II,HaliteChallenge/Halite,HaliteChallenge/Halite-II,lanyudhy/Halite-II,HaliteChallenge/Halite,lanyudhy/Halite-II,yangle/HaliteIO,lanyudhy/Halite-II,yangle/HaliteIO,HaliteChallenge/Halite-II,HaliteChallenge/Halite-II,HaliteChallenge/Halite,HaliteChallenge/Halite,lanyudhy/Halite-II,HaliteChallenge/Halite-II,HaliteChallenge/Halite,HaliteChallenge/Halite-II,yangle/HaliteIO,HaliteChallenge/Halite-II,yangle/HaliteIO,yangle/HaliteIO,yangle/HaliteIO,lanyudhy/Halite-II,HaliteChallenge/Halite,HaliteChallenge/Halite-II,HaliteChallenge/Halite,HaliteChallenge/Halite-II,yangle/HaliteIO,HaliteChallenge/Halite-II,HaliteChallenge/Halite-II,HaliteChallenge/Halite,HaliteChallenge/Halite-II,lanyudhy/Halite-II,HaliteChallenge/Halite,lanyudhy/Halite-II,lanyudhy/Halite-II,HaliteChallenge/Halite-II
python
## Code Before: import os import os.path import configparser import shutil import subprocess # Setup print("Setting up...") if os.path.isfile("../halite.ini"): shutil.copyfile("../halite.ini", "temp.ini") shutil.copyfile("tests.ini", "../halite.ini") parser = configparser.ConfigParser() parser.read("../halite.ini") # Website tests print("Beginning website backend tests") os.system("mysql -u "+parser["database"]["username"]+" -p"+parser["database"]["password"]+" < ../website/sql/Database.sql") subprocess.call(["phpunit", "--stderr", "website/"]) # Environment tests. print(subprocess.Popen('cd environment; python3 testenv.py', stdout=subprocess.PIPE, shell = True).stdout.read().decode('utf-8')) # Tear down print("Almost done...") if os.path.isfile("../temp.ini"): shutil.copyfile("temp.ini", "../halite.ini") ## Instruction: Make test runner work with blank mysql password ## Code After: import os import os.path import configparser import shutil import subprocess # Setup print("Setting up...") if os.path.isfile("../halite.ini"): shutil.copyfile("../halite.ini", "temp.ini") shutil.copyfile("tests.ini", "../halite.ini") parser = configparser.ConfigParser() parser.read("../halite.ini") # Website tests print("Beginning website backend tests") passwordField = "" if parser["database"]["password"] == "" else "-p"+parser["database"]["password"] os.system("mysql -u "+parser["database"]["username"]+" "+passwordField+" < ../website/sql/Database.sql") subprocess.call(["phpunit", "--stderr", "website/"]) # Environment tests. print(subprocess.Popen('cd environment; python3 testenv.py', stdout=subprocess.PIPE, shell = True).stdout.read().decode('utf-8')) # Tear down print("Almost done...") if os.path.isfile("../temp.ini"): shutil.copyfile("temp.ini", "../halite.ini")
67f6b0dd9cae88debab6a350f84f4dff0d13eefc
Engine/engine.js
Engine/engine.js
var Game = (function () { var Game = function (canvasRenderer,svgRenderer ) { }; return Game; }());
var canvasDrawer = new CanvasDrawer(); var player = new Player('Pesho', 20, 180, 15); var disc = new Disc(canvasDrawer.canvasWidth / 2, canvasDrawer.canvasHeight / 2, 12); function startGame() { canvasDrawer.clear(); canvasDrawer.drawPlayer(player); canvasDrawer.drawDisc(disc); player.move(); disc.move(); detectCollisionWithDisc(player, disc); function detectCollisionWithDisc(player, disc) { var dx = player.x - disc.x, dy = player.y - disc.y, distance = Math.sqrt(dx * dx + dy * dy); if (distance < player.radius + disc.radius) { if (distance === 0) { distance = 0.1; } var unitX = dx / distance, unitY = dy / distance, force = -2, forceX = unitX * force, forceY = unitY * force; disc.velocity.x += forceX + player.speed / 2; disc.velocity.y += forceY + player.speed / 2; return true; } else { return false; } } // bounce off the floor if (disc.y > canvasDrawer.canvasHeight - disc.radius) { disc.y = canvasDrawer.canvasHeight - disc.radius; disc.velocity.y = -Math.abs(disc.velocity.y); } // bounce off ceiling if (disc.y < disc.radius + 0) { disc.y = disc.radius + 0; disc.velocity.y = Math.abs(disc.velocity.y); } // bounce off right wall if (disc.x > canvasDrawer.canvasWidth - disc.radius) { disc.x = canvasDrawer.canvasWidth - disc.radius; disc.velocity.x = -Math.abs(disc.velocity.x); } // bounce off left wall if (disc.x < disc.radius) { disc.x = disc.radius; disc.velocity.x = Math.abs(disc.velocity.x); } requestAnimationFrame(function () { startGame(); }); } startGame();
Implement logic for player and disc movements and collision between them
Implement logic for player and disc movements and collision between them
JavaScript
mit
TeamBarracuda-Telerik/JustDiscBattle,TeamBarracuda-Telerik/JustDiscBattle
javascript
## Code Before: var Game = (function () { var Game = function (canvasRenderer,svgRenderer ) { }; return Game; }()); ## Instruction: Implement logic for player and disc movements and collision between them ## Code After: var canvasDrawer = new CanvasDrawer(); var player = new Player('Pesho', 20, 180, 15); var disc = new Disc(canvasDrawer.canvasWidth / 2, canvasDrawer.canvasHeight / 2, 12); function startGame() { canvasDrawer.clear(); canvasDrawer.drawPlayer(player); canvasDrawer.drawDisc(disc); player.move(); disc.move(); detectCollisionWithDisc(player, disc); function detectCollisionWithDisc(player, disc) { var dx = player.x - disc.x, dy = player.y - disc.y, distance = Math.sqrt(dx * dx + dy * dy); if (distance < player.radius + disc.radius) { if (distance === 0) { distance = 0.1; } var unitX = dx / distance, unitY = dy / distance, force = -2, forceX = unitX * force, forceY = unitY * force; disc.velocity.x += forceX + player.speed / 2; disc.velocity.y += forceY + player.speed / 2; return true; } else { return false; } } // bounce off the floor if (disc.y > canvasDrawer.canvasHeight - disc.radius) { disc.y = canvasDrawer.canvasHeight - disc.radius; disc.velocity.y = -Math.abs(disc.velocity.y); } // bounce off ceiling if (disc.y < disc.radius + 0) { disc.y = disc.radius + 0; disc.velocity.y = Math.abs(disc.velocity.y); } // bounce off right wall if (disc.x > canvasDrawer.canvasWidth - disc.radius) { disc.x = canvasDrawer.canvasWidth - disc.radius; disc.velocity.x = -Math.abs(disc.velocity.x); } // bounce off left wall if (disc.x < disc.radius) { disc.x = disc.radius; disc.velocity.x = Math.abs(disc.velocity.x); } requestAnimationFrame(function () { startGame(); }); } startGame();
92ba8b69094b07cfd2e91192ee6416fc6e7c02e9
public/landing.html
public/landing.html
<div class="center tc"> <form ng-submit="join(event)" class="pbs"> <input ng-model="event" class="ptm pbm prm plm f2 tc br3 bal tracked" placeholder="Enter room name" /> <div class="pts"> <button type="submit" class="btn br3 pbm ptm pr-special pl-special bg-darkest-blue white f2 b--blue tracked">Join</button> </div> </form> <h2 class="f1 dark-blue ttu tracked pbs">or</h2> <button ng-click="create()" class="btn br3 pbm ptm pr-other pl-other white bg-blue b--dark-blue f2 tracked">Create</button> </div>
<div class="center tc"> <form ng-submit="join(event)" class="pbs"> <input ng-model="event" class="ptm pbm prm plm f2 tc br3 bal tracked" placeholder="Enter room name" /> <div class="pts"> <button type="submit" class="btn br3 pbm ptm pr-special pl-special bg-darkest-blue white f2 b--blue tracked">Join</button> </div> </form> <h2 class="f1 dark-blue ttu tracked pbs">or</h2> <button ng-click="create()" class="create-button btn br3 pbm ptm pr-other pl-other white bg-blue b--dark-blue f2 tracked">Create</button> </div>
Add class 'create-button' to create button so it can be grabbed for testing
Add class 'create-button' to create button so it can be grabbed for testing
HTML
mit
sndsgn/visceral-tambourine,PhongHPham/visceral-tambourine,sndsgn/visceral-tambourine,PhongHPham/visceral-tambourine,visceral-tambourine/visceral-tambourine,alexvision/yodel,aaronnorby/visceral-tambourine,livvielin/visceral-tambourine,alexvision/yodel,visceral-tambourine/visceral-tambourine,aaronnorby/visceral-tambourine,livvielin/visceral-tambourine
html
## Code Before: <div class="center tc"> <form ng-submit="join(event)" class="pbs"> <input ng-model="event" class="ptm pbm prm plm f2 tc br3 bal tracked" placeholder="Enter room name" /> <div class="pts"> <button type="submit" class="btn br3 pbm ptm pr-special pl-special bg-darkest-blue white f2 b--blue tracked">Join</button> </div> </form> <h2 class="f1 dark-blue ttu tracked pbs">or</h2> <button ng-click="create()" class="btn br3 pbm ptm pr-other pl-other white bg-blue b--dark-blue f2 tracked">Create</button> </div> ## Instruction: Add class 'create-button' to create button so it can be grabbed for testing ## Code After: <div class="center tc"> <form ng-submit="join(event)" class="pbs"> <input ng-model="event" class="ptm pbm prm plm f2 tc br3 bal tracked" placeholder="Enter room name" /> <div class="pts"> <button type="submit" class="btn br3 pbm ptm pr-special pl-special bg-darkest-blue white f2 b--blue tracked">Join</button> </div> </form> <h2 class="f1 dark-blue ttu tracked pbs">or</h2> <button ng-click="create()" class="create-button btn br3 pbm ptm pr-other pl-other white bg-blue b--dark-blue f2 tracked">Create</button> </div>
3bfcd86532a3c068e804e3f569de38f6412d8e90
core/src/main/java/bisq/core/btc/model/InputsAndChangeOutput.java
core/src/main/java/bisq/core/btc/model/InputsAndChangeOutput.java
/* * This file is part of Bisq. * * Bisq 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. * * Bisq 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 Bisq. If not, see <http://www.gnu.org/licenses/>. */ package bisq.core.btc.model; import java.util.ArrayList; import javax.annotation.Nullable; import static com.google.common.base.Preconditions.checkArgument; public class InputsAndChangeOutput { public final ArrayList<RawTransactionInput> rawTransactionInputs; // Is set to 0L in case we don't have an output public final long changeOutputValue; @Nullable public final String changeOutputAddress; public InputsAndChangeOutput(ArrayList<RawTransactionInput> rawTransactionInputs, long changeOutputValue, @Nullable String changeOutputAddress) { checkArgument(!rawTransactionInputs.isEmpty(), "rawInputs.isEmpty()"); this.rawTransactionInputs = rawTransactionInputs; this.changeOutputValue = changeOutputValue; this.changeOutputAddress = changeOutputAddress; } }
/* * This file is part of Bisq. * * Bisq 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. * * Bisq 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 Bisq. If not, see <http://www.gnu.org/licenses/>. */ package bisq.core.btc.model; import java.util.List; import javax.annotation.Nullable; import static com.google.common.base.Preconditions.checkArgument; public class InputsAndChangeOutput { public final List<RawTransactionInput> rawTransactionInputs; // Is set to 0L in case we don't have an output public final long changeOutputValue; @Nullable public final String changeOutputAddress; public InputsAndChangeOutput(List<RawTransactionInput> rawTransactionInputs, long changeOutputValue, @Nullable String changeOutputAddress) { checkArgument(!rawTransactionInputs.isEmpty(), "rawInputs.isEmpty()"); this.rawTransactionInputs = rawTransactionInputs; this.changeOutputValue = changeOutputValue; this.changeOutputAddress = changeOutputAddress; } }
Use List instead of ArrayList as type
Use List instead of ArrayList as type
Java
agpl-3.0
bitsquare/bitsquare,bisq-network/exchange,bisq-network/exchange,bitsquare/bitsquare
java
## Code Before: /* * This file is part of Bisq. * * Bisq 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. * * Bisq 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 Bisq. If not, see <http://www.gnu.org/licenses/>. */ package bisq.core.btc.model; import java.util.ArrayList; import javax.annotation.Nullable; import static com.google.common.base.Preconditions.checkArgument; public class InputsAndChangeOutput { public final ArrayList<RawTransactionInput> rawTransactionInputs; // Is set to 0L in case we don't have an output public final long changeOutputValue; @Nullable public final String changeOutputAddress; public InputsAndChangeOutput(ArrayList<RawTransactionInput> rawTransactionInputs, long changeOutputValue, @Nullable String changeOutputAddress) { checkArgument(!rawTransactionInputs.isEmpty(), "rawInputs.isEmpty()"); this.rawTransactionInputs = rawTransactionInputs; this.changeOutputValue = changeOutputValue; this.changeOutputAddress = changeOutputAddress; } } ## Instruction: Use List instead of ArrayList as type ## Code After: /* * This file is part of Bisq. * * Bisq 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. * * Bisq 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 Bisq. If not, see <http://www.gnu.org/licenses/>. */ package bisq.core.btc.model; import java.util.List; import javax.annotation.Nullable; import static com.google.common.base.Preconditions.checkArgument; public class InputsAndChangeOutput { public final List<RawTransactionInput> rawTransactionInputs; // Is set to 0L in case we don't have an output public final long changeOutputValue; @Nullable public final String changeOutputAddress; public InputsAndChangeOutput(List<RawTransactionInput> rawTransactionInputs, long changeOutputValue, @Nullable String changeOutputAddress) { checkArgument(!rawTransactionInputs.isEmpty(), "rawInputs.isEmpty()"); this.rawTransactionInputs = rawTransactionInputs; this.changeOutputValue = changeOutputValue; this.changeOutputAddress = changeOutputAddress; } }
e83199e34860620512e255f6ca2c8452bf22056d
src/Oro/Bundle/UIBundle/Resources/public/css/less/print/page.less
src/Oro/Bundle/UIBundle/Resources/public/css/less/print/page.less
a, a:visited { text-decoration: underline !important; } a[href]:after { content: ""; } a[class~="icons-holder-text"], a[class~="icons-holder-text"]:visited, a[class~="accordion-toggle"], a[class~="accordion-toggle"]:visited { text-decoration: none !important; } .actions-container, .widget-actions-container { white-space: nowrap; } table.grid { th.select-all-header-cell, td.select-row-cell, th.action-column, td.action-cell { display: none; } } .filter-box { padding-left: 20px; .filter-list { display: none; } .filter-item { a, a:visited { text-decoration: none !important; } } } .grid-toolbar { .pagination { li:first-child, li:last-child { display: none; } input[type="number"] { border: 0; padding-top: 5px; padding-left: 0; padding-right: 0; } } }
a, a:visited { text-decoration: underline !important; } a[href]:after { content: ""; } a[class~="icons-holder-text"], a[class~="icons-holder-text"]:visited, a[class~="accordion-toggle"], a[class~="accordion-toggle"]:visited { text-decoration: none !important; } .actions-container, .widget-actions-container { white-space: nowrap; } table.grid { th.select-all-header-cell, td.select-row-cell, th.action-column, td.action-cell { display: none; } } .filter-box { padding-left: 20px; .filter-list { display: none; } .filter-item { a, a:visited { text-decoration: none !important; } } } .grid-toolbar { .pagination { li:first-child, li:last-child { display: none; } input[type="number"] { border: 0; padding-top: 5px; padding-left: 0; padding-right: 0; } } } .scrollable-container { height: auto !important; }
Fix .scrollable-container in print version
Fix .scrollable-container in print version In printable version .scrollable-container has fixed height and it crops part of the content
Less
mit
trustify/oroplatform,ramunasd/platform,geoffroycochard/platform,2ndkauboy/platform,2ndkauboy/platform,northdakota/platform,northdakota/platform,orocrm/platform,hugeval/platform,orocrm/platform,trustify/oroplatform,2ndkauboy/platform,geoffroycochard/platform,orocrm/platform,Djamy/platform,hugeval/platform,morontt/platform,geoffroycochard/platform,morontt/platform,ramunasd/platform,northdakota/platform,hugeval/platform,morontt/platform,Djamy/platform,trustify/oroplatform,Djamy/platform,ramunasd/platform
less
## Code Before: a, a:visited { text-decoration: underline !important; } a[href]:after { content: ""; } a[class~="icons-holder-text"], a[class~="icons-holder-text"]:visited, a[class~="accordion-toggle"], a[class~="accordion-toggle"]:visited { text-decoration: none !important; } .actions-container, .widget-actions-container { white-space: nowrap; } table.grid { th.select-all-header-cell, td.select-row-cell, th.action-column, td.action-cell { display: none; } } .filter-box { padding-left: 20px; .filter-list { display: none; } .filter-item { a, a:visited { text-decoration: none !important; } } } .grid-toolbar { .pagination { li:first-child, li:last-child { display: none; } input[type="number"] { border: 0; padding-top: 5px; padding-left: 0; padding-right: 0; } } } ## Instruction: Fix .scrollable-container in print version In printable version .scrollable-container has fixed height and it crops part of the content ## Code After: a, a:visited { text-decoration: underline !important; } a[href]:after { content: ""; } a[class~="icons-holder-text"], a[class~="icons-holder-text"]:visited, a[class~="accordion-toggle"], a[class~="accordion-toggle"]:visited { text-decoration: none !important; } .actions-container, .widget-actions-container { white-space: nowrap; } table.grid { th.select-all-header-cell, td.select-row-cell, th.action-column, td.action-cell { display: none; } } .filter-box { padding-left: 20px; .filter-list { display: none; } .filter-item { a, a:visited { text-decoration: none !important; } } } .grid-toolbar { .pagination { li:first-child, li:last-child { display: none; } input[type="number"] { border: 0; padding-top: 5px; padding-left: 0; padding-right: 0; } } } .scrollable-container { height: auto !important; }
e53e51c0adf5a027148067ccbf06535e49bea469
numeric-string/numeric-string.js
numeric-string/numeric-string.js
var numericString = function (number) { var string = ('' + number).split('.'), length = string[0].length, places = 0; while (--length) { places += 1; // At every third position we want to insert a comma if (places % 3 === 0) { string[0] = string[0].substr(0, length) + ',' + string[0].substr(length); } } return string.join('.'); };
var numericString = function (number) { var parts = ('' + number).split('.'), length = parts[0].length, places = 0; while (--length) { places += 1; // At every third position we want to insert a comma if (places % 3 === 0) { parts[0] = parts[0].substr(0, length) + ',' + parts[0].substr(length); } } return parts.join('.'); }; // Example using regular expression - let me know if I can skip the split step // some how var numericString = function (number) { var parts = ('' + number).split('.'); parts[0] = parts[0].replace(/(\d)(?=(?:\d{3})+$)/g, '$1,'); return parts.join('.'); };
Implement regex numeric string solution.
Implement regex numeric string solution.
JavaScript
mit
saurabhjn76/code-problems,angelkar/code-problems,sethdame/code-problems,jefimenko/code-problems,lgulliver/code-problems,caoglish/code-problems,lgulliver/code-problems,SterlingVix/code-problems,aloisdg/code-problems,diversedition/code-problems,patrickford/code-problems,caoglish/code-problems,caoglish/code-problems,patrickford/code-problems,faruzzy/code-problems,netuoso/code-problems,blakeembrey/code-problems,ranveer-git/code-problems,marcoviappiani/code-problems,faruzzy/code-problems,nacho-gil/code-problems,cjjavellana/code-problems,blakeembrey/code-problems,SterlingVix/code-problems,marcoviappiani/code-problems,sisirkoppaka/code-problems,angelkar/code-problems,marcoviappiani/code-problems,netuoso/code-problems,nacho-gil/code-problems,patrickford/code-problems,ranveer-git/code-problems,faruzzy/code-problems,netuoso/code-problems,cjjavellana/code-problems,ockang/code-problems,dwatson3/code-problems,SterlingVix/code-problems,AndrewKishino/code-problems,hlan2/code-problems,faruzzy/code-problems,aloisdg/code-problems,ankur-anand/code-problems,marcoviappiani/code-problems,jmera/code-problems,tahoeRobbo/code-problems,caoglish/code-problems,hlan2/code-problems,ankur-anand/code-problems,dwatson3/code-problems,netuoso/code-problems,cjjavellana/code-problems,ranveer-git/code-problems,AndrewKishino/code-problems,blakeembrey/code-problems,SterlingVix/code-problems,netuoso/code-problems,nacho-gil/code-problems,nacho-gil/code-problems,faruzzy/code-problems,caoglish/code-problems,tahoeRobbo/code-problems,angelkar/code-problems,AndrewKishino/code-problems,saurabhjn76/code-problems,ockang/code-problems,marcoviappiani/code-problems,ankur-anand/code-problems,blakeembrey/code-problems,blakeembrey/code-problems,hlan2/code-problems,marcoviappiani/code-problems,aloisdg/code-problems,jefimenko/code-problems,SterlingVix/code-problems,jefimenko/code-problems,sethdame/code-problems,netuoso/code-problems,dwatson3/code-problems,BastinRobin/code-problems,tahoeRobbo/code-problems,diversedition/code-problems,sisirkoppaka/code-problems,aloisdg/code-problems,caoglish/code-problems,nacho-gil/code-problems,BastinRobin/code-problems,AndrewKishino/code-problems,saurabhjn76/code-problems,Widea/code-problems,nickell-andrew/code-problems,Widea/code-problems,tahoeRobbo/code-problems,diversedition/code-problems,patrickford/code-problems,angelkar/code-problems,angelkar/code-problems,ockang/code-problems,akaragkiozidis/code-problems,caoglish/code-problems,patrickford/code-problems,SterlingVix/code-problems,netuoso/code-problems,angelkar/code-problems,nacho-gil/code-problems,rkho/code-problems,saurabhjn76/code-problems,hlan2/code-problems,nickell-andrew/code-problems,sisirkoppaka/code-problems,modulexcite/code-problems,blakeembrey/code-problems,cjjavellana/code-problems,lgulliver/code-problems,sisirkoppaka/code-problems,akaragkiozidis/code-problems,jefimenko/code-problems,rkho/code-problems,nacho-gil/code-problems,ankur-anand/code-problems,ankur-anand/code-problems,modulexcite/code-problems,ranveer-git/code-problems,patrickford/code-problems,nickell-andrew/code-problems,AndrewKishino/code-problems,cjjavellana/code-problems,tahoeRobbo/code-problems,cjjavellana/code-problems,BastinRobin/code-problems,jefimenko/code-problems,jefimenko/code-problems,jmera/code-problems,diversedition/code-problems,Widea/code-problems,nickell-andrew/code-problems,AndrewKishino/code-problems,aloisdg/code-problems,nacho-gil/code-problems,ankur-anand/code-problems,BastinRobin/code-problems,ranveer-git/code-problems,modulexcite/code-problems,sethdame/code-problems,saurabhjn76/code-problems,ockang/code-problems,tahoeRobbo/code-problems,jmera/code-problems,diversedition/code-problems,modulexcite/code-problems,modulexcite/code-problems,cjjavellana/code-problems,ankur-anand/code-problems,modulexcite/code-problems,faruzzy/code-problems,ockang/code-problems,aloisdg/code-problems,sisirkoppaka/code-problems,marcoviappiani/code-problems,diversedition/code-problems,jefimenko/code-problems,rkho/code-problems,nacho-gil/code-problems,diversedition/code-problems,jmera/code-problems,modulexcite/code-problems,aloisdg/code-problems,saurabhjn76/code-problems,Widea/code-problems,netuoso/code-problems,Widea/code-problems,rkho/code-problems,tahoeRobbo/code-problems,aloisdg/code-problems,blakeembrey/code-problems,patrickford/code-problems,Widea/code-problems,nickell-andrew/code-problems,sethdame/code-problems,caoglish/code-problems,BastinRobin/code-problems,sethdame/code-problems,ankur-anand/code-problems,lgulliver/code-problems,ockang/code-problems,hlan2/code-problems,hlan2/code-problems,SterlingVix/code-problems,faruzzy/code-problems,patrickford/code-problems,sisirkoppaka/code-problems,patrickford/code-problems,rkho/code-problems,jefimenko/code-problems,Widea/code-problems,sethdame/code-problems,faruzzy/code-problems,diversedition/code-problems,modulexcite/code-problems,marcoviappiani/code-problems,marcoviappiani/code-problems,blakeembrey/code-problems,angelkar/code-problems,angelkar/code-problems,BastinRobin/code-problems,Widea/code-problems,diversedition/code-problems,saurabhjn76/code-problems,jmera/code-problems,faruzzy/code-problems,ankur-anand/code-problems,lgulliver/code-problems,modulexcite/code-problems,BastinRobin/code-problems,hlan2/code-problems,nickell-andrew/code-problems,nickell-andrew/code-problems,akaragkiozidis/code-problems,lgulliver/code-problems,tahoeRobbo/code-problems,sethdame/code-problems,sisirkoppaka/code-problems,lgulliver/code-problems,nickell-andrew/code-problems,Widea/code-problems,ockang/code-problems,jefimenko/code-problems,sethdame/code-problems,AndrewKishino/code-problems,dwatson3/code-problems,sisirkoppaka/code-problems,marcoviappiani/code-problems,caoglish/code-problems,rkho/code-problems,akaragkiozidis/code-problems,jmera/code-problems,AndrewKishino/code-problems,nickell-andrew/code-problems,saurabhjn76/code-problems,hlan2/code-problems,angelkar/code-problems,akaragkiozidis/code-problems,BastinRobin/code-problems,aloisdg/code-problems,ockang/code-problems,ockang/code-problems,rkho/code-problems,jefimenko/code-problems,ranveer-git/code-problems,akaragkiozidis/code-problems,modulexcite/code-problems,hlan2/code-problems,saurabhjn76/code-problems,ranveer-git/code-problems,AndrewKishino/code-problems,jmera/code-problems,rkho/code-problems,tahoeRobbo/code-problems,dwatson3/code-problems,tahoeRobbo/code-problems,sethdame/code-problems,dwatson3/code-problems,jmera/code-problems,angelkar/code-problems,caoglish/code-problems,ranveer-git/code-problems,SterlingVix/code-problems,ockang/code-problems,cjjavellana/code-problems,cjjavellana/code-problems,SterlingVix/code-problems,jmera/code-problems,ankur-anand/code-problems,netuoso/code-problems,akaragkiozidis/code-problems,patrickford/code-problems,sethdame/code-problems,faruzzy/code-problems,nacho-gil/code-problems,cjjavellana/code-problems,hlan2/code-problems,lgulliver/code-problems,nickell-andrew/code-problems,ranveer-git/code-problems,rkho/code-problems,lgulliver/code-problems,ranveer-git/code-problems,akaragkiozidis/code-problems,lgulliver/code-problems,rkho/code-problems,BastinRobin/code-problems,dwatson3/code-problems,akaragkiozidis/code-problems,akaragkiozidis/code-problems,dwatson3/code-problems,aloisdg/code-problems,dwatson3/code-problems,SterlingVix/code-problems,saurabhjn76/code-problems,blakeembrey/code-problems,jmera/code-problems,sisirkoppaka/code-problems,dwatson3/code-problems,AndrewKishino/code-problems,sisirkoppaka/code-problems,Widea/code-problems,blakeembrey/code-problems
javascript
## Code Before: var numericString = function (number) { var string = ('' + number).split('.'), length = string[0].length, places = 0; while (--length) { places += 1; // At every third position we want to insert a comma if (places % 3 === 0) { string[0] = string[0].substr(0, length) + ',' + string[0].substr(length); } } return string.join('.'); }; ## Instruction: Implement regex numeric string solution. ## Code After: var numericString = function (number) { var parts = ('' + number).split('.'), length = parts[0].length, places = 0; while (--length) { places += 1; // At every third position we want to insert a comma if (places % 3 === 0) { parts[0] = parts[0].substr(0, length) + ',' + parts[0].substr(length); } } return parts.join('.'); }; // Example using regular expression - let me know if I can skip the split step // some how var numericString = function (number) { var parts = ('' + number).split('.'); parts[0] = parts[0].replace(/(\d)(?=(?:\d{3})+$)/g, '$1,'); return parts.join('.'); };
e1fb60e7858c44c7c0964e9fb131f44f95ef073c
docker-compose.yml
docker-compose.yml
version: "2" services: ackee: restart: always build: . ports: - "3000:3000" environment: - MONGODB=mongodb://mongo:27017/ackee - WAIT_HOSTS=mongo:27017 links: - mongo depends_on: - mongo mongo: image: "mongo" volumes: - ./data:/data/db ports: - "27017:27017"
version: "2" services: ackee: restart: always build: . ports: - "3000:3000" environment: - MONGODB=mongodb://mongo:27017/ackee - USERNAME=username - PASSWORD=password - WAIT_HOSTS=mongo:27017 links: - mongo depends_on: - mongo mongo: image: "mongo" volumes: - ./data:/data/db ports: - "27017:27017"
Include default username and password
Include default username and password
YAML
mit
electerious/Ackee
yaml
## Code Before: version: "2" services: ackee: restart: always build: . ports: - "3000:3000" environment: - MONGODB=mongodb://mongo:27017/ackee - WAIT_HOSTS=mongo:27017 links: - mongo depends_on: - mongo mongo: image: "mongo" volumes: - ./data:/data/db ports: - "27017:27017" ## Instruction: Include default username and password ## Code After: version: "2" services: ackee: restart: always build: . ports: - "3000:3000" environment: - MONGODB=mongodb://mongo:27017/ackee - USERNAME=username - PASSWORD=password - WAIT_HOSTS=mongo:27017 links: - mongo depends_on: - mongo mongo: image: "mongo" volumes: - ./data:/data/db ports: - "27017:27017"
292a3ed89cdc730bc15f248a552114583ea6c36e
solus/.solus_setup.sh
solus/.solus_setup.sh
sudo eopkg upgrade sudo eopkg install -y -c system.devel sudo eopkg install -y \ cloc emacs fuse git keybase linux-lts llvm llvm-clang openssh \ sdl2-devel sdl2-image-devel sdl2-mixer-devel sdl2-ttf-devel sudo usermod -aG fuse $(whoami) snap refresh snap install sublime-text --classic snap install sublime-merge --classic wget -N https://raw.githubusercontent.com/ryanpcmcquen/linuxTweaks/master/.genericLinuxConfig.sh -P ~/ && \ bash ~/.genericLinuxConfig.sh if [ "`which plasmashell`" ]; then wget -N https://raw.githubusercontent.com/ryanpcmcquen/linuxTweaks/master/.kdeSetup.sh -P ~/ && \ bash .kdeSetup.sh fi
sudo eopkg upgrade sudo eopkg install -y -c system.devel sudo eopkg install -y \ cloc emacs fuse git keybase linux-lts llvm llvm-clang openssh \ sdl2-devel sdl2-image-devel sdl2-mixer-devel sdl2-ttf-devel sudo usermod -aG fuse $(whoami) sudo snap refresh sudo snap install sublime-text --classic sudo snap install sublime-merge --classic wget -N https://raw.githubusercontent.com/ryanpcmcquen/linuxTweaks/master/.genericLinuxConfig.sh -P ~/ && \ bash ~/.genericLinuxConfig.sh if [ "`which plasmashell`" ]; then wget -N https://raw.githubusercontent.com/ryanpcmcquen/linuxTweaks/master/.kdeSetup.sh -P ~/ && \ bash .kdeSetup.sh fi
Use sudo for the snap commands.
Use sudo for the snap commands.
Shell
mpl-2.0
ryanpcmcquen/linuxTweaks
shell
## Code Before: sudo eopkg upgrade sudo eopkg install -y -c system.devel sudo eopkg install -y \ cloc emacs fuse git keybase linux-lts llvm llvm-clang openssh \ sdl2-devel sdl2-image-devel sdl2-mixer-devel sdl2-ttf-devel sudo usermod -aG fuse $(whoami) snap refresh snap install sublime-text --classic snap install sublime-merge --classic wget -N https://raw.githubusercontent.com/ryanpcmcquen/linuxTweaks/master/.genericLinuxConfig.sh -P ~/ && \ bash ~/.genericLinuxConfig.sh if [ "`which plasmashell`" ]; then wget -N https://raw.githubusercontent.com/ryanpcmcquen/linuxTweaks/master/.kdeSetup.sh -P ~/ && \ bash .kdeSetup.sh fi ## Instruction: Use sudo for the snap commands. ## Code After: sudo eopkg upgrade sudo eopkg install -y -c system.devel sudo eopkg install -y \ cloc emacs fuse git keybase linux-lts llvm llvm-clang openssh \ sdl2-devel sdl2-image-devel sdl2-mixer-devel sdl2-ttf-devel sudo usermod -aG fuse $(whoami) sudo snap refresh sudo snap install sublime-text --classic sudo snap install sublime-merge --classic wget -N https://raw.githubusercontent.com/ryanpcmcquen/linuxTweaks/master/.genericLinuxConfig.sh -P ~/ && \ bash ~/.genericLinuxConfig.sh if [ "`which plasmashell`" ]; then wget -N https://raw.githubusercontent.com/ryanpcmcquen/linuxTweaks/master/.kdeSetup.sh -P ~/ && \ bash .kdeSetup.sh fi
dda86e85b5303d69d121b76165884fa901125f47
core/templates/dev/head/components/html_select_directive.html
core/templates/dev/head/components/html_select_directive.html
<script type="text/ng-template" id="components/htmlSelect"> <div class="oppia-html-select"> <button class="btn btn-default dropdown-toggle oppia-html-select-selection" type="button" id="menu1" aria-expanded="false" data-toggle="dropdown"> <div class="oppia-html-select-selection-element" angular-html-bind="options[selection].val"></div> <span class="caret oppia-html-select-selection-caret"></span> </button> <ul class="dropdown-menu" style="width: inherit;"> <li ng-repeat="choice in options"> <a class="oppia-html-select-option" angular-html-bind="choice.val" ng-click="select(choice.id)"> </a> </li> </ul> </div> </script>
<script type="text/ng-template" id="components/htmlSelect"> <div class="oppia-html-select"> <button class="btn btn-default dropdown-toggle oppia-html-select-selection" type="button" aria-expanded="false" data-toggle="dropdown"> <div class="oppia-html-select-selection-element" angular-html-bind="options[selection].val"></div> <span class="caret oppia-html-select-selection-caret"></span> </button> <ul class="dropdown-menu" style="width: inherit;"> <li ng-repeat="choice in options"> <a class="oppia-html-select-option" angular-html-bind="choice.val" ng-click="select(choice.id)"> </a> </li> </ul> </div> </script>
Remove id from button HTML tag
Remove id from button HTML tag
HTML
apache-2.0
sbhowmik89/oppia,sdulal/oppia,sbhowmik89/oppia,shaz13/oppia,anthkris/oppia,kennho/oppia,jestapinski/oppia,zgchizi/oppia-uc,bjvoth/oppia,MAKOSCAFEE/oppia,anggorodewanto/oppia,himanshu-dixit/oppia,bjvoth/oppia,MaximLich/oppia,brianrodri/oppia,souravbadami/oppia,kevinlee12/oppia,kevinlee12/oppia,bjvoth/oppia,MaximLich/oppia,raju249/oppia,michaelWagner/oppia,mit0110/oppia,AllanYangZhou/oppia,sdulal/oppia,brianrodri/oppia,kevinlee12/oppia,sbhowmik89/oppia,amgowano/oppia,sbhowmik89/oppia,zgchizi/oppia-uc,kennho/oppia,terrameijar/oppia,terrameijar/oppia,bjvoth/oppia,prasanna08/oppia,kingctan/oppia,mit0110/oppia,MAKOSCAFEE/oppia,anthkris/oppia,edallison/oppia,rackstar17/oppia,brianrodri/oppia,shaz13/oppia,himanshu-dixit/oppia,rackstar17/oppia,AllanYangZhou/oppia,brianrodri/oppia,sdulal/oppia,edallison/oppia,michaelWagner/oppia,shaz13/oppia,kennho/oppia,oppia/oppia,terrameijar/oppia,terrameijar/oppia,michaelWagner/oppia,mit0110/oppia,anggorodewanto/oppia,edallison/oppia,bjvoth/oppia,souravbadami/oppia,jestapinski/oppia,mit0110/oppia,oppia/oppia,prasanna08/oppia,rackstar17/oppia,AllanYangZhou/oppia,edallison/oppia,anthkris/oppia,oppia/oppia,amgowano/oppia,jestapinski/oppia,himanshu-dixit/oppia,kingctan/oppia,prasanna08/oppia,MAKOSCAFEE/oppia,sdulal/oppia,prasanna08/oppia,zgchizi/oppia-uc,zgchizi/oppia-uc,himanshu-dixit/oppia,mit0110/oppia,rackstar17/oppia,kennho/oppia,anthkris/oppia,MAKOSCAFEE/oppia,souravbadami/oppia,MaximLich/oppia,kevinlee12/oppia,amgowano/oppia,sdulal/oppia,souravbadami/oppia,jestapinski/oppia,raju249/oppia,oppia/oppia,shaz13/oppia,brianrodri/oppia,sbhowmik89/oppia,kingctan/oppia,MaximLich/oppia,kevinlee12/oppia,kingctan/oppia,anggorodewanto/oppia,kingctan/oppia,michaelWagner/oppia,raju249/oppia,prasanna08/oppia,amgowano/oppia,AllanYangZhou/oppia,michaelWagner/oppia,raju249/oppia,souravbadami/oppia,anggorodewanto/oppia,kennho/oppia,oppia/oppia
html
## Code Before: <script type="text/ng-template" id="components/htmlSelect"> <div class="oppia-html-select"> <button class="btn btn-default dropdown-toggle oppia-html-select-selection" type="button" id="menu1" aria-expanded="false" data-toggle="dropdown"> <div class="oppia-html-select-selection-element" angular-html-bind="options[selection].val"></div> <span class="caret oppia-html-select-selection-caret"></span> </button> <ul class="dropdown-menu" style="width: inherit;"> <li ng-repeat="choice in options"> <a class="oppia-html-select-option" angular-html-bind="choice.val" ng-click="select(choice.id)"> </a> </li> </ul> </div> </script> ## Instruction: Remove id from button HTML tag ## Code After: <script type="text/ng-template" id="components/htmlSelect"> <div class="oppia-html-select"> <button class="btn btn-default dropdown-toggle oppia-html-select-selection" type="button" aria-expanded="false" data-toggle="dropdown"> <div class="oppia-html-select-selection-element" angular-html-bind="options[selection].val"></div> <span class="caret oppia-html-select-selection-caret"></span> </button> <ul class="dropdown-menu" style="width: inherit;"> <li ng-repeat="choice in options"> <a class="oppia-html-select-option" angular-html-bind="choice.val" ng-click="select(choice.id)"> </a> </li> </ul> </div> </script>
a6e7f053c151fc343f0dd86010b159e21c0948b5
accountsplus/forms.py
accountsplus/forms.py
from __future__ import unicode_literals import django.forms from django.conf import settings from django.apps import apps from django.contrib.auth.forms import AuthenticationForm from django.contrib.admin.forms import AdminAuthenticationForm from captcha.fields import ReCaptchaField class CaptchaForm(django.forms.Form): captcha = ReCaptchaField() username = django.forms.CharField() def clean_username(self): username = self.cleaned_data.get('username') User = apps.get_model(getattr(settings, 'AUTH_USER_MODEL')) if not User.objects.filter(email=username).exists(): raise django.forms.ValidationError("Username does not belong to a registered user") return username class EmailBasedAuthenticationForm(AuthenticationForm): def clean_username(self): return self.cleaned_data['username'].lower() class EmailBasedAdminAuthenticationForm(AdminAuthenticationForm): def clean_username(self): return self.cleaned_data['username'].lower()
from __future__ import unicode_literals import django.forms from django.conf import settings from django.apps import apps from django.contrib.auth.forms import AuthenticationForm from django.contrib.admin.forms import AdminAuthenticationForm from captcha.fields import ReCaptchaField class CaptchaForm(django.forms.Form): captcha = ReCaptchaField() username = django.forms.CharField() def clean_username(self): username = self.cleaned_data.get('username') User = apps.get_model(getattr(settings, 'AUTH_USER_MODEL')) if not User.objects.filter(email=username).exists(): raise django.forms.ValidationError("Username does not belong to a registered user") return username class EmailBasedAuthenticationForm(AuthenticationForm): def clean_username(self): return self.data['username'].lower() class EmailBasedAdminAuthenticationForm(AdminAuthenticationForm): def clean_username(self): return self.data['username'].lower()
Fix how we are reading user name
Fix how we are reading user name
Python
mit
foundertherapy/django-users-plus,foundertherapy/django-users-plus
python
## Code Before: from __future__ import unicode_literals import django.forms from django.conf import settings from django.apps import apps from django.contrib.auth.forms import AuthenticationForm from django.contrib.admin.forms import AdminAuthenticationForm from captcha.fields import ReCaptchaField class CaptchaForm(django.forms.Form): captcha = ReCaptchaField() username = django.forms.CharField() def clean_username(self): username = self.cleaned_data.get('username') User = apps.get_model(getattr(settings, 'AUTH_USER_MODEL')) if not User.objects.filter(email=username).exists(): raise django.forms.ValidationError("Username does not belong to a registered user") return username class EmailBasedAuthenticationForm(AuthenticationForm): def clean_username(self): return self.cleaned_data['username'].lower() class EmailBasedAdminAuthenticationForm(AdminAuthenticationForm): def clean_username(self): return self.cleaned_data['username'].lower() ## Instruction: Fix how we are reading user name ## Code After: from __future__ import unicode_literals import django.forms from django.conf import settings from django.apps import apps from django.contrib.auth.forms import AuthenticationForm from django.contrib.admin.forms import AdminAuthenticationForm from captcha.fields import ReCaptchaField class CaptchaForm(django.forms.Form): captcha = ReCaptchaField() username = django.forms.CharField() def clean_username(self): username = self.cleaned_data.get('username') User = apps.get_model(getattr(settings, 'AUTH_USER_MODEL')) if not User.objects.filter(email=username).exists(): raise django.forms.ValidationError("Username does not belong to a registered user") return username class EmailBasedAuthenticationForm(AuthenticationForm): def clean_username(self): return self.data['username'].lower() class EmailBasedAdminAuthenticationForm(AdminAuthenticationForm): def clean_username(self): return self.data['username'].lower()
b3e5da1dba0226d9f56d336248e1b3f8f00175ef
lib/metacrunch/ubpb/record/zählung.rb
lib/metacrunch/ubpb/record/zählung.rb
require_relative "./generisches_element" class Metacrunch::UBPB::Record::Zählung < Metacrunch::UBPB::Record::GenerischesElement end
require_relative "./generisches_element" class Metacrunch::UBPB::Record::Zählung < Metacrunch::UBPB::Record::GenerischesElement SUBFIELDS = { a: { "Zusammenfassung" => :NW }, # Non-RDA b: { "Band" => :NW }, # RDA h: { "Heft" => :NW }, # RDA j: { "Jahr" => :NW }, # RDA s: { "Seiten" => :NW } # RDA } def get(property = nil, options = {}) zusammenfassung = @properties["Zusammenfassung"] if zusammenfassung.present? zusammenfassung else # Beispiel: Heft 19 (1964), Seite 39-45 : Illustrationen result = join("", @properties["Band"], prepend_always: "Band ") result = join(result, @properties["Heft"], separator: ", ", prepend_always: "Heft ") result = join(result, @properties["Jahr"], separator: " ", wrap: "(@)") result = join(result, @properties["Seiten"], separator: ", ", prepend_always: "Seite ") result end end private def join(memo, string, separator: "", wrap: "", prepend_always: "") if string.blank? memo else string = prepend_always + string if memo.present? string = wrap.gsub("@", string) if wrap.present? memo + separator + string else string end end end end
Add RDA Support for field 596
Add RDA Support for field 596
Ruby
mit
ubpb/metacrunch-ubpb
ruby
## Code Before: require_relative "./generisches_element" class Metacrunch::UBPB::Record::Zählung < Metacrunch::UBPB::Record::GenerischesElement end ## Instruction: Add RDA Support for field 596 ## Code After: require_relative "./generisches_element" class Metacrunch::UBPB::Record::Zählung < Metacrunch::UBPB::Record::GenerischesElement SUBFIELDS = { a: { "Zusammenfassung" => :NW }, # Non-RDA b: { "Band" => :NW }, # RDA h: { "Heft" => :NW }, # RDA j: { "Jahr" => :NW }, # RDA s: { "Seiten" => :NW } # RDA } def get(property = nil, options = {}) zusammenfassung = @properties["Zusammenfassung"] if zusammenfassung.present? zusammenfassung else # Beispiel: Heft 19 (1964), Seite 39-45 : Illustrationen result = join("", @properties["Band"], prepend_always: "Band ") result = join(result, @properties["Heft"], separator: ", ", prepend_always: "Heft ") result = join(result, @properties["Jahr"], separator: " ", wrap: "(@)") result = join(result, @properties["Seiten"], separator: ", ", prepend_always: "Seite ") result end end private def join(memo, string, separator: "", wrap: "", prepend_always: "") if string.blank? memo else string = prepend_always + string if memo.present? string = wrap.gsub("@", string) if wrap.present? memo + separator + string else string end end end end
5d08dd6f2e09884c7cfe30a305f19662c204bdfd
README.md
README.md
TogglCalc --------- Easily calculate the number of days worked on the Toggl Report page. [Download from addons.mozilla.org](https://addons.mozilla.org/en-US/firefox/addon/togglcalc/) [Time](http://thenounproject.com/noun/time/#icon-No6732) designed by [Richard de Vos](http://thenounproject.com/ristyled) from The Noun Project
TogglCalc --------- Easily calculate the number of days worked on the Toggl Report page. [Download from addons.mozilla.org](https://addons.mozilla.org/en-US/firefox/addon/togglcalc/) Icon is [Time](http://thenounproject.com/noun/time/#icon-No6732) designed by [Richard de Vos](http://thenounproject.com/ristyled) from The Noun Project
Update readme a bit more
Update readme a bit more
Markdown
mit
nigelbabu/togglcalc
markdown
## Code Before: TogglCalc --------- Easily calculate the number of days worked on the Toggl Report page. [Download from addons.mozilla.org](https://addons.mozilla.org/en-US/firefox/addon/togglcalc/) [Time](http://thenounproject.com/noun/time/#icon-No6732) designed by [Richard de Vos](http://thenounproject.com/ristyled) from The Noun Project ## Instruction: Update readme a bit more ## Code After: TogglCalc --------- Easily calculate the number of days worked on the Toggl Report page. [Download from addons.mozilla.org](https://addons.mozilla.org/en-US/firefox/addon/togglcalc/) Icon is [Time](http://thenounproject.com/noun/time/#icon-No6732) designed by [Richard de Vos](http://thenounproject.com/ristyled) from The Noun Project
6b5a63996b417853379defb68e94f7f7b97bb959
Code/Compiler/Extrinsic-environment/import-from-sicl-global-environment.lisp
Code/Compiler/Extrinsic-environment/import-from-sicl-global-environment.lisp
(cl:in-package #:sicl-extrinsic-environment) ;;; Add every global environment function into the environment. (defun import-from-sicl-global-environment (environment) (loop for symbol being each external-symbol in '#:sicl-global-environment when (fboundp symbol) do (setf (sicl-env:fdefinition symbol environment) (fdefinition symbol)) when (fboundp `(setf ,symbol)) do (setf (sicl-env:fdefinition `(setf ,symbol) environment) (fdefinition `(setf ,symbol)))))
(cl:in-package #:sicl-extrinsic-environment) ;;; Add every global environment function into the environment. (defun import-from-sicl-global-environment (environment) (loop for symbol being each external-symbol in '#:sicl-global-environment when (fboundp symbol) do (setf (sicl-env:fdefinition symbol environment) (fdefinition symbol)) when (fboundp `(setf ,symbol)) do (setf (sicl-env:fdefinition `(setf ,symbol) environment) (fdefinition `(setf ,symbol)))) (setf (sicl-env:special-variable 'sicl-env:*global-environment* environment t) environment))
Define variable *GLOBAL-ENVIRONMENT* in the exitrinsic environment.
Define variable *GLOBAL-ENVIRONMENT* in the exitrinsic environment.
Common Lisp
bsd-2-clause
vtomole/SICL,clasp-developers/SICL,clasp-developers/SICL,clasp-developers/SICL,vtomole/SICL,vtomole/SICL,clasp-developers/SICL,vtomole/SICL
common-lisp
## Code Before: (cl:in-package #:sicl-extrinsic-environment) ;;; Add every global environment function into the environment. (defun import-from-sicl-global-environment (environment) (loop for symbol being each external-symbol in '#:sicl-global-environment when (fboundp symbol) do (setf (sicl-env:fdefinition symbol environment) (fdefinition symbol)) when (fboundp `(setf ,symbol)) do (setf (sicl-env:fdefinition `(setf ,symbol) environment) (fdefinition `(setf ,symbol))))) ## Instruction: Define variable *GLOBAL-ENVIRONMENT* in the exitrinsic environment. ## Code After: (cl:in-package #:sicl-extrinsic-environment) ;;; Add every global environment function into the environment. (defun import-from-sicl-global-environment (environment) (loop for symbol being each external-symbol in '#:sicl-global-environment when (fboundp symbol) do (setf (sicl-env:fdefinition symbol environment) (fdefinition symbol)) when (fboundp `(setf ,symbol)) do (setf (sicl-env:fdefinition `(setf ,symbol) environment) (fdefinition `(setf ,symbol)))) (setf (sicl-env:special-variable 'sicl-env:*global-environment* environment t) environment))
024de1e7eff4e4f688266d14abfe0dbcaedf407e
index.js
index.js
require('./env'); var http = require('http'); var koa = require('koa'); var app = koa(); app.use(require('koa-bodyparser')()); app.use(function *(next) { if (typeof this.request.body === 'undefined' || this.request.body === null) { this.request.body = {}; } yield next; }); app.use(require('koa-views')('views', { default: 'jade' })); app.use(function *(next) { this.api = API; var token = this.cookies.get('session-token'); if (token) { this.api.$header('x-session-token', token); } yield next; }); app.use(function *(next) { try { yield next; } catch (err) { if (err.body) { if (err.body.status === 401) { this.redirect('/account/signin'); } else { this.body = err.body; } } console.error(err.stack); } }); require('koa-mount-directory')(app, require('path').join(__dirname, 'routes')); app.use(require('koa-mount')('/api', require('./api'))); if (require.main === module) { app.listen($config.port); } else { module.exports = app; }
require('./env'); var mount = require('koa-mount'); var koa = require('koa'); var app = koa(); app.use(require('koa-bodyparser')()); app.use(function *(next) { if (typeof this.request.body === 'undefined' || this.request.body === null) { this.request.body = {}; } yield next; }); app.use(mount('/build', require('koa-static')('build', { defer: true }))); app.use(require('koa-views')('views', { default: 'jade' })); app.use(function *(next) { this.api = API; var token = this.cookies.get('session-token'); if (token) { this.api.$header('x-session-token', token); } yield next; }); app.use(function *(next) { try { yield next; } catch (err) { if (err.body) { if (err.body.status === 401) { this.redirect('/account/signin'); } else { this.body = err.body; } } console.error(err.stack || err); } }); require('koa-mount-directory')(app, require('path').join(__dirname, 'routes')); app.use(require('koa-mount')('/api', require('./api'))); if (require.main === module) { app.listen($config.port); } else { module.exports = app; }
Use koa-static to serve static files
Use koa-static to serve static files
JavaScript
mit
luin/doclab,luin/doclab
javascript
## Code Before: require('./env'); var http = require('http'); var koa = require('koa'); var app = koa(); app.use(require('koa-bodyparser')()); app.use(function *(next) { if (typeof this.request.body === 'undefined' || this.request.body === null) { this.request.body = {}; } yield next; }); app.use(require('koa-views')('views', { default: 'jade' })); app.use(function *(next) { this.api = API; var token = this.cookies.get('session-token'); if (token) { this.api.$header('x-session-token', token); } yield next; }); app.use(function *(next) { try { yield next; } catch (err) { if (err.body) { if (err.body.status === 401) { this.redirect('/account/signin'); } else { this.body = err.body; } } console.error(err.stack); } }); require('koa-mount-directory')(app, require('path').join(__dirname, 'routes')); app.use(require('koa-mount')('/api', require('./api'))); if (require.main === module) { app.listen($config.port); } else { module.exports = app; } ## Instruction: Use koa-static to serve static files ## Code After: require('./env'); var mount = require('koa-mount'); var koa = require('koa'); var app = koa(); app.use(require('koa-bodyparser')()); app.use(function *(next) { if (typeof this.request.body === 'undefined' || this.request.body === null) { this.request.body = {}; } yield next; }); app.use(mount('/build', require('koa-static')('build', { defer: true }))); app.use(require('koa-views')('views', { default: 'jade' })); app.use(function *(next) { this.api = API; var token = this.cookies.get('session-token'); if (token) { this.api.$header('x-session-token', token); } yield next; }); app.use(function *(next) { try { yield next; } catch (err) { if (err.body) { if (err.body.status === 401) { this.redirect('/account/signin'); } else { this.body = err.body; } } console.error(err.stack || err); } }); require('koa-mount-directory')(app, require('path').join(__dirname, 'routes')); app.use(require('koa-mount')('/api', require('./api'))); if (require.main === module) { app.listen($config.port); } else { module.exports = app; }
08ca4e22625174d7135b5393575ccbcd2f51629f
Sources/Rosetta/Actions/Targeting.cpp
Sources/Rosetta/Actions/Targeting.cpp
// This code is based on Sabberstone project. // Copyright (c) 2017-2019 SabberStone Team, darkfriend77 & rnilva // Hearthstone++ is hearthstone simulator using C++ with reinforcement learning. // Copyright (c) 2019 Chris Ohk, Youngjoong Kim, SeungHyun Jeon #include <Rosetta/Actions/Targeting.hpp> #include <Rosetta/Games/Game.hpp> namespace RosettaStone::Generic { bool IsValidTarget(Entity* source, Entity* target) { for (auto& requirement : source->card.playRequirements) { switch (requirement.first) { case +PlayReq::REQ_MINION_TARGET: { if (dynamic_cast<Minion*>(target) == nullptr) { return false; } } case +PlayReq::REQ_ENEMY_TARGET: { if (&target->GetOwner() == &source->GetOwner()) { return false; } } case +PlayReq::REQ_TARGET_TO_PLAY: { if (dynamic_cast<Character*>(target) == nullptr) { return false; } } default: break; } } return true; } } // namespace RosettaStone::Generic
// This code is based on Sabberstone project. // Copyright (c) 2017-2019 SabberStone Team, darkfriend77 & rnilva // Hearthstone++ is hearthstone simulator using C++ with reinforcement learning. // Copyright (c) 2019 Chris Ohk, Youngjoong Kim, SeungHyun Jeon #include <Rosetta/Actions/Targeting.hpp> #include <Rosetta/Games/Game.hpp> namespace RosettaStone::Generic { bool IsValidTarget(Entity* source, Entity* target) { for (auto& requirement : source->card.playRequirements) { switch (requirement.first) { case +PlayReq::REQ_MINION_TARGET: { if (dynamic_cast<Minion*>(target) == nullptr) { return false; } break; } case +PlayReq::REQ_ENEMY_TARGET: { if (&target->GetOwner() == &source->GetOwner()) { return false; } break; } case +PlayReq::REQ_TARGET_TO_PLAY: { if (dynamic_cast<Character*>(target) == nullptr) { return false; } break; } default: break; } } return true; } } // namespace RosettaStone::Generic
Add 'break' in switch-case statement
fix: Add 'break' in switch-case statement
C++
mit
Hearthstonepp/Hearthstonepp,Hearthstonepp/Hearthstonepp
c++
## Code Before: // This code is based on Sabberstone project. // Copyright (c) 2017-2019 SabberStone Team, darkfriend77 & rnilva // Hearthstone++ is hearthstone simulator using C++ with reinforcement learning. // Copyright (c) 2019 Chris Ohk, Youngjoong Kim, SeungHyun Jeon #include <Rosetta/Actions/Targeting.hpp> #include <Rosetta/Games/Game.hpp> namespace RosettaStone::Generic { bool IsValidTarget(Entity* source, Entity* target) { for (auto& requirement : source->card.playRequirements) { switch (requirement.first) { case +PlayReq::REQ_MINION_TARGET: { if (dynamic_cast<Minion*>(target) == nullptr) { return false; } } case +PlayReq::REQ_ENEMY_TARGET: { if (&target->GetOwner() == &source->GetOwner()) { return false; } } case +PlayReq::REQ_TARGET_TO_PLAY: { if (dynamic_cast<Character*>(target) == nullptr) { return false; } } default: break; } } return true; } } // namespace RosettaStone::Generic ## Instruction: fix: Add 'break' in switch-case statement ## Code After: // This code is based on Sabberstone project. // Copyright (c) 2017-2019 SabberStone Team, darkfriend77 & rnilva // Hearthstone++ is hearthstone simulator using C++ with reinforcement learning. // Copyright (c) 2019 Chris Ohk, Youngjoong Kim, SeungHyun Jeon #include <Rosetta/Actions/Targeting.hpp> #include <Rosetta/Games/Game.hpp> namespace RosettaStone::Generic { bool IsValidTarget(Entity* source, Entity* target) { for (auto& requirement : source->card.playRequirements) { switch (requirement.first) { case +PlayReq::REQ_MINION_TARGET: { if (dynamic_cast<Minion*>(target) == nullptr) { return false; } break; } case +PlayReq::REQ_ENEMY_TARGET: { if (&target->GetOwner() == &source->GetOwner()) { return false; } break; } case +PlayReq::REQ_TARGET_TO_PLAY: { if (dynamic_cast<Character*>(target) == nullptr) { return false; } break; } default: break; } } return true; } } // namespace RosettaStone::Generic
51be77b8fff6811e4d70d9f201cb93ebb9411425
_posts/2016-12-28-Infrastructure-Status-and-Official-Builds.md
_posts/2016-12-28-Infrastructure-Status-and-Official-Builds.md
--- layout: post title: Infrastructure Status & Official Builds category: blog excerpt: Build slaves, mirrors, and builds author: zifnab --- We're working on getting everything operational and would like to thank everyone who's reached out offering assistance. If you haven't heard back from us, you should in the next week or so. Current needs: * Build Slaves * Must be able to finish (and upload) `make clean && make dist` within an hour, and be capable of running docker. * Build Mirrors * Minimum 100mbit network connectivity, 1gbit preferred. * Minimum 500GB storage space. * As a note, we'd prefer non-capped connections with static IPs, and they must be in some sort of professional hosting company (ie, datacenter, colocation facility, ISP, university, etc). While we appreciate the offers from people with gigabit at home, it's slightly too hard to manage. As a reminder: we have not started doing official builds yet. One of the benefits of this being an open source project is that anyone can build it, but please be careful flashing builds you've downloaded from other sources. We will have some more information on when weeklies (or possibly nightlies) will be starting soon. Thanks! LineageOS Team
--- layout: post title: Infrastructure Status & Official Builds category: blog excerpt: Build slaves, mirrors, and builds author: zifnab --- We're working on getting everything operational and would like to thank everyone who's reached out offering assistance. If you haven't heard back from us, you should in the next week or so. Current needs: * Build Slaves * Must be able to finish (and upload) `make clean && make dist` within an hour, and be capable of running docker. * Build Mirrors * Minimum 100mbit network connectivity, 1gbit preferred. * Minimum 500GB storage space. * As a note, we'd prefer non-capped connections with static IPs, and they must be in some sort of professional hosting company (ie, datacenter, colocation facility, ISP, university, etc). While we appreciate the offers from people with gigabit at home, it's slightly too hard to manage. Please contact [infra@lineageos.org](mailto:infra@lineageos.org) if you are willing to provide either build slaves or build mirrors. As a reminder: we have not started doing official builds yet. One of the benefits of this being an open source project is that anyone can build it, but please be careful flashing builds you've downloaded from other sources. We will have some more information on when weeklies (or possibly nightlies) will be starting soon. Thanks! LineageOS Team
Add email to infra post
Add email to infra post Change-Id: Ib41b003eaddaf01586cbcf8326466164ed0ed903
Markdown
mit
aquaris-dev/aquaris-dev.github.io
markdown
## Code Before: --- layout: post title: Infrastructure Status & Official Builds category: blog excerpt: Build slaves, mirrors, and builds author: zifnab --- We're working on getting everything operational and would like to thank everyone who's reached out offering assistance. If you haven't heard back from us, you should in the next week or so. Current needs: * Build Slaves * Must be able to finish (and upload) `make clean && make dist` within an hour, and be capable of running docker. * Build Mirrors * Minimum 100mbit network connectivity, 1gbit preferred. * Minimum 500GB storage space. * As a note, we'd prefer non-capped connections with static IPs, and they must be in some sort of professional hosting company (ie, datacenter, colocation facility, ISP, university, etc). While we appreciate the offers from people with gigabit at home, it's slightly too hard to manage. As a reminder: we have not started doing official builds yet. One of the benefits of this being an open source project is that anyone can build it, but please be careful flashing builds you've downloaded from other sources. We will have some more information on when weeklies (or possibly nightlies) will be starting soon. Thanks! LineageOS Team ## Instruction: Add email to infra post Change-Id: Ib41b003eaddaf01586cbcf8326466164ed0ed903 ## Code After: --- layout: post title: Infrastructure Status & Official Builds category: blog excerpt: Build slaves, mirrors, and builds author: zifnab --- We're working on getting everything operational and would like to thank everyone who's reached out offering assistance. If you haven't heard back from us, you should in the next week or so. Current needs: * Build Slaves * Must be able to finish (and upload) `make clean && make dist` within an hour, and be capable of running docker. * Build Mirrors * Minimum 100mbit network connectivity, 1gbit preferred. * Minimum 500GB storage space. * As a note, we'd prefer non-capped connections with static IPs, and they must be in some sort of professional hosting company (ie, datacenter, colocation facility, ISP, university, etc). While we appreciate the offers from people with gigabit at home, it's slightly too hard to manage. Please contact [infra@lineageos.org](mailto:infra@lineageos.org) if you are willing to provide either build slaves or build mirrors. As a reminder: we have not started doing official builds yet. One of the benefits of this being an open source project is that anyone can build it, but please be careful flashing builds you've downloaded from other sources. We will have some more information on when weeklies (or possibly nightlies) will be starting soon. Thanks! LineageOS Team
76d42d66d22400ffe16f56ee52c56912c4817390
CONTRIBUTING.md
CONTRIBUTING.md
We love pull requests from everyone. By participating in this project, you agree to abide by the contribution [code of conduct](http://contributor-covenant.org/version/1/2/0/). ## Workflow Fork, then clone the repo: $ git clone git@github.com:your-username/whois-parser.git Set up your machine: $ bundle Make sure the tests pass: $ bundle exec rake To propose a change/feature/patch, create your feature branch: $ git checkout -b my-new-feature Make your change. Add tests for your change. Make the tests pass: $ bundle exec rake Commit your changes: $ git commit -am 'Add some feature' Push to your fork and [submit a pull request](https://github.com/weppos/whois-parser/compare/). ## Tests To increase the chance that your pull request is accepted please **make sure to write tests**. Changes without corresponding tests will likely not be included as they will produce fragile code that can easily break whenever the registry changes the response format.
We love pull requests from everyone. By participating in this project, you agree to abide by the contribution [code of conduct](http://contributor-covenant.org/version/1/2/0/). ## Workflow Fork, then clone the repo: $ git clone git@github.com:your-username/whois-parser.git Set up your machine: $ bundle Make sure the tests pass: $ bundle exec rake To propose a change/feature/patch, create your feature branch: $ git checkout -b my-new-feature Make your change. Add tests for your change. Make the tests pass: $ bundle exec rake Commit your changes: $ git commit -am 'Add some feature' Push to your fork and [submit a pull request](https://github.com/weppos/whois-parser/compare/). ## Tests To increase the chance that your pull request is accepted please **make sure to write tests**. Changes without corresponding tests will likely not be included as they will produce fragile code that can easily break whenever the registry changes the response format. Some examples: [84dbdde320f31c20184bcfe5e544e8fd3cd32862](https://github.com/weppos/whois/commit/84dbdde320f31c20184bcfe5e544e8fd3cd32862), [3b6688b95e6fadcf720cc777ef4bbd2cd644e62b](https://github.com/weppos/whois/commit/3b6688b95e6fadcf720cc777ef4bbd2cd644e62b)
Add examples of commits with specs
Add examples of commits with specs
Markdown
mit
weppos/whois-parser
markdown
## Code Before: We love pull requests from everyone. By participating in this project, you agree to abide by the contribution [code of conduct](http://contributor-covenant.org/version/1/2/0/). ## Workflow Fork, then clone the repo: $ git clone git@github.com:your-username/whois-parser.git Set up your machine: $ bundle Make sure the tests pass: $ bundle exec rake To propose a change/feature/patch, create your feature branch: $ git checkout -b my-new-feature Make your change. Add tests for your change. Make the tests pass: $ bundle exec rake Commit your changes: $ git commit -am 'Add some feature' Push to your fork and [submit a pull request](https://github.com/weppos/whois-parser/compare/). ## Tests To increase the chance that your pull request is accepted please **make sure to write tests**. Changes without corresponding tests will likely not be included as they will produce fragile code that can easily break whenever the registry changes the response format. ## Instruction: Add examples of commits with specs ## Code After: We love pull requests from everyone. By participating in this project, you agree to abide by the contribution [code of conduct](http://contributor-covenant.org/version/1/2/0/). ## Workflow Fork, then clone the repo: $ git clone git@github.com:your-username/whois-parser.git Set up your machine: $ bundle Make sure the tests pass: $ bundle exec rake To propose a change/feature/patch, create your feature branch: $ git checkout -b my-new-feature Make your change. Add tests for your change. Make the tests pass: $ bundle exec rake Commit your changes: $ git commit -am 'Add some feature' Push to your fork and [submit a pull request](https://github.com/weppos/whois-parser/compare/). ## Tests To increase the chance that your pull request is accepted please **make sure to write tests**. Changes without corresponding tests will likely not be included as they will produce fragile code that can easily break whenever the registry changes the response format. Some examples: [84dbdde320f31c20184bcfe5e544e8fd3cd32862](https://github.com/weppos/whois/commit/84dbdde320f31c20184bcfe5e544e8fd3cd32862), [3b6688b95e6fadcf720cc777ef4bbd2cd644e62b](https://github.com/weppos/whois/commit/3b6688b95e6fadcf720cc777ef4bbd2cd644e62b)
6b4a85cc94ece0ee6d17acd174124364ed7d3a02
lib/rom/session/environment.rb
lib/rom/session/environment.rb
module ROM class Session # @api public class Environment < ROM::Environment include Proxy attr_reader :environment private :environment attr_reader :tracker private :tracker attr_reader :memory private :memory def initialize(environment, tracker) @environment = environment @tracker = tracker initialize_memory end # @api public def [](name) memory[name] end # @api private def commit tracker.commit end private # @api private def initialize_memory @memory = Hash.new { |memory, name| memory[name] = build_relation(name) } end # @api private def build_relation(name) Session::Relation.build(environment[name], tracker, tracker.identity_map(name)) end end # Registry end # Session end # ROM
module ROM class Session # Session-specific environment wrapping ROM's environment # # It works exactly the same as ROM::Environment except it returns # session relations # # @api public class Environment < ROM::Environment include Proxy attr_reader :environment, :tracker, :memory private :environment, :tracker, :memory # @api private def initialize(environment, tracker) @environment = environment @tracker = tracker initialize_memory end # Return a relation identified by name # # @param [Symbol] name of a relation # # @return [Session::Relation] rom's relation wrapped by session # # @api public def [](name) memory[name] end # @api private def commit tracker.commit end private # @api private def initialize_memory @memory = Hash.new { |memory, name| memory[name] = build_relation(name) } end # @api private def build_relation(name) Session::Relation.build(environment[name], tracker, tracker.identity_map(name)) end end # Environment end # Session end # ROM
Simplify Session::Environment a little and add docs
Simplify Session::Environment a little and add docs
Ruby
mit
kwando/rom,rom-rb/rom,rom-rb/rom,Snuff/rom,dcarral/rom,rom-rb/rom,pxlpnk/rom,dekz/rom,pvcarrera/rom,cored/rom,pdswan/rom,jeremyf/rom,endash/rom,vrish88/rom,denyago/rom
ruby
## Code Before: module ROM class Session # @api public class Environment < ROM::Environment include Proxy attr_reader :environment private :environment attr_reader :tracker private :tracker attr_reader :memory private :memory def initialize(environment, tracker) @environment = environment @tracker = tracker initialize_memory end # @api public def [](name) memory[name] end # @api private def commit tracker.commit end private # @api private def initialize_memory @memory = Hash.new { |memory, name| memory[name] = build_relation(name) } end # @api private def build_relation(name) Session::Relation.build(environment[name], tracker, tracker.identity_map(name)) end end # Registry end # Session end # ROM ## Instruction: Simplify Session::Environment a little and add docs ## Code After: module ROM class Session # Session-specific environment wrapping ROM's environment # # It works exactly the same as ROM::Environment except it returns # session relations # # @api public class Environment < ROM::Environment include Proxy attr_reader :environment, :tracker, :memory private :environment, :tracker, :memory # @api private def initialize(environment, tracker) @environment = environment @tracker = tracker initialize_memory end # Return a relation identified by name # # @param [Symbol] name of a relation # # @return [Session::Relation] rom's relation wrapped by session # # @api public def [](name) memory[name] end # @api private def commit tracker.commit end private # @api private def initialize_memory @memory = Hash.new { |memory, name| memory[name] = build_relation(name) } end # @api private def build_relation(name) Session::Relation.build(environment[name], tracker, tracker.identity_map(name)) end end # Environment end # Session end # ROM
7bac6f1c9dce3414e31bb605d21dd08aa5f93628
src/Ctype/README.md
src/Ctype/README.md
Symfony Polyfill / Ctype ======================== This component provides `ctype_*` to users who run php versions without the ctype extension. More information can be found in the [main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md). License ======= This library is released under the [MIT license](LICENSE).
Symfony Polyfill / Ctype ======================== This component provides `ctype_*` functions to users who run php versions without the ctype extension. More information can be found in the [main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md). License ======= This library is released under the [MIT license](LICENSE).
Add a forgotten word in the readme
Add a forgotten word in the readme
Markdown
mit
keradus/polyfill,nicolas-grekas/polyfill,symfony/polyfill
markdown
## Code Before: Symfony Polyfill / Ctype ======================== This component provides `ctype_*` to users who run php versions without the ctype extension. More information can be found in the [main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md). License ======= This library is released under the [MIT license](LICENSE). ## Instruction: Add a forgotten word in the readme ## Code After: Symfony Polyfill / Ctype ======================== This component provides `ctype_*` functions to users who run php versions without the ctype extension. More information can be found in the [main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md). License ======= This library is released under the [MIT license](LICENSE).
ceb3b77897adc98646bba9b4707357903e401dd3
README.md
README.md
cosmopolite =========== Client/server publish/subscribe and key/value storage for AppEngine. Components: * A server API built on the AppEngine Python framework. * A browser client library written in JavaScript. Feature overview: * Near-realtime notification to subscribers of messages published to a "subject" * Server-side storage of past messages for replay later to clients * Support for associating a key with a message and for lookup of the most recent message for a given key * Client identification persistence via localStorage tokens or in combination with Google account signin * Complex messages supported via transparent JSON serialization * Server-side strict ordering of messages * Client-side message queueing in localStorage and resumption on restart * Message duplication detection and elimination * Promise support for notification of client -> server operation completion
cosmopolite =========== See https://www.cosmopolite.org/ for tutorial, reference, etc. Client/server publish/subscribe and key/value storage for AppEngine. Components: * A server API built on the AppEngine Python framework. * A browser client library written in JavaScript. Feature overview: * Near-realtime notification to subscribers of messages published to a "subject" * Server-side storage of past messages for replay later to clients * Support for associating a key with a message and for lookup of the most recent message for a given key * Client identification persistence via localStorage tokens or in combination with Google account signin * Complex messages supported via transparent JSON serialization * Server-side strict ordering of messages * Client-side message queueing in localStorage and resumption on restart * Message duplication detection and elimination * Promise support for notification of client -> server operation completion
Add website link in readme
Add website link in readme
Markdown
apache-2.0
flamingcowtv/cosmopolite,flamingcowtv/cosmopolite,flamingcowtv/cosmopolite,flamingcowtv/cosmopolite,flamingcowtv/cosmopolite
markdown
## Code Before: cosmopolite =========== Client/server publish/subscribe and key/value storage for AppEngine. Components: * A server API built on the AppEngine Python framework. * A browser client library written in JavaScript. Feature overview: * Near-realtime notification to subscribers of messages published to a "subject" * Server-side storage of past messages for replay later to clients * Support for associating a key with a message and for lookup of the most recent message for a given key * Client identification persistence via localStorage tokens or in combination with Google account signin * Complex messages supported via transparent JSON serialization * Server-side strict ordering of messages * Client-side message queueing in localStorage and resumption on restart * Message duplication detection and elimination * Promise support for notification of client -> server operation completion ## Instruction: Add website link in readme ## Code After: cosmopolite =========== See https://www.cosmopolite.org/ for tutorial, reference, etc. Client/server publish/subscribe and key/value storage for AppEngine. Components: * A server API built on the AppEngine Python framework. * A browser client library written in JavaScript. Feature overview: * Near-realtime notification to subscribers of messages published to a "subject" * Server-side storage of past messages for replay later to clients * Support for associating a key with a message and for lookup of the most recent message for a given key * Client identification persistence via localStorage tokens or in combination with Google account signin * Complex messages supported via transparent JSON serialization * Server-side strict ordering of messages * Client-side message queueing in localStorage and resumption on restart * Message duplication detection and elimination * Promise support for notification of client -> server operation completion
222f48cec5982b50b06fa6dca7bfa2e724ceebd4
project-code/project/Build.scala
project-code/project/Build.scala
import sbt._ import Keys._ import play.Play.autoImport._ import PlayKeys._ object ApplicationBuild extends Build { val appName = "play2-crud" val appVersion = "0.7.4-SNAPSHOT" val appScalaVersion = "2.11.1" val appDependencies = Seq( javaCore, javaJdbc, javaEbean, cache, "org.webjars" % "jasny-bootstrap" % "2.3.0-j5", "org.webjars" % "json2" % "20110223", "com.google.inject" % "guice" % "3.0" ) val root = Project(appName, file(".")).enablePlugins(play.PlayScala).settings( version := appVersion, scalaVersion := appScalaVersion, libraryDependencies ++= appDependencies, publishArtifact in(Compile, packageDoc) := false, packagedArtifacts += ((artifact in playPackageAssets).value -> playPackageAssets.value), publishMavenStyle := true, publishTo <<= version { (v: String) => if (v.trim.endsWith("SNAPSHOT")) Some(Resolver.file("file", new File( "../../maven-repo/snapshots" )) ) else Some(Resolver.file("file", new File( "../../maven-repo/releases" )) ) } ) }
import sbt._ import Keys._ import play.Play.autoImport._ import PlayKeys._ object ApplicationBuild extends Build { val appName = "play2-crud" val appVersion = "0.7.4-SNAPSHOT" val appScalaVersion = "2.11.1" val appDependencies = Seq( javaCore, javaJdbc, javaEbean, cache, "org.webjars" % "jasny-bootstrap" % "2.3.0-j5", "org.webjars" % "json2" % "20110223", "com.google.inject" % "guice" % "3.0" ) val root = Project(appName, file(".")).enablePlugins(play.PlayScala).settings( version := appVersion, scalaVersion := appScalaVersion, libraryDependencies ++= appDependencies, publishArtifact in(Compile, packageDoc) := false, packagedArtifacts += ((artifact in playPackageAssets).value -> playPackageAssets.value), publishMavenStyle := true, publishTo <<= version { (v: String) => if (v.trim.endsWith("SNAPSHOT")) Some(Resolver.file("file", new File( "../../maven-repo/snapshots" )) ) else Some(Resolver.file("file", new File( "../../maven-repo/releases" )) ) } ) }
Use spaces instead of tabs
Use spaces instead of tabs
Scala
mit
hakandilek/play2-crud,rchincho/play2-crud,rchincho/play2-crud,hakandilek/play2-crud,rchincho/play2-crud,rchincho/play2-crud,hakandilek/play2-crud,hakandilek/play2-crud
scala
## Code Before: import sbt._ import Keys._ import play.Play.autoImport._ import PlayKeys._ object ApplicationBuild extends Build { val appName = "play2-crud" val appVersion = "0.7.4-SNAPSHOT" val appScalaVersion = "2.11.1" val appDependencies = Seq( javaCore, javaJdbc, javaEbean, cache, "org.webjars" % "jasny-bootstrap" % "2.3.0-j5", "org.webjars" % "json2" % "20110223", "com.google.inject" % "guice" % "3.0" ) val root = Project(appName, file(".")).enablePlugins(play.PlayScala).settings( version := appVersion, scalaVersion := appScalaVersion, libraryDependencies ++= appDependencies, publishArtifact in(Compile, packageDoc) := false, packagedArtifacts += ((artifact in playPackageAssets).value -> playPackageAssets.value), publishMavenStyle := true, publishTo <<= version { (v: String) => if (v.trim.endsWith("SNAPSHOT")) Some(Resolver.file("file", new File( "../../maven-repo/snapshots" )) ) else Some(Resolver.file("file", new File( "../../maven-repo/releases" )) ) } ) } ## Instruction: Use spaces instead of tabs ## Code After: import sbt._ import Keys._ import play.Play.autoImport._ import PlayKeys._ object ApplicationBuild extends Build { val appName = "play2-crud" val appVersion = "0.7.4-SNAPSHOT" val appScalaVersion = "2.11.1" val appDependencies = Seq( javaCore, javaJdbc, javaEbean, cache, "org.webjars" % "jasny-bootstrap" % "2.3.0-j5", "org.webjars" % "json2" % "20110223", "com.google.inject" % "guice" % "3.0" ) val root = Project(appName, file(".")).enablePlugins(play.PlayScala).settings( version := appVersion, scalaVersion := appScalaVersion, libraryDependencies ++= appDependencies, publishArtifact in(Compile, packageDoc) := false, packagedArtifacts += ((artifact in playPackageAssets).value -> playPackageAssets.value), publishMavenStyle := true, publishTo <<= version { (v: String) => if (v.trim.endsWith("SNAPSHOT")) Some(Resolver.file("file", new File( "../../maven-repo/snapshots" )) ) else Some(Resolver.file("file", new File( "../../maven-repo/releases" )) ) } ) }
3b333a78456ca8ea8e569c0b1410042d7d0634c0
README.md
README.md
StaticFiles =========== This repo contains middleware for handling requests for file system resources including files and directories. This project is part of ASP.NET 5. You can find samples, documentation and getting started instructions for ASP.NET 5 at the [Home](https://github.com/aspnet/home) repo.
StaticFiles =========== AppVeyor: [![AppVeyor](https://ci.appveyor.com/api/projects/status/m1l7adh2cwv488dt/branch/dev?svg=true)](https://ci.appveyor.com/project/aspnetci/StaticFiles/branch/dev) Travis: [![Travis](https://travis-ci.org/aspnet/StaticFiles.svg?branch=dev)](https://travis-ci.org/aspnet/StaticFiles) This repo contains middleware for handling requests for file system resources including files and directories. This project is part of ASP.NET 5. You can find samples, documentation and getting started instructions for ASP.NET 5 at the [Home](https://github.com/aspnet/home) repo.
Add AppVeyor, Travis build status
Add AppVeyor, Travis build status
Markdown
apache-2.0
aspnet/AspNetCore,aspnet/AspNetCore,aspnet/AspNetCore,aspnet/AspNetCore,aspnet/AspNetCore,aspnet/AspNetCore,aspnet/AspNetCore,aspnet/AspNetCore,aspnet/AspNetCore
markdown
## Code Before: StaticFiles =========== This repo contains middleware for handling requests for file system resources including files and directories. This project is part of ASP.NET 5. You can find samples, documentation and getting started instructions for ASP.NET 5 at the [Home](https://github.com/aspnet/home) repo. ## Instruction: Add AppVeyor, Travis build status ## Code After: StaticFiles =========== AppVeyor: [![AppVeyor](https://ci.appveyor.com/api/projects/status/m1l7adh2cwv488dt/branch/dev?svg=true)](https://ci.appveyor.com/project/aspnetci/StaticFiles/branch/dev) Travis: [![Travis](https://travis-ci.org/aspnet/StaticFiles.svg?branch=dev)](https://travis-ci.org/aspnet/StaticFiles) This repo contains middleware for handling requests for file system resources including files and directories. This project is part of ASP.NET 5. You can find samples, documentation and getting started instructions for ASP.NET 5 at the [Home](https://github.com/aspnet/home) repo.
f3033ed163de4fa8c56f034cae861e7f6556ac4c
lib/dry/types/enum.rb
lib/dry/types/enum.rb
require 'dry/types/decorator' module Dry module Types class Enum include Type include Dry::Equalizer(:type, :options, :mapping) include Decorator # @return [Array] attr_reader :values # @return [Hash] attr_reader :mapping # @param [Type] type # @param [Hash] options # @option options [Array] :values def initialize(type, options) super @mapping = options.fetch(:mapping).freeze @values = @mapping.keys.freeze.each(&:freeze) end # @param [Object] input # @return [Object] def call(input = Undefined) value = if input.equal?(Undefined) type.call elsif values.include?(input) input elsif mapping.key?(input) mapping[input] elsif mapping.values.include?(input) mapping.key(input) else input end type[value] end alias_method :[], :call def default(*) raise '.enum(*values).default(value) is not supported. Call '\ '.default(value).enum(*values) instead' end # Check whether a value is in the enum # @param [Object] value # @return [Boolean] alias_method :include?, :valid? # @api public # # @see Definition#to_ast def to_ast(meta: true) [:enum, [type.to_ast(meta: meta), mapping, meta ? self.meta : EMPTY_HASH]] end end end end
require 'dry/types/decorator' module Dry module Types class Enum include Type include Dry::Equalizer(:type, :options, :mapping) include Decorator # @return [Array] attr_reader :values # @return [Hash] attr_reader :mapping # @return [Hash] attr_reader :inverted_mapping # @param [Type] type # @param [Hash] options # @option options [Array] :values def initialize(type, options) super @mapping = options.fetch(:mapping).freeze @values = @mapping.keys.freeze @inverted_mapping = @mapping.invert.freeze freeze end # @param [Object] input # @return [Object] def call(input = Undefined) value = if input.equal?(Undefined) type.call elsif mapping.key?(input) input else inverted_mapping.fetch(input, input) end type[value] end alias_method :[], :call def default(*) raise '.enum(*values).default(value) is not supported. Call '\ '.default(value).enum(*values) instead' end # Check whether a value is in the enum # @param [Object] value # @return [Boolean] alias_method :include?, :valid? # @api public # # @see Definition#to_ast def to_ast(meta: true) [:enum, [type.to_ast(meta: meta), mapping, meta ? self.meta : EMPTY_HASH]] end end end end
Replace array search with hash lookup
Replace array search with hash lookup
Ruby
mit
dryrb/dry-data,dryrb/dry-types,dryrb/dry-data,dryrb/dry-types
ruby
## Code Before: require 'dry/types/decorator' module Dry module Types class Enum include Type include Dry::Equalizer(:type, :options, :mapping) include Decorator # @return [Array] attr_reader :values # @return [Hash] attr_reader :mapping # @param [Type] type # @param [Hash] options # @option options [Array] :values def initialize(type, options) super @mapping = options.fetch(:mapping).freeze @values = @mapping.keys.freeze.each(&:freeze) end # @param [Object] input # @return [Object] def call(input = Undefined) value = if input.equal?(Undefined) type.call elsif values.include?(input) input elsif mapping.key?(input) mapping[input] elsif mapping.values.include?(input) mapping.key(input) else input end type[value] end alias_method :[], :call def default(*) raise '.enum(*values).default(value) is not supported. Call '\ '.default(value).enum(*values) instead' end # Check whether a value is in the enum # @param [Object] value # @return [Boolean] alias_method :include?, :valid? # @api public # # @see Definition#to_ast def to_ast(meta: true) [:enum, [type.to_ast(meta: meta), mapping, meta ? self.meta : EMPTY_HASH]] end end end end ## Instruction: Replace array search with hash lookup ## Code After: require 'dry/types/decorator' module Dry module Types class Enum include Type include Dry::Equalizer(:type, :options, :mapping) include Decorator # @return [Array] attr_reader :values # @return [Hash] attr_reader :mapping # @return [Hash] attr_reader :inverted_mapping # @param [Type] type # @param [Hash] options # @option options [Array] :values def initialize(type, options) super @mapping = options.fetch(:mapping).freeze @values = @mapping.keys.freeze @inverted_mapping = @mapping.invert.freeze freeze end # @param [Object] input # @return [Object] def call(input = Undefined) value = if input.equal?(Undefined) type.call elsif mapping.key?(input) input else inverted_mapping.fetch(input, input) end type[value] end alias_method :[], :call def default(*) raise '.enum(*values).default(value) is not supported. Call '\ '.default(value).enum(*values) instead' end # Check whether a value is in the enum # @param [Object] value # @return [Boolean] alias_method :include?, :valid? # @api public # # @see Definition#to_ast def to_ast(meta: true) [:enum, [type.to_ast(meta: meta), mapping, meta ? self.meta : EMPTY_HASH]] end end end end
50d90e6788d1251f698b2b0b6bcda3af3ae70d71
runtime/spec/language/regexp/interpolation_spec.rb
runtime/spec/language/regexp/interpolation_spec.rb
require File.expand_path('../../../spec_helper', __FILE__) describe "Regexps with interpolation" do it "allows interpolation of strings" do str = "foo|bar" /#{str}/.should == /foo|bar/ end end
require File.expand_path('../../../spec_helper', __FILE__) describe "Regexps with interpolation" do it "allows interpolation of strings" do str = "foo|bar" /#{str}/.should == /foo|bar/ end it "allows interpolation to interact with other Regexp constructs" do str = "foo)|(bar" /(#{str})/.should == /(foo)|(bar)/ str = "a" /[#{str}-z]/.should == /[a-z]/ end end
Add some more Regexp interpolation specs
Add some more Regexp interpolation specs
Ruby
mit
charliesome/opal,kachick/opal,iliabylich/opal,kachick/opal,Mogztter/opal,opal/opal,Flikofbluelight747/opal,Ajedi32/opal,bbatsov/opal,merongivian/opal,gabrielrios/opal,Mogztter/opal,suyesh/opal,fazibear/opal,wied03/opal,fazibear/opal,gabrielrios/opal,castwide/opal,suyesh/opal,iliabylich/opal,catprintlabs/opal,jannishuebl/opal,jgaskins/opal,jannishuebl/opal,kachick/opal,Mogztter/opal,Flikofbluelight747/opal,catprintlabs/opal,jannishuebl/opal,iliabylich/opal,kachick/opal,suyesh/opal,c42engineering/opal,gausie/opal,bbatsov/opal,catprintlabs/opal,opal/opal,Mogztter/opal,domgetter/opal,fazibear/opal,gausie/opal,jgaskins/opal,c42engineering/opal,wied03/opal,opal/opal,c42engineering/opal,castwide/opal,Ajedi32/opal,merongivian/opal,Ajedi32/opal,opal/opal,Flikofbluelight747/opal,bbatsov/opal,jgaskins/opal,charliesome/opal,merongivian/opal,domgetter/opal,gausie/opal,wied03/opal,castwide/opal,gabrielrios/opal
ruby
## Code Before: require File.expand_path('../../../spec_helper', __FILE__) describe "Regexps with interpolation" do it "allows interpolation of strings" do str = "foo|bar" /#{str}/.should == /foo|bar/ end end ## Instruction: Add some more Regexp interpolation specs ## Code After: require File.expand_path('../../../spec_helper', __FILE__) describe "Regexps with interpolation" do it "allows interpolation of strings" do str = "foo|bar" /#{str}/.should == /foo|bar/ end it "allows interpolation to interact with other Regexp constructs" do str = "foo)|(bar" /(#{str})/.should == /(foo)|(bar)/ str = "a" /[#{str}-z]/.should == /[a-z]/ end end
eea640dd88f34bb658f5c10b6266225c820ba24a
Cargo.toml
Cargo.toml
[package] name = "futures" version = "0.1.0" authors = ["Alex Crichton <alex@alexcrichton.com>"] license = "MIT/Apache-2.0" readme = "README.md" keywords = ["futures", "async", "future"] repository = "https://github.com/alexcrichton/futures-rs" homepage = "https://github.com/alexcrichton/futures-rs" documentation = "http://alexcrichton.com/futures-rs/futures/" description = """ An implementation of futures and streams featuring zero allocations, composability, and iterator-like interfaces. """ [workspace] members = [ "futures-tls", "futures-io", "futures-mio", "futures-iobuf", "futures-cpupool", "futures-minihttp", "futures-minihttp/tls-example", "futures-socks5", "ferry", ] [dependencies] log = "0.3"
[package] name = "futures" version = "0.1.0" authors = ["Alex Crichton <alex@alexcrichton.com>"] license = "MIT/Apache-2.0" readme = "README.md" keywords = ["futures", "async", "future"] repository = "https://github.com/alexcrichton/futures-rs" homepage = "https://github.com/alexcrichton/futures-rs" documentation = "http://alexcrichton.com/futures-rs/futures/" description = """ An implementation of futures and streams featuring zero allocations, composability, and iterator-like interfaces. """ [workspace] members = [ "futures-tls", "futures-io", "futures-mio", "futures-iobuf", "futures-cpupool", "futures-minihttp", "futures-minihttp/tls-example", "futures-socks5", ] [dependencies] log = "0.3"
Remove "ferry" from the workspace
Remove "ferry" from the workspace
TOML
apache-2.0
alexcrichton/futures-rs,Idolf/futures-rs
toml
## Code Before: [package] name = "futures" version = "0.1.0" authors = ["Alex Crichton <alex@alexcrichton.com>"] license = "MIT/Apache-2.0" readme = "README.md" keywords = ["futures", "async", "future"] repository = "https://github.com/alexcrichton/futures-rs" homepage = "https://github.com/alexcrichton/futures-rs" documentation = "http://alexcrichton.com/futures-rs/futures/" description = """ An implementation of futures and streams featuring zero allocations, composability, and iterator-like interfaces. """ [workspace] members = [ "futures-tls", "futures-io", "futures-mio", "futures-iobuf", "futures-cpupool", "futures-minihttp", "futures-minihttp/tls-example", "futures-socks5", "ferry", ] [dependencies] log = "0.3" ## Instruction: Remove "ferry" from the workspace ## Code After: [package] name = "futures" version = "0.1.0" authors = ["Alex Crichton <alex@alexcrichton.com>"] license = "MIT/Apache-2.0" readme = "README.md" keywords = ["futures", "async", "future"] repository = "https://github.com/alexcrichton/futures-rs" homepage = "https://github.com/alexcrichton/futures-rs" documentation = "http://alexcrichton.com/futures-rs/futures/" description = """ An implementation of futures and streams featuring zero allocations, composability, and iterator-like interfaces. """ [workspace] members = [ "futures-tls", "futures-io", "futures-mio", "futures-iobuf", "futures-cpupool", "futures-minihttp", "futures-minihttp/tls-example", "futures-socks5", ] [dependencies] log = "0.3"
10c23da83705e2778928881c485cd4d231e96dfb
install_docker.sh
install_docker.sh
if hash docker 2>/dev/null; then echo "Docker already installed."; else echo "Installing docker ..." sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9 sudo sh -c "echo deb https://get.docker.com/ubuntu docker main" > /etc/apt/sources.list.d/docker.list sudo apt-get update --quiet sudo apt-get install --quiet --assume-yes lxc-docker echo "Docker installed." fi
if hash docker 2>/dev/null; then echo "Docker already installed."; else echo "Installing docker ..." sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9 sudo sh -c "echo deb https://get.docker.com/ubuntu docker main" > /etc/apt/sources.list.d/docker.list sudo apt-get update --quiet sudo apt-get install --quiet --assume-yes linux-image-extra-$(uname -r) lxc-docker sudo echo 'DOCKER_OPTS="--storage-driver=aufs"' >> /etc/default/docker sudo service docker restart echo "Docker installed." fi
Switch docker from devicemapper to aufs.
Switch docker from devicemapper to aufs. In order to switch you need to do ==> redef-devbox: Forcing shutdown of VM... ==> redef-devbox: Destroying VM and associated drives... ==> redef-devbox: Running cleanup tasks for 'shell' provisioner... ==> redef-devbox: Running cleanup tasks for 'shell' provisioner... ==> redef-devbox: Running cleanup tasks for 'shell' provisioner... first.
Shell
mit
digibib/ls.ext,digibib/redef,digibib/ls.ext,digibib/ls.ext,digibib/ls.ext,digibib/redef,digibib/redef,digibib/redef,digibib/redef
shell
## Code Before: if hash docker 2>/dev/null; then echo "Docker already installed."; else echo "Installing docker ..." sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9 sudo sh -c "echo deb https://get.docker.com/ubuntu docker main" > /etc/apt/sources.list.d/docker.list sudo apt-get update --quiet sudo apt-get install --quiet --assume-yes lxc-docker echo "Docker installed." fi ## Instruction: Switch docker from devicemapper to aufs. In order to switch you need to do ==> redef-devbox: Forcing shutdown of VM... ==> redef-devbox: Destroying VM and associated drives... ==> redef-devbox: Running cleanup tasks for 'shell' provisioner... ==> redef-devbox: Running cleanup tasks for 'shell' provisioner... ==> redef-devbox: Running cleanup tasks for 'shell' provisioner... first. ## Code After: if hash docker 2>/dev/null; then echo "Docker already installed."; else echo "Installing docker ..." sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9 sudo sh -c "echo deb https://get.docker.com/ubuntu docker main" > /etc/apt/sources.list.d/docker.list sudo apt-get update --quiet sudo apt-get install --quiet --assume-yes linux-image-extra-$(uname -r) lxc-docker sudo echo 'DOCKER_OPTS="--storage-driver=aufs"' >> /etc/default/docker sudo service docker restart echo "Docker installed." fi
4fe60b8e38550afb807bffff653b7f022ecd23b3
sessions/workshops/natural-language-processing-in-10-lines-of-code.md
sessions/workshops/natural-language-processing-in-10-lines-of-code.md
speaker: andraz-hribernik title: Natural Language Processing in 10 Lines of Code --- Do you know that there are over 150 personal names mentioned in Jane Austen's Pride & Prejudice? Did you ever want to remove common words such as 'we', 'what', and 'for' from text? Or extract interesting keywords from it? Did you know all of this could be done in 10 lines of Python code? In this workshop we will answer these and similar questions using the open source library spaCy. One hour spent with us will be useful for anybody who is interested in text processing, text information extraction or text related data science. You do not need to have prior experiences with NLP or data science. However, some Python programming skills are needed. We would also encourage you to install spaCy in advance (link to Github repo with installation instructions).
speaker: andraz-hribernik title: Natural Language Processing in 10 Lines of Code --- Do you know that there are over 150 personal names mentioned in Jane Austen's Pride & Prejudice? Did you ever want to remove common words such as 'we', 'what', and 'for' from text? Or how to extract interesting keywords from a document? Did you know all of this could be done in 10 lines of Python code? In this workshop we will answer these and similar questions using the open source library [spaCy](http://spacy.io/). One hour spent with us will be useful for anybody who is interested in text processing, text information extraction or text related data science. You will leave with the tools and knowledge to start developing your own natural language processing projects in Python. No prior experience with NLP or data science is required for this workshop, however some Python experience is needed to get the most out of the event. We would like to encourage you to install spaCy in advance, installation instructions can be found at [our workshop repo on GitHub](https://github.com/cytora/pycon-nlp-in-10-lines).
Update NLP in 10 lines of Code workshop description.
Update NLP in 10 lines of Code workshop description.
Markdown
mit
PyconUK/2016.pyconuk.org,PyconUK/2016.pyconuk.org,PyconUK/2016.pyconuk.org
markdown
## Code Before: speaker: andraz-hribernik title: Natural Language Processing in 10 Lines of Code --- Do you know that there are over 150 personal names mentioned in Jane Austen's Pride & Prejudice? Did you ever want to remove common words such as 'we', 'what', and 'for' from text? Or extract interesting keywords from it? Did you know all of this could be done in 10 lines of Python code? In this workshop we will answer these and similar questions using the open source library spaCy. One hour spent with us will be useful for anybody who is interested in text processing, text information extraction or text related data science. You do not need to have prior experiences with NLP or data science. However, some Python programming skills are needed. We would also encourage you to install spaCy in advance (link to Github repo with installation instructions). ## Instruction: Update NLP in 10 lines of Code workshop description. ## Code After: speaker: andraz-hribernik title: Natural Language Processing in 10 Lines of Code --- Do you know that there are over 150 personal names mentioned in Jane Austen's Pride & Prejudice? Did you ever want to remove common words such as 'we', 'what', and 'for' from text? Or how to extract interesting keywords from a document? Did you know all of this could be done in 10 lines of Python code? In this workshop we will answer these and similar questions using the open source library [spaCy](http://spacy.io/). One hour spent with us will be useful for anybody who is interested in text processing, text information extraction or text related data science. You will leave with the tools and knowledge to start developing your own natural language processing projects in Python. No prior experience with NLP or data science is required for this workshop, however some Python experience is needed to get the most out of the event. We would like to encourage you to install spaCy in advance, installation instructions can be found at [our workshop repo on GitHub](https://github.com/cytora/pycon-nlp-in-10-lines).
d205cff2f517d22b5ec8d3e1711b9b35e175bf9d
scripts/server_start.sh
scripts/server_start.sh
su - -c "rq worker" ox_user 2>&1 | \ rotatelogs /home/ox_user/ox_server/logs/rq_worker.log 86400 & su - -c rqscheduler ox_user 2>&1 | \ rotatelogs /home/ox_user/ox_server/logs/rqscheduler.log 86400 &
su - -c "rq worker" ox_user 2>&1 | \ rotatelogs /home/ox_user/ox_server/logs/rq_worker.log 86400 & su - -c rqscheduler ox_user 2>&1 | \ rotatelogs /home/ox_user/ox_server/logs/rqscheduler.log 86400 & export PYTHONPATH=/home/ox_user/ox_server/ox_herd echo "PYTHONPATH is $PYTHONPATH" python3 /home/ox_user/ox_server/ox_herd/ox_herd/scripts/serve_ox_herd.py
Set and show PYTHONPATH before starting server
Set and show PYTHONPATH before starting server
Shell
bsd-2-clause
aocks/ox_herd,aocks/ox_herd,aocks/ox_herd
shell
## Code Before: su - -c "rq worker" ox_user 2>&1 | \ rotatelogs /home/ox_user/ox_server/logs/rq_worker.log 86400 & su - -c rqscheduler ox_user 2>&1 | \ rotatelogs /home/ox_user/ox_server/logs/rqscheduler.log 86400 & ## Instruction: Set and show PYTHONPATH before starting server ## Code After: su - -c "rq worker" ox_user 2>&1 | \ rotatelogs /home/ox_user/ox_server/logs/rq_worker.log 86400 & su - -c rqscheduler ox_user 2>&1 | \ rotatelogs /home/ox_user/ox_server/logs/rqscheduler.log 86400 & export PYTHONPATH=/home/ox_user/ox_server/ox_herd echo "PYTHONPATH is $PYTHONPATH" python3 /home/ox_user/ox_server/ox_herd/ox_herd/scripts/serve_ox_herd.py
45d2501fb5030a99d5f832a67ffdf20923f90822
.travis.yml
.travis.yml
language: php php: - 7.3 - 7.4 - nightly before_script: - composer install --dev --no-interaction - composer dump-autoload matrix: allow_failures: - php: nightly script: - mkdir -p build/logs - phpdbg -qrr ./vendor/bin/phpunit
language: php php: - 7.3 - 7.4 - nightly before_script: - composer validate --strict - composer install --dev --no-interaction - composer dump-autoload matrix: allow_failures: - php: nightly script: - mkdir -p build/logs - phpdbg -qrr ./vendor/bin/phpunit
Check Composer configs before using them
Check Composer configs before using them
YAML
mit
loganhenson/tlint
yaml
## Code Before: language: php php: - 7.3 - 7.4 - nightly before_script: - composer install --dev --no-interaction - composer dump-autoload matrix: allow_failures: - php: nightly script: - mkdir -p build/logs - phpdbg -qrr ./vendor/bin/phpunit ## Instruction: Check Composer configs before using them ## Code After: language: php php: - 7.3 - 7.4 - nightly before_script: - composer validate --strict - composer install --dev --no-interaction - composer dump-autoload matrix: allow_failures: - php: nightly script: - mkdir -p build/logs - phpdbg -qrr ./vendor/bin/phpunit
509a4ead3440b87a1043abdc65df421520a209a7
.travis.yml
.travis.yml
language: php php: - 5.3 - 5.4 env: global: - ES_VER=0.20.5 - ES_MAPPER_ATTACHMENTS_VER=1.6.0 - ES_TRANSPORT_THRIFT_VER=1.4.0 before_script: - composer self-update - composer --dev install - ./test/bin/install_php_memcache.sh - ./test/bin/run_elasticsearch.sh script: phpunit -c test/
language: php php: - 5.3 - 5.4 env: global: - ES_VER=0.20.5 - ES_MAPPER_ATTACHMENTS_VER=1.6.0 - ES_TRANSPORT_THRIFT_VER=1.4.0 before_script: - composer self-update - composer --dev --prefer-source install - ./test/bin/install_php_memcache.sh - ./test/bin/run_elasticsearch.sh script: phpunit -c test/
Use --prefer-source for composer install
Use --prefer-source for composer install Makes builds more stable on Travis CI
YAML
mit
ebernhardson/Elastica,ewgRa/Elastica,ruflin/Elastica,ewgRa/Elastica,piotrantosik/Elastica,0x46616c6b/Elastica,fubuki/Elastica,CJGarner/mediawiki-extensions-CirrusSearch-Elastica,piotrantosik/Elastica,miniplay/Elastica,ebernhardson/Elastica,kartikm/Elastica,Tobion/Elastica,vlajos/Elastica,kartikm/Elastica,vlajos/Elastica,stof/Elastica,jeancsil/Elastica,stof/Elastica,Southparkfan/Elastica,markeilander/Elastica,fubuki/Elastica,Tobion/Elastica,sugarcrm/Elastica,p365labs/Elastica,eilgin/Elastica,Jmoati/Elastica,eilgin/Elastica,p365labs/Elastica,pborreli/Elastica,Gasol/Elastica,giovannialbero1992/Elastica,JustinHook/Elastica,Mosoc/Elastica,webdevsHub/Elastica,JustinHook/Elastica,im-denisenko/Elastica,vend/Elastica,idio/elastica,falconavs/Elastica,jeancsil/Elastica,splitice/Elastica,Southparkfan/Elastica,giorrrgio/Elastica,ARAMISAUTO/Elastica,0x46616c6b/Elastica,webdevsHub/Elastica,sugarcrm/Elastica,Gasol/Elastica,giorrrgio/Elastica,Jmoati/Elastica,miniplay/Elastica,revinate/Elastica,im-denisenko/Elastica,pborreli/Elastica,tmatei/Elastica,Mosoc/Elastica,CJGarner/mediawiki-extensions-CirrusSearch-Elastica,vend/Elastica,ARAMISAUTO/Elastica,vend/Elastica,tmatei/Elastica,giovannialbero1992/Elastica,markeilander/Elastica,idio/elastica,revinate/Elastica,falconavs/Elastica
yaml
## Code Before: language: php php: - 5.3 - 5.4 env: global: - ES_VER=0.20.5 - ES_MAPPER_ATTACHMENTS_VER=1.6.0 - ES_TRANSPORT_THRIFT_VER=1.4.0 before_script: - composer self-update - composer --dev install - ./test/bin/install_php_memcache.sh - ./test/bin/run_elasticsearch.sh script: phpunit -c test/ ## Instruction: Use --prefer-source for composer install Makes builds more stable on Travis CI ## Code After: language: php php: - 5.3 - 5.4 env: global: - ES_VER=0.20.5 - ES_MAPPER_ATTACHMENTS_VER=1.6.0 - ES_TRANSPORT_THRIFT_VER=1.4.0 before_script: - composer self-update - composer --dev --prefer-source install - ./test/bin/install_php_memcache.sh - ./test/bin/run_elasticsearch.sh script: phpunit -c test/
43d5d261a230496005274575fb26017248326b63
webtests/net/hillsdon/reviki/webtests/TestMisc.java
webtests/net/hillsdon/reviki/webtests/TestMisc.java
/** * Copyright 2008 Matthew Hillsdon * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package net.hillsdon.reviki.webtests; public class TestMisc extends WebTestSupport { public void testWikiRootRedirectsToFrontPage() throws Exception { assertTrue(getWebPage("pages/test/").getTitleText().contains("Front Page")); assertTrue(getWebPage("pages/test").getTitleText().contains("Front Page")); } public void testNoBackLinkToSelf() throws Exception { assertTrue(getWikiPage("FrontPage") .getByXPath("id('backlinks')//a[@href = 'FrontPage']").isEmpty()); } public void testSidebar() throws Exception { String expect = "T" + System.currentTimeMillis(); editWikiPage("ConfigSideBar", expect, "Some new content", null); assertTrue(getWikiPage("FrontPage").asText().contains(expect)); } }
/** * Copyright 2008 Matthew Hillsdon * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package net.hillsdon.reviki.webtests; import net.hillsdon.reviki.vc.PageReference; import net.hillsdon.reviki.web.vcintegration.SpecialPagePopulatingPageStore; public class TestMisc extends WebTestSupport { public void testWikiRootRedirectsToFrontPage() throws Exception { assertTrue(getWebPage("pages/test/").getTitleText().contains("Front Page")); assertTrue(getWebPage("pages/test").getTitleText().contains("Front Page")); } public void testNoBackLinkToSelf() throws Exception { assertTrue(getWikiPage("FrontPage") .getByXPath("id('backlinks')//a[@href = 'FrontPage']").isEmpty()); } public void testSidebarEtc() throws Exception { for (PageReference page : SpecialPagePopulatingPageStore.COMPLIMENTARY_CONTENT_PAGES) { final String expect = "T" + System.currentTimeMillis() + page.getPath().toLowerCase(); editWikiPage(page.getPath(), expect, "Some new content", null); assertTrue(getWikiPage("FrontPage").asText().contains(expect)); } } }
Make test cover header/footer too.
Make test cover header/footer too.
Java
apache-2.0
ashirley/reviki,strr/reviki,strr/reviki,paulcadman/reviki,paulcadman/reviki,ashirley/reviki,strr/reviki,strr/reviki,ashirley/reviki,CoreFiling/reviki,CoreFiling/reviki,ashirley/reviki,ashirley/reviki,CoreFiling/reviki,paulcadman/reviki,strr/reviki,CoreFiling/reviki,CoreFiling/reviki,paulcadman/reviki
java
## Code Before: /** * Copyright 2008 Matthew Hillsdon * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package net.hillsdon.reviki.webtests; public class TestMisc extends WebTestSupport { public void testWikiRootRedirectsToFrontPage() throws Exception { assertTrue(getWebPage("pages/test/").getTitleText().contains("Front Page")); assertTrue(getWebPage("pages/test").getTitleText().contains("Front Page")); } public void testNoBackLinkToSelf() throws Exception { assertTrue(getWikiPage("FrontPage") .getByXPath("id('backlinks')//a[@href = 'FrontPage']").isEmpty()); } public void testSidebar() throws Exception { String expect = "T" + System.currentTimeMillis(); editWikiPage("ConfigSideBar", expect, "Some new content", null); assertTrue(getWikiPage("FrontPage").asText().contains(expect)); } } ## Instruction: Make test cover header/footer too. ## Code After: /** * Copyright 2008 Matthew Hillsdon * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package net.hillsdon.reviki.webtests; import net.hillsdon.reviki.vc.PageReference; import net.hillsdon.reviki.web.vcintegration.SpecialPagePopulatingPageStore; public class TestMisc extends WebTestSupport { public void testWikiRootRedirectsToFrontPage() throws Exception { assertTrue(getWebPage("pages/test/").getTitleText().contains("Front Page")); assertTrue(getWebPage("pages/test").getTitleText().contains("Front Page")); } public void testNoBackLinkToSelf() throws Exception { assertTrue(getWikiPage("FrontPage") .getByXPath("id('backlinks')//a[@href = 'FrontPage']").isEmpty()); } public void testSidebarEtc() throws Exception { for (PageReference page : SpecialPagePopulatingPageStore.COMPLIMENTARY_CONTENT_PAGES) { final String expect = "T" + System.currentTimeMillis() + page.getPath().toLowerCase(); editWikiPage(page.getPath(), expect, "Some new content", null); assertTrue(getWikiPage("FrontPage").asText().contains(expect)); } } }
ce0ecb80845828f85cc87f939b8f48f713b53cbb
packages/co/coin.yaml
packages/co/coin.yaml
homepage: https://bitbucket.org/borekpiotr/coin changelog-type: '' hash: d652c80be8aa6a05ab1cbe74feb91ed27dd34413272501a734c82cb486c41452 test-bench-deps: {} maintainer: Piotr Borek <piotrborek@op.pl> synopsis: Simple account manager changelog: '' basic-deps: bytestring: -any base: ! '>=4.8 && <5.0' time: -any persistent: -any text: -any glib: -any persistent-template: -any monad-control: -any gtk3: -any filepath: -any containers: -any lens: -any binary: -any mtl: -any monad-logger: -any transformers: -any resourcet: -any persistent-sqlite: -any aeson: -any directory: -any all-versions: - '1.0' - '1.1' - '1.1.1' - '1.2' author: Piotr Borek <piotrborek@op.pl> latest: '1.2' description-type: haddock description: Simple account manager license-name: GPL
homepage: https://bitbucket.org/borekpiotr/coin changelog-type: '' hash: 8ead4d4b34ce6ff4fb72f03799086ad9fe90aec97f4e913609c9cb0fd5e316da test-bench-deps: {} maintainer: Piotr Borek <piotrborek@op.pl> synopsis: Simple account manager changelog: '' basic-deps: bytestring: -any base: ! '>=4.8 && <5.0' time: -any persistent: -any text: -any glib: -any persistent-template: -any monad-control: -any gtk3: -any filepath: -any containers: -any lens: -any binary: -any mtl: -any monad-logger: -any transformers: -any resourcet: -any persistent-sqlite: -any aeson: -any directory: -any all-versions: - '1.0' - '1.1' - '1.1.1' - '1.2' - '1.2.1' author: Piotr Borek <piotrborek@op.pl> latest: '1.2.1' description-type: haddock description: Simple account manager license-name: GPL
Update from Hackage at 2017-06-13T14:31:58Z
Update from Hackage at 2017-06-13T14:31:58Z
YAML
mit
commercialhaskell/all-cabal-metadata
yaml
## Code Before: homepage: https://bitbucket.org/borekpiotr/coin changelog-type: '' hash: d652c80be8aa6a05ab1cbe74feb91ed27dd34413272501a734c82cb486c41452 test-bench-deps: {} maintainer: Piotr Borek <piotrborek@op.pl> synopsis: Simple account manager changelog: '' basic-deps: bytestring: -any base: ! '>=4.8 && <5.0' time: -any persistent: -any text: -any glib: -any persistent-template: -any monad-control: -any gtk3: -any filepath: -any containers: -any lens: -any binary: -any mtl: -any monad-logger: -any transformers: -any resourcet: -any persistent-sqlite: -any aeson: -any directory: -any all-versions: - '1.0' - '1.1' - '1.1.1' - '1.2' author: Piotr Borek <piotrborek@op.pl> latest: '1.2' description-type: haddock description: Simple account manager license-name: GPL ## Instruction: Update from Hackage at 2017-06-13T14:31:58Z ## Code After: homepage: https://bitbucket.org/borekpiotr/coin changelog-type: '' hash: 8ead4d4b34ce6ff4fb72f03799086ad9fe90aec97f4e913609c9cb0fd5e316da test-bench-deps: {} maintainer: Piotr Borek <piotrborek@op.pl> synopsis: Simple account manager changelog: '' basic-deps: bytestring: -any base: ! '>=4.8 && <5.0' time: -any persistent: -any text: -any glib: -any persistent-template: -any monad-control: -any gtk3: -any filepath: -any containers: -any lens: -any binary: -any mtl: -any monad-logger: -any transformers: -any resourcet: -any persistent-sqlite: -any aeson: -any directory: -any all-versions: - '1.0' - '1.1' - '1.1.1' - '1.2' - '1.2.1' author: Piotr Borek <piotrborek@op.pl> latest: '1.2.1' description-type: haddock description: Simple account manager license-name: GPL
0aa5741ce05dcd4926be9c74af18f6fe46f4aded
etl_framework/utilities/DatetimeConverter.py
etl_framework/utilities/DatetimeConverter.py
"""class to convert datetime values""" import datetime class DatetimeConverter(object): """stuff""" _EPOCH_0 = datetime.datetime(1970, 1, 1) def __init__(self): """stuff""" pass @staticmethod def get_tomorrow(): """stuff""" return datetime.datetime.today() + datetime.timedelta(days=1) @classmethod def get_timestamp(cls, datetime_obj): """helper method to return timestamp fo datetime object""" return (datetime_obj - cls._EPOCH_0).total_seconds() @classmethod def get_tomorrow_timestamp(cls): """stuff""" return cls.get_timestamp(cls.get_tomorrow())
"""class to convert datetime values""" import datetime class DatetimeConverter(object): """stuff""" _EPOCH_0 = datetime.datetime(1970, 1, 1) def __init__(self): """stuff""" pass @staticmethod def get_tomorrow(): """stuff""" return datetime.datetime.today() + datetime.timedelta(days=1) @staticmethod def get_yesterday(): return datetime.datetime.today() - datetime.timedelta(days=1) @classmethod def get_timestamp(cls, datetime_obj): """helper method to return timestamp fo datetime object""" return (datetime_obj - cls._EPOCH_0).total_seconds() @classmethod def get_tomorrow_timestamp(cls): """stuff""" return cls.get_timestamp(cls.get_tomorrow()) @classmethod def get_yesterday_timestamp(cls): return cls.get_timestamp(cls.get_yesterday())
Add utility methods for yesterday's date
Add utility methods for yesterday's date
Python
mit
pantheon-systems/etl-framework
python
## Code Before: """class to convert datetime values""" import datetime class DatetimeConverter(object): """stuff""" _EPOCH_0 = datetime.datetime(1970, 1, 1) def __init__(self): """stuff""" pass @staticmethod def get_tomorrow(): """stuff""" return datetime.datetime.today() + datetime.timedelta(days=1) @classmethod def get_timestamp(cls, datetime_obj): """helper method to return timestamp fo datetime object""" return (datetime_obj - cls._EPOCH_0).total_seconds() @classmethod def get_tomorrow_timestamp(cls): """stuff""" return cls.get_timestamp(cls.get_tomorrow()) ## Instruction: Add utility methods for yesterday's date ## Code After: """class to convert datetime values""" import datetime class DatetimeConverter(object): """stuff""" _EPOCH_0 = datetime.datetime(1970, 1, 1) def __init__(self): """stuff""" pass @staticmethod def get_tomorrow(): """stuff""" return datetime.datetime.today() + datetime.timedelta(days=1) @staticmethod def get_yesterday(): return datetime.datetime.today() - datetime.timedelta(days=1) @classmethod def get_timestamp(cls, datetime_obj): """helper method to return timestamp fo datetime object""" return (datetime_obj - cls._EPOCH_0).total_seconds() @classmethod def get_tomorrow_timestamp(cls): """stuff""" return cls.get_timestamp(cls.get_tomorrow()) @classmethod def get_yesterday_timestamp(cls): return cls.get_timestamp(cls.get_yesterday())
e3a76e2db5c9b7ed6959d114fc706533d10af2cc
Poppins/Models/Async.swift
Poppins/Models/Async.swift
class Async { private var _done: (() -> ())? class func map<U, T>(u: [U], f: U -> T) -> Async { var proc = Async() let queue = AsyncQueue(name: "PoppinsSyncQueue", maxOperations: 10) u.map { x in queue.addOperationWithBlock { _ = f(x) } } queue.finally { _ = proc._done?() } return proc } func done(f: () -> ()) { _done = f } }
private let queue = AsyncQueue(name: "PoppinsSyncQueue", maxOperations: 10) class Async { private var _done: (() -> ())? class func map<U, T>(u: [U], f: U -> T) -> Async { var proc = Async() u.map { x in queue.addOperationWithBlock { _ = f(x) } } queue.finally { _ = proc._done?() } return proc } func done(f: () -> ()) { _done = f } }
Move queue to global constant
Move queue to global constant This needs to be a global constant so that it isn't affected by memory management.
Swift
mit
thoughtbot/poppins,thoughtbot/poppins,kevinnguy/poppins,kevinnguy/poppins,thoughtbot/poppins,kevinnguy/poppins,thoughtbot/poppins,kevinnguy/poppins,RyanMacG/poppins,RyanMacG/poppins,RyanMacG/poppins,RyanMacG/poppins
swift
## Code Before: class Async { private var _done: (() -> ())? class func map<U, T>(u: [U], f: U -> T) -> Async { var proc = Async() let queue = AsyncQueue(name: "PoppinsSyncQueue", maxOperations: 10) u.map { x in queue.addOperationWithBlock { _ = f(x) } } queue.finally { _ = proc._done?() } return proc } func done(f: () -> ()) { _done = f } } ## Instruction: Move queue to global constant This needs to be a global constant so that it isn't affected by memory management. ## Code After: private let queue = AsyncQueue(name: "PoppinsSyncQueue", maxOperations: 10) class Async { private var _done: (() -> ())? class func map<U, T>(u: [U], f: U -> T) -> Async { var proc = Async() u.map { x in queue.addOperationWithBlock { _ = f(x) } } queue.finally { _ = proc._done?() } return proc } func done(f: () -> ()) { _done = f } }
aa0e58e7ea03e55f864fc1d2435793bec1343095
t/database.t
t/database.t
use strict; use warnings; use Test::More tests => 5; use Test::Exception; use Mongo; my $conn = Mongo::Connection->new; isa_ok($conn, 'Mongo::Connection'); my $db = $conn->get_database('test_database'); isa_ok($db, 'Mongo::Database'); $db->drop; my $coll = $db->get_collection('test'); $coll->insert({ just => 'another', perl => 'hacker' }); ok((grep { $_ eq 'test' } $db->collection_names), 'collection_names'); is($coll->count, 1, 'count'); is($coll->find_one->{perl}, 'hacker', 'find_one'); END { $db->drop; }
use strict; use warnings; use Test::More tests => 6; use Test::Exception; use Mongo; my $conn = Mongo::Connection->new; isa_ok($conn, 'Mongo::Connection'); my $db = $conn->get_database('test_database'); isa_ok($db, 'Mongo::Database'); $db->drop; my $coll = $db->get_collection('test'); my $id = $coll->insert({ just => 'another', perl => 'hacker' }); ok((grep { $_ eq 'test' } $db->collection_names), 'collection_names'); is($coll->count, 1, 'count'); is($coll->find_one->{perl}, 'hacker', 'find_one'); is($coll->find_one->{_id}->value, $id->value, 'insert id'); END { $db->drop; }
Test that insert() is returning the right id.
Test that insert() is returning the right id.
Perl
apache-2.0
kainwinterheart/mongo-perl-driver,kainwinterheart/mongo-perl-driver,rahuldhodapkar/mongo-perl-driver,kainwinterheart/mongo-perl-driver,xdg/mongo-perl-driver,jorol/mongo-perl-driver,gormanb/mongo-perl-driver,dagolden/mongo-perl-driver,gormanb/mongo-perl-driver,dagolden/mongo-perl-driver,jorol/mongo-perl-driver,jorol/mongo-perl-driver,xdg/mongo-perl-driver,dagolden/mongo-perl-driver,dagolden/mongo-perl-driver,kainwinterheart/mongo-perl-driver,jorol/mongo-perl-driver,gormanb/mongo-perl-driver,rahuldhodapkar/mongo-perl-driver,rahuldhodapkar/mongo-perl-driver,gormanb/mongo-perl-driver,xdg/mongo-perl-driver,mongodb/mongo-perl-driver,mongodb/mongo-perl-driver,rahuldhodapkar/mongo-perl-driver,mongodb/mongo-perl-driver
perl
## Code Before: use strict; use warnings; use Test::More tests => 5; use Test::Exception; use Mongo; my $conn = Mongo::Connection->new; isa_ok($conn, 'Mongo::Connection'); my $db = $conn->get_database('test_database'); isa_ok($db, 'Mongo::Database'); $db->drop; my $coll = $db->get_collection('test'); $coll->insert({ just => 'another', perl => 'hacker' }); ok((grep { $_ eq 'test' } $db->collection_names), 'collection_names'); is($coll->count, 1, 'count'); is($coll->find_one->{perl}, 'hacker', 'find_one'); END { $db->drop; } ## Instruction: Test that insert() is returning the right id. ## Code After: use strict; use warnings; use Test::More tests => 6; use Test::Exception; use Mongo; my $conn = Mongo::Connection->new; isa_ok($conn, 'Mongo::Connection'); my $db = $conn->get_database('test_database'); isa_ok($db, 'Mongo::Database'); $db->drop; my $coll = $db->get_collection('test'); my $id = $coll->insert({ just => 'another', perl => 'hacker' }); ok((grep { $_ eq 'test' } $db->collection_names), 'collection_names'); is($coll->count, 1, 'count'); is($coll->find_one->{perl}, 'hacker', 'find_one'); is($coll->find_one->{_id}->value, $id->value, 'insert id'); END { $db->drop; }
2e3010b693cd5e0d8a0600861eb6b788c13b4361
src/coffee/controllers/history-step.coffee
src/coffee/controllers/history-step.coffee
define ['lodash'], (L) -> Array '$scope', '$log', '$modal', (scope, log, modalFactory) -> InputEditCtrl = Array '$scope', '$modalInstance', 'history', 'step', (scope, modal, history, step, index) -> scope.data = L.clone step.data delete scope.data.service # Not editable scope.ok = -> modal.close history.id, index, scope.data scope.cancel = -> modal.dismiss 'cancel' scope.openEditDialogue = -> dialogue = modalFactory.open templateUrl: '/partials/edit-step-data.html' controller: InputEditCtrl size: 'lg' resolve: index: -> scope.$index history: -> scope.history step: -> scope.s
define ['lodash'], (L) -> Array '$scope', '$log', '$modal', (scope, log, modalFactory) -> InputEditCtrl = Array '$scope', '$modalInstance', 'history', 'step', (scope, modal, history, step, index) -> scope.data = L.clone step.data, true delete scope.data.service # Not editable scope.ok = -> modal.close history.id, index, scope.data scope.cancel = -> modal.dismiss 'cancel' scope.data = L.clone step.data, true scope.openEditDialogue = -> dialogue = modalFactory.open templateUrl: '/partials/edit-step-data.html' controller: InputEditCtrl size: 'lg' resolve: index: -> scope.$index history: -> scope.history step: -> scope.s
Rollback any data changes on cancel.
Rollback any data changes on cancel.
CoffeeScript
bsd-2-clause
yochannah/staircase,yochannah/staircase,joshkh/staircase,joshkh/staircase,yochannah/staircase,joshkh/staircase
coffeescript
## Code Before: define ['lodash'], (L) -> Array '$scope', '$log', '$modal', (scope, log, modalFactory) -> InputEditCtrl = Array '$scope', '$modalInstance', 'history', 'step', (scope, modal, history, step, index) -> scope.data = L.clone step.data delete scope.data.service # Not editable scope.ok = -> modal.close history.id, index, scope.data scope.cancel = -> modal.dismiss 'cancel' scope.openEditDialogue = -> dialogue = modalFactory.open templateUrl: '/partials/edit-step-data.html' controller: InputEditCtrl size: 'lg' resolve: index: -> scope.$index history: -> scope.history step: -> scope.s ## Instruction: Rollback any data changes on cancel. ## Code After: define ['lodash'], (L) -> Array '$scope', '$log', '$modal', (scope, log, modalFactory) -> InputEditCtrl = Array '$scope', '$modalInstance', 'history', 'step', (scope, modal, history, step, index) -> scope.data = L.clone step.data, true delete scope.data.service # Not editable scope.ok = -> modal.close history.id, index, scope.data scope.cancel = -> modal.dismiss 'cancel' scope.data = L.clone step.data, true scope.openEditDialogue = -> dialogue = modalFactory.open templateUrl: '/partials/edit-step-data.html' controller: InputEditCtrl size: 'lg' resolve: index: -> scope.$index history: -> scope.history step: -> scope.s
ffd7a6dc31688d519906b68b3d120eb0db57e97f
deepin.md
deepin.md
``` sudo dd bs=4M if=./deepin-desktop-community-1002-amd64.iso of=/dev/sde status=progress oflag=sync ``` ### Enable root account useful when home partition got corrupted ``` sudo passwd root ``` ### Swap Caps Lock and Esc 1. To change mapping of Caps Lock, do this fist: ``` gsettings set com.deepin.dde.keybinding.mediakey capslock '[]' ``` 2. Then, you can re-map capslock with prefered layout-options. Swap Caps Lock and Esc: ``` gsettings set com.deepin.dde.keyboard layout-options '["caps:swapescape"]' ```
``` sudo dd bs=4M if=./deepin-desktop-community-1002-amd64.iso of=/dev/sde status=progress oflag=sync ``` ### Enable root account useful when home partition got corrupted ``` sudo passwd root ``` ### Swap Caps Lock and Esc 1. To change mapping of Caps Lock, do this fist: ``` gsettings set com.deepin.dde.keybinding.mediakey capslock '[]' ``` 2. Then, you can re-map capslock with prefered layout-options. Swap Caps Lock and Esc: ``` gsettings set com.deepin.dde.keyboard layout-options '["caps:swapescape"]' ``` ### Can not find boot device Enable Compatibility Support Module in BIOS: ``` F12 --> Startup --> CSM mode --> Choose 'Enable' ```
Enable Compatibility Support Module in BIOS
Enable Compatibility Support Module in BIOS
Markdown
apache-2.0
gengwg/cheatsheets
markdown
## Code Before: ``` sudo dd bs=4M if=./deepin-desktop-community-1002-amd64.iso of=/dev/sde status=progress oflag=sync ``` ### Enable root account useful when home partition got corrupted ``` sudo passwd root ``` ### Swap Caps Lock and Esc 1. To change mapping of Caps Lock, do this fist: ``` gsettings set com.deepin.dde.keybinding.mediakey capslock '[]' ``` 2. Then, you can re-map capslock with prefered layout-options. Swap Caps Lock and Esc: ``` gsettings set com.deepin.dde.keyboard layout-options '["caps:swapescape"]' ``` ## Instruction: Enable Compatibility Support Module in BIOS ## Code After: ``` sudo dd bs=4M if=./deepin-desktop-community-1002-amd64.iso of=/dev/sde status=progress oflag=sync ``` ### Enable root account useful when home partition got corrupted ``` sudo passwd root ``` ### Swap Caps Lock and Esc 1. To change mapping of Caps Lock, do this fist: ``` gsettings set com.deepin.dde.keybinding.mediakey capslock '[]' ``` 2. Then, you can re-map capslock with prefered layout-options. Swap Caps Lock and Esc: ``` gsettings set com.deepin.dde.keyboard layout-options '["caps:swapescape"]' ``` ### Can not find boot device Enable Compatibility Support Module in BIOS: ``` F12 --> Startup --> CSM mode --> Choose 'Enable' ```
36bb9d11677bcb54eee9ea784208e6c2e5c4534d
cloudbuild.yaml
cloudbuild.yaml
substitutions: _REGION: us-central1 steps: - name: 'gcr.io/k8s-skaffold/skaffold' entrypoint: 'sh' args: - -xe - -c - | # Build and push images skaffold build --file-output=/workspace/artifacts.json \ --default-repo gcr.io/$PROJECT_ID \ --push=true # Test images skaffold test --build-artifacts=/workspace/artifacts.json - name: 'google/cloud-sdk:latest' entrypoint: 'sh' args: - -xe - -c - | gcloud alpha deploy apply --region ${_REGION} --file deploy/pipeline.yaml gcloud alpha deploy apply --region ${_REGION} --file deploy/staging.yaml gcloud alpha deploy apply --region ${_REGION} --file deploy/canary.yaml gcloud alpha deploy apply --region ${_REGION} --file deploy/prod.yaml gcloud alpha deploy releases create $SHORT_SHA-$(date +%s) \ --delivery-pipeline sample-app \ --description "$(git log -1 --pretty='%s')" \ --region ${_REGION} \ --build-artifacts /workspace/artifacts.json artifacts: objects: location: 'gs://$PROJECT_ID-gceme-artifacts/' paths: - '/workspace/artifacts.json' options: machineType: E2_HIGHCPU_8 timeout: 3600s
substitutions: _REGION: us-central1 steps: - name: 'gcr.io/k8s-skaffold/skaffold' entrypoint: 'sh' args: - -xe - -c - | # Build and push images skaffold build --file-output=/workspace/artifacts.json \ --default-repo gcr.io/$PROJECT_ID \ --push=true # Test images skaffold test --build-artifacts=/workspace/artifacts.json - name: 'gcr.io/k8s-skaffold/skaffold' entrypoint: 'sh' args: - -xe - -c - | gcloud alpha deploy apply --region ${_REGION} --file deploy/pipeline.yaml gcloud alpha deploy apply --region ${_REGION} --file deploy/staging.yaml gcloud alpha deploy apply --region ${_REGION} --file deploy/canary.yaml gcloud alpha deploy apply --region ${_REGION} --file deploy/prod.yaml gcloud alpha deploy releases create $SHORT_SHA-$(date +%s) \ --delivery-pipeline sample-app \ --description "$(git log -1 --pretty='%s')" \ --region ${_REGION} \ --build-artifacts /workspace/artifacts.json artifacts: objects: location: 'gs://$PROJECT_ID-gceme-artifacts/' paths: - '/workspace/artifacts.json' options: machineType: E2_HIGHCPU_8 timeout: 3600s
Use skaffold image for creating releases
Use skaffold image for creating releases
YAML
apache-2.0
google/golden-path-for-app-delivery,google/golden-path-for-app-delivery,google/golden-path-for-app-delivery
yaml
## Code Before: substitutions: _REGION: us-central1 steps: - name: 'gcr.io/k8s-skaffold/skaffold' entrypoint: 'sh' args: - -xe - -c - | # Build and push images skaffold build --file-output=/workspace/artifacts.json \ --default-repo gcr.io/$PROJECT_ID \ --push=true # Test images skaffold test --build-artifacts=/workspace/artifacts.json - name: 'google/cloud-sdk:latest' entrypoint: 'sh' args: - -xe - -c - | gcloud alpha deploy apply --region ${_REGION} --file deploy/pipeline.yaml gcloud alpha deploy apply --region ${_REGION} --file deploy/staging.yaml gcloud alpha deploy apply --region ${_REGION} --file deploy/canary.yaml gcloud alpha deploy apply --region ${_REGION} --file deploy/prod.yaml gcloud alpha deploy releases create $SHORT_SHA-$(date +%s) \ --delivery-pipeline sample-app \ --description "$(git log -1 --pretty='%s')" \ --region ${_REGION} \ --build-artifacts /workspace/artifacts.json artifacts: objects: location: 'gs://$PROJECT_ID-gceme-artifacts/' paths: - '/workspace/artifacts.json' options: machineType: E2_HIGHCPU_8 timeout: 3600s ## Instruction: Use skaffold image for creating releases ## Code After: substitutions: _REGION: us-central1 steps: - name: 'gcr.io/k8s-skaffold/skaffold' entrypoint: 'sh' args: - -xe - -c - | # Build and push images skaffold build --file-output=/workspace/artifacts.json \ --default-repo gcr.io/$PROJECT_ID \ --push=true # Test images skaffold test --build-artifacts=/workspace/artifacts.json - name: 'gcr.io/k8s-skaffold/skaffold' entrypoint: 'sh' args: - -xe - -c - | gcloud alpha deploy apply --region ${_REGION} --file deploy/pipeline.yaml gcloud alpha deploy apply --region ${_REGION} --file deploy/staging.yaml gcloud alpha deploy apply --region ${_REGION} --file deploy/canary.yaml gcloud alpha deploy apply --region ${_REGION} --file deploy/prod.yaml gcloud alpha deploy releases create $SHORT_SHA-$(date +%s) \ --delivery-pipeline sample-app \ --description "$(git log -1 --pretty='%s')" \ --region ${_REGION} \ --build-artifacts /workspace/artifacts.json artifacts: objects: location: 'gs://$PROJECT_ID-gceme-artifacts/' paths: - '/workspace/artifacts.json' options: machineType: E2_HIGHCPU_8 timeout: 3600s
775ab6def21a25e348c6584d1b86b2cc4d37ba6f
example/Button.js
example/Button.js
import React from 'react'; var Button = React.createClass({ render() { const { children, kind = 'default' } = this.props; const cls = `btn btn-${kind}`; return ( <button className={cls} role="button"> {children} </button> ); } }); export default Button;
import React from 'react'; var Button = React.createClass({ getInitialState() { return {}; }, render() { const { children, kind = 'default' } = this.props; const cls = `btn btn-${kind}`; return ( <button className={cls} role="button" onClick={() => this.setState(s => ({ toggle: !s.toggle }))} style={{ fontSize: this.state.toggle ? '20px' : '10px'}} > {children} </button> ); } }); export default Button;
Make the button example a bit more dynamic
Make the button example a bit more dynamic
JavaScript
mit
glenjamin/devboard,glenjamin/devboard,glenjamin/devboard
javascript
## Code Before: import React from 'react'; var Button = React.createClass({ render() { const { children, kind = 'default' } = this.props; const cls = `btn btn-${kind}`; return ( <button className={cls} role="button"> {children} </button> ); } }); export default Button; ## Instruction: Make the button example a bit more dynamic ## Code After: import React from 'react'; var Button = React.createClass({ getInitialState() { return {}; }, render() { const { children, kind = 'default' } = this.props; const cls = `btn btn-${kind}`; return ( <button className={cls} role="button" onClick={() => this.setState(s => ({ toggle: !s.toggle }))} style={{ fontSize: this.state.toggle ? '20px' : '10px'}} > {children} </button> ); } }); export default Button;
b44662de07df147bc64fb439db554f5d045cbb5e
api/models/Image.js
api/models/Image.js
/** * Image.js * * @description :: This represents a product image with file paths for different variations (original, thumb, ...). * @docs :: http://sailsjs.org/documentation/concepts/models-and-orm/models */ module.exports = { attributes: { width: { type: 'integer', min: 0 }, height: { type: 'integer', min: 0 }, thumb: { type: 'string' }, medium: { type: 'string' }, large: { type: 'string' }, original: { type: 'string', required: true }, toJSON: function() { var obj = this.toObject() , baseUrl = sails.config.app.baseUrl; if (obj.thumb) { obj.thumb = baseUrl + obj.thumb; } if (obj.medium) { obj.medium = baseUrl + obj.medium; } if (obj.large) { obj.large = baseUrl + obj.large; } obj.original = baseUrl + obj.original; return obj; } }, beforeUpdate: function (values, next) { // Prevent user from overriding these attributes delete values.thumb; delete values.medium; delete values.large; delete values.original; delete values.createdAt; delete values.updatedAt; next(); } };
/** * Image.js * * @description :: This represents a product image with file paths for different variations (original, thumb, ...). * @docs :: http://sailsjs.org/documentation/concepts/models-and-orm/models */ module.exports = { attributes: { width: { type: 'integer', min: 0 }, height: { type: 'integer', min: 0 }, thumb: { type: 'string' }, medium: { type: 'string' }, large: { type: 'string' }, original: { type: 'string', required: true }, toJSON: function() { var obj = this.toObject() , baseUrl = sails.config.app.baseUrl; if (obj.thumb) { obj.thumb = baseUrl + obj.thumb; } if (obj.medium) { obj.medium = baseUrl + obj.medium; } if (obj.large) { obj.large = baseUrl + obj.large; } obj.original = baseUrl + obj.original; return obj; } }, beforeUpdate: function (values, next) { if (obj.thumb && obj.thumb.indexOf('http') === 0) { delete obj.thumb; } if (obj.medium && obj.medium.indexOf('http') === 0) { delete obj.medium; } if (obj.large && obj.large.indexOf('http') === 0) { delete obj.large; } // Prevent user from overriding these attributes delete values.original; delete values.createdAt; delete values.updatedAt; next(); } };
Fix bug where images could not be created
Fix bug where images could not be created
JavaScript
mit
joschaefer/online-shop-api
javascript
## Code Before: /** * Image.js * * @description :: This represents a product image with file paths for different variations (original, thumb, ...). * @docs :: http://sailsjs.org/documentation/concepts/models-and-orm/models */ module.exports = { attributes: { width: { type: 'integer', min: 0 }, height: { type: 'integer', min: 0 }, thumb: { type: 'string' }, medium: { type: 'string' }, large: { type: 'string' }, original: { type: 'string', required: true }, toJSON: function() { var obj = this.toObject() , baseUrl = sails.config.app.baseUrl; if (obj.thumb) { obj.thumb = baseUrl + obj.thumb; } if (obj.medium) { obj.medium = baseUrl + obj.medium; } if (obj.large) { obj.large = baseUrl + obj.large; } obj.original = baseUrl + obj.original; return obj; } }, beforeUpdate: function (values, next) { // Prevent user from overriding these attributes delete values.thumb; delete values.medium; delete values.large; delete values.original; delete values.createdAt; delete values.updatedAt; next(); } }; ## Instruction: Fix bug where images could not be created ## Code After: /** * Image.js * * @description :: This represents a product image with file paths for different variations (original, thumb, ...). * @docs :: http://sailsjs.org/documentation/concepts/models-and-orm/models */ module.exports = { attributes: { width: { type: 'integer', min: 0 }, height: { type: 'integer', min: 0 }, thumb: { type: 'string' }, medium: { type: 'string' }, large: { type: 'string' }, original: { type: 'string', required: true }, toJSON: function() { var obj = this.toObject() , baseUrl = sails.config.app.baseUrl; if (obj.thumb) { obj.thumb = baseUrl + obj.thumb; } if (obj.medium) { obj.medium = baseUrl + obj.medium; } if (obj.large) { obj.large = baseUrl + obj.large; } obj.original = baseUrl + obj.original; return obj; } }, beforeUpdate: function (values, next) { if (obj.thumb && obj.thumb.indexOf('http') === 0) { delete obj.thumb; } if (obj.medium && obj.medium.indexOf('http') === 0) { delete obj.medium; } if (obj.large && obj.large.indexOf('http') === 0) { delete obj.large; } // Prevent user from overriding these attributes delete values.original; delete values.createdAt; delete values.updatedAt; next(); } };
8d7f7f9491c6ba598e515259d5293e4746d5b45e
test/unit/client_interface_sections/history_test.rb
test/unit/client_interface_sections/history_test.rb
require_relative '../../test_helper' class ClientInterfaceHistoryTest < Test::Unit::TestCase def client @client ||= FHIR::Client.new('history-test') end def test_history_uses_default_json_dstu2 stub_request(:get, /history-test/).to_return(body: '{"resourceType":"Bundle"}') temp = client temp.use_dstu2 temp.default_json reply = temp.all_history assert_equal FHIR::Formats::ResourceFormat::RESOURCE_JSON_DSTU2, reply.request[:headers]['format'] end end
require_relative '../../test_helper' class ClientInterfaceHistoryTest < Test::Unit::TestCase def client @client ||= FHIR::Client.new('history-test') end def test_history_uses_default_json_dstu2 stub_request(:get, /history-test/).to_return(body: '{"resourceType":"Bundle"}') temp = client temp.use_dstu2 temp.default_json reply = temp.all_history assert_equal FHIR::Formats::ResourceFormat::RESOURCE_JSON_DSTU2, reply.request[:headers]['format'] end def test_history_uses_default_xml_dstu2 stub_request(:get, /history-test/).to_return(body: '{"resourceType":"Bundle"}') temp = client temp.use_dstu2 temp.default_xml reply = temp.all_history assert_equal FHIR::Formats::ResourceFormat::RESOURCE_XML_DSTU2, reply.request[:headers]['format'] end def test_history_uses_default_json_stu3 stub_request(:get, /history-test/).to_return(body: '{"resourceType":"Bundle"}') temp = client temp.use_stu3 temp.default_json reply = temp.all_history assert_equal FHIR::Formats::ResourceFormat::RESOURCE_JSON, reply.request[:headers]['format'] end def test_history_uses_default_xml_stu3 stub_request(:get, /history-test/).to_return(body: '{"resourceType":"Bundle"}') temp = client temp.use_stu3 temp.default_xml reply = temp.all_history assert_equal FHIR::Formats::ResourceFormat::RESOURCE_XML, reply.request[:headers]['format'] end end
Add history tests for other resource formats
Add history tests for other resource formats
Ruby
apache-2.0
fhir-crucible/fhir_client,fhir-crucible/fhir_client
ruby
## Code Before: require_relative '../../test_helper' class ClientInterfaceHistoryTest < Test::Unit::TestCase def client @client ||= FHIR::Client.new('history-test') end def test_history_uses_default_json_dstu2 stub_request(:get, /history-test/).to_return(body: '{"resourceType":"Bundle"}') temp = client temp.use_dstu2 temp.default_json reply = temp.all_history assert_equal FHIR::Formats::ResourceFormat::RESOURCE_JSON_DSTU2, reply.request[:headers]['format'] end end ## Instruction: Add history tests for other resource formats ## Code After: require_relative '../../test_helper' class ClientInterfaceHistoryTest < Test::Unit::TestCase def client @client ||= FHIR::Client.new('history-test') end def test_history_uses_default_json_dstu2 stub_request(:get, /history-test/).to_return(body: '{"resourceType":"Bundle"}') temp = client temp.use_dstu2 temp.default_json reply = temp.all_history assert_equal FHIR::Formats::ResourceFormat::RESOURCE_JSON_DSTU2, reply.request[:headers]['format'] end def test_history_uses_default_xml_dstu2 stub_request(:get, /history-test/).to_return(body: '{"resourceType":"Bundle"}') temp = client temp.use_dstu2 temp.default_xml reply = temp.all_history assert_equal FHIR::Formats::ResourceFormat::RESOURCE_XML_DSTU2, reply.request[:headers]['format'] end def test_history_uses_default_json_stu3 stub_request(:get, /history-test/).to_return(body: '{"resourceType":"Bundle"}') temp = client temp.use_stu3 temp.default_json reply = temp.all_history assert_equal FHIR::Formats::ResourceFormat::RESOURCE_JSON, reply.request[:headers]['format'] end def test_history_uses_default_xml_stu3 stub_request(:get, /history-test/).to_return(body: '{"resourceType":"Bundle"}') temp = client temp.use_stu3 temp.default_xml reply = temp.all_history assert_equal FHIR::Formats::ResourceFormat::RESOURCE_XML, reply.request[:headers]['format'] end end
198726932334459e65619b9108cfea92fa807657
metadata/io.horizontalsystems.bankwallet.yml
metadata/io.horizontalsystems.bankwallet.yml
AntiFeatures: - NonFreeNet Categories: - Money License: MIT AuthorName: Horizontal Systems AuthorEmail: hsdao@protonmail.ch WebSite: https://horizontalsystems.io/ SourceCode: https://github.com/horizontalsystems/unstoppable-wallet-android IssueTracker: https://github.com/horizontalsystems/unstoppable-wallet-android/issues Translation: https://crowdin.com/project/bank-wallet-android Changelog: https://github.com/horizontalsystems/unstoppable-wallet-android/releases AutoName: Unstoppable Wallet RepoType: git Repo: https://github.com/horizontalsystems/unstoppable-wallet-android Builds: - versionName: 0.21.3 versionCode: 48 commit: 0.21.3 subdir: app gradle: - yes AutoUpdateMode: Version UpdateCheckMode: Tags CurrentVersion: 0.21.3 CurrentVersionCode: 48
AntiFeatures: - NonFreeNet Categories: - Money License: MIT AuthorName: Horizontal Systems AuthorEmail: hsdao@protonmail.ch WebSite: https://horizontalsystems.io/ SourceCode: https://github.com/horizontalsystems/unstoppable-wallet-android IssueTracker: https://github.com/horizontalsystems/unstoppable-wallet-android/issues Translation: https://crowdin.com/project/bank-wallet-android Changelog: https://github.com/horizontalsystems/unstoppable-wallet-android/releases AutoName: Unstoppable RepoType: git Repo: https://github.com/horizontalsystems/unstoppable-wallet-android Builds: - versionName: 0.21.3 versionCode: 48 commit: 0.21.3 subdir: app gradle: - yes - versionName: 0.22.1 versionCode: 52 commit: e6baef3c8530608ad7ed33a8b104382c7a54d55e subdir: app gradle: - yes AutoUpdateMode: Version UpdateCheckMode: Tags CurrentVersion: 0.22.1 CurrentVersionCode: 52
Update Unstoppable to 0.22.1 (52)
Update Unstoppable to 0.22.1 (52)
YAML
agpl-3.0
f-droid/fdroiddata,f-droid/fdroiddata
yaml
## Code Before: AntiFeatures: - NonFreeNet Categories: - Money License: MIT AuthorName: Horizontal Systems AuthorEmail: hsdao@protonmail.ch WebSite: https://horizontalsystems.io/ SourceCode: https://github.com/horizontalsystems/unstoppable-wallet-android IssueTracker: https://github.com/horizontalsystems/unstoppable-wallet-android/issues Translation: https://crowdin.com/project/bank-wallet-android Changelog: https://github.com/horizontalsystems/unstoppable-wallet-android/releases AutoName: Unstoppable Wallet RepoType: git Repo: https://github.com/horizontalsystems/unstoppable-wallet-android Builds: - versionName: 0.21.3 versionCode: 48 commit: 0.21.3 subdir: app gradle: - yes AutoUpdateMode: Version UpdateCheckMode: Tags CurrentVersion: 0.21.3 CurrentVersionCode: 48 ## Instruction: Update Unstoppable to 0.22.1 (52) ## Code After: AntiFeatures: - NonFreeNet Categories: - Money License: MIT AuthorName: Horizontal Systems AuthorEmail: hsdao@protonmail.ch WebSite: https://horizontalsystems.io/ SourceCode: https://github.com/horizontalsystems/unstoppable-wallet-android IssueTracker: https://github.com/horizontalsystems/unstoppable-wallet-android/issues Translation: https://crowdin.com/project/bank-wallet-android Changelog: https://github.com/horizontalsystems/unstoppable-wallet-android/releases AutoName: Unstoppable RepoType: git Repo: https://github.com/horizontalsystems/unstoppable-wallet-android Builds: - versionName: 0.21.3 versionCode: 48 commit: 0.21.3 subdir: app gradle: - yes - versionName: 0.22.1 versionCode: 52 commit: e6baef3c8530608ad7ed33a8b104382c7a54d55e subdir: app gradle: - yes AutoUpdateMode: Version UpdateCheckMode: Tags CurrentVersion: 0.22.1 CurrentVersionCode: 52
48cdc1d7e1f0c674147492ae6f11d3d90311fc3a
.travis.yml
.travis.yml
language: ruby addons: postgresql: "9.3" rvm: - '2.1.2' before_install: - sudo apt-get install -qq phantomjs before_script: - bundle exec rake db:test:prepare notifications: email: false
language: ruby addons: postgresql: "9.3" rvm: - '2.1.2' before_install: - sudo apt-get install -qq phantomjs before_script: - cp .env.sample .env - bundle exec rake db:test:prepare notifications: email: false
Use sample .env to build on Travis CI
Use sample .env to build on Travis CI
YAML
mit
ministryofjustice/scs_appraisals,ministryofjustice/scs_appraisals,ministryofjustice/scs_appraisals
yaml
## Code Before: language: ruby addons: postgresql: "9.3" rvm: - '2.1.2' before_install: - sudo apt-get install -qq phantomjs before_script: - bundle exec rake db:test:prepare notifications: email: false ## Instruction: Use sample .env to build on Travis CI ## Code After: language: ruby addons: postgresql: "9.3" rvm: - '2.1.2' before_install: - sudo apt-get install -qq phantomjs before_script: - cp .env.sample .env - bundle exec rake db:test:prepare notifications: email: false
a0311b0fda0474ff073a85ca78f63e9c2ab3431e
src/main/java/io/github/saidie/plantuml_api/AccountRepository.java
src/main/java/io/github/saidie/plantuml_api/AccountRepository.java
package io.github.saidie.plantuml_api; import org.springframework.data.repository.PagingAndSortingRepository; import org.springframework.data.rest.core.annotation.RepositoryRestResource; @RepositoryRestResource public interface AccountRepository extends PagingAndSortingRepository<Account, Long> { }
package io.github.saidie.plantuml_api; import org.springframework.data.repository.PagingAndSortingRepository; import org.springframework.data.rest.core.annotation.RepositoryRestResource; @RepositoryRestResource public interface AccountRepository extends PagingAndSortingRepository<Account, Long> { public Account findByUsername(String username); }
Add method to find account by username to the repository
Add method to find account by username to the repository
Java
mit
saidie/plantuml-api,saidie/plantuml-api
java
## Code Before: package io.github.saidie.plantuml_api; import org.springframework.data.repository.PagingAndSortingRepository; import org.springframework.data.rest.core.annotation.RepositoryRestResource; @RepositoryRestResource public interface AccountRepository extends PagingAndSortingRepository<Account, Long> { } ## Instruction: Add method to find account by username to the repository ## Code After: package io.github.saidie.plantuml_api; import org.springframework.data.repository.PagingAndSortingRepository; import org.springframework.data.rest.core.annotation.RepositoryRestResource; @RepositoryRestResource public interface AccountRepository extends PagingAndSortingRepository<Account, Long> { public Account findByUsername(String username); }
793c650caa39a48fa11907fff2e9c02784b06fab
src/Model/DataTypeHandlingTrait.php
src/Model/DataTypeHandlingTrait.php
<?php namespace Downsider\Clay\Model; use Downsider\Clay\Exception\ModelException; /** * handles specific data types so we can intelligently apply */ trait DataTypeHandlingTrait { protected $dateFormat = "Y-m-d"; /** * @param mixed $date * @return \DateTime * @throws ModelException */ protected function handleSetDate($date) { if (is_string($date)) { return new \DateTime($date); } elseif ($date instanceof \DateTime) { return $date; } $type = gettype($date); if ($type == "object") { $type = get_class($date); } throw new ModelException("Could not set a date. The value was invalid ($type)"); } protected function handleGetDate(\DateTime $date, $asString = true) { if ($asString) { return $date->format($this->dateFormat); } return $date; } }
<?php namespace Downsider\Clay\Model; use Downsider\Clay\Exception\ModelException; /** * handles specific data types so we can intelligently apply */ trait DataTypeHandlingTrait { protected $dateFormat = "Y-m-d"; /** * @param mixed $date * @return \DateTime * @throws ModelException */ protected function handleSetDate($date) { if (is_string($date)) { return new \DateTime($date); } elseif (is_int($date)) { $date = new \DateTime(); $date->setTimestamp($date); return $date; } elseif ($date instanceof \DateTime) { return $date; } $type = gettype($date); if ($type == "object") { $type = get_class($date); } throw new ModelException("Could not set a date. The value was invalid ($type)"); } protected function handleGetDate(\DateTime $date, $asString = true) { if ($asString) { return $date->format($this->dateFormat); } return $date; } }
Allow creating a date by unix timestamp
Allow creating a date by unix timestamp
PHP
mit
downsider/clay
php
## Code Before: <?php namespace Downsider\Clay\Model; use Downsider\Clay\Exception\ModelException; /** * handles specific data types so we can intelligently apply */ trait DataTypeHandlingTrait { protected $dateFormat = "Y-m-d"; /** * @param mixed $date * @return \DateTime * @throws ModelException */ protected function handleSetDate($date) { if (is_string($date)) { return new \DateTime($date); } elseif ($date instanceof \DateTime) { return $date; } $type = gettype($date); if ($type == "object") { $type = get_class($date); } throw new ModelException("Could not set a date. The value was invalid ($type)"); } protected function handleGetDate(\DateTime $date, $asString = true) { if ($asString) { return $date->format($this->dateFormat); } return $date; } } ## Instruction: Allow creating a date by unix timestamp ## Code After: <?php namespace Downsider\Clay\Model; use Downsider\Clay\Exception\ModelException; /** * handles specific data types so we can intelligently apply */ trait DataTypeHandlingTrait { protected $dateFormat = "Y-m-d"; /** * @param mixed $date * @return \DateTime * @throws ModelException */ protected function handleSetDate($date) { if (is_string($date)) { return new \DateTime($date); } elseif (is_int($date)) { $date = new \DateTime(); $date->setTimestamp($date); return $date; } elseif ($date instanceof \DateTime) { return $date; } $type = gettype($date); if ($type == "object") { $type = get_class($date); } throw new ModelException("Could not set a date. The value was invalid ($type)"); } protected function handleGetDate(\DateTime $date, $asString = true) { if ($asString) { return $date->format($this->dateFormat); } return $date; } }
5a5f064af15228bb8e286cbe9f1f6e41764c84f4
src/SimplyTestable/WebClientBundle/Resources/views/Partials/User/Account/latest-invoice.html.twig
src/SimplyTestable/WebClientBundle/Resources/views/Partials/User/Account/latest-invoice.html.twig
<p class="invoice-date"> {{ stripe_event_data['invoice'].date|date("j F Y") }} - {% if stripe_event_data['invoice'] == true %}paid <i class="icon icon-ok"></i>{% endif %} </p> <table class="table"> <tbody> {% for line in stripe_event_data['invoice'].lines.data %} <tr> <td> {% if line.type == 'subscription' %} Subscription to {{ line.plan.name|lower }} plan {% if line.amount == 0 %}(free trial){% endif %} <br><span>{{ line.period.start|date("j F Y") }} to {{ line.period.end|date("j F Y") }}</span> {% endif %} </td> <td>&pound;{{ line.amount|number_format(2) }}</td> </tr> {% endfor %} <tr> <td>Total</td> <td>&pound;{{ stripe_event_data['invoice'].total|number_format(2) }}</td> </tr> </tbody> </table>
<p class="invoice-date"> {{ stripe_event_data['invoice'].date|date("j F Y") }} - {% if stripe_event_data['invoice'].paid == true %} paid <i class="icon icon-ok"></i> {% else %} unpaid {% endif %} </p> <table class="table"> <tbody> {% for line in stripe_event_data['invoice'].lines.data %} <tr> <td> {% if line.type == 'subscription' %} Subscription to {{ line.plan.name|lower }} plan {% if line.amount == 0 %}(free trial){% endif %} <br><span>{{ line.period.start|date("j F Y") }} to {{ line.period.end|date("j F Y") }}</span> {% endif %} </td> <td>&pound;{{ (line.amount / 100)|number_format(2) }}</td> </tr> {% endfor %} <tr> <td>Total</td> <td>&pound;{{ (stripe_event_data['invoice'].total/100)|number_format(2) }}</td> </tr> </tbody> </table>
Mark latest invoice as paid/unpaid correctly
Mark latest invoice as paid/unpaid correctly
Twig
mit
webignition/web.client.simplytestable.com,webignition/web.client.simplytestable.com,webignition/web.client.simplytestable.com
twig
## Code Before: <p class="invoice-date"> {{ stripe_event_data['invoice'].date|date("j F Y") }} - {% if stripe_event_data['invoice'] == true %}paid <i class="icon icon-ok"></i>{% endif %} </p> <table class="table"> <tbody> {% for line in stripe_event_data['invoice'].lines.data %} <tr> <td> {% if line.type == 'subscription' %} Subscription to {{ line.plan.name|lower }} plan {% if line.amount == 0 %}(free trial){% endif %} <br><span>{{ line.period.start|date("j F Y") }} to {{ line.period.end|date("j F Y") }}</span> {% endif %} </td> <td>&pound;{{ line.amount|number_format(2) }}</td> </tr> {% endfor %} <tr> <td>Total</td> <td>&pound;{{ stripe_event_data['invoice'].total|number_format(2) }}</td> </tr> </tbody> </table> ## Instruction: Mark latest invoice as paid/unpaid correctly ## Code After: <p class="invoice-date"> {{ stripe_event_data['invoice'].date|date("j F Y") }} - {% if stripe_event_data['invoice'].paid == true %} paid <i class="icon icon-ok"></i> {% else %} unpaid {% endif %} </p> <table class="table"> <tbody> {% for line in stripe_event_data['invoice'].lines.data %} <tr> <td> {% if line.type == 'subscription' %} Subscription to {{ line.plan.name|lower }} plan {% if line.amount == 0 %}(free trial){% endif %} <br><span>{{ line.period.start|date("j F Y") }} to {{ line.period.end|date("j F Y") }}</span> {% endif %} </td> <td>&pound;{{ (line.amount / 100)|number_format(2) }}</td> </tr> {% endfor %} <tr> <td>Total</td> <td>&pound;{{ (stripe_event_data['invoice'].total/100)|number_format(2) }}</td> </tr> </tbody> </table>
5cd4f1e2df23137d7eb9bf42e94a981d17f82678
napkin/src/main/java/com/github/aleksandermielczarek/napkin/Napkin.java
napkin/src/main/java/com/github/aleksandermielczarek/napkin/Napkin.java
package com.github.aleksandermielczarek.napkin; import android.content.Context; import android.support.v4.app.Fragment; /** * Created by Aleksander Mielczarek on 14.05.2016. */ public class Napkin { private Napkin() { } public static <T> T provideComponent(Object object) { ComponentProvider<T> componentProvider = (ComponentProvider<T>) object; return componentProvider.provideComponent(); } public static <T> T provideAppComponent(Context context) { Context application = context.getApplicationContext(); return provideComponent(application); } public static <T> T provideAppComponent(Fragment fragment) { Context application = fragment.getContext().getApplicationContext(); return provideComponent(application); } public static <T> T provideActivityComponent(Fragment fragment) { Context activity = fragment.getActivity(); return provideComponent(activity); } }
package com.github.aleksandermielczarek.napkin; import android.content.Context; import android.support.v4.app.Fragment; import android.view.View; /** * Created by Aleksander Mielczarek on 14.05.2016. */ public class Napkin { private Napkin() { } @SuppressWarnings("unchecked") public static <T> T provideComponent(Object object) { ComponentProvider<T> componentProvider = (ComponentProvider<T>) object; return componentProvider.provideComponent(); } public static <T> T provideAppComponent(Context context) { Context application = context.getApplicationContext(); return provideComponent(application); } public static <T> T provideAppComponent(Fragment fragment) { Context context = fragment.getContext(); return provideAppComponent(context); } public static <T> T provideAppComponent(View view) { Context context = view.getContext(); return provideAppComponent(context); } public static <T> T provideActivityComponent(Fragment fragment) { Context activity = fragment.getActivity(); return provideComponent(activity); } public static <T> T provideActivityComponent(View view) { Context activity = view.getContext(); return provideComponent(activity); } }
Allow to retrieve component from View
Allow to retrieve component from View
Java
apache-2.0
AleksanderMielczarek/Napkin
java
## Code Before: package com.github.aleksandermielczarek.napkin; import android.content.Context; import android.support.v4.app.Fragment; /** * Created by Aleksander Mielczarek on 14.05.2016. */ public class Napkin { private Napkin() { } public static <T> T provideComponent(Object object) { ComponentProvider<T> componentProvider = (ComponentProvider<T>) object; return componentProvider.provideComponent(); } public static <T> T provideAppComponent(Context context) { Context application = context.getApplicationContext(); return provideComponent(application); } public static <T> T provideAppComponent(Fragment fragment) { Context application = fragment.getContext().getApplicationContext(); return provideComponent(application); } public static <T> T provideActivityComponent(Fragment fragment) { Context activity = fragment.getActivity(); return provideComponent(activity); } } ## Instruction: Allow to retrieve component from View ## Code After: package com.github.aleksandermielczarek.napkin; import android.content.Context; import android.support.v4.app.Fragment; import android.view.View; /** * Created by Aleksander Mielczarek on 14.05.2016. */ public class Napkin { private Napkin() { } @SuppressWarnings("unchecked") public static <T> T provideComponent(Object object) { ComponentProvider<T> componentProvider = (ComponentProvider<T>) object; return componentProvider.provideComponent(); } public static <T> T provideAppComponent(Context context) { Context application = context.getApplicationContext(); return provideComponent(application); } public static <T> T provideAppComponent(Fragment fragment) { Context context = fragment.getContext(); return provideAppComponent(context); } public static <T> T provideAppComponent(View view) { Context context = view.getContext(); return provideAppComponent(context); } public static <T> T provideActivityComponent(Fragment fragment) { Context activity = fragment.getActivity(); return provideComponent(activity); } public static <T> T provideActivityComponent(View view) { Context activity = view.getContext(); return provideComponent(activity); } }
c79f7ab77841b991076aa839f0bd3464967248c9
_posts/2015-01-16-liltwitter.markdown
_posts/2015-01-16-liltwitter.markdown
--- title: Lil Twitter subtitle: If a tweet gets smaller, is it a twit? layout: default modal-id: 3 date: 2015-01-16 img: liltwitter.jpg thumbnail: liltwitter-thumb.png alt: image-alt project-date: January 2015 source_1: source_1_name: source_2: source_2_name: category: Web Development description: Our first ever web app! Our team of 4 developed a twitter clone using Ruby with Sinatra, ActiveRecord, and Bootstrap. Users can tweet and see the tweets of who they are following. Setting up the associations for this one was definitely a rewarding challenge. ---
--- title: Lil Twitter subtitle: If a tweet gets smaller, is it a twit? layout: default modal-id: 3 date: 2015-01-16 img: liltwitter.jpg thumbnail: liltwitter-thumb.png alt: image-alt project-date: January 2015 source_1: https://github.com/godspeedyoo/Lil-Twitter source_1_name: Github source_2: source_2_name: category: Web Development description: Our first ever web app! Our team of 4 developed a twitter clone using Ruby with Sinatra, ActiveRecord, and Bootstrap. Users can tweet and see the tweets of who they are following. Setting up the associations for this one was definitely a rewarding challenge. Team members - Charles Kim, Paul Yu, Amir Beheshtaein, Joseph Won ---
Add liltwitter source link to github
Add liltwitter source link to github
Markdown
apache-2.0
godspeedyoo/godspeedyoo.github.io,godspeedyoo/godspeedyoo.github.io,godspeedyoo/godspeedyoo.github.io,godspeedyoo/godspeedyoo.github.io
markdown
## Code Before: --- title: Lil Twitter subtitle: If a tweet gets smaller, is it a twit? layout: default modal-id: 3 date: 2015-01-16 img: liltwitter.jpg thumbnail: liltwitter-thumb.png alt: image-alt project-date: January 2015 source_1: source_1_name: source_2: source_2_name: category: Web Development description: Our first ever web app! Our team of 4 developed a twitter clone using Ruby with Sinatra, ActiveRecord, and Bootstrap. Users can tweet and see the tweets of who they are following. Setting up the associations for this one was definitely a rewarding challenge. --- ## Instruction: Add liltwitter source link to github ## Code After: --- title: Lil Twitter subtitle: If a tweet gets smaller, is it a twit? layout: default modal-id: 3 date: 2015-01-16 img: liltwitter.jpg thumbnail: liltwitter-thumb.png alt: image-alt project-date: January 2015 source_1: https://github.com/godspeedyoo/Lil-Twitter source_1_name: Github source_2: source_2_name: category: Web Development description: Our first ever web app! Our team of 4 developed a twitter clone using Ruby with Sinatra, ActiveRecord, and Bootstrap. Users can tweet and see the tweets of who they are following. Setting up the associations for this one was definitely a rewarding challenge. Team members - Charles Kim, Paul Yu, Amir Beheshtaein, Joseph Won ---
28f44b82691f71220f610bfaa1f544f49253a2bd
.github/workflows/build-pr.yml
.github/workflows/build-pr.yml
name: build-pr on: pull_request: branches: - main jobs: build: runs-on: ubuntu-latest steps: - name: Checkout source code uses: actions/checkout@v2 - name: Setup Go uses: actions/setup-go@v2 with: go-version: 1.16 - name: Install golangci-lint uses: golangci/golangci-lint-action@v2 with: version: v1.36.0 - name: Test style run: make test-style - name: Run unit tests run: make test-coverage
name: build-pr on: pull_request: branches: - main jobs: build: runs-on: ubuntu-latest steps: - name: Checkout source code uses: actions/checkout@v2 - name: Setup Go uses: actions/setup-go@v2 with: go-version: '1.16' - name: Install golangci-lint run: | curl -sSLO https://github.com/golangci/golangci-lint/releases/download/v$GOLANGCI_LINT_VERSION/golangci-lint-$GOLANGCI_LINT_VERSION-linux-amd64.tar.gz shasum -a 256 golangci-lint-$GOLANGCI_LINT_VERSION-linux-amd64.tar.gz | grep "^$GOLANGCI_LINT_SHA256 " > /dev/null tar -xf golangci-lint-$GOLANGCI_LINT_VERSION-linux-amd64.tar.gz sudo mv golangci-lint-$GOLANGCI_LINT_VERSION-linux-amd64/golangci-lint /usr/local/bin/golangci-lint rm -rf golangci-lint-$GOLANGCI_LINT_VERSION-linux-amd64* env: GOLANGCI_LINT_VERSION: '1.36.0' GOLANGCI_LINT_SHA256: '9b8856b3a1c9bfbcf3a06b78e94611763b79abd9751c245246787cd3bf0e78a5' - name: Test style run: make test-style - name: Run unit tests run: make test-coverage
Revert "Use official golangci-lint action"
Revert "Use official golangci-lint action" Signed-off-by: Josh Dolitsky <c028c213ed5efcf30c3f4fc7361dbde0c893c5b7@dolit.ski>
YAML
apache-2.0
bacongobbler/helm,bacongobbler/helm,helm/helm,helm/helm
yaml
## Code Before: name: build-pr on: pull_request: branches: - main jobs: build: runs-on: ubuntu-latest steps: - name: Checkout source code uses: actions/checkout@v2 - name: Setup Go uses: actions/setup-go@v2 with: go-version: 1.16 - name: Install golangci-lint uses: golangci/golangci-lint-action@v2 with: version: v1.36.0 - name: Test style run: make test-style - name: Run unit tests run: make test-coverage ## Instruction: Revert "Use official golangci-lint action" Signed-off-by: Josh Dolitsky <c028c213ed5efcf30c3f4fc7361dbde0c893c5b7@dolit.ski> ## Code After: name: build-pr on: pull_request: branches: - main jobs: build: runs-on: ubuntu-latest steps: - name: Checkout source code uses: actions/checkout@v2 - name: Setup Go uses: actions/setup-go@v2 with: go-version: '1.16' - name: Install golangci-lint run: | curl -sSLO https://github.com/golangci/golangci-lint/releases/download/v$GOLANGCI_LINT_VERSION/golangci-lint-$GOLANGCI_LINT_VERSION-linux-amd64.tar.gz shasum -a 256 golangci-lint-$GOLANGCI_LINT_VERSION-linux-amd64.tar.gz | grep "^$GOLANGCI_LINT_SHA256 " > /dev/null tar -xf golangci-lint-$GOLANGCI_LINT_VERSION-linux-amd64.tar.gz sudo mv golangci-lint-$GOLANGCI_LINT_VERSION-linux-amd64/golangci-lint /usr/local/bin/golangci-lint rm -rf golangci-lint-$GOLANGCI_LINT_VERSION-linux-amd64* env: GOLANGCI_LINT_VERSION: '1.36.0' GOLANGCI_LINT_SHA256: '9b8856b3a1c9bfbcf3a06b78e94611763b79abd9751c245246787cd3bf0e78a5' - name: Test style run: make test-style - name: Run unit tests run: make test-coverage
1171402aaef19a2163f172954245310d4f4f8242
git-up.gemspec
git-up.gemspec
lib = File.expand_path('../lib/', __FILE__) $:.unshift lib unless $:.include?(lib) require 'git-up/version' Gem::Specification.new do |s| s.name = "git-up" s.version = GitUp::VERSION s.platform = Gem::Platform::RUBY s.authors = ["Aanand Prasad", "Elliot Crosby-McCullough"] s.email = ["aanand.prasad@gmail.com", "elliot.cm@gmail.com"] s.homepage = "http://github.com/aanand/git-up" s.summary = "git command to fetch and rebase all branches" s.add_development_dependency "thoughtbot-shoulda" s.add_dependency "colored", ">= 1.2" s.add_dependency "grit" s.files = Dir.glob("{bin,lib,vendor}/**/*") + %w(LICENSE README.md) s.require_path = 'lib' s.executables = Dir.glob("bin/*").map(&File.method(:basename)) end
lib = File.expand_path('../lib/', __FILE__) $:.unshift lib unless $:.include?(lib) require 'git-up/version' Gem::Specification.new do |s| s.name = "git-up" s.version = GitUp::VERSION s.platform = Gem::Platform::RUBY s.authors = ["Aanand Prasad", "Elliot Crosby-McCullough", "Adrian Irving-Beer", "Joshua Wehner"] s.email = ["aanand.prasad@gmail.com", "elliot.cm@gmail.com"] s.homepage = "http://github.com/aanand/git-up" s.summary = "git command to fetch and rebase all branches" s.add_development_dependency "thoughtbot-shoulda" s.add_dependency "colored", ">= 1.2" s.add_dependency "grit" s.files = Dir.glob("{bin,lib,vendor}/**/*") + %w(LICENSE README.md) s.require_path = 'lib' s.executables = Dir.glob("bin/*").map(&File.method(:basename)) end
Add Josh and Adrian to gemspec authors
Add Josh and Adrian to gemspec authors
Ruby
mit
Borgaard/git-up,aanand/git-up,zhangweiyu51/git-up,bhalothia/git-up,Loke155/git-up,jeremywiebe/git-up,christer155/git-up,milosm/git-up,albfan/git-up
ruby
## Code Before: lib = File.expand_path('../lib/', __FILE__) $:.unshift lib unless $:.include?(lib) require 'git-up/version' Gem::Specification.new do |s| s.name = "git-up" s.version = GitUp::VERSION s.platform = Gem::Platform::RUBY s.authors = ["Aanand Prasad", "Elliot Crosby-McCullough"] s.email = ["aanand.prasad@gmail.com", "elliot.cm@gmail.com"] s.homepage = "http://github.com/aanand/git-up" s.summary = "git command to fetch and rebase all branches" s.add_development_dependency "thoughtbot-shoulda" s.add_dependency "colored", ">= 1.2" s.add_dependency "grit" s.files = Dir.glob("{bin,lib,vendor}/**/*") + %w(LICENSE README.md) s.require_path = 'lib' s.executables = Dir.glob("bin/*").map(&File.method(:basename)) end ## Instruction: Add Josh and Adrian to gemspec authors ## Code After: lib = File.expand_path('../lib/', __FILE__) $:.unshift lib unless $:.include?(lib) require 'git-up/version' Gem::Specification.new do |s| s.name = "git-up" s.version = GitUp::VERSION s.platform = Gem::Platform::RUBY s.authors = ["Aanand Prasad", "Elliot Crosby-McCullough", "Adrian Irving-Beer", "Joshua Wehner"] s.email = ["aanand.prasad@gmail.com", "elliot.cm@gmail.com"] s.homepage = "http://github.com/aanand/git-up" s.summary = "git command to fetch and rebase all branches" s.add_development_dependency "thoughtbot-shoulda" s.add_dependency "colored", ">= 1.2" s.add_dependency "grit" s.files = Dir.glob("{bin,lib,vendor}/**/*") + %w(LICENSE README.md) s.require_path = 'lib' s.executables = Dir.glob("bin/*").map(&File.method(:basename)) end
42320a1baa7b4e69170b881090e17a25080bf45c
lib/assemblers/none.py
lib/assemblers/none.py
"""Null object for the assemblers.""" from os.path import join import lib.db as db from lib.assemblers.base import BaseAssembler class NoneAssembler(BaseAssembler): """Null object for the assemblers.""" def __init__(self, args, db_conn): """Build the assembler.""" super().__init__(args, db_conn) self.steps = [] self.blast_only = True # Used to short-circuit the assembler def write_final_output(self, blast_db, query): """Output this file if we are not assembling the contigs.""" prefix = self.final_output_prefix(blast_db, query) file_name = join(prefix, 'blast_only.fasta') with open(file_name, 'w') as output_file: for row in db.get_sra_blast_hits(self.state['db_conn'], 1): output_file.write('>{}{}\n'.format( row['seq_name'], row['seq_end'])) output_file.write('{}\n'.format(row['seq']))
"""Null object for the assemblers.""" from os.path import join import lib.db as db from lib.assemblers.base import BaseAssembler class NoneAssembler(BaseAssembler): """Null object for the assemblers.""" def __init__(self, args, db_conn): """Build the assembler.""" super().__init__(args, db_conn) self.steps = [] self.blast_only = True # Used to short-circuit the assembler def write_final_output(self, blast_db, query): """Output this file if we are not assembling the contigs.""" prefix = self.final_output_prefix(blast_db, query) file_name = '{}.fasta'.format(prefix) with open(file_name, 'w') as output_file: for row in db.get_sra_blast_hits(self.state['db_conn'], 1): output_file.write('>{}{}\n'.format( row['seq_name'], row['seq_end'])) output_file.write('{}\n'.format(row['seq']))
Change file name for output for no assembler given
Change file name for output for no assembler given
Python
bsd-3-clause
juliema/aTRAM
python
## Code Before: """Null object for the assemblers.""" from os.path import join import lib.db as db from lib.assemblers.base import BaseAssembler class NoneAssembler(BaseAssembler): """Null object for the assemblers.""" def __init__(self, args, db_conn): """Build the assembler.""" super().__init__(args, db_conn) self.steps = [] self.blast_only = True # Used to short-circuit the assembler def write_final_output(self, blast_db, query): """Output this file if we are not assembling the contigs.""" prefix = self.final_output_prefix(blast_db, query) file_name = join(prefix, 'blast_only.fasta') with open(file_name, 'w') as output_file: for row in db.get_sra_blast_hits(self.state['db_conn'], 1): output_file.write('>{}{}\n'.format( row['seq_name'], row['seq_end'])) output_file.write('{}\n'.format(row['seq'])) ## Instruction: Change file name for output for no assembler given ## Code After: """Null object for the assemblers.""" from os.path import join import lib.db as db from lib.assemblers.base import BaseAssembler class NoneAssembler(BaseAssembler): """Null object for the assemblers.""" def __init__(self, args, db_conn): """Build the assembler.""" super().__init__(args, db_conn) self.steps = [] self.blast_only = True # Used to short-circuit the assembler def write_final_output(self, blast_db, query): """Output this file if we are not assembling the contigs.""" prefix = self.final_output_prefix(blast_db, query) file_name = '{}.fasta'.format(prefix) with open(file_name, 'w') as output_file: for row in db.get_sra_blast_hits(self.state['db_conn'], 1): output_file.write('>{}{}\n'.format( row['seq_name'], row['seq_end'])) output_file.write('{}\n'.format(row['seq']))
da434efad2ec016f79b5feac788852a02501664d
accounts/templates/accounts/account_detail.html
accounts/templates/accounts/account_detail.html
{% extends "account_base.html" %} {% block content %} <h1>{{ account }}</h1> <ul> {% for account_user in account_users %} <li><a href="{{ account_user.get_absolute_url }}">{{ account_user }}</a></li> {% endfor %} </u> {% endblock %}
{% extends "account_base.html" %} {% block content %} <h1>{{ account }}</h1> <ul> <li><a href="{% url account_edit account.pk %}">Edit</a></li> <li><a href="{% url account_delete account.pk %}">Delete</a></li> <li><a href="{% url account_user_add account.pk %}">Add a member</a></li> </ul> <ul> {% for account_user in account_users %} <li><a href="{{ account_user.get_absolute_url }}">{{ account_user }}</a></li> {% endfor %} </ul> {% endblock %}
Add edit links back to account detail
Add edit links back to account detail
HTML
bsd-2-clause
GauthamGoli/django-organizations,bennylope/django-organizations,aptivate/django-organizations,DESHRAJ/django-organizations,arteria/django-ar-organizations,arteria/django-ar-organizations,aptivate/django-organizations,st8st8/django-organizations,aptivate/django-organizations,GauthamGoli/django-organizations,bennylope/django-organizations,st8st8/django-organizations,DESHRAJ/django-organizations
html
## Code Before: {% extends "account_base.html" %} {% block content %} <h1>{{ account }}</h1> <ul> {% for account_user in account_users %} <li><a href="{{ account_user.get_absolute_url }}">{{ account_user }}</a></li> {% endfor %} </u> {% endblock %} ## Instruction: Add edit links back to account detail ## Code After: {% extends "account_base.html" %} {% block content %} <h1>{{ account }}</h1> <ul> <li><a href="{% url account_edit account.pk %}">Edit</a></li> <li><a href="{% url account_delete account.pk %}">Delete</a></li> <li><a href="{% url account_user_add account.pk %}">Add a member</a></li> </ul> <ul> {% for account_user in account_users %} <li><a href="{{ account_user.get_absolute_url }}">{{ account_user }}</a></li> {% endfor %} </ul> {% endblock %}
5fe2f07bba5782da7a3df5b362757d38f5c5d5d3
app/views/backend/pases/_pase.html.erb
app/views/backend/pases/_pase.html.erb
<table class="well"> <tbody> <tr> <td class="field_name"> <%= resource_class.human_attribute_name(:ingreso) %>: <%= pase.ingreso %> </td> </tr> <tr> <td class="field_name"> <%= resource_class.human_attribute_name(:descripcion) %>: <%= pase.descripcion %> </td> </tr> <% #TODO: agregar Area, con link al area en cuestion" %> </tbody> </table>
<table class="well"> <tbody> <tr> <td class="field_name"> <%= resource_class.human_attribute_name(:ingreso) %>: <%= pase.ingreso %> </td> </tr> <tr> <td class="field_name"> <%= resource_class.human_attribute_name(:descripcion) %>: <%= pase.descripcion %> </td> </tr> <tr> <td class="field_name"> <%= resource_class.human_attribute_name(:area) %>: <%= link_to pase.area.name, backend_area_path(pase.area) %> </td> </tr> </tbody> </table>
Add link in the Nota-> pases section to the corresponding Area it was trasnfered
Add link in the Nota-> pases section to the corresponding Area it was trasnfered
HTML+ERB
agpl-3.0
bluelemons/diputados,bluelemons/diputados
html+erb
## Code Before: <table class="well"> <tbody> <tr> <td class="field_name"> <%= resource_class.human_attribute_name(:ingreso) %>: <%= pase.ingreso %> </td> </tr> <tr> <td class="field_name"> <%= resource_class.human_attribute_name(:descripcion) %>: <%= pase.descripcion %> </td> </tr> <% #TODO: agregar Area, con link al area en cuestion" %> </tbody> </table> ## Instruction: Add link in the Nota-> pases section to the corresponding Area it was trasnfered ## Code After: <table class="well"> <tbody> <tr> <td class="field_name"> <%= resource_class.human_attribute_name(:ingreso) %>: <%= pase.ingreso %> </td> </tr> <tr> <td class="field_name"> <%= resource_class.human_attribute_name(:descripcion) %>: <%= pase.descripcion %> </td> </tr> <tr> <td class="field_name"> <%= resource_class.human_attribute_name(:area) %>: <%= link_to pase.area.name, backend_area_path(pase.area) %> </td> </tr> </tbody> </table>
cf17403bd2e9fd17ae7c0d271a8ba76a73de60b3
giant/plugins/servers/web_api_2/web_api/templates/DataModel.cs.jinja
giant/plugins/servers/web_api_2/web_api/templates/DataModel.cs.jinja
{% import 'variables-webapi.jinja' as vars with context %} {% for definition_name, definition in swagger.definitions.iteritems() %} {{ (vars.api_name + '/Models/' + definition_name)|start_of_file -}} using System.Runtime.Serialization; namespace {{ swagger.info.title|replace(' ', '') }}.Models { [DataContract] public class {{ definition_name }} { {% for property_name, property in definition.properties.iteritems() %} [DataMember(Name = "{{ property_name }}")] public {{ property|property_type }} {{ property_name|camel_to_pascal }} { get; set; } {% endfor %} } } {%- endfor %}
{% import 'variables-webapi.jinja' as vars with context %} {% for definition_name, definition in swagger.definitions.iteritems() %} {{ (vars.api_name + '/Models/' + definition_name)|start_of_file -}} using System.Runtime.Serialization; using System; namespace {{ swagger.info.title|replace(' ', '') }}.Models { [DataContract] public class {{ definition_name }} { {% for property_name, property in definition.properties.iteritems() %} [DataMember(Name = "{{ property_name }}")] public {{ property|property_type }} {{ property_name|camel_to_pascal }} { get; set; } {% endfor %} } } {%- endfor %}
Fix WebApi models containing date times.
Fix WebApi models containing date times.
HTML+Django
mit
lixar/giant,lixar/giant
html+django
## Code Before: {% import 'variables-webapi.jinja' as vars with context %} {% for definition_name, definition in swagger.definitions.iteritems() %} {{ (vars.api_name + '/Models/' + definition_name)|start_of_file -}} using System.Runtime.Serialization; namespace {{ swagger.info.title|replace(' ', '') }}.Models { [DataContract] public class {{ definition_name }} { {% for property_name, property in definition.properties.iteritems() %} [DataMember(Name = "{{ property_name }}")] public {{ property|property_type }} {{ property_name|camel_to_pascal }} { get; set; } {% endfor %} } } {%- endfor %} ## Instruction: Fix WebApi models containing date times. ## Code After: {% import 'variables-webapi.jinja' as vars with context %} {% for definition_name, definition in swagger.definitions.iteritems() %} {{ (vars.api_name + '/Models/' + definition_name)|start_of_file -}} using System.Runtime.Serialization; using System; namespace {{ swagger.info.title|replace(' ', '') }}.Models { [DataContract] public class {{ definition_name }} { {% for property_name, property in definition.properties.iteritems() %} [DataMember(Name = "{{ property_name }}")] public {{ property|property_type }} {{ property_name|camel_to_pascal }} { get; set; } {% endfor %} } } {%- endfor %}
d91c0286b9c17e86ef71216f2e6e590e0e457b10
wstr_impl/Cargo.toml
wstr_impl/Cargo.toml
[package] name = "wstr_impl" version = "0.1.0" authors = ["LEE Wondong <wdlee91@gmail.com>"] description = "Private macro implementations for compile-time UTF-16 (wide) string literals." license = "MIT" [dependencies] proc-macro-hack = "0.3" syn = "0.11" [lib] proc-macro = true
[package] name = "wstr_impl" version = "0.1.0" authors = ["LEE Wondong <wdlee91@gmail.com>"] description = "Private macro implementations for compile-time UTF-16 (wide) string literals." license = "MIT" workspace = ".." [dependencies] proc-macro-hack = "0.3" syn = "0.11" [lib] proc-macro = true
Add workspace line in wstr_impl
Add workspace line in wstr_impl
TOML
mit
nitric1/wstr-rs
toml
## Code Before: [package] name = "wstr_impl" version = "0.1.0" authors = ["LEE Wondong <wdlee91@gmail.com>"] description = "Private macro implementations for compile-time UTF-16 (wide) string literals." license = "MIT" [dependencies] proc-macro-hack = "0.3" syn = "0.11" [lib] proc-macro = true ## Instruction: Add workspace line in wstr_impl ## Code After: [package] name = "wstr_impl" version = "0.1.0" authors = ["LEE Wondong <wdlee91@gmail.com>"] description = "Private macro implementations for compile-time UTF-16 (wide) string literals." license = "MIT" workspace = ".." [dependencies] proc-macro-hack = "0.3" syn = "0.11" [lib] proc-macro = true
7c1dd781647027fbee03629b518dbff2ec0d988c
build/org.eclipse.birt/build.properties
build/org.eclipse.birt/build.properties
bin.includes = plugin.xml,\ about.properties,\ about.mappings,\ about.ini,\ about.html,\ META-INF/,\ eclipse32.png,\ plugin.properties src.includes =
bin.includes = plugin.xml,\ about.properties,\ about.mappings,\ about.ini,\ about.html,\ META-INF/,\ eclipse32.png,\ plugin.properties src.includes = about.html
Include about.html in source package.
Include about.html in source package. Signed-off-by: Carl Thronson <3ca9340464dfc362fd17366f8329959a26b88236@actuate.com>
INI
epl-1.0
Charling-Huang/birt,Charling-Huang/birt,sguan-actuate/birt,sguan-actuate/birt,Charling-Huang/birt,Charling-Huang/birt,Charling-Huang/birt,rrimmana/birt-1,sguan-actuate/birt,sguan-actuate/birt,rrimmana/birt-1,rrimmana/birt-1,rrimmana/birt-1,sguan-actuate/birt,rrimmana/birt-1
ini
## Code Before: bin.includes = plugin.xml,\ about.properties,\ about.mappings,\ about.ini,\ about.html,\ META-INF/,\ eclipse32.png,\ plugin.properties src.includes = ## Instruction: Include about.html in source package. Signed-off-by: Carl Thronson <3ca9340464dfc362fd17366f8329959a26b88236@actuate.com> ## Code After: bin.includes = plugin.xml,\ about.properties,\ about.mappings,\ about.ini,\ about.html,\ META-INF/,\ eclipse32.png,\ plugin.properties src.includes = about.html
239e9f612cade9c706bcd0cd6b576a11a3fd3d06
src/misc/utils.js
src/misc/utils.js
export const omit = (obj, arr) => Object.keys(obj).reduce((res, key) => { if (arr.indexOf(key) === -1) { res[key] = obj[key] } return res }, {})
const omit = (obj, arr) => Object.keys(obj).reduce((res, key) => { if (arr.indexOf(key) === -1) { res[key] = obj[key] } return res }, {}) export { omit }
Fix side effect warning when building
Fix side effect warning when building
JavaScript
mit
g-script/react-be-blaze
javascript
## Code Before: export const omit = (obj, arr) => Object.keys(obj).reduce((res, key) => { if (arr.indexOf(key) === -1) { res[key] = obj[key] } return res }, {}) ## Instruction: Fix side effect warning when building ## Code After: const omit = (obj, arr) => Object.keys(obj).reduce((res, key) => { if (arr.indexOf(key) === -1) { res[key] = obj[key] } return res }, {}) export { omit }
08ab790ae0bd1d3c2bf57ce8e7dfc21d95c42cee
app/styles/cookie-consent.scss
app/styles/cookie-consent.scss
.cc { &-window { background-color: black; bottom: 0; color: white; display: flex; justify-content: space-around; align-items: center; height: $topbar-height; left: 0; padding: 8px; position: fixed; right: 0; z-index: 9999; } &-btn { background-color: $brand-primary; color: white !important; border-radius: 3px; text-decoration: none !important; padding: 5px 6px 4px; } &-invisible { display: none; } }
.cc { &-window { align-items: center; background-color: black; bottom: 0; color: white; display: flex; min-height: $topbar-height; justify-content: space-around; left: 0; line-height: 1.2; padding: 8px; position: fixed; right: 0; z-index: 9999; } &-btn { background-color: $brand-primary; color: white !important; border-radius: 3px; text-decoration: none !important; padding: 5px 6px 4px; } &-invisible { display: none; } }
Fix better cookie notice styling on mobile
Fix better cookie notice styling on mobile
SCSS
mit
CopenhagenCityArchives/kbh-billeder,CopenhagenCityArchives/kbh-billeder,CopenhagenCityArchives/kbh-billeder
scss
## Code Before: .cc { &-window { background-color: black; bottom: 0; color: white; display: flex; justify-content: space-around; align-items: center; height: $topbar-height; left: 0; padding: 8px; position: fixed; right: 0; z-index: 9999; } &-btn { background-color: $brand-primary; color: white !important; border-radius: 3px; text-decoration: none !important; padding: 5px 6px 4px; } &-invisible { display: none; } } ## Instruction: Fix better cookie notice styling on mobile ## Code After: .cc { &-window { align-items: center; background-color: black; bottom: 0; color: white; display: flex; min-height: $topbar-height; justify-content: space-around; left: 0; line-height: 1.2; padding: 8px; position: fixed; right: 0; z-index: 9999; } &-btn { background-color: $brand-primary; color: white !important; border-radius: 3px; text-decoration: none !important; padding: 5px 6px 4px; } &-invisible { display: none; } }
22f6d29e632c328264fd617cdbf2c7c035382c3e
src/browser/views/options.jade
src/browser/views/options.jade
doctype html html head meta(charset='UTF-8') title Redux DevTools Options style. body { padding: 2px; } .input { margin-bottom: 10px; } .caption { margin-right: 5px; width: 105px; display: inline-block; vertical-align: top; padding-top: 3px; } .comment { color: #999; margin-left: 5px; } input[type="text"] { width: 25px; font-weight: bold; text-align: center; } input[type="checkbox"] { width: 24px; height: 20px; } textarea { width: 250px; height: 50px; } select { width: 250px; } body #root script(src='/js/options.bundle.js')
doctype html html head meta(charset='UTF-8') title Redux DevTools Options style. body { padding: 2px; min-width: 360px; } .input { margin-bottom: 10px; } .caption { margin-right: 5px; width: 105px; display: inline-block; vertical-align: top; padding-top: 3px; } .comment { color: #999; margin-left: 5px; } input[type="text"] { width: 25px; font-weight: bold; text-align: center; } input[type="checkbox"] { width: 24px; height: 20px; } textarea { width: 250px; height: 50px; } select { width: 250px; } body #root script(src='/js/options.bundle.js')
Fix the option page layout on Windows
Fix the option page layout on Windows Related to #54
Jade
mit
zalmoxisus/redux-devtools-extension,zalmoxisus/redux-devtools-extension
jade
## Code Before: doctype html html head meta(charset='UTF-8') title Redux DevTools Options style. body { padding: 2px; } .input { margin-bottom: 10px; } .caption { margin-right: 5px; width: 105px; display: inline-block; vertical-align: top; padding-top: 3px; } .comment { color: #999; margin-left: 5px; } input[type="text"] { width: 25px; font-weight: bold; text-align: center; } input[type="checkbox"] { width: 24px; height: 20px; } textarea { width: 250px; height: 50px; } select { width: 250px; } body #root script(src='/js/options.bundle.js') ## Instruction: Fix the option page layout on Windows Related to #54 ## Code After: doctype html html head meta(charset='UTF-8') title Redux DevTools Options style. body { padding: 2px; min-width: 360px; } .input { margin-bottom: 10px; } .caption { margin-right: 5px; width: 105px; display: inline-block; vertical-align: top; padding-top: 3px; } .comment { color: #999; margin-left: 5px; } input[type="text"] { width: 25px; font-weight: bold; text-align: center; } input[type="checkbox"] { width: 24px; height: 20px; } textarea { width: 250px; height: 50px; } select { width: 250px; } body #root script(src='/js/options.bundle.js')
14578217d8311175d851f292f756d791ecf6f8cc
infra/concourse/build/developer-tools/README.md
infra/concourse/build/developer-tools/README.md
Developer Tools Image === See design decisions and discussion in [Common developer-tools container with credentials handling (DevEx 2.0)][design] Environment Variables === The following environment variables are inputs to the running container. Enviornment variables also implement feature flags to enable or disable behavior. These variables are considered a public API and interface into the running container instance. | Environment Variable | Description | | --- | --- | | SERVICE_ACCOUNT_JSON | The JSON string content used to initialize credentials inside the container | | CFT_DISABLE_INIT_CREDENTIALS | Disables automatic initialization of credentials via ~root/.bashrc if the value has length ' [design]: https://github.com/GoogleCloudPlatform/cloud-foundation-toolkit/issues/255
See design decisions and discussion in [Common developer-tools container with credentials handling (DevEx 2.0)][design] ## Building and Releasing To build a local Docker image from the `Dockerfile`, run `build-image-developer-tools`. To release a local Docker image to the registry, update the value of `DOCKER_TAG_VERSION_DEVELOPER_TOOLS` in the `Makefile` following Semantic Versioning and run `release-image-developer-tools`. Review the `Makefile` to identify other variable inputs to the build and release workflow. ## Environment Variables The following environment variables are inputs to the running container. Enviornment variables also implement feature flags to enable or disable behavior. These variables are considered a public API and interface into the running container instance. | Environment Variable | Description | | --- | --- | | SERVICE_ACCOUNT_JSON | The JSON string content used to initialize credentials inside the container | | CFT_DISABLE_INIT_CREDENTIALS | Disables automatic initialization of credentials via ~root/.bashrc if the value has length ' [design]: https://github.com/GoogleCloudPlatform/cloud-foundation-toolkit/issues/255
Add build, release instructions; fix header size
Add build, release instructions; fix header size
Markdown
apache-2.0
GoogleCloudPlatform/cloud-foundation-toolkit,GoogleCloudPlatform/cloud-foundation-toolkit,GoogleCloudPlatform/cloud-foundation-toolkit,GoogleCloudPlatform/cloud-foundation-toolkit,GoogleCloudPlatform/cloud-foundation-toolkit
markdown
## Code Before: Developer Tools Image === See design decisions and discussion in [Common developer-tools container with credentials handling (DevEx 2.0)][design] Environment Variables === The following environment variables are inputs to the running container. Enviornment variables also implement feature flags to enable or disable behavior. These variables are considered a public API and interface into the running container instance. | Environment Variable | Description | | --- | --- | | SERVICE_ACCOUNT_JSON | The JSON string content used to initialize credentials inside the container | | CFT_DISABLE_INIT_CREDENTIALS | Disables automatic initialization of credentials via ~root/.bashrc if the value has length ' [design]: https://github.com/GoogleCloudPlatform/cloud-foundation-toolkit/issues/255 ## Instruction: Add build, release instructions; fix header size ## Code After: See design decisions and discussion in [Common developer-tools container with credentials handling (DevEx 2.0)][design] ## Building and Releasing To build a local Docker image from the `Dockerfile`, run `build-image-developer-tools`. To release a local Docker image to the registry, update the value of `DOCKER_TAG_VERSION_DEVELOPER_TOOLS` in the `Makefile` following Semantic Versioning and run `release-image-developer-tools`. Review the `Makefile` to identify other variable inputs to the build and release workflow. ## Environment Variables The following environment variables are inputs to the running container. Enviornment variables also implement feature flags to enable or disable behavior. These variables are considered a public API and interface into the running container instance. | Environment Variable | Description | | --- | --- | | SERVICE_ACCOUNT_JSON | The JSON string content used to initialize credentials inside the container | | CFT_DISABLE_INIT_CREDENTIALS | Disables automatic initialization of credentials via ~root/.bashrc if the value has length ' [design]: https://github.com/GoogleCloudPlatform/cloud-foundation-toolkit/issues/255
eb51c67c2b7635381d69b6351b8efe302acf3df8
lib/src/Hostname.cpp
lib/src/Hostname.cpp
Hostname::Hostname() { } Hostname::Hostname(const ci_string& hostname) { create(hostname); } bool Hostname::isValid() { return !data.empty(); } void Hostname::create(const ci_string & hostname) { if (isValid()) { throw std::runtime_error("Hostname is defined!"); } data = hostname; std::transform(data.begin(), data.end(), data.begin(), std::tolower); } void Hostname::destroy() { data.clear(); } bool Hostname::operator==(const Hostname & other) const { return data == other.data; } bool Hostname::operator!=(const Hostname & other) const { return !(*this == other); } std::ostream& operator<<(std::ostream& output, const Hostname & hostname) { output << hostname.data.c_str(); return output; } std::istream& operator>>(std::istream& input, Hostname & hostname) { ci_string str; std::copy( std::istreambuf_iterator<char>(input), std::istreambuf_iterator<char>(), std::back_inserter(str)); if (hostname.isValid()) { hostname.destroy(); } hostname.create(str); return input; }
Hostname::Hostname() { } Hostname::Hostname(const ci_string& hostname) { create(hostname); } bool Hostname::isValid() { return !data.empty(); } void Hostname::create(const ci_string & hostname) { if (isValid()) { throw std::runtime_error("Hostname is defined!"); } data = hostname; std::for_each(data.begin(), data.end(), [](char& c) { c = std::tolower(c); }); } void Hostname::destroy() { data.clear(); } bool Hostname::operator==(const Hostname & other) const { return data == other.data; } bool Hostname::operator!=(const Hostname & other) const { return !(*this == other); } std::ostream& operator<<(std::ostream& output, const Hostname & hostname) { output << hostname.data.c_str(); return output; } std::istream& operator>>(std::istream& input, Hostname & hostname) { ci_string str; std::copy( std::istreambuf_iterator<char>(input), std::istreambuf_iterator<char>(), std::back_inserter(str)); if (hostname.isValid()) { hostname.destroy(); } hostname.create(str); return input; }
Convert std::transform to std::for_each (not supported by GCC 4.6)
Convert std::transform to std::for_each (not supported by GCC 4.6)
C++
mit
cristian-szabo/bt-code-test
c++
## Code Before: Hostname::Hostname() { } Hostname::Hostname(const ci_string& hostname) { create(hostname); } bool Hostname::isValid() { return !data.empty(); } void Hostname::create(const ci_string & hostname) { if (isValid()) { throw std::runtime_error("Hostname is defined!"); } data = hostname; std::transform(data.begin(), data.end(), data.begin(), std::tolower); } void Hostname::destroy() { data.clear(); } bool Hostname::operator==(const Hostname & other) const { return data == other.data; } bool Hostname::operator!=(const Hostname & other) const { return !(*this == other); } std::ostream& operator<<(std::ostream& output, const Hostname & hostname) { output << hostname.data.c_str(); return output; } std::istream& operator>>(std::istream& input, Hostname & hostname) { ci_string str; std::copy( std::istreambuf_iterator<char>(input), std::istreambuf_iterator<char>(), std::back_inserter(str)); if (hostname.isValid()) { hostname.destroy(); } hostname.create(str); return input; } ## Instruction: Convert std::transform to std::for_each (not supported by GCC 4.6) ## Code After: Hostname::Hostname() { } Hostname::Hostname(const ci_string& hostname) { create(hostname); } bool Hostname::isValid() { return !data.empty(); } void Hostname::create(const ci_string & hostname) { if (isValid()) { throw std::runtime_error("Hostname is defined!"); } data = hostname; std::for_each(data.begin(), data.end(), [](char& c) { c = std::tolower(c); }); } void Hostname::destroy() { data.clear(); } bool Hostname::operator==(const Hostname & other) const { return data == other.data; } bool Hostname::operator!=(const Hostname & other) const { return !(*this == other); } std::ostream& operator<<(std::ostream& output, const Hostname & hostname) { output << hostname.data.c_str(); return output; } std::istream& operator>>(std::istream& input, Hostname & hostname) { ci_string str; std::copy( std::istreambuf_iterator<char>(input), std::istreambuf_iterator<char>(), std::back_inserter(str)); if (hostname.isValid()) { hostname.destroy(); } hostname.create(str); return input; }
5cc9d99238c417ec010db44b3919873929fd1d7f
devtools/travis-ci/update_versions_json.py
devtools/travis-ci/update_versions_json.py
import json try: from urllib.request import urlopen except ImportError: from urllib2 import urlopen from mdtraj import version if not version.release: print("This is not a release.") exit(0) URL = 'http://www.msmbuilder.org' versions = json.load(urlopen(URL + '/versions.json')) # new release so all the others are now old for i in range(len(versions)): versions[i]['latest'] = False versions.append({ 'version': version.short_version, 'url': "{base}/{version}".format(base=URL, version=version.short_version), 'latest': True}) with open("doc/_deploy/versions.json", 'w') as versionf: json.dump(versions, versionf)
import json try: from urllib.request import urlopen except ImportError: from urllib2 import urlopen from mdtraj import version if not version.release: print("This is not a release.") exit(0) URL = 'http://www.msmbuilder.org' versions = json.load(urlopen(URL + '/versions.json')) # new release so all the others are now old for i in range(len(versions)): versions[i]['latest'] = False versions.append({ 'version': version.short_version, 'display': version.short_version, 'url': "{base}/{version}".format(base=URL, version=version.short_version), 'latest': True}) with open("doc/_deploy/versions.json", 'w') as versionf: json.dump(versions, versionf)
Add 'display' key to versions.json
Add 'display' key to versions.json
Python
lgpl-2.1
mattwthompson/mdtraj,leeping/mdtraj,ctk3b/mdtraj,msultan/mdtraj,mattwthompson/mdtraj,rmcgibbo/mdtraj,dwhswenson/mdtraj,rmcgibbo/mdtraj,ctk3b/mdtraj,leeping/mdtraj,leeping/mdtraj,gph82/mdtraj,tcmoore3/mdtraj,gph82/mdtraj,ctk3b/mdtraj,msultan/mdtraj,tcmoore3/mdtraj,gph82/mdtraj,msultan/mdtraj,mdtraj/mdtraj,mattwthompson/mdtraj,mattwthompson/mdtraj,swails/mdtraj,dwhswenson/mdtraj,jchodera/mdtraj,mdtraj/mdtraj,jchodera/mdtraj,leeping/mdtraj,jchodera/mdtraj,swails/mdtraj,tcmoore3/mdtraj,swails/mdtraj,mdtraj/mdtraj,swails/mdtraj,ctk3b/mdtraj,jchodera/mdtraj,msultan/mdtraj,tcmoore3/mdtraj,rmcgibbo/mdtraj,dwhswenson/mdtraj,swails/mdtraj,ctk3b/mdtraj
python
## Code Before: import json try: from urllib.request import urlopen except ImportError: from urllib2 import urlopen from mdtraj import version if not version.release: print("This is not a release.") exit(0) URL = 'http://www.msmbuilder.org' versions = json.load(urlopen(URL + '/versions.json')) # new release so all the others are now old for i in range(len(versions)): versions[i]['latest'] = False versions.append({ 'version': version.short_version, 'url': "{base}/{version}".format(base=URL, version=version.short_version), 'latest': True}) with open("doc/_deploy/versions.json", 'w') as versionf: json.dump(versions, versionf) ## Instruction: Add 'display' key to versions.json ## Code After: import json try: from urllib.request import urlopen except ImportError: from urllib2 import urlopen from mdtraj import version if not version.release: print("This is not a release.") exit(0) URL = 'http://www.msmbuilder.org' versions = json.load(urlopen(URL + '/versions.json')) # new release so all the others are now old for i in range(len(versions)): versions[i]['latest'] = False versions.append({ 'version': version.short_version, 'display': version.short_version, 'url': "{base}/{version}".format(base=URL, version=version.short_version), 'latest': True}) with open("doc/_deploy/versions.json", 'w') as versionf: json.dump(versions, versionf)
671cd3d066de375da71d8226c5c2acecaf3e309d
examples/hello-world/docker-compose.yml
examples/hello-world/docker-compose.yml
version: '3' services: task-master: image: timgreen/task-master hostname: task-master-hello-world volumes: - /var/run/docker.sock:/var/run/docker.sock - ./config.hello-world.yaml:/config.yaml:ro - /dev/shm/.task-master-hello-world:/dev/shm/.task-master-hello-world environment: - WORKDIR=/dev/shm/.task-master-hello-world
version: '3.2' services: task-master: image: timgreen/task-master hostname: task-master-hello-world environment: WORKDIR: &WORKDIR /dev/shm/.task-master-hello-world volumes: - /var/run/docker.sock:/var/run/docker.sock - ./config.hello-world.yaml:/config.yaml:ro - type: bind source: *WORKDIR target: *WORKDIR
Define WORKDIR as anchor and reuse it in volume.
Define WORKDIR as anchor and reuse it in volume.
YAML
mit
timgreen/docker-task-master
yaml
## Code Before: version: '3' services: task-master: image: timgreen/task-master hostname: task-master-hello-world volumes: - /var/run/docker.sock:/var/run/docker.sock - ./config.hello-world.yaml:/config.yaml:ro - /dev/shm/.task-master-hello-world:/dev/shm/.task-master-hello-world environment: - WORKDIR=/dev/shm/.task-master-hello-world ## Instruction: Define WORKDIR as anchor and reuse it in volume. ## Code After: version: '3.2' services: task-master: image: timgreen/task-master hostname: task-master-hello-world environment: WORKDIR: &WORKDIR /dev/shm/.task-master-hello-world volumes: - /var/run/docker.sock:/var/run/docker.sock - ./config.hello-world.yaml:/config.yaml:ro - type: bind source: *WORKDIR target: *WORKDIR
19c821c40e99f4274d7bb83181d296601bde6c1e
scripts/edw_import_cron.sh
scripts/edw_import_cron.sh
hostname=$1 shift notify=$@ ext=`date +%b%d.%H` cd /srv/encoded out=/srv/cron.logs/edw_sync/compare.${ext} bin/read-edw-fileinfo -C -q >${out}.tsv 2> ${out}.log diff=`grep -c APP_DIFF ${out}.tsv` edw=`grep -c EDW_ONLY ${out}.tsv` app=`grep -c APP_ONLY ${out}.tsv` (cat ${out}.log; echo "Comparison file: ${out}.tsv") | mail -s "CRON: EDW file compare to ${hostname}. Diffs: ${diff}, EDW only: ${edw}, App only: ${app}" ${notify} $notify hostname=$1 shift notify=$@ ext=`date +%b%d.%H` cd /srv/encoded out=/srv/cron.logs/edw_sync/import.${ext}.log bin/read-edw-fileinfo -v -I > ${out} 2>&1 success=`grep -c Success ${out}` fail=`grep -c Fail ${out}` mail -s "CRON: EDW file sync to ${hostname}. Succeeded: ${success}, Failed: ${fail}" ${notify} < ${out}
hostname=$1 shift notify=$@ ext=`date +%b%d.%H` cd /srv/encoded out=/srv/cron.logs/edw_sync/import.${ext}.log bin/read-edw-fileinfo -v -I > ${out} 2>&1 success=`grep -c Success ${out}` fail=`grep -c Fail ${out}` mail -s "CRON: EDW file sync to ${hostname}. Succeeded: ${success}, Failed: ${fail}" ${notify} < ${out}
Trim to actual script (had leading cruft from related script)
Trim to actual script (had leading cruft from related script)
Shell
mit
T2DREAM/t2dream-portal,ENCODE-DCC/snovault,ClinGen/clincoded,hms-dbmi/fourfront,ENCODE-DCC/encoded,ENCODE-DCC/encoded,4dn-dcic/fourfront,kidaa/encoded,hms-dbmi/fourfront,ClinGen/clincoded,ENCODE-DCC/encoded,ClinGen/clincoded,philiptzou/clincoded,kidaa/encoded,philiptzou/clincoded,T2DREAM/t2dream-portal,hms-dbmi/fourfront,ENCODE-DCC/snovault,philiptzou/clincoded,philiptzou/clincoded,4dn-dcic/fourfront,ClinGen/clincoded,ENCODE-DCC/snovault,ENCODE-DCC/encoded,T2DREAM/t2dream-portal,T2DREAM/t2dream-portal,hms-dbmi/fourfront,ENCODE-DCC/snovault,ClinGen/clincoded,kidaa/encoded,kidaa/encoded,ENCODE-DCC/snovault,4dn-dcic/fourfront,kidaa/encoded,4dn-dcic/fourfront,hms-dbmi/fourfront,philiptzou/clincoded
shell
## Code Before: hostname=$1 shift notify=$@ ext=`date +%b%d.%H` cd /srv/encoded out=/srv/cron.logs/edw_sync/compare.${ext} bin/read-edw-fileinfo -C -q >${out}.tsv 2> ${out}.log diff=`grep -c APP_DIFF ${out}.tsv` edw=`grep -c EDW_ONLY ${out}.tsv` app=`grep -c APP_ONLY ${out}.tsv` (cat ${out}.log; echo "Comparison file: ${out}.tsv") | mail -s "CRON: EDW file compare to ${hostname}. Diffs: ${diff}, EDW only: ${edw}, App only: ${app}" ${notify} $notify hostname=$1 shift notify=$@ ext=`date +%b%d.%H` cd /srv/encoded out=/srv/cron.logs/edw_sync/import.${ext}.log bin/read-edw-fileinfo -v -I > ${out} 2>&1 success=`grep -c Success ${out}` fail=`grep -c Fail ${out}` mail -s "CRON: EDW file sync to ${hostname}. Succeeded: ${success}, Failed: ${fail}" ${notify} < ${out} ## Instruction: Trim to actual script (had leading cruft from related script) ## Code After: hostname=$1 shift notify=$@ ext=`date +%b%d.%H` cd /srv/encoded out=/srv/cron.logs/edw_sync/import.${ext}.log bin/read-edw-fileinfo -v -I > ${out} 2>&1 success=`grep -c Success ${out}` fail=`grep -c Fail ${out}` mail -s "CRON: EDW file sync to ${hostname}. Succeeded: ${success}, Failed: ${fail}" ${notify} < ${out}
b4c62832d322b66ad62c378e367143e815781e3c
web/concrete/css/ccm_app/loaders.less
web/concrete/css/ccm_app/loaders.less
/** * Currently not used */ div#ccm-modal-overlay { position: fixed; width: 100%; background-color: transparent; height: 100%; top: 0px; left: 0px; z-index: @index-level-modal-overlay; -webkit-transform: translate3d(0, 0, 0); -moz-transform: translate3d(0, 0, 0); .transition(all 1.0s linear); &.ccm-modal-overlay-active { background-color: rgba(0, 0, 0, 0.4); } #ccm-loader { -webkit-transform: translate3d(0, 0, 0); -moz-transform: translate3d(0, 0, 0); .opacity(0); position: absolute; width: 100px; height: 100px; .border-radius(10px); top: 50%; left: 50%; margin-top: -50px; margin-left: -50px; z-index: @index-level-modal-loader; background-color: rgba(0,0,0,0.8); &.ccm-loader-active { .opacity(1); .transition(opacity 0.3s linear); } } }
/** * Currently not used */ div#ccm-modal-overlay { position: fixed; width: 100%; background-color: transparent; height: 100%; top: 0px; left: 0px; z-index: @index-level-modal-overlay; .translate3d(0, 0, 0); .transition(all 1.0s linear); &.ccm-modal-overlay-active { background-color: rgba(0, 0, 0, 0.4); } #ccm-loader { .translate3d(0, 0, 0); .opacity(0); position: absolute; width: 100px; height: 100px; .border-radius(10px); top: 50%; left: 50%; margin-top: -50px; margin-left: -50px; z-index: @index-level-modal-loader; background-color: rgba(0,0,0,0.8); &.ccm-loader-active { .opacity(1); .transition(opacity 0.3s linear); } } }
Add Bootstrap Mixins vendor prefixes
Add Bootstrap Mixins vendor prefixes Former-commit-id: 87e5019077acae24f1203f4e5676b0bebd4298d2
Less
mit
mainio/concrete5,jaromirdalecky/concrete5,acliss19xx/concrete5,hissy/concrete5,mainio/concrete5,concrete5/concrete5,deek87/concrete5,mainio/concrete5,rikzuiderlicht/concrete5,deek87/concrete5,biplobice/concrete5,jaromirdalecky/concrete5,jaromirdalecky/concrete5,olsgreen/concrete5,biplobice/concrete5,haeflimi/concrete5,mlocati/concrete5,mlocati/concrete5,haeflimi/concrete5,deek87/concrete5,a3020/concrete5,acliss19xx/concrete5,triplei/concrete5-8,a3020/concrete5,haeflimi/concrete5,olsgreen/concrete5,triplei/concrete5-8,MrKarlDilkington/concrete5,jaromirdalecky/concrete5,deek87/concrete5,hissy/concrete5,hissy/concrete5,triplei/concrete5-8,biplobice/concrete5,olsgreen/concrete5,concrete5/concrete5,concrete5/concrete5,KorvinSzanto/concrete5,haeflimi/concrete5,hissy/concrete5,acliss19xx/concrete5,rikzuiderlicht/concrete5,mlocati/concrete5,concrete5/concrete5,mlocati/concrete5,KorvinSzanto/concrete5,MrKarlDilkington/concrete5,rikzuiderlicht/concrete5,MrKarlDilkington/concrete5,biplobice/concrete5,KorvinSzanto/concrete5
less
## Code Before: /** * Currently not used */ div#ccm-modal-overlay { position: fixed; width: 100%; background-color: transparent; height: 100%; top: 0px; left: 0px; z-index: @index-level-modal-overlay; -webkit-transform: translate3d(0, 0, 0); -moz-transform: translate3d(0, 0, 0); .transition(all 1.0s linear); &.ccm-modal-overlay-active { background-color: rgba(0, 0, 0, 0.4); } #ccm-loader { -webkit-transform: translate3d(0, 0, 0); -moz-transform: translate3d(0, 0, 0); .opacity(0); position: absolute; width: 100px; height: 100px; .border-radius(10px); top: 50%; left: 50%; margin-top: -50px; margin-left: -50px; z-index: @index-level-modal-loader; background-color: rgba(0,0,0,0.8); &.ccm-loader-active { .opacity(1); .transition(opacity 0.3s linear); } } } ## Instruction: Add Bootstrap Mixins vendor prefixes Former-commit-id: 87e5019077acae24f1203f4e5676b0bebd4298d2 ## Code After: /** * Currently not used */ div#ccm-modal-overlay { position: fixed; width: 100%; background-color: transparent; height: 100%; top: 0px; left: 0px; z-index: @index-level-modal-overlay; .translate3d(0, 0, 0); .transition(all 1.0s linear); &.ccm-modal-overlay-active { background-color: rgba(0, 0, 0, 0.4); } #ccm-loader { .translate3d(0, 0, 0); .opacity(0); position: absolute; width: 100px; height: 100px; .border-radius(10px); top: 50%; left: 50%; margin-top: -50px; margin-left: -50px; z-index: @index-level-modal-loader; background-color: rgba(0,0,0,0.8); &.ccm-loader-active { .opacity(1); .transition(opacity 0.3s linear); } } }
4246d7e6436a8705fa1c3bca1818caf22fb2048e
.travis.yml
.travis.yml
language: rust sudo: false os: - linux - osx rust: - stable - nightly matrix: fast_finish: true branches: only: - master script: - cargo build --verbose - cargo test --verbose after_script: | if [ "$TRAVIS_OS_NAME" = linux -a "$TRAVIS_RUST_VERSION" = nightly ]; then bash <(curl https://raw.githubusercontent.com/xd009642/tarpaulin/master/travis-install.sh) cargo tarpaulin --out Xml bash <(curl -s https://codecov.io/bash) fi
language: rust sudo: false os: - linux - osx rust: - stable - nightly matrix: fast_finish: true branches: only: - master cache: cargo before_cache: | if [[ "$TRAVIS_RUST_VERSION" = nightly ]]; then RUSTFLAGS="--cfg procmacro2_semver_exempt" cargo install cargo-tarpaulin -f fi script: - cargo build --verbose - cargo test --verbose after_script: | if [[ "$TRAVIS_OS_NAME" = linux && "$TRAVIS_RUST_VERSION" = nightly ]]; then cargo tarpaulin --out Xml bash <(curl -s https://codecov.io/bash) fi
Stop using the shell script as it's no longer recommended
Stop using the shell script as it's no longer recommended
YAML
mit
uutils/findutils,uutils/findutils,uutils/findutils
yaml
## Code Before: language: rust sudo: false os: - linux - osx rust: - stable - nightly matrix: fast_finish: true branches: only: - master script: - cargo build --verbose - cargo test --verbose after_script: | if [ "$TRAVIS_OS_NAME" = linux -a "$TRAVIS_RUST_VERSION" = nightly ]; then bash <(curl https://raw.githubusercontent.com/xd009642/tarpaulin/master/travis-install.sh) cargo tarpaulin --out Xml bash <(curl -s https://codecov.io/bash) fi ## Instruction: Stop using the shell script as it's no longer recommended ## Code After: language: rust sudo: false os: - linux - osx rust: - stable - nightly matrix: fast_finish: true branches: only: - master cache: cargo before_cache: | if [[ "$TRAVIS_RUST_VERSION" = nightly ]]; then RUSTFLAGS="--cfg procmacro2_semver_exempt" cargo install cargo-tarpaulin -f fi script: - cargo build --verbose - cargo test --verbose after_script: | if [[ "$TRAVIS_OS_NAME" = linux && "$TRAVIS_RUST_VERSION" = nightly ]]; then cargo tarpaulin --out Xml bash <(curl -s https://codecov.io/bash) fi
4551b9f361e12a69b559efc826a70e080015e877
cli/lib/cmds/services/list.js
cli/lib/cmds/services/list.js
'use strict'; var Promise = require('es6-promise').Promise; var Command = require('../../cli/command'); var services = require('../../services'); module.exports = new Command( 'services', 'list services for your org', function(ctx) { return new Promise(function(resolve) { resolve(); }); } );
'use strict'; var Promise = require('es6-promise').Promise; var Command = require('../../cli/command'); module.exports = new Command( 'services', 'list services for your org', function(/*ctx*/) { return new Promise(function(resolve) { resolve(); }); } );
Fix lint errors in 'ag services' base
Fix lint errors in 'ag services' base
JavaScript
bsd-3-clause
manifoldco/torus-cli,luizbranco/torus-cli,manifoldco/torus-cli,manifoldco/torus-cli,luizbranco/torus-cli,luizbranco/torus-cli
javascript
## Code Before: 'use strict'; var Promise = require('es6-promise').Promise; var Command = require('../../cli/command'); var services = require('../../services'); module.exports = new Command( 'services', 'list services for your org', function(ctx) { return new Promise(function(resolve) { resolve(); }); } ); ## Instruction: Fix lint errors in 'ag services' base ## Code After: 'use strict'; var Promise = require('es6-promise').Promise; var Command = require('../../cli/command'); module.exports = new Command( 'services', 'list services for your org', function(/*ctx*/) { return new Promise(function(resolve) { resolve(); }); } );
36298a9f9a7a373a716e44cac6226a0ec8c8c40c
__main__.py
__main__.py
from twisted.internet.endpoints import TCP4ServerEndpoint from twisted.internet import reactor import editorFactory if __name__ == "__main__": server = editorFactory.EditorFactory() TCP4ServerEndpoint(reactor, 4567).listen(server) reactor.run()
from twisted.internet.endpoints import TCP4ServerEndpoint from twisted.internet import reactor import editorFactory if __name__ == "__main__": server = editorFactory.EditorFactory() TCP4ServerEndpoint(reactor, 4567).listen(server) print('Starting up...') reactor.run()
Print something at the start
Print something at the start
Python
apache-2.0
Floobits/floobits-emacs
python
## Code Before: from twisted.internet.endpoints import TCP4ServerEndpoint from twisted.internet import reactor import editorFactory if __name__ == "__main__": server = editorFactory.EditorFactory() TCP4ServerEndpoint(reactor, 4567).listen(server) reactor.run() ## Instruction: Print something at the start ## Code After: from twisted.internet.endpoints import TCP4ServerEndpoint from twisted.internet import reactor import editorFactory if __name__ == "__main__": server = editorFactory.EditorFactory() TCP4ServerEndpoint(reactor, 4567).listen(server) print('Starting up...') reactor.run()
6180af3544882649dc5cdc5e2d5f0e007d899c5f
foobot/blankbot.yaml
foobot/blankbot.yaml
foobot: apikey : email : password :
foobot: # index - with multiple foobots in one account, you can specify which foobot in the list this refers to index : 0 # apikey - 300 digit foobot apikey (request from https://api.foobot.io/apidoc/index.html ) apikey : # email - email address of your account email : # password - password on your account (in the app) password : # domain - location where you have installed yous indoor air quality dashboard website domain : http://localhost
Add more comments to the example yaml file
Add more comments to the example yaml file
YAML
mit
Rockvole/indoor-air-quality-dashboard,Rockvole/indoor-air-quality-dashboard,Rockvole/indoor-air-quality-dashboard,Rockvole/indoor-air-quality-dashboard,Rockvole/indoor-air-quality-dashboard
yaml
## Code Before: foobot: apikey : email : password : ## Instruction: Add more comments to the example yaml file ## Code After: foobot: # index - with multiple foobots in one account, you can specify which foobot in the list this refers to index : 0 # apikey - 300 digit foobot apikey (request from https://api.foobot.io/apidoc/index.html ) apikey : # email - email address of your account email : # password - password on your account (in the app) password : # domain - location where you have installed yous indoor air quality dashboard website domain : http://localhost
7a654e7e0da8dd974a739d0fc047925c742355a8
app/admin/drugs.rb
app/admin/drugs.rb
ActiveAdmin.register Drug do menu priority: 7 permit_params :pubchem_id, :name, :ncit_id filter :name filter :pubchem_id filter :ncit_id form do |f| f.semantic_errors(*f.object.errors.keys) f.inputs do f.input :name f.input :pubchem_id f.input :ncit_id, input_html: { rows: 1 } end f.actions end index do selectable_column column :name column :pubchem_id column :ncit_id column :created_at column :updated_at actions end show do |f| attributes_table do row :name row :pubchem_id row :ncit_id row :evidence_item_count do |d| d.evidence_items.count end end end end
ActiveAdmin.register Drug do menu priority: 7 permit_params :pubchem_id, :name, :ncit_id filter :name filter :pubchem_id filter :ncit_id form do |f| f.semantic_errors(*f.object.errors.keys) f.inputs do f.input :name f.input :pubchem_id f.input :ncit_id, input_html: { rows: 1 } end f.actions end index do selectable_column column :name column :pubchem_id column :ncit_id column :created_at column :updated_at actions end show do |f| attributes_table do row :name row :pubchem_id row :ncit_id row :evidence_item_count do |d| d.evidence_items.count end row :assertion_count do |d| d.assertions.count end end end end
Add assertion count to drug admin view
Add assertion count to drug admin view
Ruby
mit
genome/civic-server,genome/civic-server,genome/civic-server,genome/civic-server,genome/civic-server
ruby
## Code Before: ActiveAdmin.register Drug do menu priority: 7 permit_params :pubchem_id, :name, :ncit_id filter :name filter :pubchem_id filter :ncit_id form do |f| f.semantic_errors(*f.object.errors.keys) f.inputs do f.input :name f.input :pubchem_id f.input :ncit_id, input_html: { rows: 1 } end f.actions end index do selectable_column column :name column :pubchem_id column :ncit_id column :created_at column :updated_at actions end show do |f| attributes_table do row :name row :pubchem_id row :ncit_id row :evidence_item_count do |d| d.evidence_items.count end end end end ## Instruction: Add assertion count to drug admin view ## Code After: ActiveAdmin.register Drug do menu priority: 7 permit_params :pubchem_id, :name, :ncit_id filter :name filter :pubchem_id filter :ncit_id form do |f| f.semantic_errors(*f.object.errors.keys) f.inputs do f.input :name f.input :pubchem_id f.input :ncit_id, input_html: { rows: 1 } end f.actions end index do selectable_column column :name column :pubchem_id column :ncit_id column :created_at column :updated_at actions end show do |f| attributes_table do row :name row :pubchem_id row :ncit_id row :evidence_item_count do |d| d.evidence_items.count end row :assertion_count do |d| d.assertions.count end end end end
bfe2ed8b692b64a700da7b9cd3100ebc3512da53
docs/docs/walkthrough/phase-0/loops-in-progress.md
docs/docs/walkthrough/phase-0/loops-in-progress.md
To get you comfortable with submitting a "PR" (stands for pull request), test it out by submitting a PR to this page, adding your name to the list of people who have loops in progress. This way we know how many people are in the development phase, too. New to Github, and PRs? Check out how to submit your first PR. List of people who are working on closed loops: - Dana Lewis - Ben West - Chris Hannemann - Sarah Howard - Mike Stebbins - Scott Hanselman
To get you comfortable with submitting a "PR" (stands for pull request), test it out by submitting a PR to this page, adding your name to the list of people who have loops in progress. This way we know how many people are in the development phase, too. New to Github, and PRs? Check out how to submit your first PR. List of people who are working on closed loops: - Dana Lewis - Ben West - Chris Hannemann - Sarah Howard - Mike Stebbins - Scott Hanselman - Greg Scull
Add Name to the loops in progress
Add Name to the loops in progress
Markdown
mit
danamlewis/docs,openaps/docs,dakago/docs,sarahspins/docs,danamlewis/docs,Pazoles/docs,jbwittmer/docs,Jieseldeep/docs
markdown
## Code Before: To get you comfortable with submitting a "PR" (stands for pull request), test it out by submitting a PR to this page, adding your name to the list of people who have loops in progress. This way we know how many people are in the development phase, too. New to Github, and PRs? Check out how to submit your first PR. List of people who are working on closed loops: - Dana Lewis - Ben West - Chris Hannemann - Sarah Howard - Mike Stebbins - Scott Hanselman ## Instruction: Add Name to the loops in progress ## Code After: To get you comfortable with submitting a "PR" (stands for pull request), test it out by submitting a PR to this page, adding your name to the list of people who have loops in progress. This way we know how many people are in the development phase, too. New to Github, and PRs? Check out how to submit your first PR. List of people who are working on closed loops: - Dana Lewis - Ben West - Chris Hannemann - Sarah Howard - Mike Stebbins - Scott Hanselman - Greg Scull
ef0e2bc8290901d1f7a5b5c3004505867adea638
app/views/mappings/_tags.html.erb
app/views/mappings/_tags.html.erb
<% if mapping.taggings.any? %> <span class="rm">Tagged with:</span> <ul class="tag-list remove-bottom-margin pull-right"> <% mapping.taggings.each do |tagging| %> <% tag = tagging.tag.to_s %> <li> <% if @filter.tags.include?(tag) %> <span class="tag tag-active"><%= tag %></span> <% else %> <%= link_to tag, @filter.query.with_tag(tag), class: 'tag' %> <% end %> </li> <% end %> </ul> <% end %>
<% if mapping.taggings.any? %> <span class="rm">Tagged with:</span> <ul class="tag-list remove-bottom-margin pull-right"> <% mapping.taggings.each do |tagging| %> <% tag = tagging.tag.to_s %> <li> <% if @filter %> <% if @filter.tags.include?(tag) %> <span class="tag tag-active"><%= tag %></span> <% else %> <%= link_to tag, @filter.query.with_tag(tag), class: 'tag' %> <% end %> <% else %> <span class="tag"><%= tag %></span> <% end %> </li> <% end %> </ul> <% end %>
Kill two bugs with one bird
Kill two bugs with one bird * Stop @filter blowing up in the saved mappings modal because _tags assumes it's only ever being used from MappingsController#index * Don't make the tags links when we're not on MappingsController#index
HTML+ERB
mit
alphagov/transition,alphagov/transition,alphagov/transition
html+erb
## Code Before: <% if mapping.taggings.any? %> <span class="rm">Tagged with:</span> <ul class="tag-list remove-bottom-margin pull-right"> <% mapping.taggings.each do |tagging| %> <% tag = tagging.tag.to_s %> <li> <% if @filter.tags.include?(tag) %> <span class="tag tag-active"><%= tag %></span> <% else %> <%= link_to tag, @filter.query.with_tag(tag), class: 'tag' %> <% end %> </li> <% end %> </ul> <% end %> ## Instruction: Kill two bugs with one bird * Stop @filter blowing up in the saved mappings modal because _tags assumes it's only ever being used from MappingsController#index * Don't make the tags links when we're not on MappingsController#index ## Code After: <% if mapping.taggings.any? %> <span class="rm">Tagged with:</span> <ul class="tag-list remove-bottom-margin pull-right"> <% mapping.taggings.each do |tagging| %> <% tag = tagging.tag.to_s %> <li> <% if @filter %> <% if @filter.tags.include?(tag) %> <span class="tag tag-active"><%= tag %></span> <% else %> <%= link_to tag, @filter.query.with_tag(tag), class: 'tag' %> <% end %> <% else %> <span class="tag"><%= tag %></span> <% end %> </li> <% end %> </ul> <% end %>
11bbe180ae92477b305e90a2f816bf1b43f1cec9
bower.json
bower.json
{ "name": "bootstrap-social", "main": "bootstrap-social.css", "license": "MIT", "ignore": [ "assets", "index.html", "LICENCE" ], "dependencies": { "bootstrap": "~3", "font-awesome": "~4.5" } }
{ "name": "bootstrap-social", "main": [ "bootstrap-social.css", "bootstrap-social.less", "bootstrap-social.scss" ], "license": "MIT", "ignore": [ "assets", "index.html", "LICENCE" ], "dependencies": { "bootstrap": "~3", "font-awesome": "~4.5" } }
Add SASS and LESS support for `wiredep`
Add SASS and LESS support for `wiredep`
JSON
mit
lipis/bootstrap-social,lipis/bootstrap-social
json
## Code Before: { "name": "bootstrap-social", "main": "bootstrap-social.css", "license": "MIT", "ignore": [ "assets", "index.html", "LICENCE" ], "dependencies": { "bootstrap": "~3", "font-awesome": "~4.5" } } ## Instruction: Add SASS and LESS support for `wiredep` ## Code After: { "name": "bootstrap-social", "main": [ "bootstrap-social.css", "bootstrap-social.less", "bootstrap-social.scss" ], "license": "MIT", "ignore": [ "assets", "index.html", "LICENCE" ], "dependencies": { "bootstrap": "~3", "font-awesome": "~4.5" } }
aa80248ed687347fba0a6d6b7bde854ff1a95f42
README.md
README.md
An entire vagrant VM for portably compiling RMarkdown files. Useful for when you need to collaborate over a manuscript and you want to make sure everyone has a dependency-managed way to compile the manuscript. # Installation Copy and paste this into your terminal, then hit Enter ```bash curl -O https://cdn.rawgit.com/briandk/academic-writing-with-vagrant/master/makefile curl -O https://cdn.rawgit.com/briandk/academic-writing-with-vagrant/master/Vagrantfile curl -O https://cdn.rawgit.com/briandk/academic-writing-with-vagrant/master/render_manuscript.R curl -O https://cdn.rawgit.com/briandk/academic-writing-with-vagrant/master/r-dependencies.R curl -O https://cdn.rawgit.com/briandk/academic-writing-with-vagrant/master/bootstrap.sh vagrant up ```
An entire vagrant VM for portably compiling RMarkdown files. Useful for when you need to collaborate over a manuscript and you want to make sure everyone has a dependency-managed way to compile the manuscript. # Installation Copy and paste this into your terminal, then hit Enter ```bash curl -O https://rawgit.com/briandk/academic-writing-with-vagrant/master/makefile curl -O https://rawgit.com/briandk/academic-writing-with-vagrant/master/Vagrantfile curl -O https://rawgit.com/briandk/academic-writing-with-vagrant/master/render_manuscript.R curl -O https://rawgit.com/briandk/academic-writing-with-vagrant/master/r-dependencies.R curl -O https://rawgit.com/briandk/academic-writing-with-vagrant/master/bootstrap.sh vagrant up ```
Stop using cached versions of files from rawgit.com
Stop using cached versions of files from rawgit.com
Markdown
mit
briandk/academic-writing-with-vagrant,briandk/academic-writing-with-vagrant
markdown
## Code Before: An entire vagrant VM for portably compiling RMarkdown files. Useful for when you need to collaborate over a manuscript and you want to make sure everyone has a dependency-managed way to compile the manuscript. # Installation Copy and paste this into your terminal, then hit Enter ```bash curl -O https://cdn.rawgit.com/briandk/academic-writing-with-vagrant/master/makefile curl -O https://cdn.rawgit.com/briandk/academic-writing-with-vagrant/master/Vagrantfile curl -O https://cdn.rawgit.com/briandk/academic-writing-with-vagrant/master/render_manuscript.R curl -O https://cdn.rawgit.com/briandk/academic-writing-with-vagrant/master/r-dependencies.R curl -O https://cdn.rawgit.com/briandk/academic-writing-with-vagrant/master/bootstrap.sh vagrant up ``` ## Instruction: Stop using cached versions of files from rawgit.com ## Code After: An entire vagrant VM for portably compiling RMarkdown files. Useful for when you need to collaborate over a manuscript and you want to make sure everyone has a dependency-managed way to compile the manuscript. # Installation Copy and paste this into your terminal, then hit Enter ```bash curl -O https://rawgit.com/briandk/academic-writing-with-vagrant/master/makefile curl -O https://rawgit.com/briandk/academic-writing-with-vagrant/master/Vagrantfile curl -O https://rawgit.com/briandk/academic-writing-with-vagrant/master/render_manuscript.R curl -O https://rawgit.com/briandk/academic-writing-with-vagrant/master/r-dependencies.R curl -O https://rawgit.com/briandk/academic-writing-with-vagrant/master/bootstrap.sh vagrant up ```
8d66a68a0e885731d0047801fc229215a2d6d232
gradle/wrapper/gradle-wrapper.properties
gradle/wrapper/gradle-wrapper.properties
distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists distributionUrl=https\://services.gradle.org/distributions-snapshots/gradle-3.0-20160613000028+0000-bin.zip
distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists distributionUrl=http\://repo.gradle.org/gradle/dist-snapshots/gradle-script-kotlin-3.0.0-20160609180841+0000-bin.zip
Return wrapper version to gsk custom distro
Return wrapper version to gsk custom distro
INI
apache-2.0
robinverduijn/gradle,blindpirate/gradle,blindpirate/gradle,blindpirate/gradle,gradle/gradle,blindpirate/gradle,gradle/gradle,robinverduijn/gradle,gradle/gradle,robinverduijn/gradle,robinverduijn/gradle,gradle/gradle,blindpirate/gradle,robinverduijn/gradle,gradle/gradle,gradle/gradle,gradle/gradle,gradle/gradle-script-kotlin,robinverduijn/gradle,robinverduijn/gradle,gradle/gradle,robinverduijn/gradle,robinverduijn/gradle,robinverduijn/gradle,gradle/gradle,blindpirate/gradle,blindpirate/gradle,robinverduijn/gradle,gradle/gradle-script-kotlin,blindpirate/gradle,blindpirate/gradle,blindpirate/gradle,gradle/gradle
ini
## Code Before: distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists distributionUrl=https\://services.gradle.org/distributions-snapshots/gradle-3.0-20160613000028+0000-bin.zip ## Instruction: Return wrapper version to gsk custom distro ## Code After: distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists distributionUrl=http\://repo.gradle.org/gradle/dist-snapshots/gradle-script-kotlin-3.0.0-20160609180841+0000-bin.zip
e9e5767f9398ce00a2966393652816b10c8e707f
app/assets/app.styl
app/assets/app.styl
// libs @require 'nib' @require 'normalize.styl' // global @import 'stylus/vars' @import 'stylus/mixins' @import 'stylus/styles' // templates @import 'stylus/common/*' @import 'directive/*' @import 'site/*' @import 'party/*' @import 'volume/*' @import 'slot/*' @import 'asset/*' // shame @import 'stylus/shame'
// libs @require 'nib' @require 'normalize.styl' // global @import 'stylus/vars' @import 'stylus/mixins' @import 'stylus/styles' // templates @import 'stylus/common/*' @import 'directive/*' @import 'site/*' @import 'party/*' @import 'volume/*' @import 'asset/*' // shame @import 'stylus/shame'
Remove now-expired slot styl import
Remove now-expired slot styl import
Stylus
agpl-3.0
databrary/databrary,databrary/databrary,databrary/databrary,databrary/databrary
stylus
## Code Before: // libs @require 'nib' @require 'normalize.styl' // global @import 'stylus/vars' @import 'stylus/mixins' @import 'stylus/styles' // templates @import 'stylus/common/*' @import 'directive/*' @import 'site/*' @import 'party/*' @import 'volume/*' @import 'slot/*' @import 'asset/*' // shame @import 'stylus/shame' ## Instruction: Remove now-expired slot styl import ## Code After: // libs @require 'nib' @require 'normalize.styl' // global @import 'stylus/vars' @import 'stylus/mixins' @import 'stylus/styles' // templates @import 'stylus/common/*' @import 'directive/*' @import 'site/*' @import 'party/*' @import 'volume/*' @import 'asset/*' // shame @import 'stylus/shame'
e520d62088ffeecf2df74aa1bdceb3aad9adf55b
README.md
README.md
Makes it easy to translate your resource fields. ## Context The original gem is not maintened anymore, so I forked it to be compatible for Rails 4.2 and globalize 5 . ## Installation ```ruby gem "activeadmin-globalize", github: 'anthony-robin/activeadmin-globalize' ``` ## Your model ```ruby active_admin_translates :title, :description do validates_presence_of :title end ``` ## Editor configuration ```ruby # if you are using Rails 4 or Strong Parameters: permit_params translations_attributes: [:locale, :title, :content] index do # ... translation_status # ... default_actions end form do |f| # ... f.translated_inputs "Translated fields", switch_locale: false do |t| t.input :title t.input :content end # ... end ``` If `switch_locale` is set, each tab will be rendered switching locale.
Makes it easy to translate your resource fields. ## Context The original gem is not maintened anymore, so I forked it to be compatible for Rails 4.2 and globalize 5 . ## Installation ```ruby gem "activeadmin-globalize", github: 'anthony-robin/activeadmin-globalize' ``` ## Your model ```ruby active_admin_translates :title, :content do validates_presence_of :title end ``` ## Editor configuration ```ruby # if you are using Rails 4 or Strong Parameters: permit_params translations_attributes: [ :id, :locale, :title, :content ] index do # ... translation_status actions end form do |f| # ... f.translated_inputs "Translated fields", switch_locale: false do |t| t.input :title t.input :content end # ... end ``` If `switch_locale` is set, each tab will be rendered switching locale.
Improve Readme to be coherent
Improve Readme to be coherent
Markdown
mit
jklimke/activeadmin-globalize,anthony-robin/activeadmin-globalize
markdown
## Code Before: Makes it easy to translate your resource fields. ## Context The original gem is not maintened anymore, so I forked it to be compatible for Rails 4.2 and globalize 5 . ## Installation ```ruby gem "activeadmin-globalize", github: 'anthony-robin/activeadmin-globalize' ``` ## Your model ```ruby active_admin_translates :title, :description do validates_presence_of :title end ``` ## Editor configuration ```ruby # if you are using Rails 4 or Strong Parameters: permit_params translations_attributes: [:locale, :title, :content] index do # ... translation_status # ... default_actions end form do |f| # ... f.translated_inputs "Translated fields", switch_locale: false do |t| t.input :title t.input :content end # ... end ``` If `switch_locale` is set, each tab will be rendered switching locale. ## Instruction: Improve Readme to be coherent ## Code After: Makes it easy to translate your resource fields. ## Context The original gem is not maintened anymore, so I forked it to be compatible for Rails 4.2 and globalize 5 . ## Installation ```ruby gem "activeadmin-globalize", github: 'anthony-robin/activeadmin-globalize' ``` ## Your model ```ruby active_admin_translates :title, :content do validates_presence_of :title end ``` ## Editor configuration ```ruby # if you are using Rails 4 or Strong Parameters: permit_params translations_attributes: [ :id, :locale, :title, :content ] index do # ... translation_status actions end form do |f| # ... f.translated_inputs "Translated fields", switch_locale: false do |t| t.input :title t.input :content end # ... end ``` If `switch_locale` is set, each tab will be rendered switching locale.
b71e53c39ffe20d806d585b70331ba99139f811d
src/test/java/pro/cucumber/RevisionProviderContract.java
src/test/java/pro/cucumber/RevisionProviderContract.java
package pro.cucumber; import org.junit.Before; import org.junit.Test; import pro.cucumber.gitcli.GitCliRevisionProvider; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.util.regex.Pattern; import static org.junit.Assert.assertTrue; public abstract class RevisionProviderContract { private Path rootPath; @Before public void createScm() throws IOException { rootPath = Files.createTempDirectory("GitWC"); Path subfolder = rootPath.resolve("subfolder"); Files.createDirectory(subfolder); Files.createFile(subfolder.resolve("file")); Exec.cmd("git init", rootPath); Exec.cmd("git add -A", rootPath); Exec.cmd("git commit -am \"files\"", rootPath); } @Test public void findsRev() { String sha1Pattern = "^[a-f0-9]{40}$"; RevisionProvider revisionProvider = makeRevisionProvider(rootPath); String rev = revisionProvider.getRev(); assertTrue("Expected a sha1, got: "+rev, Pattern.matches(sha1Pattern, rev)); } protected abstract RevisionProvider makeRevisionProvider(Path rootPath); }
package pro.cucumber; import org.junit.Before; import org.junit.Test; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.util.ArrayList; import java.util.List; import java.util.regex.Pattern; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; public abstract class RevisionProviderContract { private Path rootPath; @Before public void createScm() throws IOException { rootPath = Files.createTempDirectory("GitWC"); Path subfolder = rootPath.resolve("subfolder"); Files.createDirectory(subfolder); Files.createFile(subfolder.resolve("file")); Exec.cmd("git init", rootPath); Exec.cmd("git add -A", rootPath); Exec.cmd("git commit -am \"files\"", rootPath); List<String> status = Exec.cmd("git status --porcelain", rootPath); assertEquals(new ArrayList<String>(), status); } @Test public void findsRev() { String sha1Pattern = "^[a-f0-9]{40}$"; RevisionProvider revisionProvider = makeRevisionProvider(rootPath); String rev = revisionProvider.getRev(); assertTrue("Expected a sha1, got: " + rev, Pattern.matches(sha1Pattern, rev)); } protected abstract RevisionProvider makeRevisionProvider(Path rootPath); }
Check the test repo is created correctly
Check the test repo is created correctly
Java
mit
cucumber-ltd/cucumber-pro-plugin-jvm,cucumber-ltd/cucumber-pro-plugin-jvm
java
## Code Before: package pro.cucumber; import org.junit.Before; import org.junit.Test; import pro.cucumber.gitcli.GitCliRevisionProvider; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.util.regex.Pattern; import static org.junit.Assert.assertTrue; public abstract class RevisionProviderContract { private Path rootPath; @Before public void createScm() throws IOException { rootPath = Files.createTempDirectory("GitWC"); Path subfolder = rootPath.resolve("subfolder"); Files.createDirectory(subfolder); Files.createFile(subfolder.resolve("file")); Exec.cmd("git init", rootPath); Exec.cmd("git add -A", rootPath); Exec.cmd("git commit -am \"files\"", rootPath); } @Test public void findsRev() { String sha1Pattern = "^[a-f0-9]{40}$"; RevisionProvider revisionProvider = makeRevisionProvider(rootPath); String rev = revisionProvider.getRev(); assertTrue("Expected a sha1, got: "+rev, Pattern.matches(sha1Pattern, rev)); } protected abstract RevisionProvider makeRevisionProvider(Path rootPath); } ## Instruction: Check the test repo is created correctly ## Code After: package pro.cucumber; import org.junit.Before; import org.junit.Test; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.util.ArrayList; import java.util.List; import java.util.regex.Pattern; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; public abstract class RevisionProviderContract { private Path rootPath; @Before public void createScm() throws IOException { rootPath = Files.createTempDirectory("GitWC"); Path subfolder = rootPath.resolve("subfolder"); Files.createDirectory(subfolder); Files.createFile(subfolder.resolve("file")); Exec.cmd("git init", rootPath); Exec.cmd("git add -A", rootPath); Exec.cmd("git commit -am \"files\"", rootPath); List<String> status = Exec.cmd("git status --porcelain", rootPath); assertEquals(new ArrayList<String>(), status); } @Test public void findsRev() { String sha1Pattern = "^[a-f0-9]{40}$"; RevisionProvider revisionProvider = makeRevisionProvider(rootPath); String rev = revisionProvider.getRev(); assertTrue("Expected a sha1, got: " + rev, Pattern.matches(sha1Pattern, rev)); } protected abstract RevisionProvider makeRevisionProvider(Path rootPath); }
da3a1223b4d1d1b05131e036b8df0d6d77a79b39
.travis.yml
.travis.yml
language: node_js node_js: - '0.12' - 'iojs' env: - npm_config_target=0.28.1 npm_config_arch=x64 npm_config_disturl=https://atom.io/download/atom-shell before_install: - sudo apt-get install libzmq3-dev - npm install -g node-gyp electron electron-prebuilt install: - HOME=~/.electron-gyp npm install
language: node_js node_js: - '0.12' - 'iojs' env: - npm_config_target=0.28.1 npm_config_arch=x64 npm_config_disturl=https://atom.io/download/atom-shell before_install: - sudo apt-get install -qq libzmq3-dev pkg-config - npm install -g node-gyp electron electron-prebuilt install: - HOME=~/.electron-gyp npm install
Install pkg-config while we're at it.
Install pkg-config while we're at it.
YAML
bsd-3-clause
rgbkrk/jupyter-sidecar,rgbkrk/jupyter-sidecar,nteract/sidecar,nteract/jupyter-sidecar,nteract/sidecar,captainsafia/jupyter-sidecar,captainsafia/jupyter-sidecar,nteract/jupyter-sidecar
yaml
## Code Before: language: node_js node_js: - '0.12' - 'iojs' env: - npm_config_target=0.28.1 npm_config_arch=x64 npm_config_disturl=https://atom.io/download/atom-shell before_install: - sudo apt-get install libzmq3-dev - npm install -g node-gyp electron electron-prebuilt install: - HOME=~/.electron-gyp npm install ## Instruction: Install pkg-config while we're at it. ## Code After: language: node_js node_js: - '0.12' - 'iojs' env: - npm_config_target=0.28.1 npm_config_arch=x64 npm_config_disturl=https://atom.io/download/atom-shell before_install: - sudo apt-get install -qq libzmq3-dev pkg-config - npm install -g node-gyp electron electron-prebuilt install: - HOME=~/.electron-gyp npm install
1835e2ce016d62b649615e7af0071170fab9d5dd
README.md
README.md
[![Travis CI](https://travis-ci.org/dragonnodejs/dragonnodejs.svg?branch=master "Travis CI")] (https://travis-ci.org/dragonnodejs/dragonnodejs) # DragonNode.js Documentation see [dragonnodejs/skeleton](https://github.com/dragonnodejs/skeleton)
[![Travis CI](https://travis-ci.org/dragonnodejs/dragonnodejs.svg?branch=master "Travis CI")] (https://travis-ci.org/dragonnodejs/dragonnodejs) # DragonNode.js Documentation see [dragonnodejs/skeleton](https://github.com/dragonnodejs/skeleton) ## Changelog ### 2.1.0 Minor: - Feature: Add "dragonnodejs" function itself to the services. Specially need it for the bundles Trivial: - Change: Remove unneeded default configuration "." for the "directory" in the environmentconfig ### 2.0.0 Major: - Feature: Add define libraries included in Node.js. The change need to split the library configuration to "nodejs" and "npm". Also need to define the library configuration as empty object if no library is needed instead of not define the complete library configuration ### 1.0.1 Trivial: - Change: Remove unneeded default configuration "." for the "directory" in the environmentconfig
Add changelog to the documentation
Add changelog to the documentation
Markdown
mit
dragonnodejs/dragonnodejs
markdown
## Code Before: [![Travis CI](https://travis-ci.org/dragonnodejs/dragonnodejs.svg?branch=master "Travis CI")] (https://travis-ci.org/dragonnodejs/dragonnodejs) # DragonNode.js Documentation see [dragonnodejs/skeleton](https://github.com/dragonnodejs/skeleton) ## Instruction: Add changelog to the documentation ## Code After: [![Travis CI](https://travis-ci.org/dragonnodejs/dragonnodejs.svg?branch=master "Travis CI")] (https://travis-ci.org/dragonnodejs/dragonnodejs) # DragonNode.js Documentation see [dragonnodejs/skeleton](https://github.com/dragonnodejs/skeleton) ## Changelog ### 2.1.0 Minor: - Feature: Add "dragonnodejs" function itself to the services. Specially need it for the bundles Trivial: - Change: Remove unneeded default configuration "." for the "directory" in the environmentconfig ### 2.0.0 Major: - Feature: Add define libraries included in Node.js. The change need to split the library configuration to "nodejs" and "npm". Also need to define the library configuration as empty object if no library is needed instead of not define the complete library configuration ### 1.0.1 Trivial: - Change: Remove unneeded default configuration "." for the "directory" in the environmentconfig
5e3f0f88317e8c4dea16e2b60fecb911d73ce261
code/js/controllers/SpotifyController.js
code/js/controllers/SpotifyController.js
;(function() { "use strict"; var BaseController = require("BaseController"); new BaseController({ siteName: "Spotify", playPause: "[title='Pause'],[title='Play']", playNext: "[title='Next']", playPrev: "[title='Previous']", playState: "[title='Pause']", song: ".now-playing-bar div div [href*='/album/']", artist: ".now-playing-bar div div [href*='/artist/']" }); })();
;(function() { "use strict"; var BaseController = require("BaseController"), _ = require("lodash"); var multiSelectors = { playPause: ["#play-pause", "#play", "[title='Pause'],[title='Play']"], playNext: ["#next", "#next", "[title='Next']"], playPrev: ["#previous", "#previous", "[title='Previous']"], playState: ["#play-pause.playing", "#play.playing", "[title='Pause']"], iframe: ["#app-player", "#main", null], like: [".thumb.up", ".thumb.up", null], dislike: [".thumb.down", ".thumb.down", null], song: ["#track-name", ".caption .track", ".now-playing-bar div div [href*='/album/']"], artist: ["#track-artist", ".caption .artist", ".now-playing-bar div div [href*='/artist/']"] }; var controller = new BaseController({ siteName: "Spotify" }); controller.checkPlayer = function() { var that = this; var selectorIndex; if (window.location.hostname === "open.spotify.com") { selectorIndex = 2; } else { if (document.querySelector(multiSelectors.iframe[0])) { selectorIndex = 0; } if (document.querySelector(multiSelectors.iframe[1])) { selectorIndex = 1; } } _.each(multiSelectors, function(value, key) { that.selectors[key] = value[selectorIndex]; }); }; })();
Fix spotify for older player versions.
Fix spotify for older player versions.
JavaScript
mit
nemchik/streamkeys,nemchik/streamkeys,nemchik/streamkeys,ovcharik/streamkeys,ovcharik/streamkeys,alexesprit/streamkeys,berrberr/streamkeys,berrberr/streamkeys,berrberr/streamkeys,alexesprit/streamkeys
javascript
## Code Before: ;(function() { "use strict"; var BaseController = require("BaseController"); new BaseController({ siteName: "Spotify", playPause: "[title='Pause'],[title='Play']", playNext: "[title='Next']", playPrev: "[title='Previous']", playState: "[title='Pause']", song: ".now-playing-bar div div [href*='/album/']", artist: ".now-playing-bar div div [href*='/artist/']" }); })(); ## Instruction: Fix spotify for older player versions. ## Code After: ;(function() { "use strict"; var BaseController = require("BaseController"), _ = require("lodash"); var multiSelectors = { playPause: ["#play-pause", "#play", "[title='Pause'],[title='Play']"], playNext: ["#next", "#next", "[title='Next']"], playPrev: ["#previous", "#previous", "[title='Previous']"], playState: ["#play-pause.playing", "#play.playing", "[title='Pause']"], iframe: ["#app-player", "#main", null], like: [".thumb.up", ".thumb.up", null], dislike: [".thumb.down", ".thumb.down", null], song: ["#track-name", ".caption .track", ".now-playing-bar div div [href*='/album/']"], artist: ["#track-artist", ".caption .artist", ".now-playing-bar div div [href*='/artist/']"] }; var controller = new BaseController({ siteName: "Spotify" }); controller.checkPlayer = function() { var that = this; var selectorIndex; if (window.location.hostname === "open.spotify.com") { selectorIndex = 2; } else { if (document.querySelector(multiSelectors.iframe[0])) { selectorIndex = 0; } if (document.querySelector(multiSelectors.iframe[1])) { selectorIndex = 1; } } _.each(multiSelectors, function(value, key) { that.selectors[key] = value[selectorIndex]; }); }; })();
5a15939ff42911340b8e003d9a265b7f40922795
app/views/islay/admin/pages/edit.html.haml
app/views/islay/admin/pages/edit.html.haml
- sub_header('Edit Page', @page.name) = resource_form(@page, :url => path(:page, :id => params[:id]), :method => :put) do |f| = content do - @page.each do |slug, type, name, val| %div.field = label(name, slug) = contents_field(slug, type, val) = footer do = cancel_button(@page, path(:pages)) = save_button
- sub_header('Content', path(:pages)) - prefixed_sub_header('Edit Page', @page.name) = resource_form(@page, :url => path(:page, :id => params[:id]), :method => :put) do |f| = content do - @page.each do |slug, type, name, val| %div.field = label(name, slug) = contents_field(slug, type, val) = footer do = cancel_button(@page, path(:pages)) = save_button
Fix header for page content edit form.
Fix header for page content edit form.
Haml
mit
spookandpuff/islay,spookandpuff/islay,spookandpuff/islay
haml
## Code Before: - sub_header('Edit Page', @page.name) = resource_form(@page, :url => path(:page, :id => params[:id]), :method => :put) do |f| = content do - @page.each do |slug, type, name, val| %div.field = label(name, slug) = contents_field(slug, type, val) = footer do = cancel_button(@page, path(:pages)) = save_button ## Instruction: Fix header for page content edit form. ## Code After: - sub_header('Content', path(:pages)) - prefixed_sub_header('Edit Page', @page.name) = resource_form(@page, :url => path(:page, :id => params[:id]), :method => :put) do |f| = content do - @page.each do |slug, type, name, val| %div.field = label(name, slug) = contents_field(slug, type, val) = footer do = cancel_button(@page, path(:pages)) = save_button
a9011808be0283e5d00fa2b542f8b0d4a1763a17
addon/models/preprint-provider.js
addon/models/preprint-provider.js
import DS from 'ember-data'; import OsfModel from 'ember-osf/models/osf-model'; export default OsfModel.extend({ name: DS.attr('fixstring'), logoPath: DS.attr('string'), bannerPath: DS.attr('string'), description: DS.attr('fixstring'), example: DS.attr('fixstring'), advisoryBoard: DS.attr('string'), emailContact: DS.attr('fixstring'), emailSupport: DS.attr('fixstring'), socialTwitter: DS.attr('fixstring'), socialFacebook: DS.attr('fixstring'), socialInstagram: DS.attr('fixstring'), headerText: DS.attr('fixstring'), subjectsAcceptable: DS.attr(), // Relationships taxonomies: DS.hasMany('taxonomy'), preprints: DS.hasMany('preprint', { inverse: 'provider', async: true }), licensesAcceptable: DS.hasMany('license', { inverse: null }), });
import DS from 'ember-data'; import OsfModel from 'ember-osf/models/osf-model'; export default OsfModel.extend({ name: DS.attr('fixstring'), logoPath: DS.attr('string'), bannerPath: DS.attr('string'), description: DS.attr('fixstring'), example: DS.attr('fixstring'), advisoryBoard: DS.attr('string'), emailContact: DS.attr('fixstring'), emailSupport: DS.attr('fixstring'), socialTwitter: DS.attr('fixstring'), socialFacebook: DS.attr('fixstring'), socialInstagram: DS.attr('fixstring'), aboutLink: DS.attr('fixstring'), headerText: DS.attr('fixstring'), subjectsAcceptable: DS.attr(), // Relationships taxonomies: DS.hasMany('taxonomy'), preprints: DS.hasMany('preprint', { inverse: 'provider', async: true }), licensesAcceptable: DS.hasMany('license', { inverse: null }), });
Add new field for about link
Add new field for about link
JavaScript
apache-2.0
CenterForOpenScience/ember-osf,binoculars/ember-osf,chrisseto/ember-osf,baylee-d/ember-osf,crcresearch/ember-osf,CenterForOpenScience/ember-osf,binoculars/ember-osf,chrisseto/ember-osf,baylee-d/ember-osf,jamescdavis/ember-osf,jamescdavis/ember-osf,crcresearch/ember-osf
javascript
## Code Before: import DS from 'ember-data'; import OsfModel from 'ember-osf/models/osf-model'; export default OsfModel.extend({ name: DS.attr('fixstring'), logoPath: DS.attr('string'), bannerPath: DS.attr('string'), description: DS.attr('fixstring'), example: DS.attr('fixstring'), advisoryBoard: DS.attr('string'), emailContact: DS.attr('fixstring'), emailSupport: DS.attr('fixstring'), socialTwitter: DS.attr('fixstring'), socialFacebook: DS.attr('fixstring'), socialInstagram: DS.attr('fixstring'), headerText: DS.attr('fixstring'), subjectsAcceptable: DS.attr(), // Relationships taxonomies: DS.hasMany('taxonomy'), preprints: DS.hasMany('preprint', { inverse: 'provider', async: true }), licensesAcceptable: DS.hasMany('license', { inverse: null }), }); ## Instruction: Add new field for about link ## Code After: import DS from 'ember-data'; import OsfModel from 'ember-osf/models/osf-model'; export default OsfModel.extend({ name: DS.attr('fixstring'), logoPath: DS.attr('string'), bannerPath: DS.attr('string'), description: DS.attr('fixstring'), example: DS.attr('fixstring'), advisoryBoard: DS.attr('string'), emailContact: DS.attr('fixstring'), emailSupport: DS.attr('fixstring'), socialTwitter: DS.attr('fixstring'), socialFacebook: DS.attr('fixstring'), socialInstagram: DS.attr('fixstring'), aboutLink: DS.attr('fixstring'), headerText: DS.attr('fixstring'), subjectsAcceptable: DS.attr(), // Relationships taxonomies: DS.hasMany('taxonomy'), preprints: DS.hasMany('preprint', { inverse: 'provider', async: true }), licensesAcceptable: DS.hasMany('license', { inverse: null }), });
cb5f147d7802393ee617a5010b67e6f4865a7989
www/static/css/forms.css
www/static/css/forms.css
.contact-form { text-align: left; } .contact-form .fields label{ text-align: left; margin-right: 0.5em; display: block; } .contact-form .fields input{ display: block; height:15pt; width:230px; max-width:100%; max-height:100%; } .contact-form .fields textarea{ top:50px; left:30px; width:230px; height:15pt; -webkit-transition: all 0.7s ease; transition: all 0.7s ease; } .contact-form .fields textarea:focus { border: 2px solid #333; border-radius:5px; /*background-color:#000001; */ top:0; left:0; height:200px; width:300px; max-width:100%; max-height:100%; } .contact-form .fields input:hover, .contact-form .fields textarea:hover, .contact-form .fields input:focus { border: 2px solid #333; border-radius:5px; } .contact-form .fields .errorlist{ color: #F00; }
.contact-form { text-align: left; } .contact-form .fields label{ text-align: left; margin-right: 0.5em; display: block; } .contact-form .fields input{ display: block; height:15pt; width:230px; max-width:80%; max-height:80%; } .contact-form .fields textarea{ top:50px; left:30px; width:230px; height:15pt; max-width:80%; max-height:80%; -webkit-transition: all 0.7s ease; transition: all 0.7s ease; } .contact-form .fields textarea:focus { border: 2px solid #333; border-radius:5px; /*background-color:#000001; */ top:0; left:0; height:200px; width:300px; max-width:80%; max-height:80%; } .contact-form .fields input:hover, .contact-form .fields textarea:hover, .contact-form .fields input:focus { border: 2px solid #333; border-radius:5px; } .contact-form .fields .errorlist{ color: #F00; }
Fix rendering of form on mobiles.
Fix rendering of form on mobiles. Makes max width of fields 80%
CSS
mit
zsoobhan/prometheus,zsoobhan/prometheus,zsoobhan/prometheus,zsoobhan/prometheus
css
## Code Before: .contact-form { text-align: left; } .contact-form .fields label{ text-align: left; margin-right: 0.5em; display: block; } .contact-form .fields input{ display: block; height:15pt; width:230px; max-width:100%; max-height:100%; } .contact-form .fields textarea{ top:50px; left:30px; width:230px; height:15pt; -webkit-transition: all 0.7s ease; transition: all 0.7s ease; } .contact-form .fields textarea:focus { border: 2px solid #333; border-radius:5px; /*background-color:#000001; */ top:0; left:0; height:200px; width:300px; max-width:100%; max-height:100%; } .contact-form .fields input:hover, .contact-form .fields textarea:hover, .contact-form .fields input:focus { border: 2px solid #333; border-radius:5px; } .contact-form .fields .errorlist{ color: #F00; } ## Instruction: Fix rendering of form on mobiles. Makes max width of fields 80% ## Code After: .contact-form { text-align: left; } .contact-form .fields label{ text-align: left; margin-right: 0.5em; display: block; } .contact-form .fields input{ display: block; height:15pt; width:230px; max-width:80%; max-height:80%; } .contact-form .fields textarea{ top:50px; left:30px; width:230px; height:15pt; max-width:80%; max-height:80%; -webkit-transition: all 0.7s ease; transition: all 0.7s ease; } .contact-form .fields textarea:focus { border: 2px solid #333; border-radius:5px; /*background-color:#000001; */ top:0; left:0; height:200px; width:300px; max-width:80%; max-height:80%; } .contact-form .fields input:hover, .contact-form .fields textarea:hover, .contact-form .fields input:focus { border: 2px solid #333; border-radius:5px; } .contact-form .fields .errorlist{ color: #F00; }
1cad9ab61148173b0f61971805b3e6203da3050d
faker/providers/en_CA/ssn.py
faker/providers/en_CA/ssn.py
from __future__ import unicode_literals from ..ssn import Provider as SsnProvider class Provider(SsnProvider): ssn_formats = ("### ### ###",) @classmethod def ssn(cls): return cls.bothify(cls.random_element(cls.ssn_formats))
from __future__ import unicode_literals from ..ssn import Provider as SsnProvider import random class Provider(SsnProvider): #in order to create a valid SIN we need to provide a number that passes a simple modified Luhn Algorithmn checksum #this function essentially reverses the checksum steps to create a random valid SIN (Social Insurance Number) @classmethod def ssn(cls): #create an array of 8 elements initialized randomly digits = random.sample(range(10), 8) # All of the digits must sum to a multiple of 10. # sum the first 8 and set 9th to the value to get to a multiple of 10 digits.append(10 - (sum(digits) % 10)) #digits is now the digital root of the number we want multiplied by the magic number 121 212 121 #reverse the multiplication which occurred on every other element for i in range(1, len(digits), 2): if digits[i] % 2 == 0: digits[i] = (digits[i] / 2) else: digits[i] = (digits[i] + 9) / 2 #build the resulting SIN string sin = "" for i in range(0, len(digits), 1): sin += str(digits[i]) #add a space to make it conform to normal standards in Canada if i % 3 == 2: sin += " " #finally return our random but valid SIN return sin
Update Canada SSN/SIN provider to create a valid number
Update Canada SSN/SIN provider to create a valid number The first revision generated a random number in the correct format. This commit creates a SIN number that passes the checksum as described here http://http://en.wikipedia.org/wiki/Social_Insurance_Number
Python
mit
jaredculp/faker,trtd/faker,xfxf/faker-python,HAYASAKA-Ryosuke/faker,johnraz/faker,joke2k/faker,joke2k/faker,venmo/faker,ericchaves/faker,xfxf/faker-1,GLMeece/faker,danhuss/faker,beetleman/faker,thedrow/faker,meganlkm/faker,yiliaofan/faker,MaryanMorel/faker
python
## Code Before: from __future__ import unicode_literals from ..ssn import Provider as SsnProvider class Provider(SsnProvider): ssn_formats = ("### ### ###",) @classmethod def ssn(cls): return cls.bothify(cls.random_element(cls.ssn_formats)) ## Instruction: Update Canada SSN/SIN provider to create a valid number The first revision generated a random number in the correct format. This commit creates a SIN number that passes the checksum as described here http://http://en.wikipedia.org/wiki/Social_Insurance_Number ## Code After: from __future__ import unicode_literals from ..ssn import Provider as SsnProvider import random class Provider(SsnProvider): #in order to create a valid SIN we need to provide a number that passes a simple modified Luhn Algorithmn checksum #this function essentially reverses the checksum steps to create a random valid SIN (Social Insurance Number) @classmethod def ssn(cls): #create an array of 8 elements initialized randomly digits = random.sample(range(10), 8) # All of the digits must sum to a multiple of 10. # sum the first 8 and set 9th to the value to get to a multiple of 10 digits.append(10 - (sum(digits) % 10)) #digits is now the digital root of the number we want multiplied by the magic number 121 212 121 #reverse the multiplication which occurred on every other element for i in range(1, len(digits), 2): if digits[i] % 2 == 0: digits[i] = (digits[i] / 2) else: digits[i] = (digits[i] + 9) / 2 #build the resulting SIN string sin = "" for i in range(0, len(digits), 1): sin += str(digits[i]) #add a space to make it conform to normal standards in Canada if i % 3 == 2: sin += " " #finally return our random but valid SIN return sin
29d581091804b1f6b4aa55e0b8cc8d96270ab575
index.js
index.js
'use strict'; var assign = require('object-assign'); var chalk = require('chalk'); var ProgressBar = require('progress'); /** * Progress bar download plugin * * @param {Object} res * @api public */ module.exports = function (opts) { return function (res, file) { opts = opts || { info: 'cyan' }; var msg = chalk[opts.info](' downloading') + ' : ' + file.url; var info = chalk[opts.info](' progress') + ' : [:bar] :percent :etas'; var len = parseInt(res.headers['content-length'], 10); var bar = new ProgressBar(info, assign({ complete: '=', incomplete: ' ', width: 20, total: len }, opts)); console.log(msg); res.on('data', function (data) { bar.tick(data.length); }); res.on('end', function () { console.log('\n'); }); }; };
'use strict'; var assign = require('object-assign'); var chalk = require('chalk'); var ProgressBar = require('progress'); /** * Progress bar download plugin * * @param {Object} res * @api public */ module.exports = function (opts) { return function (res, file, cb) { opts = opts || { info: 'cyan' }; var msg = chalk[opts.info](' downloading') + ' : ' + file.url; var info = chalk[opts.info](' progress') + ' : [:bar] :percent :etas'; var len = parseInt(res.headers['content-length'], 10); var bar = new ProgressBar(info, assign({ complete: '=', incomplete: ' ', width: 20, total: len }, opts)); console.log(msg); res.on('data', function (data) { bar.tick(data.length); }); res.on('end', function () { console.log('\n'); cb(); }); }; };
Allow other middleware by calling `cb()`
Allow other middleware by calling `cb()`
JavaScript
mit
kevva/download-status
javascript
## Code Before: 'use strict'; var assign = require('object-assign'); var chalk = require('chalk'); var ProgressBar = require('progress'); /** * Progress bar download plugin * * @param {Object} res * @api public */ module.exports = function (opts) { return function (res, file) { opts = opts || { info: 'cyan' }; var msg = chalk[opts.info](' downloading') + ' : ' + file.url; var info = chalk[opts.info](' progress') + ' : [:bar] :percent :etas'; var len = parseInt(res.headers['content-length'], 10); var bar = new ProgressBar(info, assign({ complete: '=', incomplete: ' ', width: 20, total: len }, opts)); console.log(msg); res.on('data', function (data) { bar.tick(data.length); }); res.on('end', function () { console.log('\n'); }); }; }; ## Instruction: Allow other middleware by calling `cb()` ## Code After: 'use strict'; var assign = require('object-assign'); var chalk = require('chalk'); var ProgressBar = require('progress'); /** * Progress bar download plugin * * @param {Object} res * @api public */ module.exports = function (opts) { return function (res, file, cb) { opts = opts || { info: 'cyan' }; var msg = chalk[opts.info](' downloading') + ' : ' + file.url; var info = chalk[opts.info](' progress') + ' : [:bar] :percent :etas'; var len = parseInt(res.headers['content-length'], 10); var bar = new ProgressBar(info, assign({ complete: '=', incomplete: ' ', width: 20, total: len }, opts)); console.log(msg); res.on('data', function (data) { bar.tick(data.length); }); res.on('end', function () { console.log('\n'); cb(); }); }; };
e2c53b348a69093cc770ba827a6bdd5191f2a830
aldryn_faq/cms_toolbar.py
aldryn_faq/cms_toolbar.py
from django.core.urlresolvers import reverse from django.utils.translation import ugettext_lazy as _ from cms.toolbar_pool import toolbar_pool from cms.toolbar_base import CMSToolbar from aldryn_blog import request_post_identifier from aldryn_faq import request_faq_category_identifier @toolbar_pool.register class FaqToolbar(CMSToolbar): def populate(self): def can(action, model): perm = 'aldryn_faq.%(action)s_%(model)s' % {'action': action, 'model': model} return self.request.user.has_perm(perm) if self.is_current_app and (can('add', 'category') or can('change', 'category')): menu = self.toolbar.get_or_create_menu('faq-app', _('FAQ')) if can('add', 'category'): menu.add_modal_item(_('Add category'), reverse('admin:aldryn_faq_category_add') + '?_popup') category = getattr(self.request, request_faq_category_identifier, None) if category and can('change', 'category'): url = reverse('admin:aldryn_faq_category_change', args=(category.pk,)) + '?_popup' menu.add_modal_item(_('Edit category'), url, active=True)
from django.core.urlresolvers import reverse from django.utils.translation import ugettext_lazy as _, get_language from cms.toolbar_pool import toolbar_pool from cms.toolbar_base import CMSToolbar from aldryn_faq import request_faq_category_identifier @toolbar_pool.register class FaqToolbar(CMSToolbar): def populate(self): def can(action, model): perm = 'aldryn_faq.%(action)s_%(model)s' % {'action': action, 'model': model} return self.request.user.has_perm(perm) if self.is_current_app and (can('add', 'category') or can('change', 'category')): menu = self.toolbar.get_or_create_menu('faq-app', _('FAQ')) if can('add', 'category'): menu.add_modal_item(_('Add category'), reverse('admin:aldryn_faq_category_add') + '?_popup') category = getattr(self.request, request_faq_category_identifier, None) if category and can('add', 'question'): params = ('?_popup&category=%s&language=%s' % (category.pk, self.request.LANGUAGE_CODE)) menu.add_modal_item(_('Add question'), reverse('admin:aldryn_faq_question_add') + params) if category and can('change', 'category'): url = reverse('admin:aldryn_faq_category_change', args=(category.pk,)) + '?_popup' menu.add_modal_item(_('Edit category'), url, active=True)
Add ability to create question from toolbar
Add ability to create question from toolbar
Python
bsd-3-clause
czpython/aldryn-faq,mkoistinen/aldryn-faq,czpython/aldryn-faq,czpython/aldryn-faq,czpython/aldryn-faq
python
## Code Before: from django.core.urlresolvers import reverse from django.utils.translation import ugettext_lazy as _ from cms.toolbar_pool import toolbar_pool from cms.toolbar_base import CMSToolbar from aldryn_blog import request_post_identifier from aldryn_faq import request_faq_category_identifier @toolbar_pool.register class FaqToolbar(CMSToolbar): def populate(self): def can(action, model): perm = 'aldryn_faq.%(action)s_%(model)s' % {'action': action, 'model': model} return self.request.user.has_perm(perm) if self.is_current_app and (can('add', 'category') or can('change', 'category')): menu = self.toolbar.get_or_create_menu('faq-app', _('FAQ')) if can('add', 'category'): menu.add_modal_item(_('Add category'), reverse('admin:aldryn_faq_category_add') + '?_popup') category = getattr(self.request, request_faq_category_identifier, None) if category and can('change', 'category'): url = reverse('admin:aldryn_faq_category_change', args=(category.pk,)) + '?_popup' menu.add_modal_item(_('Edit category'), url, active=True) ## Instruction: Add ability to create question from toolbar ## Code After: from django.core.urlresolvers import reverse from django.utils.translation import ugettext_lazy as _, get_language from cms.toolbar_pool import toolbar_pool from cms.toolbar_base import CMSToolbar from aldryn_faq import request_faq_category_identifier @toolbar_pool.register class FaqToolbar(CMSToolbar): def populate(self): def can(action, model): perm = 'aldryn_faq.%(action)s_%(model)s' % {'action': action, 'model': model} return self.request.user.has_perm(perm) if self.is_current_app and (can('add', 'category') or can('change', 'category')): menu = self.toolbar.get_or_create_menu('faq-app', _('FAQ')) if can('add', 'category'): menu.add_modal_item(_('Add category'), reverse('admin:aldryn_faq_category_add') + '?_popup') category = getattr(self.request, request_faq_category_identifier, None) if category and can('add', 'question'): params = ('?_popup&category=%s&language=%s' % (category.pk, self.request.LANGUAGE_CODE)) menu.add_modal_item(_('Add question'), reverse('admin:aldryn_faq_question_add') + params) if category and can('change', 'category'): url = reverse('admin:aldryn_faq_category_change', args=(category.pk,)) + '?_popup' menu.add_modal_item(_('Edit category'), url, active=True)
353676d83d59615c6bb55e85b911711df4db076d
app/assets/stylesheets/bootstrap_and_overrides.css.less
app/assets/stylesheets/bootstrap_and_overrides.css.less
@import "twitter/bootstrap/bootstrap"; body { padding-top: 60px; } @import "twitter/bootstrap/responsive"; // Set the correct sprite paths @iconSpritePath: asset-path('twitter/bootstrap/glyphicons-halflings.png'); @iconWhiteSpritePath: asset-path('twitter/bootstrap/glyphicons-halflings-white.png'); @gridColumns: 9; // Your custom LESS stylesheets goes here // // Since bootstrap was imported above you have access to its mixins which // you may use and inherit here // // If you'd like to override bootstrap's own variables, you can do so here as well // See http://twitter.github.com/bootstrap/less.html for their names and documentation // // Example: // @linkColor: #ff0000;
@import "twitter/bootstrap/bootstrap"; body { padding-top: 60px; } @import "twitter/bootstrap/responsive"; // Set the correct sprite paths @iconSpritePath: asset-path('twitter/bootstrap/glyphicons-halflings.png'); @iconWhiteSpritePath: asset-path('twitter/bootstrap/glyphicons-halflings-white.png'); @gridColumns: 9; // Your custom LESS stylesheets goes here // // Since bootstrap was imported above you have access to its mixins which // you may use and inherit here // // If you'd like to override bootstrap's own variables, you can do so here as well // See http://twitter.github.com/bootstrap/less.html for their names and documentation // // Example: // @linkColor: #ff0000; @media (min-width: 768px) and (max-width: 979px) { #grid > .core(42px, 25px); }
Fix sidebar running into form in tablet view
Fix sidebar running into form in tablet view
Less
mit
jasnow/atlrug3,skalnik/atlrug3,jasnow/atlrug3,skalnik/atlrug3,skalnik/atlrug3,jasnow/atlrug3
less
## Code Before: @import "twitter/bootstrap/bootstrap"; body { padding-top: 60px; } @import "twitter/bootstrap/responsive"; // Set the correct sprite paths @iconSpritePath: asset-path('twitter/bootstrap/glyphicons-halflings.png'); @iconWhiteSpritePath: asset-path('twitter/bootstrap/glyphicons-halflings-white.png'); @gridColumns: 9; // Your custom LESS stylesheets goes here // // Since bootstrap was imported above you have access to its mixins which // you may use and inherit here // // If you'd like to override bootstrap's own variables, you can do so here as well // See http://twitter.github.com/bootstrap/less.html for their names and documentation // // Example: // @linkColor: #ff0000; ## Instruction: Fix sidebar running into form in tablet view ## Code After: @import "twitter/bootstrap/bootstrap"; body { padding-top: 60px; } @import "twitter/bootstrap/responsive"; // Set the correct sprite paths @iconSpritePath: asset-path('twitter/bootstrap/glyphicons-halflings.png'); @iconWhiteSpritePath: asset-path('twitter/bootstrap/glyphicons-halflings-white.png'); @gridColumns: 9; // Your custom LESS stylesheets goes here // // Since bootstrap was imported above you have access to its mixins which // you may use and inherit here // // If you'd like to override bootstrap's own variables, you can do so here as well // See http://twitter.github.com/bootstrap/less.html for their names and documentation // // Example: // @linkColor: #ff0000; @media (min-width: 768px) and (max-width: 979px) { #grid > .core(42px, 25px); }
69b6e0a7af68ff7e9bb8aefec8a18656a57c342d
spec/database/database_schema_spec.rb
spec/database/database_schema_spec.rb
describe "database" do describe "foreign keys" do let(:query) do <<-SQL SELECT constraint_name, table_name FROM information_schema.table_constraints WHERE constraint_type = 'FOREIGN KEY' SQL end it "should not exist" do message = "" ActiveRecord::Base.connection.select_all(query).each do |fk| message << "Foreign Key #{fk["constraint_name"]} on table #{fk["table_name"]} should be removed\n" end raise message unless message.empty? end end describe "_id column types" do let(:query) do <<-SQL SELECT table_name, column_name, data_type FROM information_schema.columns WHERE column_name LIKE '%\\_id' AND table_schema = 'public' AND data_type != 'bigint' SQL end it "should be bigint" do message = "" ActiveRecord::Base.connection.select_all(query).each do |col| message << "Column #{col["column_name"]} in table #{col["table_name"]} is either named improperly (_id is reserved for actual id columns) or needs to be of type bigint\n" end raise message unless message.empty? end end end
describe "Database" do describe "foreign key constraints" do let(:query) do <<-SQL SELECT constraint_name, table_name FROM information_schema.table_constraints WHERE constraint_type = 'FOREIGN KEY' SQL end it "should not exist" do message = "" ActiveRecord::Base.connection.select_all(query).each do |fk| message << "Foreign key constraint #{fk["constraint_name"]} on table #{fk["table_name"]} should be removed\n" end raise message unless message.empty? end end describe "_id columns" do let(:query) do <<-SQL SELECT table_name, column_name, data_type FROM information_schema.columns WHERE column_name LIKE '%\\_id' AND table_schema = 'public' AND data_type != 'bigint' SQL end it "should be of type bigint" do message = "" ActiveRecord::Base.connection.select_all(query).each do |col| message << "Column #{col["column_name"]} in table #{col["table_name"]} is either named improperly (_id is reserved for actual id columns) or needs to be of type bigint\n" end raise message unless message.empty? end end end
Update the spec wording to be a bit more clear
Update the spec wording to be a bit more clear
Ruby
apache-2.0
aufi/manageiq,mkanoor/manageiq,borod108/manageiq,mzazrivec/manageiq,mkanoor/manageiq,josejulio/manageiq,ilackarms/manageiq,aufi/manageiq,andyvesel/manageiq,romanblanco/manageiq,d-m-u/manageiq,chessbyte/manageiq,agrare/manageiq,israel-hdez/manageiq,mzazrivec/manageiq,mzazrivec/manageiq,branic/manageiq,djberg96/manageiq,pkomanek/manageiq,mzazrivec/manageiq,branic/manageiq,chessbyte/manageiq,jntullo/manageiq,jvlcek/manageiq,fbladilo/manageiq,syncrou/manageiq,jameswnl/manageiq,tinaafitz/manageiq,jrafanie/manageiq,hstastna/manageiq,kbrock/manageiq,yaacov/manageiq,romanblanco/manageiq,NickLaMuro/manageiq,mfeifer/manageiq,andyvesel/manageiq,skateman/manageiq,gerikis/manageiq,juliancheal/manageiq,mresti/manageiq,syncrou/manageiq,billfitzgerald0120/manageiq,mresti/manageiq,jntullo/manageiq,ManageIQ/manageiq,d-m-u/manageiq,juliancheal/manageiq,hstastna/manageiq,billfitzgerald0120/manageiq,gmcculloug/manageiq,ilackarms/manageiq,kbrock/manageiq,mfeifer/manageiq,ManageIQ/manageiq,israel-hdez/manageiq,NickLaMuro/manageiq,NickLaMuro/manageiq,skateman/manageiq,josejulio/manageiq,agrare/manageiq,yaacov/manageiq,syncrou/manageiq,durandom/manageiq,mfeifer/manageiq,romanblanco/manageiq,djberg96/manageiq,tzumainn/manageiq,mkanoor/manageiq,NaNi-Z/manageiq,josejulio/manageiq,gerikis/manageiq,d-m-u/manageiq,ailisp/manageiq,lpichler/manageiq,mresti/manageiq,chessbyte/manageiq,aufi/manageiq,jrafanie/manageiq,andyvesel/manageiq,israel-hdez/manageiq,jvlcek/manageiq,ailisp/manageiq,gmcculloug/manageiq,borod108/manageiq,kbrock/manageiq,fbladilo/manageiq,hstastna/manageiq,lpichler/manageiq,billfitzgerald0120/manageiq,NaNi-Z/manageiq,romanblanco/manageiq,hstastna/manageiq,jrafanie/manageiq,fbladilo/manageiq,tzumainn/manageiq,skateman/manageiq,chessbyte/manageiq,gmcculloug/manageiq,josejulio/manageiq,aufi/manageiq,djberg96/manageiq,mfeifer/manageiq,branic/manageiq,pkomanek/manageiq,juliancheal/manageiq,ilackarms/manageiq,borod108/manageiq,tzumainn/manageiq,kbrock/manageiq,gerikis/manageiq,d-m-u/manageiq,jntullo/manageiq,NaNi-Z/manageiq,tzumainn/manageiq,matobet/manageiq,gmcculloug/manageiq,djberg96/manageiq,jntullo/manageiq,juliancheal/manageiq,mkanoor/manageiq,gerikis/manageiq,jameswnl/manageiq,agrare/manageiq,billfitzgerald0120/manageiq,durandom/manageiq,andyvesel/manageiq,ailisp/manageiq,jameswnl/manageiq,jameswnl/manageiq,matobet/manageiq,pkomanek/manageiq,matobet/manageiq,tinaafitz/manageiq,agrare/manageiq,ManageIQ/manageiq,jvlcek/manageiq,lpichler/manageiq,israel-hdez/manageiq,ailisp/manageiq,durandom/manageiq,yaacov/manageiq,ManageIQ/manageiq,borod108/manageiq,ilackarms/manageiq,pkomanek/manageiq,tinaafitz/manageiq,yaacov/manageiq,tinaafitz/manageiq,NaNi-Z/manageiq,jrafanie/manageiq,jvlcek/manageiq,syncrou/manageiq,skateman/manageiq,durandom/manageiq,fbladilo/manageiq,matobet/manageiq,lpichler/manageiq,branic/manageiq,mresti/manageiq,NickLaMuro/manageiq
ruby
## Code Before: describe "database" do describe "foreign keys" do let(:query) do <<-SQL SELECT constraint_name, table_name FROM information_schema.table_constraints WHERE constraint_type = 'FOREIGN KEY' SQL end it "should not exist" do message = "" ActiveRecord::Base.connection.select_all(query).each do |fk| message << "Foreign Key #{fk["constraint_name"]} on table #{fk["table_name"]} should be removed\n" end raise message unless message.empty? end end describe "_id column types" do let(:query) do <<-SQL SELECT table_name, column_name, data_type FROM information_schema.columns WHERE column_name LIKE '%\\_id' AND table_schema = 'public' AND data_type != 'bigint' SQL end it "should be bigint" do message = "" ActiveRecord::Base.connection.select_all(query).each do |col| message << "Column #{col["column_name"]} in table #{col["table_name"]} is either named improperly (_id is reserved for actual id columns) or needs to be of type bigint\n" end raise message unless message.empty? end end end ## Instruction: Update the spec wording to be a bit more clear ## Code After: describe "Database" do describe "foreign key constraints" do let(:query) do <<-SQL SELECT constraint_name, table_name FROM information_schema.table_constraints WHERE constraint_type = 'FOREIGN KEY' SQL end it "should not exist" do message = "" ActiveRecord::Base.connection.select_all(query).each do |fk| message << "Foreign key constraint #{fk["constraint_name"]} on table #{fk["table_name"]} should be removed\n" end raise message unless message.empty? end end describe "_id columns" do let(:query) do <<-SQL SELECT table_name, column_name, data_type FROM information_schema.columns WHERE column_name LIKE '%\\_id' AND table_schema = 'public' AND data_type != 'bigint' SQL end it "should be of type bigint" do message = "" ActiveRecord::Base.connection.select_all(query).each do |col| message << "Column #{col["column_name"]} in table #{col["table_name"]} is either named improperly (_id is reserved for actual id columns) or needs to be of type bigint\n" end raise message unless message.empty? end end end