No Picture
Java

[JAVA] Read XML data

2013-05-07 C.H. Ling 0

For reading XML file, there are several approaches to do so, if reading XML node element, it can use Java.xml in an old school approach. public static void main(String[] args) throws SAXException, IOException, ParserConfigurationException, TransformerException […]

No Picture
Database

[SQL] 利用坐標找出指定距離內的記錄

2013-05-05 C.H. Ling 0

這陣子要做有關在地服務 (Location-based Service)的程式, 需要計算指定距離內的東西. 經過一輪google,找到部份指引. 原來要利用 Haversine Formula 找出. 詳細我也似非而是地理解作利用畢氐定理及asin 計出來. 結果如下: SELECT *, (3959 * acos( cos( radians(<Current Latitude>) ) * cos( radians(<Latitude column>) ) * cos( radians(<Longitude column>) – radians(<Current Longitude>) ) + sin( radians(<Current […]

1 25 26 27