This series is about code in various languages that will calculate the distance between two latitudes and longitudes. This article is for the Javascript code. Code courtsey : GeoDataSource /*::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*/ /*:: :*/ /*:: This routine calculates the distance between two :*/ /*:: points (given the latitude/longitude of those points). :*/ /*:: It is being used… Continue reading Distance between two Latitudes and Longitudes – Part 2
Category: Miscellaneous
Database of All Countries
Here is a MySQL dump of all the countries in one table. It is a pretty handy database with 2 char country codes, 3 char country codes and latitude and longitude (somewhat in the middle area) of each countries. Below are the columns of the table. And below is a sample of the data stored… Continue reading Database of All Countries
Nice Article on Full Page Background Image
Secure Upload Folders
There are two ways to prevent execution of any (malicious) scripts uploaded to by users. Method one – like described in this post. Method two – add the below code to .htaccess file of the directory that needs to be protected. RemoveHandler .cgi .php .php3 .php4 .php5 .phtml .pl .py .pyc .pyo .sh .html .shtml… Continue reading Secure Upload Folders
Throw scripts as text instead of executing it
To throw PHP or other scripts as text instead of executing it, add the below code to .htacess file. AddType text/plain .cgi .php .php3 .php4 .php5 .phtml .pl .py .pyc .pyo .sh .html .shtml .jsp This method can be used to execute .html files as .php (or for executing any other type of file as… Continue reading Throw scripts as text instead of executing it