<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Snipplr</title>
<link>http://snipplr.com/tags/coordinates</link>
<description>Recent snippets posted on Snipplr.com</description>
<language>en-us</language>
<pubDate>Wed, 22 May 2013 07:01:21 GMT</pubDate>
<item>
<title>(SQL) sql time zone table by country/city - decahedronhotmailcom</title>
<link>http://snipplr.com/view/70872/sql-time-zone-table-by-countrycity/</link>
<description><![CDATA[ <p>Sql table with country codes coordinates timezone utc utc-dst
usefull if you want to have human friendly time zones like America/Los_Angeles</p> ]]></description>
<pubDate>Sun, 21 Apr 2013 14:18:25 GMT</pubDate>
<guid>http://snipplr.com/view/70872/sql-time-zone-table-by-countrycity/</guid>
</item>
<item>
<title>(JavaScript) Check if coordinates are adjacent - hellowouter</title>
<link>http://snipplr.com/view/64354/check-if-coordinates-are-adjacent/</link>
<description><![CDATA[ <p>This function returns true if the two sets of coordinates are neighbors and false if they ar not. The function easily determines whether they are neighbors by looking at the distance between the positions along both axes, also callled the Manhattan distance. The sum of the two distances must be exactly 1 if the positions are adjacent.

Note: the coordinates should be integers</p> ]]></description>
<pubDate>Wed, 04 Apr 2012 19:25:53 GMT</pubDate>
<guid>http://snipplr.com/view/64354/check-if-coordinates-are-adjacent/</guid>
</item>
<item>
<title>(JavaScript) Bresenham\'s Line Algorithm - nefd</title>
<link>http://snipplr.com/view/58314/bresenhams-line-algorithm/</link>
<description><![CDATA[ <p>Code obtained from a [stackoverflow question](http://stackoverflow.com/questions/4672279/bresenham-algorithm-in-javascript). This is a javascript implementation of the [Bresenham line algorithm](http://en.wikipedia.org/wiki/Bresenham's_line_algorithm). Given two points, this function will return an array of coordinates which go from point A to point B, one step at a time.</p> ]]></description>
<pubDate>Wed, 31 Aug 2011 00:07:22 GMT</pubDate>
<guid>http://snipplr.com/view/58314/bresenhams-line-algorithm/</guid>
</item>
<item>
<title>(PHP) X,Y from lat,long - burnleywallet</title>
<link>http://snipplr.com/view/53315/xy-from-latlong/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Wed, 11 May 2011 01:55:18 GMT</pubDate>
<guid>http://snipplr.com/view/53315/xy-from-latlong/</guid>
</item>
<item>
<title>(PHP) Convert Decimal Degrees to Degrees, Minutes &amp;amp; Seconds Ordinal - tomelders</title>
<link>http://snipplr.com/view/50477/convert-decimal-degrees-to-degrees-minutes--seconds-ordinal/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Thu, 10 Mar 2011 22:08:53 GMT</pubDate>
<guid>http://snipplr.com/view/50477/convert-decimal-degrees-to-degrees-minutes--seconds-ordinal/</guid>
</item>
<item>
<title>(CSS) CSS: Submit Button Background Images - karlhorky</title>
<link>http://snipplr.com/view/37068/css-submit-button-background-images/</link>
<description><![CDATA[ <p>There are three different types of elements that submit forms:

*  &amp;lt;input type="image"&amp;gt;
*  &amp;lt;input type="submit"&amp;gt;
*  &amp;lt;button type="submit"&amp;gt;

Logically, it would seem that you would want to use input type="image" if you wanted to display an image instead of a default button. However, using input type="image" causes the page to submit two extra variables for your x and y mouse click coordinates on the image as below. Unless you are specifically using this for advertising or some purpose that takes advantage of the coordinates, this is just unnecessary data that also causes the URL to become more complex.

Example URLs:

*  type="submit"
  *  http://www.site.com/form.php?query=searchterm
*  type="image"
  *  http://www.site.com/form.php?query=searchterm&amp;x=0&amp;y=0

Additionally, if you do not require additional information pertaining to the submit to be passed to the server (eg. you do not need to have two submits with different purposes), you can use a button element instead of an input. This also allows for simple hiding of the display text as outlined with the .hide-text class in this snippet (for if you wanted to put the text in the image instead).

This solution has been tested to work in:

*  Microsoft Internet Explorer 6, 7, 8
*  Mozilla Firefox 3.6
*  Google Chrome 5
*  Apple Safari 5
*  Opera 10</p> ]]></description>
<pubDate>Sat, 10 Jul 2010 08:45:15 GMT</pubDate>
<guid>http://snipplr.com/view/37068/css-submit-button-background-images/</guid>
</item>
<item>
<title>(Pseudocode) 2D array to 1D array conversion - helloworlder</title>
<link>http://snipplr.com/view/17837/2d-array-to-1d-array-conversion/</link>
<description><![CDATA[ <p>Convert a coordinate (x,y) into the index for a 1D array. For example, the coordinate (3,1) would be at array index 8 if there are 5 columns.

Assumption: Arrays start at 0.</p> ]]></description>
<pubDate>Mon, 03 Aug 2009 10:15:45 GMT</pubDate>
<guid>http://snipplr.com/view/17837/2d-array-to-1d-array-conversion/</guid>
</item>
<item>
<title>(VB.NET) Get Latitude and Longitude from Address (using Google Maps) - blackf0rk</title>
<link>http://snipplr.com/view/14929/get-latitude-and-longitude-from-address-using-google-maps/</link>
<description><![CDATA[ <p>Use inType=0 and feed in a specific Google Maps URL to parse out the GeoCoords from the URL
e.g. http://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=53154&amp;sll=37.0625,-95.677068&amp;sspn=52.505328,80.507812&amp;ie=UTF8&amp;ll=42.858224,-88.000832&amp;spn=0.047943,0.078621&amp;t=h&amp;z=14
Function returns a string of geocoords (e.g. "-87.9010610,42.8864960")

Use inType=1 and feed in a zip code, address, or business name
Function returns a string of geocoords (e.g. "-87.9010610,42.8864960")
If an invalid address, zip code or location was entered, the function will return "0,0"</p> ]]></description>
<pubDate>Tue, 12 May 2009 10:33:03 GMT</pubDate>
<guid>http://snipplr.com/view/14929/get-latitude-and-longitude-from-address-using-google-maps/</guid>
</item>
<item>
<title>(JavaScript) Get Mouse Position (from Quirksmode.org) - noah</title>
<link>http://snipplr.com/view/3032/get-mouse-position-from-quirksmodeorg/</link>
<description><![CDATA[ <p>This is PPK's solution for finding mouse position across platforms.</p> ]]></description>
<pubDate>Mon, 25 Jun 2007 08:36:02 GMT</pubDate>
<guid>http://snipplr.com/view/3032/get-mouse-position-from-quirksmodeorg/</guid>
</item>
</channel>
</rss>