In Python, the time.monotonic() function returns the value of a monotonic clock. It is used to measure elapsed time in a way that is not affected by system clock adjustments or changes due to time synchronization. The monotonic clock is not affected by system time adjustments, such as changes made by the user or by […]
Read MoreIn a Docker Compose file (docker-compose.yml), the ports section is used to expose network ports for services defined in the file. It allows containers to listen on specified ports and make them accessible from outside the Docker environment. In the given example, the ports section is using the following format: This line maps the host […]
Read MoreTo use Prometheus to monitor a web application and prevent exposing the /metrics endpoint to the public internet, you can follow these steps: By following these steps, you can ensure that the Prometheus metrics endpoint (/metrics) is not accessible to the public internet. The metrics can only be scraped by the Prometheus instance located within […]
Read MoreForbes Real Time Billionaires List Intro List of billionaires sorted by the Realtime estimation of net worths by Forbes Screenshot How to Get Forbes Real Time Billionaires List? The Real-Time Billionaires List Permalink of This post
Read MoreAdd content for the websites The content of the apache2 websites on Ubuntu is in We can put the website content (php, html files) in the subdirectories of the above path, such as Set up Apache2 This article uses Ubuntu as an example. The files we need to edit are in First, add a new […]
Read MoreHere is the question. I came up with the answer without looking the answer, bottom up dynamic programming (dp) is not a very easy to design at the beginning. Starting from top down + cache, I wrote it a few times, and simplified it a little bit each time, and finally passed the OJ. Python […]
Read MoreWhat is a XML sitemap? In short, a XML sitemap is a list of web pages contained in a website. Its purpose is to allow search engines, mainly Google’s web crawlers, to discover the site and add the web pages within that site to its search index. A newly created website is a completely isolated […]
Read MoreProblem Statement Definition of a complete binary tree from Wikipedia:In a complete binary tree every level, except possibly the last, is completely filled, and all nodes in the last level are as far left as possible. It can have between 1 and 2h nodes inclusive at the last level h. Example: The easiest way is to traverse […]
Read More