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
foreach (City::search("{$x} > x_min AND {$x} < x_max AND {$y} > y_min AND {$y} < y_max") as $city) {
$left_node = $right_node = 0;
$lastx = $lasty = null;
foreach ($city->bounds as $bound) {
if (is_null($lastx)) {
$lastx = $bound->x;
$lasty = $bound->y;
continue;
}
This file has been truncated, but you can view the full file.
/*
OpenLayers.js -- OpenLayers Map Viewer Library
Copyright (c) 2006-2013 by OpenLayers Contributors
Published under the 2-clause BSD license.
See http://openlayers.org/dev/license.txt for the full text of the license, and http://openlayers.org/dev/authors.txt for full list of contributors.
Includes compressed code under the following licenses:
/** color visualization */
#taipei {
marker-opacity: 0.9;
marker-allow-overlap: true;
marker-placement: point;
marker-type: ellipse;
[zoom>=17] { marker-width: 8; }
[zoom<=16] { marker-width: 5; }
[zoom<=15] { marker-width: 4; }
@ronnywang
ronnywang / gist:8193857
Created December 31, 2013 07:58
2013 年新聞小幫手受回報網域排行榜
159 www.facebook.com
59 www.ettoday.net
51 www.appledaily.com.tw
33 tw.news.yahoo.com
27 udn.com
25 www.libertytimes.com.tw
18 mp.weixin.qq.com
17 www.nownews.com
16 www.chinatimes.com
13 iservice.libertytimes.com.tw
@ronnywang
ronnywang / gist:8554757
Created January 22, 2014 07:26
地政司回覆關於地籍界線資料
王先生您好:
您於103年1月1日電子郵件提及「…找不到有公開的地籍界線資料…」1事,茲答覆如下:
按地籍圖資依「土地法」與「規費法」及「財政收支劃分法」之規定,由地方政府徵收使用規費合先敘明。內政部地政司刻正配合政府開放資料(Open Data)政策及趨勢,推動「國土資訊系統土地基本資料庫分組地政資料流通應用2.0計畫」,探討可免費流通的資料項目及範疇,研擬將地籍圖資開放釋出、再利用,並規劃因應資料開放後更為前瞻的圖資流通供應方式及營運模式,讓使用者對地籍圖資賦予另類的創意運用,透過眾人力量融合其他資料,擴大圖籍資料的加值應用價值,使人們真正自由運用,達到互動、開放、多元、分享的2.0進程概念。前述計畫所獲得成果,將提供各地方政府規劃更為前瞻之「地政資料流通供應自治辦法」修正參考;經由法令鬆綁,達到政府開放資料(Open Data)目標。
以上答復,供您參考,希望能有助於解決您的問題,您若仍有其他疑問或不明瞭之處,歡迎隨時來電洽詢,感謝您的來信。
本案聯絡人員:張鵬修
聯絡電話:xxxxxxxxxxxx
敬祝 身體健康 萬事如意
內政部地政司 敬啟
@ronnywang
ronnywang / gist:9018851
Created February 15, 2014 12:43
如何濾掉聊天室的操作對話
在 Chrome 下面
在網址列手動輸入 javascript: (必需要手動輸入,因為 chrome 在複製貼上會濾掉 javascript: )
然後複製貼上
setInterval(function(){$('#chat_line_list li').each(function(){ var a = $(this); var t=$.trim(a.text().split(':')[1]); if (t == 'up' || t == 'down' || t == 'left' || t == 'right' || t == 'a' || t == 'b' || t == 'start') { a.hide(); }})}, 500)
接下來你就會發現聊天室內上下左右對話都不見了
public static function getRandomName()
{
$areas = array('taipei', 'taoyuan', 'hsinchu', 'yilan', 'hualien', 'miaoli', 'taichung', 'changhua', 'nantou', 'chiayi', 'yunlin', 'tainan', 'penghu', 'kaohiung', 'pingtung', 'kinmen', 'matsu', 'taitung');
$first_names = array('An', 'Chang', 'Chao', 'Chen', 'Cheng', 'Chi', 'Chiang', 'Chien', 'Chin', 'Chou', 'Chu', 'Fan', 'Fang', 'Fei', 'Feng', 'Fu', 'Han', 'Hao', 'Ho', 'Hsi', 'Hsiao', 'Hsieh', 'Hsu', 'Hsueh', 'Hua', 'Huang', 'Jen', 'Kang', 'Ko', 'Ku', 'Kung', 'Lang', 'Lei', 'Li', 'Lien', 'Liu', 'Lo', 'Lu', 'Ma', 'Meng', 'Miao', 'Mu', 'Ni', 'Pai', 'Pan', 'Pao', 'Peng', 'Pi', 'Pien', 'Ping', 'Pu', 'Shen', 'Shih', 'Shui', 'Su', 'Sun', 'Tang', 'Tao', 'Teng', 'Tou', 'Tsao', 'Tsen', 'Tsou', 'Wang', 'Wei', 'Wu', 'Yang', 'Yen', 'Yin', 'Yu', 'Yuan', 'Yueh', 'Yun');
for ($i = 0; $i < 10; $i ++) {
$random = strtolower($areas[rand(0, count($areas) - 1)] . '-' . $first_names[rand(0, count($first_names) - 1)] . '-' . rand(100000, 1000000)
@ronnywang
ronnywang / gist:9fca88f817b2cbb26c0f
Created April 2, 2015 10:24
這兩個是不同字...
decodeURIComponent('%EF%A7%A9+%E9%87%8C')
> "里+里"
@ronnywang
ronnywang / gist:e79fb48512507de0a8a1
Created April 20, 2015 16:51
2015/4/1 - 2015/4/20 小當家聊天室 bigram 分析
2015401
{"<3":2612," ":1076,"知道":976,"乃哥":952,"李嚴":907,"當家":814,"RR":814,"..":783,"幹 ":754,"小當":742,"!!":715," <":707,"你又":668,"嘟嘟":665,"又知":657,"道了":589,"ㄤㄤ":574,"~~":571,"雷恩":557,"B嘴":552,"料理":538,"怎麼":520,"ED":515,"LE":504,"醬汁":498,"紹安":497,"不要":481," 幹":478,"所以":466,"le":460,"0":460,"不是":451,"1":445,"了 ":430,"bl":429,"出來":427,"向恩":414,"還是":410,"什麼":405,"mp":401,"這樣":397,"hu":396,"ib":395,"um":395,"Th":390,"Bi":389,"eT":384,"%%":379,"魚片":377,"銅牌":377,"生魚":369,"閉嘴":368,"XD":366,"不錄":360,"ww":359,"來的":355,"錄了":353,"\/\/":353,"2":352,"礦物":351,"物質":350,"大麻":344,"小時":344," B":336," 你":335,"四郎":330,"是你":328,"阿飛":320,"ht":320,"tt":318,"tp":316,":\/":316,"0勝":308,"就是":304," 我":301,"1小":299,"可以":298,"3":294,"你的":293,"你不":292,"??":288,"王福":287,"ㄋㄟ":282,"魯夫":282,".c":281,"的料":280,":幹":278,"沒有":277,"RQ":277,"這個":275,"阿貝":267,"ㄟㄋ":263,"的,":261,"幹":256,"co":255,"om":255,"你還":252,"來了":249,"最後":248,"GD":246}
2015402
{"<3":2599," ":1496,"RR":1309,"嘟嘟":1086,"幹 ":1054,"當家":1038,"小當":949,"王福":947,"~~":918,"!!":907,"ED":849,
@ronnywang
ronnywang / gist:6feee36aae1dc74b76b1
Last active August 29, 2015 14:21
大都會客運 41 號
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.