PageRenderTime 1224ms queryFilters 121ms Sphinxql 413ms GetByIds 545ms meta 0ms repositoryFilters 116ms languageFilters 1ms sourceFilters 93ms

14,059 results for 'php mt_rand repo:dlorenso/dazlo' (1224 ms)

Source

Language

Repository

export_utils.php https://github.com/BarnetikKoop/SuiteCRM.git | PHP | 910 lines
414        }
415        elseif(!empty($_SESSION['export_where'])) { //bug 26026, sometimes some module doesn't have a metadata/SearchFields.php, the searchfrom is generated in the ListView.php.
416        // Currently, massupdate will not generate the where sql. It will use the sql stored in the SESSION. But this will cause bug 24722, and it cannot be avoided now.
558                       $count = count($sugar_demodata['first_name_array']) - 1;
559                        $returnContent .= '"'.$sugar_demodata['last_name_array'][mt_rand(0,$count)].'_'.mt_rand(1,111).'",';
560                     }else{
611
612                     $returnContent .= '"'.$sugar_demodata['teams'][mt_rand(0,$teams_count)]['name'].','.$sugar_demodata['users'][mt_rand(0,$users_count)]['user_name'].'",';
613
655                case "phone":
656                    $value = '('.mt_rand(300,999).') '.mt_rand(300,999).'-'.mt_rand(1000,9999);
657                      $returnContent .= '"'.$value.'",';
668                                       $count = count($sugar_demodata['first_name_array']) - 1;
669                                        $returnContent .= '"'.$sugar_demodata['last_name_array'][mt_rand(0,$count)].'_'.mt_rand(1,111).'",';
670                                     }elseif($field['name'] == 'title'){
Image.php http://firephp.googlecode.com/svn/trunk/ | text | 0 lines
362        if (!function_exists("imagepng")) {
363            require_once 'Zend/Form/Exception.php';
364            throw new Zend_Form_Exception("Image CAPTCHA requires PNG support");
394        for ($i=0; $i<100; $i++) {
395           imagefilledellipse($img, mt_rand(0,$w), mt_rand(0,$h), 2, 2, $text_color);
396        }
397        for($i=0; $i<5; $i++) {
398           imageline($img, mt_rand(0,$w), mt_rand(0,$h), mt_rand(0,$w), mt_rand(0,$h), $text_color);
399        }
455        for ($i=0; $i<100; $i++) {
456            imagefilledellipse($img2, mt_rand(0,$w), mt_rand(0,$h), 2, 2, $text_color);
457        }
458        for ($i=0; $i<5; $i++) {
459           imageline($img2, mt_rand(0,$w), mt_rand(0,$h), mt_rand(0,$w), mt_rand(0,$h), $text_color);
460        }
MissionCaseExpedition.php http://2moons.googlecode.com/svn/trunk/ | PHP | 479 lines
1<?php
2
24 * @version 1.7.1 (2013-01-18)
25 * @info $Id: MissionCaseExpedition.php 2604 2013-01-18 11:35:42Z slaver7 $
26 * @link http://2moons.cc/
77
78		$GetEvent       = mt_rand(1, 9);
79
79
80        $Message        = $LNG['sys_expe_nothing_'.mt_rand(1,8)];
81
84			case 1:
85				$WitchFound	= mt_rand(1,3);
86				$FindSize   = mt_rand(0, 100);
89				if(10 < $FindSize) {
90					$Factor 	= (mt_rand(10, 50) / $WitchFound) * $GLOBALS['CONFIG'][$this->_fleet['fleet_universe']]['resource_multiplier'];
91					$Message	= $LNG['sys_expe_found_ress_1_'.mt_rand(1,4)];
DefaultRandomizer.php http://owasp-esapi-php.googlecode.com/svn/trunk/ | PHP | 187 lines
7 * Enterprise Security API (ESAPI) project. For details, please see
8 * <a href="http://www.owasp.org/index.php/ESAPI">http://www.owasp.org/index.php/ESAPI</a>.
9 *
105     *
106     * mt_rand() without arguments will return between 0 and mt_getrandmax(). That's about as good as PHP gets
107     *
152    {
153        $rf = (float) (mt_rand() / $this->maxRand);		// Maximizes the random bit counts from the PHP PRNG
154
174        return sprintf('%04x%04x-%04x-%04x-%04x-%04x%04x%04x',
175        mt_rand(0, 65535), mt_rand(0, 65535), // 32 bits for "time_low"
176        mt_rand(0, 65535), // 16 bits for "time_mid"
181				            // 8 bits for "clk_seq_low"
182					        mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(0, 65535) // 48 bits for "node"
183					   );  
Utils.php http://sharebooks.googlecode.com/svn/trunk/ | PHP | 1,007 lines
732			$vertices = array (
733				mt_rand(-0.25*$width,$width*1.25),mt_rand(-0.25*$width,$width*1.25),
734				mt_rand(-0.25*$width,$width*1.25),mt_rand(-0.25*$width,$width*1.25),
736			);
737			$color = imagecolorallocatealpha ($image, mt_rand(0,$o_contrast), mt_rand(0,$o_contrast), mt_rand(0,$o_contrast), $object_alpha);
738			imagefilledpolygon($image, $vertices, 3, $color);
745			$color = imagecolorallocatealpha ($image, mt_rand(0,$o_contrast), mt_rand(0,$o_contrast), mt_rand(0,$o_contrast), $object_alpha);
746		//	$color = imagecolorallocate($image, mt_rand(0,$o_contrast), mt_rand(0,$o_contrast), mt_rand(0,$o_contrast));
747			imagefilledellipse($image, $x1, $y1, mt_rand($min_radius,$max_radius), mt_rand($min_radius,$max_radius), $color);
755			$y2 = mt_rand(-$height*0.25,$height*1.25);
756			$color = imagecolorallocatealpha ($image, mt_rand(0,$o_contrast), mt_rand(0,$o_contrast), mt_rand(0,$o_contrast), $object_alpha);
757			imagesetthickness ($image, mt_rand($min_thickness,$max_thickness));
764			$y1 = mt_rand(0,$height);
765			$color = imagecolorallocatealpha ($image, mt_rand(0,$o_contrast), mt_rand(0,$o_contrast), mt_rand(0,$o_contrast),$object_alpha);
766			imagesetpixel($image, $x1, $y1, $color);
shopimporter.php http://marocmall.googlecode.com/svn/trunk/ | PHP | 1,267 lines
1<?php
2
299					'.$this->l('Before starting the import please backup your database. ').'
300						<a href="index.php?tab=AdminBackup&token='.Tools::getAdminToken('AdminBackup'.intval(Tab::getIdFromClassName('AdminBackup')).intval($cookie->id_employee)).'"">'.$this->l(' Click here to backup').'</a>
301				</div>
432			$moduleName = Tools::getValue('moduleName');
433			if (file_exists('../../modules/'.$moduleName.'/'.$moduleName.'.php'))
434			{
434			{
435				require_once('../../modules/'.$moduleName.'/'.$moduleName.'.php');
436				$importModule = new $moduleName();
705	{
706		require_once('../../images.inc.php');
707		$identifier = $this->supportedImports[strtolower($className)]['identifier'];
994					{
995						if ($lang_pack = Tools::jsonDecode(Tools::file_get_contents('http://www.prestashop.com/download/lang_packs/get_language_pack.php?version='._PS_VERSION_.'&iso_lang='.$iso)))
996						{
Image.php git://github.com/centurion-project/Centurion.git | PHP | 600 lines
453        if (!function_exists("imagepng")) {
454            //$1 'Zend/Captcha/Exception.php';
455            throw new Zend_Captcha_Exception("Image CAPTCHA requires PNG support");
495        for ($i=0; $i<$this->_dotNoiseLevel; $i++) {
496           imagefilledellipse($img, mt_rand(0,$w), mt_rand(0,$h), 2, 2, $text_color);
497        }
498        for($i=0; $i<$this->_lineNoiseLevel; $i++) {
499           imageline($img, mt_rand(0,$w), mt_rand(0,$h), mt_rand(0,$w), mt_rand(0,$h), $text_color);
500        }
556        for ($i=0; $i<$this->_dotNoiseLevel; $i++) {
557            imagefilledellipse($img2, mt_rand(0,$w), mt_rand(0,$h), 2, 2, $text_color);
558        }
559        for ($i=0; $i<$this->_lineNoiseLevel; $i++) {
560           imageline($img2, mt_rand(0,$w), mt_rand(0,$h), mt_rand(0,$w), mt_rand(0,$h), $text_color);
561        }
Image.php https://bitbucket.org/svenax/zendframework.git | PHP | 609 lines
453        if (!function_exists("imagepng")) {
454            require_once 'Zend/Captcha/Exception.php';
455            throw new Zend_Captcha_Exception("Image CAPTCHA requires PNG support");
495        for ($i=0; $i<$this->_dotNoiseLevel; $i++) {
496           imagefilledellipse($img, mt_rand(0,$w), mt_rand(0,$h), 2, 2, $text_color);
497        }
498        for($i=0; $i<$this->_lineNoiseLevel; $i++) {
499           imageline($img, mt_rand(0,$w), mt_rand(0,$h), mt_rand(0,$w), mt_rand(0,$h), $text_color);
500        }
556        for ($i=0; $i<$this->_dotNoiseLevel; $i++) {
557            imagefilledellipse($img2, mt_rand(0,$w), mt_rand(0,$h), 2, 2, $text_color);
558        }
559        for ($i=0; $i<$this->_lineNoiseLevel; $i++) {
560           imageline($img2, mt_rand(0,$w), mt_rand(0,$h), mt_rand(0,$w), mt_rand(0,$h), $text_color);
561        }
MissionCaseExpedition.php https://bitbucket.org/jybox/2mex.git | PHP | 363 lines
1<?php
2
25 * @version 1.6.1 (2011-11-19)
26 * @info $Id: MissionCaseExpedition.php 2072 2011-11-17 13:21:40Z slaver7 $
27 * @link http://code.google.com/p/2moons/
74					
75		$GetEvent			= mt_rand(1, 9);
76			
79			case 1:
80				$WitchFound	= mt_rand(1,3);
81				$FindSize = mt_rand(0, 100);
83					$WitchSize	= 1;
84					$Factor 	= (mt_rand(10, 50) / $WitchFound) * $GLOBALS['CONFIG'][$this->_fleet['fleet_universe']]['resource_multiplier'];
85					$Message	= $LNG['sys_expe_found_ress_1_'.mt_rand(1,4)];
87					$WitchSize	= 2;
88					$Factor 	= (mt_rand(52, 100) / $WitchFound) * $GLOBALS['CONFIG'][$this->_fleet['fleet_universe']]['resource_multiplier'];
89					$Message	= $LNG['sys_expe_found_ress_2_'.mt_rand(1,3)];
test_album.type.policy.php http://buddypress-media.googlecode.com/svn/bp_media/trunk/ | text | 0 lines
1<?php
2
43
44			$current_type = $valid_types[mt_rand(0,6)];
45		}
62
63				$val = mt_rand(0,1);
64				$val = (bool)$val;
69
70				$val = mt_rand(-100,100);
71				$val = (int)$val;
76
77				$val = (mt_rand(-100,100) / 17);
78				$val = (float)$val;
83
84				$width = mt_rand(0, 87);
85				$val = BPM_sUtil::random_string($width);
test_album.type.policy.php http://buddypress-media.googlecode.com/svn/bp_media/trunk/ | PHP | 997 lines
1<?php
2
47
48			$current_type = $valid_types[mt_rand(0,6)];
49		}
66
67				$val = mt_rand(0,1);
68				$val = (bool)$val;
73
74				$val = mt_rand(-100,100);
75				$val = (int)$val;
80
81				$val = (mt_rand(-100,100) / 17);
82				$val = (float)$val;
87
88				$width = mt_rand(0, 87);
89				$val = BPM_sUtil::random_string($width);
Image.class.php http://nblog-thinkphp.googlecode.com/svn/trunk/ | PHP | 794 lines
235				for($i=0;$i<10;$i++){
236					imagearc($im,mt_rand(-10,$width),mt_rand(-10,$height),mt_rand(30,300),mt_rand(20,200),55,44,$pointColor);
237				}
284			$fontcolor=imagecolorallocate($im,mt_rand(0,255),mt_rand(0,255),mt_rand(0,255));
285			imagearc($im,mt_rand(-10,$width),mt_rand(-10,$height),mt_rand(30,300),mt_rand(20,200),55,44,$fontcolor);
286		}*/
310			$fontcolor=imagecolorallocate($im,mt_rand(0,255),mt_rand(0,255),mt_rand(0,255));
311			imagearc($im,mt_rand(-10,$width),mt_rand(-10,$height),mt_rand(30,300),mt_rand(20,200),55,44,$fontcolor);
312		}
322			$codex= msubstr($code,$i,1);
323			imagettftext($im,mt_rand(16,20),mt_rand(-60,60),40*$i+20,mt_rand(30,35),$fontcolor,$fontface,$codex);
324		}
406			$fontcolor=imagecolorallocate($im,mt_rand(0,255),mt_rand(0,255),mt_rand(0,255));
407			imagearc($im,mt_rand(-10,$width),mt_rand(-10,$height),mt_rand(30,300),mt_rand(20,200),55,44,$fontcolor);
408		}
Image.class.php http://nblog-thinkphp.googlecode.com/svn/trunk/ | PHP | 540 lines
235				for($i=0;$i<10;$i++){
236					imagearc($im,mt_rand(-10,$width),mt_rand(-10,$height),mt_rand(30,300),mt_rand(20,200),55,44,$pointColor);
237				}
284			$fontcolor=imagecolorallocate($im,mt_rand(0,255),mt_rand(0,255),mt_rand(0,255));
285			imagearc($im,mt_rand(-10,$width),mt_rand(-10,$height),mt_rand(30,300),mt_rand(20,200),55,44,$fontcolor);
286		}
310			$fontcolor=imagecolorallocate($im,mt_rand(0,255),mt_rand(0,255),mt_rand(0,255));
311			imagearc($im,mt_rand(-10,$width),mt_rand(-10,$height),mt_rand(30,300),mt_rand(20,200),55,44,$fontcolor);
312		}
313		for($i=0;$i<255;$i++){
314			$fontcolor=imagecolorallocate($im,mt_rand(0,255),mt_rand(0,255),mt_rand(0,255));
315			imagesetpixel($im,mt_rand(0,$width),mt_rand(0,$height),$fontcolor);
406			$fontcolor=imagecolorallocate($im,mt_rand(0,255),mt_rand(0,255),mt_rand(0,255));
407			imagearc($im,mt_rand(-10,$width),mt_rand(-10,$height),mt_rand(30,300),mt_rand(20,200),55,44,$fontcolor);
408		}
Image.class.php http://thinkphp.googlecode.com/svn/trunk/ | PHP | 569 lines
299                for ($i = 0; $i < 10; $i++) {
300                    imagearc($im, mt_rand(-10, $width), mt_rand(-10, $height), mt_rand(30, 300), mt_rand(20, 200), 55, 44, $pointColor);
301                }
344        for ($i = 0; $i < 10; $i++) {
345            imagearc($im, mt_rand(-10, $width), mt_rand(-10, $height), mt_rand(30, 300), mt_rand(20, 200), 55, 44, $stringColor);
346        }
369            $fontcolor = imagecolorallocate($im, mt_rand(0, 255), mt_rand(0, 255), mt_rand(0, 255));
370            imagearc($im, mt_rand(-10, $width), mt_rand(-10, $height), mt_rand(30, 300), mt_rand(20, 200), 55, 44, $fontcolor);
371        }
379        for ($i = 0; $i < $length; $i++) {
380            $fontcolor = imagecolorallocate($im, mt_rand(0, 120), mt_rand(0, 120), mt_rand(0, 120)); //??????????????
381            $codex = String::msubstr($code, $i, 1);
463          $fontcolor=imagecolorallocate($im,mt_rand(0,255),mt_rand(0,255),mt_rand(0,255));
464          imagearc($im,mt_rand(-10,$width),mt_rand(-10,$height),mt_rand(30,300),mt_rand(20,200),55,44,$fontcolor);
465          }
cmd.php https://github.com/dlimuratdj/kyphp2.0.git | PHP | 590 lines
349spl_autoload_register("__autoload");
350require_once(KYPHP_PATH.'kyclass/kyphp_base/Action.php');
351require_once(KYPHP_PATH.'kyclass/kyphp_base/Cache.php');
364require_once(KYPHP_PATH.'kyclass/kyphp_base/runtime.php');
365require_once(KYPHP_PATH.'kyclass/kyphp_base/Session.php');
366require_once(KYPHP_PATH.'kyclass/kyphp_base/templete.php');
441    $j = !$i ? 4 : $j+15; //绘字符位置
442    $color3 = ImageColorAllocate($im, mt_rand(0,100), mt_rand(0,100), mt_rand(0,100)); //字符随即颜色
443    ImageChar($im, $fontsize, $j, 3, $code, $color3); //绘字符
452    $color1 = ImageColorAllocate($im, mt_rand(0,255), mt_rand(0,255), mt_rand(0,255)); //干扰线颜色
453    ImageArc($im, mt_rand(-5,$w), mt_rand(-5,$h), mt_rand(20,300), mt_rand(20,200), 55, 44, $color1); //干扰线
454}   
456{   
457    $color2 = ImageColorAllocate($im, mt_rand(0,255), mt_rand(0,255), mt_rand(0,255)); //干扰点颜色 
458    ImageSetPixel($im, mt_rand(0,$w), mt_rand(0,$h), $color2); //干扰点
PortalUtil.php http://pradoportal.googlecode.com/svn/trunk/ | PHP | 898 lines
144				$path_parts = pathinfo($file);
145				if($path_parts['extension'] == "php")
146				{
147
148					$clsName = basename($path_parts['basename'],".php");
149
366				{
367					$layouts[] = array("name" => "Admin." . basename($path_parts['basename'],".php"));
368				}
703		return sprintf(/*'%04x%04x-%04x-%03x4-%04x-%04x%04x%04x'*/ '%04x%04x-%04x-4%03x-%04x-%04x%04x%04x',
704				        mt_rand(0, 65535), mt_rand(0, 65535), // 32 bits for "time_low"
705				        mt_rand(0, 65535), // 16 bits for "time_mid"
710        	    		// 8 bits for "clk_seq_low"
711	    			    mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(0, 65535) // 48 bits for "node"
712    				);
captcha_gd.php http://seo-phpbb.googlecode.com/svn/trunk/ | PHP | 1,567 lines
1<?php
2/**
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{
51
52		$bg_colours = array_splice($scheme, mt_rand(6, 12));
53
87				$current_colour = $scheme[array_rand($scheme)];
88				imageline($img, mt_rand(0,4), mt_rand($y - 3, $y), mt_rand($this->width - 5, $this->width), mt_rand($y - 3, $y), $current_colour);
89			}
97				$current_colour = $scheme[array_rand($scheme)];
98				imagedashedline($img, mt_rand($x -3, $x + 3), mt_rand(0, 4), mt_rand($x -3, $x + 3), mt_rand($this->height - 5, $this->height), $current_colour);
99			}
utilities.class.php http://webpagetest.googlecode.com/svn/trunk/ | PHP | 395 lines
1<?php
2/*
26 * @copyright See the included NOTICE.md file for more information.
27 * @link http://aws.amazon.com/php/ PHP Developer Center
28 */
190	 * @author Ryan Parman <ryan@getcloudfusion.com>
191	 * @license http://www.php.net/license/3_01.txt PHP License
192	 * @param integer $size (Required) Filesize in bytes.
291	 * @deprecated Use <php:json_encode()> instead.
292	 * @param mixed $obj (Required) The PHP object to convert into a JSON string.
293	 * @return string A JSON string.
329	 *
330	 * @license http://us.php.net/manual/en/function.base64-decode.php#81425 PHP License
331	 * @param string $s (Required) The string to test.
376	 * @author Alix Axel <http://www.php.net/manual/en/function.com-create-guid.php#99425>
377	 * @license http://www.php.net/license/3_01.txt PHP License
378	 * @return string A random GUID.
utilities.class.php http://webpagetest.googlecode.com/svn/trunk/ | PHP | 395 lines
1<?php
2/*
26 * @copyright See the included NOTICE.md file for more information.
27 * @link http://aws.amazon.com/php/ PHP Developer Center
28 */
190	 * @author Ryan Parman <ryan@getcloudfusion.com>
191	 * @license http://www.php.net/license/3_01.txt PHP License
192	 * @param integer $size (Required) Filesize in bytes.
291	 * @deprecated Use <php:json_encode()> instead.
292	 * @param mixed $obj (Required) The PHP object to convert into a JSON string.
293	 * @return string A JSON string.
329	 *
330	 * @license http://us.php.net/manual/en/function.base64-decode.php#81425 PHP License
331	 * @param string $s (Required) The string to test.
376	 * @author Alix Axel <http://www.php.net/manual/en/function.com-create-guid.php#99425>
377	 * @license http://www.php.net/license/3_01.txt PHP License
378	 * @return string A random GUID.
test_config.system.php http://buddypress-media.googlecode.com/svn/bp_media/trunk/ | text | 0 lines
1<?php
2
45
46			$current_type = $valid_types[mt_rand(0,6)];
47		}
64
65				$val = mt_rand(0,1);
66				$val = (bool)$val;
71
72				$val = mt_rand(-100,100);
73				$val = (int)$val;
78
79				$val = (mt_rand(-100,100) / 17);
80				$val = (float)$val;
85
86				$width = mt_rand(0, 87);
87				$val = BPM_sUtil::random_string($width);
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21