C and C++ programming languages provide rand() and srand() functions in order to create random numbers. Random numbers can be used for security, lottery etc. In this tutorial we will learn how to use a random number generating functions rand() and srand() with their attributes and specialties. Random Numbers Random numbers are sequential numbers those are different than each other always. Random numbers are important for security which can be used to...
Tagged: random number
While developing applications or using services or mounting disks in Linux systems we may see the term UUID or 128 bit number which might seem interesting. UUID is 128 bir number which is used to identify things like name, record, disk whatever we want. Uniqueness What makes UUID so special or interesting is its uniqueness. Yes it is right event two different and discrete systems creates UUID it is assumed...
While working with Bash environment we generally need some variable data to set and get. Bash shell provides some default values about current user, hostname etc. as environment variable. In this tutorial we will look most popular of them. Get The User Running Script While running bash interactively or non-interactively getting current user name is done with $USER special variable.
$ echo $USER
Get Hostname Host name is the name of the...
Python is practical language which provides different functions in practical way. Random number are generally used in security related issues but there are other areas too. In this post we will look different random number generation examples about python. Generate Random Number Between 0 and 1 Python provides a library named random by default. This library is used to provide different type of random functions according to given parameters. We will...