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
    
  
  
    
  | [ | |
| { "zip": "100", "name": "臺北市中正區" }, | |
| { "zip": "103", "name": "臺北市大同區" }, | |
| { "zip": "104", "name": "臺北市中山區" }, | |
| { "zip": "105", "name": "臺北市松山區" }, | |
| { "zip": "106", "name": "臺北市大安區" }, | |
| { "zip": "108", "name": "臺北市萬華區" }, | |
| { "zip": "110", "name": "臺北市信義區" }, | |
| { "zip": "111", "name": "臺北市士林區" }, | |
| { "zip": "112", "name": "臺北市北投區" }, | 
  
    
      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
    
  
  
    
  | /** | |
| * Object to QueryString | |
| * @param {object} obj json object | |
| * @returns {string} query string | |
| */ | |
| const jsonToQueryString = (obj) => { | |
| let strList = []; | |
| Object.keys(obj).forEach((key) => { | |
| // array | |
| if(Array.isArray(obj[key])) { | 
  
    
      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
    
  
  
    
  | {"Version":"20180519071009358","stores":[{"data":[{"data":[{"serviceByRecover":"Y","hours":"\u4e00~\u4e94|11:00-20:00","locationName":"\u5317\u5340","storeTEL":"0800-050-868","address":"\u4fe1\u4e00\u8def94\u865f","typeShortName":"\u7dad\u4fee\u4e2d\u5fc3","typeOrder":3,"typeName":"\u5ba2\u670d\u4e2d\u5fc3","logisticsArea":"","county":"\u57fa\u9686\u5e02","serviceByRepair":"Y","serviceByTelcom":"N","lon":121.750779,"storeID":"314005","locationID":"1","hours_holiday":"","IsOffshoreIslands":"N","district":"\u4fe1\u7fa9\u5340","serviceByAgent":"Y","storeName":"\u57fa\u9686\u4fe1\u4e00\u7dad\u4fee\u4e2d\u5fc3","typeID":"3","serviceBySale":"N","lat":25.128744},{"serviceByRecover":"Y","hours":"\u4e00~\u4e9411:00-21:00","locationName":"\u5317\u5340","storeTEL":"02-24683311","address":"\u6df1\u6eaa\u8def94\u865f","typeShortName":"\u7279\u7d04","typeOrder":1,"typeName":"\u7279\u7d04\u4e2d\u5fc3","logisticsArea":"1","county":"\u57fa\u9686\u5e02","serviceByRepair":"N","serviceByTelcom":"Y","lon":121.782527,"storeID":"97 | 
  
    
      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
    
  
  
    
  | <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>textarea rows</title> | |
| </head> | |
| <body> | |
| <textarea name="" id="ta" cols="30" rows="5"></textarea> | |
| <br> | |
| <button id="submit">submit</button> | 
  
    
      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
    
  
  
    
  | (function(){ | |
| // https://www.googleapis.com/urlshortener/v1/url?shortUrl=https://goo.gl/tzn9Hx&key=AIzaSyCRIa3jCZ1C25iOaCqg7KnU8T2dlK5HPeo | |
| // https://developer.mozilla.org/zh-TW/docs/Web/API/XMLHttpRequest/Using_XMLHttpRequest | |
| var getLongUrl = function() { | |
| var ajax = new XMLHttpRequest(); | |
| ajax.addEventListener("progress", updateProgress, false); | |
| ajax.addEventListener("load", transferComplete, false); | |
| ajax.addEventListener("error", transferFailed, false); | |
| ajax.addEventListener("abort", transferCanceled, false); | |
| ajax.open('get', 'http://my.sample.path.com/'); | 
  
    
      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
    
  
  
    
  | Object.defineProperty(HTMLSelectElement.prototype, 'emptyOptions', {get: function () { | |
| // empty options | |
| this.options.length = 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
    
  
  
    
  | $('#credit card').on('keyup keypress change', function () { | |
| var start = this.selectionStart; | |
| var end = this.selectionEnd; | |
| var oldleft = this.value.substr(0,start).replace(/[^ ]/g, '').length; | |
| this.value = this.value.replace(/\W/gi, '').replace(/(.{4})/g, '$1 ').substr(0, 19); | |
| var newleft = this.value.substr(0,start).replace(/[^ ]/g, '').length; | |
| start += newleft - oldleft; | |
| end += newleft - oldleft; | |
| this.setSelectionRange(start, end); | |
| }); | 
  
    
      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
    
  
  
    
  | <div class="pulldownChange-group triggerStoreZipCode"> | |
| <input type="hidden" class="pulldownChange-zip" id="cartZip3" name="cartZip3"> | |
| <select class="pulldownChange-city" data-val="<?php echo $cartMaster['cart_receipt_city'] ?>" ></select> | |
| <select class="pulldownChange-town" data-val="<?php echo $cartMaster['cart_receipt_district'] ?>" ></select> | |
| </div> | 
  
    
      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
    
  
  
    
  | collection = [ | |
| { "Id": 1, "color": "blue" }, | |
| { "Id": 2, "color": "green" }, | |
| { "Id": 3, "color": "yellow" }, | |
| { "Id": 4, "color": "green" }, | |
| { "Id": 5, "color": "blue" }, | |
| { "Id": 6, "color": "yellow" } | |
| ] | |
  
    
      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
    
  
  
    
  | # ================================= | |
| # [設定] 修改"位置"時調整 proxy (start) | |
| # 來源文章 http://qiita.com/uetchy/items/b9991d1f86b23f4a184d | |
| # 寫在 .bash_profile 或是 .zshrc | |
| # 觸發時間點為切換後開啟終端機或是 iTerm 這類工具讓他讀取到這段 code | |
| # ================================= | |
| proxy=這邊放proxy名稱 | |
| switch_trigger=這邊放位置的名稱 | 
NewerOlder