Generates random number that could be a BSN.
Based on: http://www.testnummers.nl/bsn.js
@return random BSN.
761134
public String generateBsn() {
        String Result1 = "";
        int Nr9 = randomUtil.random(3);
        int Nr8 = randomUtil.random(10);
        int Nr7 = randomUtil.random(10);
        int Nr6 = randomUtil.random(10);
        int Nr5 = randomUtil.random(10);
        int Nr4 = randomUtil.random(10);
        int Nr3 = randomUtil.random(10);
        int Nr2 = randomUtil.random(10);
        int Nr1 = 0;
        int SofiNr = 0;
        if ((Nr9 == 0) && (Nr8 == 0) && (Nr7 == 0)) {
            Nr8 = 1;
        }
        SofiNr = 9 * Nr9 + 8 * Nr8 + 7 * Nr7 + 6 * Nr6 + 5 * Nr5 + 4 * Nr4 + 3 * Nr3 + 2 * Nr2;
        Nr1 = floor(SofiNr - (floor(SofiNr / 11)) * 11);
        if (Nr1 > 9) {
            if (Nr2 > 0) {
                Nr2 -= 1;
                Nr1 = 8;
            } else {
                Nr2 += 1;
                Nr1 = 1;
            }
        }
        Result1 += Nr9;
        Result1 += Nr8;
        Result1 += Nr7;
        Result1 += Nr6;
        Result1 += Nr5;
        Result1 += Nr4;
        Result1 += Nr3;
        Result1 += Nr2;
        Result1 += Nr1;
        return Result1;
    }
283718
public static Random getRandom()
  {
    if (_isTest) {
      return _testRandom;
    }

    Random random = _freeRandomList.allocate();

    if (random == null) {
      random = new SecureRandom();
    }

    return random;
  }
4370
function randomString() {
    var length = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 8;
    var charset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'abcdefghijklmnopqrstuvwxyz';

    var text = '';
    for (var i = 0; i < length; i++) {
        text += charset.charAt(Math.floor(Math.random() * charset.length));
    }return text;
}
82572
function random(int $num = 1) {
        $rand = \array_rand($this->data, $num);
        if(!\is_array($rand)) {
            $rand = array($rand);
        }
        
        $col = new self();
        foreach($rand as $key) {
            $col->set($key, $this->data[$key]);
        }
        
        return $col;
    }
587234
function getUniqueRandomNumberAsync(callback) {
    if (cb.check(callback)) { return; }
    setTimeout(() => {
        debugger
        cb.done(Math.random());
    }, 1000);
}
1077425
public function rand(){
		if($this->validateConditions())
			return $this;

		$this->resetState();
		$this->connection->getDriver()->randomizeOrder($this);
		return $this;
	}
801137
public function random()
    {
        $count = $this->count();
        switch ($count) {
            case 0:
                return null;
            case 1:
                return $this->one();
            default:
                $cursor = $this->skip(mt_rand(0, $count - 1))->limit(1);
                $cursor->rewind();
                return $cursor->current();
        }
    }
873427
protected function createSequenceNumber() : int
    {
        $session = $this->request->session();

        $value = random_int(100, 10000);
        $add = random_int(10, 1000);

        $session->put(self::SESSION_KEY, [
            'value'     => $value,
            'add'       => $add,
            'total'     => $value,
            // TODO Url referer?
        ]);

        return $value;
    }
999679
public function randomSubsetWithReplacement(int $n) : self
    {
        if ($n < 1) {
            throw new InvalidArgumentException('Cannot generate a'
                . " subset of less than 1 sample, $n given.");
        }

        $max = $this->numRows() - 1;

        $samples = $labels = [];

        for ($i = 0; $i < $n; $i++) {
            $index = rand(0, $max);

            $samples[] = $this->samples[$index];
            $labels[] = $this->labels[$index];
        }

        return self::quick($samples, $labels);
    }
469605
public function getRandomPassword()
	{
		//Random rand = new Random();
		//int type, number;
		$password = "";
		for($i=0; $i<7; $i++)
		{
			$type = rand(0,21) % 3;
			$number = rand(0,25);
			if ($type == 1)
			{
				$password = $password . chr(48 + ($number%10));
			}
			else
			{
				if ($type == 2)
				{
					$password = $password  . chr(65 + $number);

				}
				else
				{
					$password  = $password . chr(97 + $number);

				}
			}
		}
		return $password;
	}
1226829
static function randomString( $nLength = 6, $bNumeric = false )
	{
		$sRet = '';
		$sChars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';

		if ( $bNumeric )
		{
			$sChars = '0123456789';
		}

		$nCharLen = strlen( $sChars );
		for ( $i = 0; $i < $nLength; $i ++ )
		{
			$sRet .= $sChars[ rand( 0, $nCharLen - 1 ) ];
		}

		return $sRet;
	}
276402
function () {
            var rand = '' + Math.random() * 1000 * new Date().getTime();
            return rand.replace('.', '').split('').sort(function () {
                return 0.5 - Math.random();
            }).join('');
        }
1249010
public static Number random(Number min, Number max) {
		double minVal = min.doubleValue() - 1;
		double maxVal = max.doubleValue() + 1;
		double ret = Math.random() * (maxVal - minVal) + minVal;
		ret = Math.min(ret, max.doubleValue());
		ret = Math.max(ret, min.doubleValue());
		return ret;
	}
485897
function randnBM() {
  const u = 1 - Math.random() // Subtraction to flip [0, 1) to (0, 1].
  const v = 1 - Math.random()
  return Math.sqrt(-2.0 * Math.log(u)) * Math.cos(2.0 * Math.PI * v)
}
14248
function () {
      var ran = Math.floor(Math.random() * 3);
      if (ran == 0) {
        return publicRuleMethods.str.apply(this, arguments);
      }
      if (ran == 1) {
        return publicRuleMethods.num.apply(this, arguments);
      }
      if (ran == 2) {
        return publicRuleMethods.bool.apply(this, arguments);
      }
    }
1236140
public static String createRandomNum(int length) {
        if (length < 0) {
            throw new IllegalArgumentException("长度不能小于0");
        }
        char[] chars = new char[length];
        for (int i = 0; i < length; i++) {
            chars[i] = (char) ((Math.random() * 10) + 48);
        }
        return new String(chars);
    }
1288909
protected function generateNumeric()
    {
        if (is_null($this->size) && $this->pattern == static::DEFAULT_PATTERN) {
            return $this->generateInteger();
        }

        return $this->generateString($this->getNumericGenerator());
    }