PHPnews.io

Overview for 'codediesel'

Questions as an initiator of data projects

Written by code-diesel / Original link on Oct. 30, 2020

Unlike many other fields data-science projects should start with focused questions. A table of data is not of much use in itself unless we analyse and understand it with a specific goal in mind. Without a predefined goal we would not know where to start – what to look for in the data, how to analyz…


Yearly medicine dosage visualization

Written by code-diesel / Original link on Oct. 30, 2020

For the past several years I’ve regularly consumed Pantoprazole – a proton pump inhibitor (PPI) – to control my acid reflux. However, as it is well know, regular PPI use causes various health problems. I’ll not enumerate those here, but trust me when I say that they are numerous. Last year I decide…


Quickly extract urls from a xml sitemap file

Written by code-diesel / Original link on Oct. 21, 2020

The following short PHP code will enable you to extract urls from a standard WordPress xml sitemap or any other website sitemap adhering to the sitemap schema. # extract-urls.php # # Extract only URLS from a XML sitemap. # Sitemap schema : https://www.sitemaps.org/protocol.html if(count($argv) getN…


Visualizing missing data in databases

Written by code-diesel / Original link on Nov. 28, 2019

Missing data in databases can cause bugs in applications or incorrect calculations. Recently, while working on a RETS application, I needed to ensure that not many missing values were encountered in one of the MySQL tables. Although one could easily write a SQL query to find the percentage of missi…



Check PHP syntax from the command line

Written by code-diesel / Original link on Mar. 4, 2019

PHP command-line interface (CLI) includes a nifty option to quickly check for any syntax errors in a source code file. A simple check for a single file is given below. The option flag to check is -l (lowercase ‘L’). $ php -l example.php If the file contains no syntax errors, the CLI returns the fol…