Home|How To

Articles containing useful examples

Website Lazy Loading

Lazy loading, the practice of loading resources when needed and not before that, is often implemented on websites as faster loading times can be crucial for user experience or Google's rating systems. Since July 2018 Google has increased the importance of page speed in its website grading systems, so faster loading websites have way better

2019-09-15T22:16:58+03:00By |Categories: How To|1 Comment

Nginx – Simple Socket Redirect

Sometimes we have to redirect listening from one port to another. For example, if we have a listener on localhost we want to redirect traffic from listening on other IP to localhost. In this example, we will listen on port 60000 and redirect all traffic to localhost listener with port 8000. server{ listen 60000; listen

2019-05-28T21:53:29+03:00By |Categories: How To|0 Comments

Install htpasswd On CentOS

Htpasswd is a tool used to manipulate flat files containing usernames and passwords for basic authentication of HTTP. In Cent OS htpasswd is part of httpd-tools pack. In order to install it, you must enter (root access required): yum install httpd-tools After entering the command you will see a result similar to the one shown

2019-04-11T07:40:29+03:00By |Categories: How To|0 Comments

Generate a Random Integer in Python

In this example we can see how to generate a random number in Python. import random x = random.randint(0,200) print x In the first row we import Python random module. It's contains different useful functions to generate random numbers. In the second row we use function randint from the imported module to generate integer between

2019-04-07T14:09:05+03:00By |Categories: How To|Tags: |0 Comments

Install pip on Windows

What is pip? The pip command is a tool for installing and managing Python packages, such as those found in the Python Package Index. It makes the community's wealth of libraries accessible to everyone. New users are no longer excluded from using community libraries by the prohibitive difficulty of setup. It's a replacement for easy_install. When

2019-04-07T15:48:11+03:00By |Categories: How To|Tags: |0 Comments

Flush DNS cache in Google Chrome

Chrome is a browser that uses its own DNS cache. To flush(clear) the existing cache, we need to complete the following steps: Navigate to chrome: // net-internals / # dns page Click "Clear host cache" button In some cases, clearing the DNS cache is not sufficient and you need to clear socket pool: Navigate to chrome: // net-internals /

2018-12-03T22:41:10+02:00By |Categories: How To|0 Comments

Mean Value with R

In this example I'll show you how to find the average value of a vector using R language. First we declare a vector with the numbers we want to find the average of and write in the variable a. The declaration of the vector is obtained by the command "c" (derived from "combine"). The assignment to

2018-12-03T22:43:24+02:00By |Categories: How To|0 Comments
Go to Top