DIP final project . Doing a restore for motion blur
(使用時記得修改圖片讀檔的相對路徑)
| <form method="post" action="https://payment.allpay.com.tw/Cashier/AioCheckOut"> | |
| <input type="hidden" value="1047153" name="MerchantID"> | |
| <input type="hidden" value="hypoOnlieTest2Product25215" name="MerchantTradeNo"> | |
| <input type="hidden" value="2015/02/10 13:58:34" name="MerchantTradeDate"> | |
| <input type="hidden" name="PaymentType" value="aio"> | |
| <input type="hidden" value="1425" name="TotalAmount"> | |
| <input type="hidden" name="TradeDesc" value="hypoProduct"> | |
| <input type="hidden" value="LHB8" name="ItemName"> | |
| <input type="hidden" name="ChoosePayment" value="Alipay"> |
| public static boolean verify(WORequest r) { | |
| // request all post argument | |
| HashMap<String, String> myMap = new HashMap<String, String>(); | |
| if(HypoUtility.safeTrim(r.stringFormValueForKey("MerchantID")).equals(MERCHANT_ID)){ | |
| myMap.put("MerchantID", MERCHANT_ID); | |
| } else{ | |
| log.info("allpayAlipay MerchantID is not Our ID"); | |
| return false; | |
| } | |
| myMap.put("MerchantTradeNo", HypoUtility.safeTrim(r.stringFormValueForKey("MerchantTradeNo")) ); |
| 2 2 | |
| 5 0 | |
| + | |
| 4 -4 | |
| 6 2 | |
| -6 -2 | |
| + | |
| -3 1 | |
| * | |
| 5 1 |
####mysql2 出錯
sudo apt-get install libmysql-ruby libmysqlclient-dev
####rails command line一個指令安裝
\curl -L https://get.rvm.io | bash -s stable --rails --autolibs=enabled # Or, --ruby=1.9.3
| #特殊的require 可以輕鬆使用參數 | |
| ### read argument | |
| require 'optparse' | |
| $options = {} | |
| OptionParser.new do |opts| | |
| opts.on("-r") { |s| $options[:r] = true } | |
| opts.on("-i", '-i INPUT', "input ") { |s| $options[:i] = s } # ./queries/origin/query-5.xml | |
| opts.on("-o", '-o OUTPUT',"output") { |s| $options[:o] = s } # ans | |
| opts.on("-m", '-m MODEL', "model ") { |s| $options[:m] = s } # ./model-files |