PageRenderTime 464ms queryFilters 10ms Sphinxql 285ms GetByIds 149ms meta 0ms repositoryFilters 10ms languageFilters 0ms sourceFilters 1ms

36,578 results for 'php mt_rand repo:dlorenso/dazlo' (464 ms)

Source

Language

Repository

SugarControllerTest.php https://github.com/mikmagic/sugarcrm_dev.git | PHP | 358 lines
1<?php
2/*********************************************************************************
37 
38require_once 'include/MVC/Controller/SugarController.php';
39
39
40class SugarControllerTest extends Sugar_PHPUnit_Framework_TestCase
41{
110    {
111        $module_name = 'TestModule'.mt_rand();
112        sugar_mkdir("modules/$module_name/",null,true);
112        sugar_mkdir("modules/$module_name/",null,true);
113        sugar_touch("modules/$module_name/DetailView.php");
114        
127    {
128        $module_name = 'TestModule'.mt_rand();
129        sugar_mkdir("modules/$module_name/views",null,true);
Basic.php https://github.com/ozten/mobhat.git | PHP | 81 lines
1<?php defined('SYSPATH') OR die('No direct access allowed.');
2/**
4 *
5 * $Id: Basic.php 3769 2008-12-15 00:48:56Z zombor $
6 *
38		{
39			$color1 = imagecolorallocate($this->image, mt_rand(200, 255), mt_rand(200, 255), mt_rand(150, 255));
40			$color2 = imagecolorallocate($this->image, mt_rand(200, 255), mt_rand(200, 255), mt_rand(150, 255));
44		// Add a few random lines
45		for ($i = 0, $count = mt_rand(5, Captcha::$config['complexity'] * 4); $i < $count; $i++)
46		{
46		{
47			$color = imagecolorallocatealpha($this->image, mt_rand(0, 255), mt_rand(0, 255), mt_rand(100, 255), mt_rand(50, 120));
48			imageline($this->image, mt_rand(0, Captcha::$config['width']), 0, mt_rand(0, Captcha::$config['width']), Captcha::$config['height'], $color);
61			// Allocate random color, size and rotation attributes to text
62			$color = imagecolorallocate($this->image, mt_rand(0, 150), mt_rand(0, 150), mt_rand(0, 150));
63			$angle = mt_rand(-40, 20);
MyID.php https://github.com/bryanveloso/sayonarane.git | PHP | 1,596 lines
1<?php
2// PLEASE DO NOT EDIT THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!
16/**
17 * Set a constant to indicate that phpMyID is running
18 */
18 */
19define('PHPMYID_STARTED', true);
20
910 * @return string
911 * @url http://php.net/manual/en/function.bcpowmod.php#72704 Borrowed from
912 */
1129 * @return string
1130 * @url http://php.net/manual/en/function.sha1.php#39492 Borrowed from
1131 */
1298	if (version_compare(phpversion(), '4.2.0', 'lt'))
1299		error_500('The required minimum version of PHP is 4.2.0, you are running ' . phpversion());
1300
uuid_helper.php https://github.com/kevinsmith/codeigniter-aws-fps.git | PHP | 160 lines
70		// 32 bits for "time_low"
71		mt_rand(0, 0xffff), mt_rand(0, 0xffff),
72
73		// 16 bits for "time_mid"
74		mt_rand(0, 0xffff),
75
85		// 48 bits for "node"
86		mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xffff)
87		);
95		// 32 bits for "time_low"
96		mt_rand(0, 0xffff), mt_rand(0, 0xffff),
97
110		// 48 bits for "node"
111		mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xffff)
112		));
captcha_helper.php https://gitlab.com/nadeermalangadan/CodeIgniter.git | PHP | 253 lines
4 *
5 * An open source application development framework for PHP
6 *
127			$word = '';
128			for ($i = 0, $mt_rand_max = strlen($pool) - 1; $i < $word_length; $i++)
129			{
129			{
130				$word .= $pool[mt_rand(0, $mt_rand_max)];
131			}
141		$length	= strlen($word);
142		$angle	= ($length >= 6) ? mt_rand(-($length-6), ($length-6)) : 0;
143		$x_axis	= mt_rand(6, (360/$length)-16);
143		$x_axis	= mt_rand(6, (360/$length)-16);
144		$y_axis = ($angle >= 0) ? mt_rand($img_height, $img_width) : mt_rand(6, $img_height);
145
FilesystemTest.php git://github.com/symfony/symfony.git | PHP | 1,734 lines
1<?php
2
43        $this->expectException('Symfony\Component\Filesystem\Exception\IOException');
44        // skip test on Windows; PHP can't easily set file as unreadable on Windows
45        if ('\\' === \DIRECTORY_SEPARATOR) {
119        $this->expectException('Symfony\Component\Filesystem\Exception\IOException');
120        // skip test on Windows; PHP can't easily set file as unwritable on Windows
121        if ('\\' === \DIRECTORY_SEPARATOR) {
379        $basePath = $this->workspace.'\\directory\\';
380        $maxPathLength = PHP_MAXPATHLEN - 2;
381
386        $path = $basePath.$file;
387        exec('TYPE NUL >>'.$file); // equivalent of touch, we can not use the php touch() here because it suffers from the same limitation
388        $this->longPathNamesWindows[] = $path; // save this so we can clean up later
625
626        $this->filesystem->chown($link, 'user'.time().mt_rand(1000, 9999));
627    }
FilesystemTest.php git://github.com/fabpot/symfony.git | PHP | 1,730 lines
1<?php
2
43        $this->expectException('Symfony\Component\Filesystem\Exception\IOException');
44        // skip test on Windows; PHP can't easily set file as unreadable on Windows
45        if ('\\' === \DIRECTORY_SEPARATOR) {
119        $this->expectException('Symfony\Component\Filesystem\Exception\IOException');
120        // skip test on Windows; PHP can't easily set file as unwritable on Windows
121        if ('\\' === \DIRECTORY_SEPARATOR) {
379        $basePath = $this->workspace.'\\directory\\';
380        $maxPathLength = PHP_MAXPATHLEN - 2;
381
386        $path = $basePath.$file;
387        exec('TYPE NUL >>'.$file); // equivalent of touch, we can not use the php touch() here because it suffers from the same limitation
388        $this->longPathNamesWindows[] = $path; // save this so we can clean up later
625
626        $this->filesystem->chown($link, 'user'.time().mt_rand(1000, 9999));
627    }
class.uuid.php https://bitbucket.org/drn05r/myexperiment-rdf | PHP | 539 lines
1<?php
2/**
2/**
3 * @file inc/functions/class.uuid.php
4 * @brief Class for generating UUIDs for Pack Relationship URNs.
228
229        $uuid['time_hi'] = (4 << 12) | (mt_rand(0, 0x1000));
230        $uuid['clock_seq_hi'] = (1 << 7) | mt_rand(0, 128);
230        $uuid['clock_seq_hi'] = (1 << 7) | mt_rand(0, 128);
231        $uuid['time_low'] = mt_rand(0, 0xffff) + (mt_rand(0, 0xffff) << 16);
232        $uuid['time_mid'] = mt_rand(0, 0xffff);
232        $uuid['time_mid'] = mt_rand(0, 0xffff);
233        $uuid['clock_seq_low'] = mt_rand(0, 255);
234        for ($i = 0; $i < 6; $i++)
234        for ($i = 0; $i < 6; $i++)
235            $uuid['node'][$i] = mt_rand(0, 255);
236        return ($uuid);
kcaptcha.php https://bitbucket.org/ivangalin/instantcms_mirror | PHP | 238 lines
1<?php
2
23
24		require(dirname(__FILE__).'/kcaptcha_config.php');
25		$fonts=array();
42				for($i=0;$i<$length;$i++){
43					$this->keystring.=$allowed_symbols{mt_rand(0,mb_strlen($allowed_symbols)-1)};
44				}
47		
48			$font_file=$fonts[mt_rand(0, count($fonts)-1)];
49			$font=imagecreatefrompng($font_file);
136		for($i=0;$i<(($height-30)*$x)*$white_noise_density;$i++){
137			imagesetpixel($img, mt_rand(0, $x-1), mt_rand(10, $height-15), $white);
138		}
139		for($i=0;$i<(($height-30)*$x)*$black_noise_density;$i++){
140			imagesetpixel($img, mt_rand(0, $x-1), mt_rand(10, $height-15), $black);
141		}
GenerateReportData.php https://github.com/anttiviljami/civicrm-core.git | PHP | 1,734 lines
1<?php
2/*
91
92require_once '../civicrm.config.php';
93
93
94require_once 'CRM/Core/Config.php';
95require_once 'CRM/Core/Error.php';
95require_once 'CRM/Core/Error.php';
96require_once 'CRM/Core/I18n.php';
97
97
98require_once 'CRM/Core/DAO/Address.php';
99require_once 'CRM/Core/DAO.php';
99require_once 'CRM/Core/DAO.php';
100require_once 'CRM/Core/DAO/Phone.php';
101require_once 'CRM/Core/DAO/Email.php';
titanic.php git://github.com/imatix/zguide.git | PHP | 260 lines
1<?php
2/*
9include_once 'mdwrkapi.php';
10include_once 'mdcliapi.php';
11
15    $uuid = sprintf('%04x%04x%04x%03x4%04x%04x%04x%04x',
16        mt_rand(0, 65535), mt_rand(0, 65535), // 32 bits for "time_low"
17        mt_rand(0, 65535), // 16 bits for "time_mid"
17        mt_rand(0, 65535), // 16 bits for "time_mid"
18        mt_rand(0, 4095),  // 12 bits before the 0100 of (version) 4 for "time_hi_and_version"
19        bindec(substr_replace(sprintf('%016b', mt_rand(0, 65535)), '01', 6, 2)),
22            // 8 bits for "clk_seq_low"
23        mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(0, 65535) // 48 bits for "node"
24    );
241                if ($verbose) {
242                    printf ("I: processing request %s%s", substr($entry, 1), PHP_EOL);
243                }
SPAF_FormValidator.class.php http://phpwcms.googlecode.com/svn/trunk/ | PHP | 332 lines
1<?php
2/* ----------------------------------------------------------------------------
2/* ----------------------------------------------------------------------------
3  SPAF_FormValidator.class.php
4 ------------------------------------------------------------------------------
46                              // Please note that this directory must be 
47                              // writable to PHP scripts.
48  
94      // launch garbage collector
95      if (mt_rand(1, 100) < $this->gc_prob) {
96        $this->launchGC();
171    for ($i = 0; $i < $chars; $i++) {
172      $str .= $this->chars[mt_rand(0, $cnt-1)];
173    }
179    // select random background
180    $background = $this->backgrounds[mt_rand(0, sizeof($this->backgrounds)-1)];
181    
captcha_non_gd.php http://seo-phpbb.googlecode.com/svn/trunk/ | PHP | 392 lines
1<?php
2/**
4* @package VC
5* @version $Id: captcha_non_gd.php 8479 2008-03-29 00:22:48Z naderman $
6* @copyright (c) 2006 phpBB Group
6* @copyright (c) 2006 phpBB Group
7* @license http://opensource.org/licenses/gpl-license.php GNU Public License
8*
13*/
14if (!defined('IN_PHPBB'))
15{
55
56			$width = mt_rand(0, 4);
57			$raw_width = $this->filtered_pngs[$char]['width'];
67
68		$offset_x = mt_rand(0, $this->width - $img_width);
69		$offset_y = mt_rand(0, $this->height - $img_height);
captcha.php http://snowcms.googlecode.com/svn/trunk/ | PHP | 180 lines
80	{
81		$colors[] = imagecolorallocate($image, mt_rand(0, 255), mt_rand(0, 255), mt_rand(0, 255));
82	}
87	{
88		imageellipse($image, mt_rand(0, $settings->get('captcha_width', 'int')), mt_rand(0, $settings->get('captcha_height', 'int')), mt_rand(1, 50), mt_rand(1, 25), $colors[array_rand($colors)]);
89	}
124		{
125			$size = ceil($settings->get('captcha_height', 'int') / 2) + mt_rand(-2, 2);
126			$angle = mt_rand(-30, 30);
154	{
155		imageline($image, (20 * $i) + mt_rand(-5, 5), 0, (20 * $i) + mt_rand(-5, 5), $settings->get('captcha_height', 'int'), $colors[array_rand($colors)]);
156	}
160	{
161		imageline($image, 0, (10 * $i) + mt_rand(-5, 5), $settings->get('captcha_width', 'int'), (10 * $i) + mt_rand(-5, 5), $colors[array_rand($colors)]);
162	}
Basic.php git://github.com/ushahidi/Ushahidi_Web.git | PHP | 81 lines
1<?php defined('SYSPATH') OR die('No direct access allowed.');
2/**
4 *
5 * $Id: Basic.php 3917 2009-01-21 03:06:22Z zombor $
6 *
38		{
39			$color1 = imagecolorallocate($this->image, mt_rand(200, 255), mt_rand(200, 255), mt_rand(150, 255));
40			$color2 = imagecolorallocate($this->image, mt_rand(200, 255), mt_rand(200, 255), mt_rand(150, 255));
44		// Add a few random lines
45		for ($i = 0, $count = mt_rand(5, Captcha::$config['complexity'] * 4); $i < $count; $i++)
46		{
46		{
47			$color = imagecolorallocatealpha($this->image, mt_rand(0, 255), mt_rand(0, 255), mt_rand(100, 255), mt_rand(50, 120));
48			imageline($this->image, mt_rand(0, Captcha::$config['width']), 0, mt_rand(0, Captcha::$config['width']), Captcha::$config['height'], $color);
61			// Allocate random color, size and rotation attributes to text
62			$color = imagecolorallocate($this->image, mt_rand(0, 150), mt_rand(0, 150), mt_rand(0, 150));
63			$angle = mt_rand(-40, 20);
class.global.php http://candydolldb.googlecode.com/svn/trunk/ | PHP | 539 lines
1<?php
2
74					
75					header('location:login.php#2');
76					exit;
80			{
81				header('location:login.php#1');
82				exit;
112				/* If not on the commandline, the Session expired */
113				header('location:login.php?url='.urlencode($_SERVER['REQUEST_URI']));
114				exit;
364		return sprintf('%04x%04x-%04x-%04x-%04x-%04x%04x%04x',
365			mt_rand(0, 65535),
366			mt_rand(0, 65535),
366			mt_rand(0, 65535),
367			mt_rand(0, 65535),
368			mt_rand(16384, 20479),
usercp_confirm.php http://xoxoshop2010.googlecode.com/svn/trunk/ | PHP | 460 lines
1<?php
2/***************************************************************************
2/***************************************************************************
3 *                            usercp_confirm.php
4 *                            -------------------
5 *   begin                : Saturday, Jan 15, 2003
6 *   copyright            : (C) 2001 The phpBB Group
7 *   email                : support@phpbb.com
8 *
9 *   $Id: usercp_confirm.php,v 1.1.2.4 2006/05/30 19:29:43 grahamje Exp $
10 *
21
22if ( !defined('IN_PHPBB') )
23{
86
87	$width = mt_rand(0, 4);
88	$char_widths[] = $width;
data_file.php git://github.com/apache/avro.git | PHP | 551 lines
1<?php
2/**
377  {
378    // From https://php.net/manual/en/function.mt-rand.php comments
379    return pack('S8',
379    return pack('S8',
380                mt_rand(0, 0xffff), mt_rand(0, 0xffff),
381                mt_rand(0, 0xffff),
381                mt_rand(0, 0xffff),
382                mt_rand(0, 0xffff) | 0x4000,
383                mt_rand(0, 0xffff) | 0x8000,
383                mt_rand(0, 0xffff) | 0x8000,
384                mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xffff));
385  }
lmbTestShellUITest.class.php https://bitbucket.org/idler/mmp/ | PHP | 211 lines
1<?php
2/*
9require_once(dirname(__FILE__) . '/../common.inc.php');
10require_once(dirname(__FILE__) . '/../../src/lmbTestShellUI.class.php');
11
28  {
29    $foo = $this->_createTestCase(LIMB_VAR_DIR . '/cases/foo_test.php');
30    $bar = $this->_createTestCase(LIMB_VAR_DIR . '/cases/a/bar_test.php');
30    $bar = $this->_createTestCase(LIMB_VAR_DIR . '/cases/a/bar_test.php');
31    $zoo = $this->_createTestCase(LIMB_VAR_DIR . '/cases/a/z/zoo_test.php');
32
46  {
47    $foo = $this->_createTestCase(LIMB_VAR_DIR . '/cases/foo_test.php');
48    $bar = $this->_createTestCase(LIMB_VAR_DIR . '/cases/a/bar_test.php');
153  {
154    $c1 = "FOO_" . mt_rand() . "_H" . mt_rand();
155    $c2 = "FOO_" . mt_rand() . "_K" . mt_rand();
strings.php https://squirrelmail.svn.sourceforge.net/svnroot/squirrelmail | PHP | 1,459 lines
193      // cases.  Thanks, PHP.
194      // see: http://bugs.php.net/bug.php?id=52731
195      // also: tracker $3053349
346    if(strpos(php_self(), '?')) {
347        $path = substr(php_self(), 0, strpos(php_self(), '?'));
348    } else {
976  * for $start and $length as needed - see the PHP manual for more
977  * information:  http://www.php.net/manual/function.substr.php
978  *
1070  * for $start and $length as needed - see the PHP manual for more
1071  * information:  http://www.php.net/manual/function.substr-replace.php
1072  *
1457
1458$PHP_SELF = php_self();
1459
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21