Generates a random text that consists of random number of random words separated by spaces.

@param min   (optional) a minimum number of words.
@param max   a maximum number of words.
@return     a random text.
349530
public static String words(int min, int max) {
        StringBuilder result = new StringBuilder();
        
        int count = RandomInteger.nextInteger(min, max);        
        for(int i = 0; i <count; i++)
            result.append(RandomString.pick(_allWords));

        return result.toString();
    }
588145
public static double random(double min, double max) {
        assert max > min;
        return min + Math.random() * (max - min);
    }
23981
public static function RAND($min = 0, $max = 0)
    {
        $min = PHPExcel_Calculation_Functions::flattenSingleValue($min);
        $max = PHPExcel_Calculation_Functions::flattenSingleValue($max);

        if ($min == 0 && $max == 0) {
            return (mt_rand(0, 10000000)) / 10000000;
        } else {
            return mt_rand($min, $max);
        }
    }
1196299
public static function getRandomInt($min = 0, $max = null)
    {
        $rand = null;

        if (function_exists('random_int')) {
            try {
                if (!isset($max)) {
                    $max = PHP_INT_MAX;
                }
                $rand = random_int($min, $max);
            } catch (Exception $e) {
                // If none of the crypto sources are available, an Exception will be thrown.
                $rand = null;
            }
        }

        if (!isset($rand)) {
            if (function_exists('mt_rand')) {
                if (!isset($max)) {
                    $max = mt_getrandmax();
                }
                $rand = mt_rand($min, $max);
            } else {
                if (!isset($max)) {
                    $max = getrandmax();
                }

                $rand = rand($min, $max);
            }
        }

        return $rand;
    }
929153
public final Parser<Void> skipTimes(int min, int max) {
    Checks.checkMinMax(min, max);
    return new SkipTimesParser(this, min, max);
  }
201107
protected double nextDouble(final double min, final double max) {
        double value = min + (random.nextDouble() * (max - min));
        if (value < min) {
            return min;
        } else if (value > max) {
            return max;
        } else {
            return value;
        }
        // NB: ThreadLocalRandom.current().nextDouble(min, max)) cannot be use because the seed is not configurable
        // and is created per thread (see Javadoc)
    }
187221
public Retryer<R> randomWait(final long minimum, final long maximum) {
        checkArgument(minimum >= 0, "minimum must be >= 0 but is %d", minimum);
        checkArgument(maximum > minimum, "maximum must be > minimum but maximum is %d and minimum is", maximum, minimum);
        
        final Random random = new Random();
        return withWaitStrategy(new WaitStrategy() {
            @Override public long computeSleepTime(int previousAttemptNumber, long delaySinceFirstAttemptInMillis) {
                long t = Math.abs(random.nextLong()) % (maximum - minimum);
                return t + minimum;
            }
        });
    }
928155
public static int nextInt(Random random, int min, int max) {
		Validate.isTrue(max >= min, "Start value must be smaller or equal to end value.");
		MoreValidate.nonNegative("min", min);

		if (min == max) {
			return min;
		}

		return min + random.nextInt(max - min);
	}
32030
public static ByteRangeRandomizer aNewByteRangeRandomizer(final Byte min, final Byte max, final long seed) {
        return new ByteRangeRandomizer(min, max, seed);
    }
956748
def words(min_size, max_size = None):
        
        max_size = max_size if max_size != None else min_size
        result = ""
        
        count = RandomInteger.next_integer(min_size, max_size)
        for i in range(count):
            result += random.choice(_all_words)

        return result
727716
function random(min, max, float) {
  if (min === undefined) {
    return Math.random();
  }

  if (max === undefined) {
    max = min;
    min = 0;
  }

  if (max < min) {
    var tmp = max;
    max = min;
    min = tmp;
  }

  if (float) {
    var result = Math.random() * (max - min) + min;
    if (float === true) {
      return result;
    } else if (typeof float === 'number') {
      var str = result.toString();
      var index = str.indexOf('.');
      str = str.substr(0, index + 1 + float);
      if (str[str.length - 1] === '0') {
        str = str.substr(0, str.length - 1) + random(1, 9);
      }
      return parseFloat(str);
    }
  }

  return Math.floor(Math.random() * (max - min + 1) + min);
}
643213
function getRandomNumber(min, max) {
  return Math.round(Math.random() * (max - min) + min);
}
174989
@Pure
	@Inline(value = "StochasticGenerator.generateRandomValue(new UniformStochasticLaw(($1), ($2)))",
			imported = {StochasticGenerator.class, UniformStochasticLaw.class})
	public static double random(double minX, double maxX) throws MathException {
		return StochasticGenerator.generateRandomValue(new UniformStochasticLaw(minX, maxX));
	}
975185
public static StringRandomizer aNewStringRandomizer(final Charset charset, final int minLength, final int maxLength, final long seed) {
        if (minLength > maxLength) {
            throw new IllegalArgumentException("minLength should be less than or equal to maxLength");
        }
        return new StringRandomizer(charset, minLength, maxLength, seed);
    }
1041827
public String randomLowerMaxLength(int minLength, int maxLength) {
        int range = maxLength - minLength;
        int randomLength = 0;
        if (range > 0) {
            randomLength = random(range);
        }
        return randomLower(minLength + randomLength);
    }
1204232
public function generate($min = 0,$max = null)
    {
        if($max === null) {
            $max = $this->max;
        }
        
        if($min === null) {
            $min = $this->min;
        }
        
        
        return rand($min,$max);
    }
1173727
public static function generateRandomInt($min, $max)
    {
        $range = $max - $min;
        $bits = $bytes = $mask = $val = 0;
        while ($range > 0) {
            if ($bits % 8 === 0) {
               ++$bytes;
            }
            ++$bits;
            $range >>= 1;
            $mask = $mask << 1 | 1;
        }
        $valueShift = $min;

        do {
            if ($attempts > 128) {
                throw new \Exception('Could not generate valid random integer');
            }
            $randomByteString = self::generateCryptoKey($bytes);

            $val = 0;
            for ($i = 0; $i < $bytes; ++$i) {
                $val |= ord($randomByteString[$i]) << ($i * 8);
            }

            $val &= $mask;
            $val += $valueShift;

            ++$attempts;

        } while (!is_int($val) || $val > $max || $val < $min);

        return (int) $val;
    }