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
    
  
  
    
  | import csv,re | |
| with open('wingOn.csv') as f: | |
| with open('wingOn_result.csv', 'w', encoding='utf-8') as output: | |
| reader = csv.DictReader(f) | |
| writer = csv.writer(output) | |
| #writer.writerow(['Date', 'Advertiser', 'Theme', 'Channel', 'Targeting_Type','Campaign', 'Google_Engine_Bid_Strategy', 'Advertiser_Bid_Strategy', 'Bidding_Activated', 'Bidding_Opt', 'Impr', 'Clicks', 'Cost(CNY)', 'RealOrd', 'Trans_Last','Trans','Realord_Rev','Revenue(CNY)','Trans_Last_Revenue']) | |
| writer.writerow(['Date', 'Advertiser', 'Campaign', 'Google_Engine_Bid_Strategy', 'Advertiser_Bid_Strategy', 'Bidding_Activated', 'Bidding_Opt', 'Impr', 'Clicks', 'Cost(HKD)', 'Trans', 'Revenue(HKD)']) | |
| for row in reader: | 
  
    
      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
    
  
  
    
  | const fs = require('fs'); | |
| var file1 = 'test1.csv'; | |
| var file2 = 'test2.csv'; | |
| var originList = {}; | |
| var missWordsList = ''; | |
| fs.readFile(file1, 'utf8', (err, fileData)=>{ | |
| if(err){ | 
  
    
      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
    
  
  
    
    | 攜程 | 銀河 酒店 | 銀河 酒店 | 新宿 花 jr 九州 酒店 | trip 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
    
  
  
    
    | 攜程 | 銀河 酒店 | 銀河 酒店 | 新宿 花 jr 九州 酒店 | trip 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
    
  
  
    
  | const fs = require('fs'); | |
| //const parse = require('csv-parse'); | |
| function compareCSV(arr1, arr2){ | |
| var missWords = []; | |
| if(arr1.length === 0 || arr2.length === 0){ | |
| return console.log('empty compare file'); | |
| } | |
| arr1.sort(); | 
  
    
      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 detectCapitalUse(s){ | |
| let str = /^([A-Z]+)([a-z]*)$/g, str2 = /^([a-z]*)$/g; | |
| if(str.test(s)){return true;} | |
| if(str2.test(s)){return true;} | |
| return false; | |
| } | |
| console.log(detectCapitalUse('FlaG')); | |
| console.log(detectCapitalUse('USA')); | |
| console.log(detectCapitalUse('Google')); | 
  
    
      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 matching(arr1, arr2){ | |
| let x = 0, number = 0; | |
| while(x < arr1.length){ | |
| if(arr1[x] === arr2[x]){ | |
| number = arr1[x].length; | |
| } | |
| } | |
| return number; | |
| } | 
  
    
      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 pa(num){ | |
| if(num == 1){ | |
| return [1]; | |
| } else{ | |
| var prev = pa(num-1); | |
| var result = [1]; | |
| var i = 0; | |
| for(;i < prev.length -1 ;i++){ | |
| result.push(prev[i]+prev[i+1]); | |
| } | 
  
    
      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
    
  
  
    
  | <html> | |
| <head> | |
| <title>test</title> | |
| <style> | |
| body { | |
| display: flex; | |
| justify-content: center; | |
| align-items: center; | |
| background-color: palegoldenrod; | |
| font-family: sans-serif; | 
  
    
      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
    
  
  
    
  | var app = angular.module("app",[]); | |
| angular.module('app').constant('AzureMobileServiceClient', { | |
| API_URL : 'http://kiliomobileapi.azure-mobile.net/api/AuthorityManage/Departments', | |
| API_KEY : 'HPTNIXeDbTlKwZnIgmwVBijYmJrLHF82', | |
| }); | |
| app.controller("index",function($scope, $http){ | |
| var MockData_Department = { | |
| "Deparments": | 
NewerOlder