Skip to content

Instantly share code, notes, and snippets.

View ronnywang's full-sized avatar

Ronny Wang ronnywang

  • https://ronny.tw/
  • Taiwan
View GitHub Profile
@ronnywang
ronnywang / gist:a80527450601212e23c7
Created May 12, 2015 10:13
大都會客運260區 (routeId=10824)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ronnywang
ronnywang / gist:7b235279d3aeafffde5e
Created May 12, 2015 10:20
大都會客運紅5 (routeId=10821)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ronnywang
ronnywang / distance_20150515.csv
Last active August 29, 2015 14:21
公車站點偏移路線
stopId routeId distance
29212 10824 888.571806532134
29211 10824 888.571806532134
59153 10824 759.904527552524
150910 10824 759.904527552524
39115 10824 743.943650131225
150911 10824 743.943650131225
152726 10824 686.816957791984
152724 10824 686.816957791984
152727 10824 654.013620102136
@ronnywang
ronnywang / code.php
Last active August 29, 2015 14:23
無燒燙傷病房的有急診醫院
<?php
$sql = "SELECT * FROM this WHERE 病床名稱 = '燒傷病床' AND (City = '臺北市' OR City = '桃園市' OR City = '新北市')";
$url = 'https://sheethub.com/clementtang/醫事機構病床類別與床數資料?sql=' . urlencode($sql) . '&format=array_json';
$hospitals = json_decode(file_get_contents($url));
$skip = array();
foreach ($hospitals as $h) {
$skip["{$h->City},{$h->Area},{$h->Name},{$h->Zone}"] = true;
}
This file has been truncated, but you can view the full file.
173772101,20111201-1,660836,pic,http://justforsale.pixnet.net/album/photo/173772101,http://justforsale.pixnet.net/album/photo/173772101,http://pic.pimg.tw/justforsale/1334560563-1851169439_t.jpg,1334560566,527,justforsale,justforsale,http://s3.pimg.tw/avatar/justforsale/0/0/resize/90x0.png?v=,http://justforsale.pixnet.net,Point,121.54933333333,25.043722222222,"Camera:HTC - Desire HD|ISOSpeedRatings:411|DateTaken:2011:12:01 19:03:42|FocalLength:4 mm|Latitude:25.043722222222|Longitude:121.54933333333",,,1322737422,http://pic.pimg.tw/justforsale/1334560563-1851169439.jpg,http://pic.pimg.tw/justforsale/1334560563-1851169439_n.jpg,http://pic.pimg.tw/justforsale/1334560563-1851169439_s.jpg,http://pic.pimg.tw/justforsale/1334560563-1851169439_q.jpg,http://pic.pimg.tw/justforsale/1334560563-1851169439_m.jpg,http://pic.pimg.tw/justforsale/1334560563-1851169439_b.jpg,http://pic.pimg.tw/justforsale/1334560563-1851169439_l.jpg,original:1952x3264|thumb:90x90|small_square:120x120|square:170x170|medium:269x450|bigger:478x80
@ronnywang
ronnywang / gist:065728677f1e010cc7f1
Last active September 18, 2015 05:17
Basic Leaftlet sample
<html>
<head>
<style>
html, body {
border: 0;
margin: 0;
padding: 0;
width: 100%;
height: 100%;
overflow: hidden;
@ronnywang
ronnywang / -
Last active December 26, 2015 09:07
http://judicial.ronny.tw/PTD/M/104/%E5%AF%A9%E8%A8%B4/508
http://judicial.ronny.tw/PTD/M/104/%E5%AF%A9%E8%A8%B4/508
http://judicial.ronny.tw/PTD/M/104/%E5%AF%A9%E5%8E%9F%E8%A8%B4/10
http://judicial.ronny.tw/PTD/M/104/%E5%AF%A9%E5%8E%9F%E8%A8%B4/10
http://judicial.ronny.tw/PTD/M/104/%E7%B0%A1/119
http://judicial.ronny.tw/PTD/M/104/%E5%AF%A9%E8%A8%B4/323
http://judicial.ronny.tw/PTD/M/103/%E7%B0%A1/1323
http://judicial.ronny.tw/PTD/M/103/%E5%8E%9F%E7%B0%A1/70
http://judicial.ronny.tw/PTD/M/103/%E5%8E%9F%E8%A8%B4/30
http://judicial.ronny.tw/PTD/M/103/%E5%AF%A9%E8%A8%B4/219
<?php
date_default_timezone_set('Asia/Taipei');
$courts = array(
/*
'TPC' => '司法院-刑事補償',
'TPU' => '司法院-訴願決定',
'TPJ' => '司法院職務法庭',
'TPS' => '最高法院',
'TPA' => '最高行政法院',
E000,滏, 2-443E 水金大金  ㄈㄨ ˇ 13
E001,添, 1-5B50 水一大心  ㄊㄧㄢˉ 11
E235,麐, 3-5A24 戈心卜大口 ㄌㄧㄣˊ 18
E236,󼍀, D-6122 廿田金   ㄏㄨㄤˊ 11
E237,𧽚, F-5C74 土人土口女  ㄩㄢˊ 17
E238,濓, 3-5155 水卜竹金  ㄌㄧㄢˊ 16
E239,𫉾, E-2F76 廿戈卜中  ㄅㄨ ˋ 18
E23A,𩃀, 4-5457 一月弓大一 ㄊㄧㄥˊ 16
E23B,瓐, 3-5C5D 一土卜心廿 ㄌㄨ ˊ 20
E23C,𥓞, F-437A 一口弓山水 ㄏ ㄢˊ 13
<?php
/**
* $a 是遞迴到的答案
* $unused_pools 是還未使用的數字
*/
function guess_function($a, $unused_pools) {
// 找到九位的話,驗證下面的算式是否成立 (EF + GH = PPP)
if (count($a) == 9) {
if (($a[4] * 10 + $a[5]) + ($a[6] * 10 + $a[7]) != (100 * $a[8] + 10 * $a[8] + $a[8])) {