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
| SELECT * | |
| FROM ${DB1}.drivers_ping a | |
| WHERE EXISTS ( SELECT * FROM ${DB2}.village b WHERE st_contains(b.area, POINT(Y(a.location), X(a.location))) AND b.town = "南港區" ) | |
| and a.month = 5 | |
| and a.day = 14 | |
| GROUP BY uid |
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 countries = require('./countries.json') | |
| const exec = async () => { | |
| const connection = await pool.createConnection() | |
| try { | |
| for (const e of countries.features) { | |
| let country |
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
| alias gl='git log --graph --oneline --decorate' | |
| alias gs='git status' | |
| alias greset='git reset --hard&&git clean -f' |
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
| struct ViewManager { | |
| static let rootViewController = UIApplication.sharedApplication().keyWindow?.rootViewController | |
| static let statusBarHeight = UIApplication.sharedApplication().statusBarFrame.size.height | |
| static var currentWindow: UIWindow? { | |
| if let window = UIApplication.sharedApplication().keyWindow { | |
| return window | |
| } else { |
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
| defaults write com.apple.LaunchServices LSHandlers -array-add '{LSHandlerContentType=public.plain-text;LSHandlerRoleAll=com.sublimetext.3;}' |
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
| // | |
| // DirectionInfoView.swift | |
| // DirectionAPP | |
| // | |
| // Created by Kuo-HsunShih on 2016/11/15. | |
| // Copyright © 2016年 Lova. All rights reserved. | |
| // | |
| import UIKit | |
| import YYWebImage |
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
| #if DEBUG | |
| func Log( message: @autoclosure () -> String, filename: NSString = #file, function: String = #function, line: Int = #line) { | |
| print("[\(filename.lastPathComponent):\(line)] %@", message()) | |
| } | |
| #else | |
| func dLog(@autoclosure message: () -> String, filename: NSString = #file, function: String = #function, line: Int = #line) { | |
| } | |
| #endif |
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
| Client.aggregate([{ | |
| "$lookup": { | |
| "from": "badge", | |
| "localField": "clientID", | |
| "foreignField": "clientID", | |
| "as": "test" | |
| } | |
| }]).exec(function(err, results) { | |
| res.set({ | |
| 'Content-Type': 'application/json', |
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
| //這樣storyboard沒反應,就不知道有這個view要render這樣 | |
| IB_DESIGNABLE | |
| @protocol LOCircleProgressViewDelegate; | |
| @interface LOCircleProgressView : UIView | |
| //////////////////////////////////// | |
| //這樣就可以 | |
| @protocol LOCircleProgressViewDelegate; | |
| IB_DESIGNABLE |
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
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |