This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
call plug#begin('~/AppData/Local/nvim/plugged') | |
Plug 'tpope/vim-fugitive' | |
Plug 'beeender/Comrade' | |
Plug 'Shougo/deoplete.nvim' | |
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } | |
Plug 'junegunn/fzf.vim' | |
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' } | |
Plug 'StanAngeloff/php.vim' | |
Plug 'jwalton512/vim-blade' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require '[clojure.string :as str]) | |
(defn SplitStringToList | |
[input_string] | |
(map read-string (str/split input_string #" ")) | |
) | |
(defn MinInSlice | |
[[start end] widths] | |
(apply min (drop start (take (+ 1 end) widths))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Starting code, fairly difficult to understand what it is doing. | |
<? | |
if ((($bo_row['qtyordu'] - $branch_avail) - $hq_avail) == 0) { | |
$bo_hq_qty = $hq_avail; | |
$bo_brn_qty = 0; | |
} elseif ((($bo_row['qtyordu'] - $branch_avail) - $hq_avail) > 0) { | |
$bo_hq_qty = $hq_avail; | |
$bo_brn_qty = (($bo_row['qtyordu'] - $branch_avail) - $hq_avail); | |
} elseif ((($bo_row['qtyordu'] - $branch_avail) - $hq_avail) < 0) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Before (this was repeated 3 times in one script, copy and pasted exactly...) | |
for($i=0,$btotal=0,$total=0,$page=1;$lclass=$row['class'],$lwhse=$row['whse'],$row=mysql_fetch_array($res);$i++,$total+=$row['cost'],$btotal+=$row['cost'],$gtotal+=$row['cost']) { | |
// ...snip.. 35 lines of echo statements dumping HTML | |
} | |
// Removing all the unused variables reduced it down to: | |
for ($i = 0; $row = mysql_fetch_array($res); $i++) { | |
// Same 35 lines of echo statements dumping HTML |