Calculating distance using MySQL

Calculating distance using MySQL” is a very useful blog post for everyone who works with geographical location data and MySQL. It shows a simple example of how to calculate the distance between two coordinates on a sphere (Earth in particular) within the MySQL itself.

SELECT ST_Distance_Sphere(
    point(-87.6770458, 41.9631174),
    point(-73.9898293, 40.7628267)
);

The above will return 1148978.6738241839, which is the distance between the two points in meters.

This functionality is available since MySQL 5.7. Have a look at the documentation of the spacial convenience functions.

MariaDB has similar functionality, but with a slightly different function names. Use ST_DISTANCE() instead of ST_Distance_Sphere(). Have a look at this blog post for more details.

GDPR cookie scanner

I came across the GDPR Expert service via this HackerNews thread. It is a service that helps website owners with the GDPR compliance. Behind the scenes, there is this open source tool, which scans for cookies and provides the details about the vendor and purpose of each identified cookie. The database includes more than 10,000 known cookies.

Very handy.

Telegram’s description of DDoS attack is the best

The servers of Telegram, a popular instant messenger, were under a DDoS attack recently. While they were working on the problem, they’ve tweeted a couple of explanations of what’s going on. CNET brings those tweets to our attention, as they explain rather complex things in a very short and simple way.

Internet Trends 2019 (Bond Report)

Internet Trends 2019 report is the most comprehensive, detailed, and research document that I have ever seen on what’s going on with the Internet, web, mobile, social media, marketing, and security.

This year’s report spans 333 pages and is full charts, graphs, statistics, insights, and references. And if you are feeling nostalgic, there is an archive of the annual reports going all the way back to 1995.

It’s difficult to pick a single fact from such a huge document, but if I had to, I’d go with this:

51% of the global population, or 3.8 billion people, were Internet users last year.

Wow. That’s quite a crowd.

Via Slashdot.

Top 20 APIs You Should Know In AI and Machine Learning

If you are playing around with the artificial intelligence and machine learning, have a look at this list of “Top 20 APIs You Should Know In AI and Machine Learning“. These are nicely organized by subject as well:

Machine Learning and Prediction APIs

APIs for Face Detection and Face Recognition

Text Analysis and Natural Language Processing APIs