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
area_data = { | |
'臺北市': [ | |
'中正區', '大同區', '中山區', '萬華區', '信義區', '松山區', '大安區', '南港區', '北投區', '內湖區', '士林區', '文山區' | |
], | |
'新北市': [ | |
'板橋區', '新莊區', '泰山區', '林口區', '淡水區', '金山區', '八里區', '萬里區', '石門區', '三芝區', '瑞芳區', '汐止區', '平溪區', '貢寮區', '雙溪區', '深坑區', '石碇區', '新店區', '坪林區', '烏來區', '中和區', '永和區', '土城區', '三峽區', '樹林區', '鶯歌區', '三重區', '蘆洲區', '五股區' | |
], | |
'基隆市': [ | |
'仁愛區', '中正區', '信義區', '中山區', '安樂區', '暖暖區', '七堵區' | |
], |
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
# EdgeOS v1.9 Hinet Config Script | |
# by Superbil (https://github.com/superbil) | |
# Last updated: Sep 25, 2018 | |
# Based on settings & scripts by Jenkins, Atlantisman, TK, and CompTech | |
# RUN THIS SCRIPT AS ROOT ON YOUR EDGEROUTER | |
# Script runs best if you copy and paste in sections | |
#______________________Basic Firewall Setup_______________________________ | |
configure |
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
#ifndef DEBUG | |
#define NSLog(...) {} | |
#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
;; Running on GNU Emacs 26.0.90 | |
Debugger entered--Lisp error: (wrong-type-argument tramp-file-name nil) | |
signal(wrong-type-argument (tramp-file-name nil)) | |
debugger-may-continue = t | |
inhibit-redisplay = nil | |
inhibit-debugger = t | |
inhibit-changing-match-data = nil | |
(or (progn (and (memq (car-safe nil) cl-struct-tramp-file-name-tags) t)) (signal 'wrong-type-argument (list 'tramp-file-name nil))) | |
[no locals] | |
(progn (or (progn (and (memq (car-safe nil) cl-struct-tramp-file-name-tags) t)) (signal 'wrong-type-argument (list 'tramp-file-name nil))) (nth 2 nil)) |
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
let calendar = Calendar(identifier: .gregorian) | |
let timeZone = TimeZone(secondsFromGMT: 0) | |
let date = DateComponents(calendar: calendar, timeZone: timeZone, year: 2017, month: 12, day: 2, hour: 0, minute: 15).date | |
print(date!.timeIntervalSince1970) | |
// 1512173700 |
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
dispatch_async(dispatch_get_global_queue(QOS_CLASS_USER_INITIATED, 0), ^{ | |
[[APIManager sharedInstance] fetchMasterInfoWith:_user.ID success:^(MasterInfo *masterInfo) { | |
self.lblDesc.text = masterInfo.desc; | |
data_done= TRUE; | |
} failure:^(NSError *error) { | |
data_done= TRUE; | |
}]; | |
while (true) { | |
if ( data_done ) { | |
break; |
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 thePixelBuffer : CVPixelBuffer? | |
let testImage : UIImage = UIImage.init(named: "twdEnds.png")! | |
self.thePixelBuffer = self.pixelBufferFromImage(image: testImage) | |
func pixelBufferFromImage(image: UIImage) -> CVPixelBuffer { | |
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
using System; | |
using System.Threading; | |
using System.Collections; | |
using System.Collections.Generic; | |
public class SyncEvents | |
{ | |
public SyncEvents() | |
{ |
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
#!/usr/bin/expect | |
set timeout 20 | |
set user [lindex $argv 0] | |
set password [lindex $argv 1] | |
spawn ssh [email protected] | |
set timeout 10 |
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 lat = document.getElementById("lat"); | |
var lng = document.getElementById("long"); | |
function getLocation() { | |
if (navigator.geolocation) { | |
navigator.geolocation.getCurrentPosition( | |
addPositionHandler, | |
errorHandler, | |
{highAccuracy: false, | |
maximumAge: 30000, // 30 seconds | |
timeout: 60000 // 1 minute |