<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Ben Wang</title>
	<atom:link href="http://www.ben-wang.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ben-wang.com</link>
	<description>good good study, day day up</description>
	<lastBuildDate>Mon, 26 Dec 2011 01:08:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Get distance between 2 GPS</title>
		<link>http://www.ben-wang.com/get-distance-between-2-gps/</link>
		<comments>http://www.ben-wang.com/get-distance-between-2-gps/#comments</comments>
		<pubDate>Sat, 24 Dec 2011 04:13:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[GPS]]></category>
		<category><![CDATA[Lat]]></category>
		<category><![CDATA[Lon]]></category>

		<guid isPermaLink="false">http://www.ben-wang.com/?p=9</guid>
		<description><![CDATA[&#60;% x1=39.9918928 y1=116.3099544 x2=41.8326865 y2=123.4038186 Const EARTH_RADIUS = 6378.137 Const Pi = 3.1415926535898 Function rad(d) rad = d * Pi / 180 End Function Function GetDistance(lat1, lng1, lat2, lng2) Dim radlat1, radlat2 Dim a, b, s, Temp radlat1 = rad(lat1) &#8230;<p class="read-more"><a href="http://www.ben-wang.com/get-distance-between-2-gps/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.ben-wang.com/wp-content/uploads/2011/12/20110915035709521.jpg"><img class="alignnone size-full wp-image-13" title="DISTANCE" src="http://www.ben-wang.com/wp-content/uploads/2011/12/20110915035709521.jpg" alt="" width="441" height="80" /></a></p>
<p>&lt;%<br />
x1=39.9918928<br />
y1=116.3099544</p>
<p>x2=41.8326865<br />
y2=123.4038186</p>
<p>Const EARTH_RADIUS = 6378.137<br />
Const Pi = 3.1415926535898</p>
<p>Function rad(d)<br />
rad = d * Pi / 180<br />
End Function</p>
<p>Function GetDistance(lat1, lng1, lat2, lng2)<br />
Dim radlat1, radlat2<br />
Dim a, b, s, Temp<br />
radlat1 = rad(lat1)<br />
radlat2 = rad(lat2)<br />
a = radlat1 &#8211; radlat2<br />
b = rad(lng1) &#8211; rad(lng2)<br />
Temp = Sqr(Sin(a / 2) ^ 2 + Cos(radlat1) * Cos(radlat2) * Sin(b / 2) ^ 2)<br />
s = 2 * Atn(Temp / Sqr(-Temp * Temp + 1))<br />
s = s * EARTH_RADIUS<br />
GetDistance = s<br />
End Function</p>
<p><strong>response.write GetDistance(x1,y1,x2,y2)</strong><br />
%&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ben-wang.com/get-distance-between-2-gps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL skill</title>
		<link>http://www.ben-wang.com/sql-skill/</link>
		<comments>http://www.ben-wang.com/sql-skill/#comments</comments>
		<pubDate>Thu, 15 Dec 2011 03:29:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[copy table]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://boliba.com/ben/?p=1</guid>
		<description><![CDATA[copy table: select * into table2 (select * from table1) c update table: update a set a.id = b.qID from v3_group a join qun2 b on a.groupid = b.groupid]]></description>
			<content:encoded><![CDATA[<p>copy table:</p>
<blockquote><p>select * into table2 (select * from table1) c</p></blockquote>
<p>update table:</p>
<blockquote><p>update a<br />
set a.id = b.qID<br />
from v3_group a join qun2 b on a.groupid = b.groupid</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.ben-wang.com/sql-skill/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

