To generate a random integer, we can use python random.randint() and numpy.random.randint(), however, they are different. In this tutorial, we will discuss the difference between them.
In this tutorial, we will use three methods to select a random element from a python list, the second method is the best, you can use it in your python applications.
Python random.randint() function can generate an integer random number. In this tutorial, we will tell you somethings you must notice when using this function.
When you are using base64 to encode a string, there are +, / and = characters in encoding result. In this tutorial, we will introduce how to replace +, / and = characters by encoding string with php base64.
In python, we can use base64 to encode a string and transfer it. However, the basic base64 function is not safe. In this tutorial, we write two functions to imporve base64 encode and decode functions in order to encode and decode string safely.
In this tutorial, we will introduce how to fix AttributeError: ‘bytes’ object has no attribute ‘b64encode’, you may also can find this error when you are learning how to use base64 encoding in python.
Sometimes, we need insert a wordpress category by php code. In this tutorial, we will introduce you how to insert a wordpress category, there are some questions you shoud notice.
When operating files in python, there some basic operations we shoud notice, for example, how to get directory, file name and file extension. In this tutorial, we will introduce how to get these file information.
Cache-Control is a http request header, it tells the browser to cache html resources or not and how long they are cached. you can improve site performance by using Cache-Control.