PageRenderTime 526ms queryFilters 0ms Sphinxql 280ms GetByIds 221ms meta 0ms repositoryFilters 0ms languageFilters 1ms sourceFilters 1ms

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

Source

Language

Repository

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.
time.test.php http://skygames.googlecode.com/svn/trunk/ | PHP | 658 lines
9 *
10 * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite>
11 * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
17 * @copyright     Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
18 * @link          https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests
19 * @package       cake.tests
510		$this->assertTrue($result);
511		$result = $this->Time->isThisMonth(mktime(0, 0, 0, date('m'), mt_rand(1, 28), date('Y') - mt_rand(1, 12)));
512		$this->assertFalse($result);
512		$this->assertFalse($result);
513		$result = $this->Time->isThisMonth(mktime(0, 0, 0, date('m'), mt_rand(1, 28), date('Y') + mt_rand(1, 12)));
514		$this->assertFalse($result);
525		$this->assertTrue($result);
526		$result = $this->Time->isThisYear(mktime(0, 0, 0, mt_rand(1, 12), mt_rand(1, 28), date('Y')));
527		$this->assertTrue($result);
utilities.class.php git://github.com/amazonwebservices/aws-sdk-for-php.git | PHP | 399 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 */
195	 * @author Ryan Parman <ryan@getcloudfusion.com>
196	 * @license http://www.php.net/license/3_01.txt PHP License
197	 * @param integer $size (Required) Filesize in bytes.
296	 * @deprecated Use <php:json_encode()> instead.
297	 * @param mixed $obj (Required) The PHP object to convert into a JSON string.
298	 * @return string A JSON string.
334	 *
335	 * @license http://us.php.net/manual/en/function.base64-decode.php#81425 PHP License
336	 * @param string $s (Required) The string to test.
381	 * @author Alix Axel <http://www.php.net/manual/en/function.com-create-guid.php#99425>
382	 * @license http://www.php.net/license/3_01.txt PHP License
383	 * @return string A random GUID.
utilities.class.php http://mollify.googlecode.com/svn/trunk/ | PHP | 516 lines
27 * See Also:
28 * 	[PHP Developer Center](http://aws.amazon.com/php/)
29 */
254	 * License:
255	 * 	[PHP License](http://www.php.net/license/3_01.txt)
256	 *
441	 * License:
442	 * 	[PHP License](http://us.php.net/manual/en/function.base64-decode.php#81425)
443	 *
489	 * Author:
490	 * 	Alix Axel <http://www.php.net/manual/en/function.com-create-guid.php#99425>
491	 *
492	 * License:
493	 * 	[PHP License](http://www.php.net/license/3_01.txt)
494	 *
Framework.Functions.php http://lussumo-vanilla.googlecode.com/svn/trunk/ | PHP | 1,017 lines
46/**
47 * Appends code to a php file, typically used for configuration.
48 *
48 *
49 * The php ending tag "?>" should be either on its own line,
50 * or be ommited all together
91
92// Make sure objects can be cloned in PHP 4 and 5.
93// Example: $NewObject = clone ($ObjectName);
271			mt_rand(0, 65535),
272			mt_rand(0, 4095),
273			bindec(substr_replace(sprintf('%016b', mt_rand(0, 65535)), '01', 6, 2)),
732		if (!$Handle) {
733			$Context->WarningCollector->Add(str_replace('\\1', $Host, $Context->GetDefinition("ErrorFopen")).($php_errormsg ? str_replace('\\1', $php_errormsg, $Context->GetDefinition('ErrorFromPHP')) : ''));
734		} else {
captcha.php http://nuke-viet.googlecode.com/svn/trunk/ | PHP | 107 lines
1<?php
2
13{
14	require NV_ROOTDIR . '/includes/class/SimpleCaptcha.class.php';
15
17
18	if( file_exists( NV_ROOTDIR . '/includes/keywords/ccaptcha_' . NV_LANG_INTERFACE . '.php' ) )
19	{
19	{
20		$captcha->wordsFile = 'keywords/ccaptcha_' . NV_LANG_INTERFACE . '.php';
21		
24	{
25		$captcha->wordsFile = 'keywords/captcha_vi.php';
26	}
53	$maxran = 1000000;
54	$random_num = mt_rand( 1, $maxran );
55
index.php.bak http://jqbird.googlecode.com/svn/trunk/ | Unknown | 448 lines
1<?php
2@set_time_limit(0);
18require_once(DEDEROOT.'/install/install.inc.php');
19require_once(DEDEINC.'/zip.class.php');
20
25
26require_once(DEDEINC.'/common.func.php');
27
51{
52	 $phpv = phpversion();
53	 $sp_os = @getenv('OS');
99  {
100  	$scriptName = $_SERVER['PHP_SELF'];
101  }
113
114  $rnd_cookieEncode = chr(mt_rand(ord('A'),ord('Z'))).chr(mt_rand(ord('a'),ord('z'))).chr(mt_rand(ord('A'),ord('Z'))).chr(mt_rand(ord('A'),ord('Z'))).chr(mt_rand(ord('a'),ord('z'))).mt_rand(1000,9999).chr(mt_rand(ord('A'),ord('Z')));
115
Image.class.php http://thinkphp.googlecode.com/svn/trunk/ | PHP | 520 lines
284        $borderColor = imagecolorallocate($im, 100, 100, 100);                    //???
285        $pointColor = imagecolorallocate($im, mt_rand(0, 255), mt_rand(0, 255), mt_rand(0, 255));                 //???
286
297                for ($i = 0; $i < 10; $i++) {
298                    imagearc($im, mt_rand(-10, $width), mt_rand(-10, $height), mt_rand(30, 300), mt_rand(20, 200), 55, 44, $pointColor);
299                }
342        for ($i = 0; $i < 10; $i++) {
343            imagearc($im, mt_rand(-10, $width), mt_rand(-10, $height), mt_rand(30, 300), mt_rand(20, 200), 55, 44, $stringColor);
344        }
367            $fontcolor = imagecolorallocate($im, mt_rand(0, 255), mt_rand(0, 255), mt_rand(0, 255));
368            imagearc($im, mt_rand(-10, $width), mt_rand(-10, $height), mt_rand(30, 300), mt_rand(20, 200), 55, 44, $fontcolor);
369        }
370        for ($i = 0; $i < 255; $i++) {
371            $fontcolor = imagecolorallocate($im, mt_rand(0, 255), mt_rand(0, 255), mt_rand(0, 255));
372            imagesetpixel($im, mt_rand(0, $width), mt_rand(0, $height), $fontcolor);
Image_sae.class.php http://thinkphp.googlecode.com/svn/trunk/ | PHP | 496 lines
284        $borderColor = imagecolorallocate($im, 100, 100, 100);                    //???
285        $pointColor = imagecolorallocate($im, mt_rand(0, 255), mt_rand(0, 255), mt_rand(0, 255));                 //???
286
297                for ($i = 0; $i < 10; $i++) {
298                    imagearc($im, mt_rand(-10, $width), mt_rand(-10, $height), mt_rand(30, 300), mt_rand(20, 200), 55, 44, $pointColor);
299                }
342            $fontcolor = imagecolorallocate($im, mt_rand(0, 255), mt_rand(0, 255), mt_rand(0, 255));
343            imagearc($im, mt_rand(-10, $width), mt_rand(-10, $height), mt_rand(30, 300), mt_rand(20, 200), 55, 44, $fontcolor);
344        }
345        for ($i = 0; $i < 255; $i++) {
346            $fontcolor = imagecolorallocate($im, mt_rand(0, 255), mt_rand(0, 255), mt_rand(0, 255));
347            imagesetpixel($im, mt_rand(0, $width), mt_rand(0, $height), $fontcolor);
352        for ($i = 0; $i < $length; $i++) {
353            $fontcolor = imagecolorallocate($im, mt_rand(0, 120), mt_rand(0, 120), mt_rand(0, 120)); //??????????????
354            $codex = String::msubstr($code, $i, 1);
sparkplug.php https://code.google.com/p/sparkplug-framework/ | PHP | 3,789 lines
1<?php
2
253/**
254 * The SparkPHPException class is used to automatically convert PHP errors to exceptions.
255 * This is one of the few *final* core classes in Spark/Plug (not extensible by plugs).
263   /**
264    * Convert PHP error to equivalent exception.
265    *
672		{
673			$nonce .= sha1(uniqid(mt_rand(), true));
674		} while (strlen($nonce) < $length);
688			$format,
689			mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xffff),
690			mt_rand(0, 0x0fff) | 0x4000,
691			mt_rand(0, 0x3fff) | 0x8000,
692			mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xffff)
693		);
utilities.class.php git://github.com/punkave/aS3StreamWrapper.git | PHP | 399 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 */
195	 * @author Ryan Parman <ryan@getcloudfusion.com>
196	 * @license http://www.php.net/license/3_01.txt PHP License
197	 * @param integer $size (Required) Filesize in bytes.
296	 * @deprecated Use <php:json_encode()> instead.
297	 * @param mixed $obj (Required) The PHP object to convert into a JSON string.
298	 * @return string A JSON string.
334	 *
335	 * @license http://us.php.net/manual/en/function.base64-decode.php#81425 PHP License
336	 * @param string $s (Required) The string to test.
381	 * @author Alix Axel <http://www.php.net/manual/en/function.com-create-guid.php#99425>
382	 * @license http://www.php.net/license/3_01.txt PHP License
383	 * @return string A random GUID.
utilities.class.php git://github.com/liip/php-osx.git | PHP | 380 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 */
187	 * @author Ryan Parman <ryan@getcloudfusion.com>
188	 * @license http://www.php.net/license/3_01.txt PHP License
189	 * @param integer $size (Required) Filesize in bytes.
288	 * @deprecated Use <php:json_encode()> instead.
289	 * @param mixed $obj (Required) The PHP object to convert into a JSON string.
290	 * @return string A JSON string.
326	 *
327	 * @license http://us.php.net/manual/en/function.base64-decode.php#81425 PHP License
328	 * @param string $s (Required) The string to test.
362	 * @author Alix Axel <http://www.php.net/manual/en/function.com-create-guid.php#99425>
363	 * @license http://www.php.net/license/3_01.txt PHP License
364	 * @return string A random GUID.
usercp_confirm.php git://github.com/MightyGorgon/icy_phoenix.git | PHP | 779 lines
1<?php
2/**
94	//$absolute_root_path = IP_ROOT_PATH; //Why this doesn't work???
95	$absolute_root_path = str_replace('index.' . PHP_EXT, '', realpath(IP_ROOT_PATH . 'index.' . PHP_EXT));
96
220	//$x_char_position = (round($total_width/6));
221	$x_char_position = (round(($total_width - 12) / strlen($code)) + mt_rand(-3, 5));
222
227		$char = $code{$i};
228		//$size = mt_rand(18, ceil($total_height / 2.8));
229		$size = mt_rand(floor($total_height / 3.5), ceil($total_height / 2.8));
230		$font = ($rnd_font) ? rand(0, (sizeof($fonts)-1)) : $font;
231		$angle = mt_rand(-30, 30);
232
418// Function  gdVersion by Hagan Fox
419// http://de3.php.net/manual/en/function.gd-info.php#52481
420function gdVersion($user_ver = 0)
utilities.class.php git://github.com/joebeeson/amazon.git | PHP | 515 lines
27 * See Also:
28 * 	[PHP Developer Center](http://aws.amazon.com/php/)
29 */
254	 * License:
255	 * 	[PHP License](http://www.php.net/license/3_01.txt)
256	 *
441	 * License:
442	 * 	[PHP License](http://us.php.net/manual/en/function.base64-decode.php#81425)
443	 *
489	 * Author:
490	 * 	Alix Axel <http://www.php.net/manual/en/function.com-create-guid.php#99425>
491	 *
492	 * License:
493	 * 	[PHP License](http://www.php.net/license/3_01.txt)
494	 *
utilities.class.php git://github.com/splittingred/phpThumbOf.git | PHP | 500 lines
1<?php
2/*
27 * See Also:
28 * 	[PHP Developer Center](http://aws.amazon.com/php/)
29 */
150		// Explicitly pass a third parameter.
151		// <http://php.net/manual/en/function.http-build-query.php#74781>
152		return http_build_query($array, '', '&');
245	 * License:
246	 * 	[PHP License](http://www.php.net/license/3_01.txt)
247	 *
256	 * See Also:
257	 * 	Original Function - http://aidanlister.com/repos/v/function.size_readable.php
258	 */
432	 * License:
433	 * 	[PHP License](http://us.php.net/manual/en/function.base64-decode.php#81425)
434	 *
FrankeImage.class.php https://hg.codeplex.com/school15 | PHP | 540 lines
282        $borderColor = imagecolorallocate($im, 100, 100, 100);                    //???
283        $pointColor = imagecolorallocate($im, mt_rand(0, 255), mt_rand(0, 255), mt_rand(0, 255));                 //???
284
295                for ($i = 0; $i < 10; $i++) {
296                    imagearc($im, mt_rand(-10, $width), mt_rand(-10, $height), mt_rand(30, 300), mt_rand(20, 200), 55, 44, $pointColor);
297                }
340        for ($i = 0; $i < 10; $i++) {
341            imagearc($im, mt_rand(-10, $width), mt_rand(-10, $height), mt_rand(30, 300), mt_rand(20, 200), 55, 44, $stringColor);
342        }
387//            $fontcolor = imagecolorallocate($im, mt_rand(0, 255), mt_rand(0, 255), mt_rand(0, 255));
388//            imagearc($im, mt_rand(-10, $width), mt_rand(-10, $height), mt_rand(30, 300), mt_rand(20, 200), 55, 44, $fontcolor);
389//        }
390//        for ($i = 0; $i < 255; $i++) {
391//            $fontcolor = imagecolorallocate($im, mt_rand(0, 255), mt_rand(0, 255), mt_rand(0, 255));
392//            imagesetpixel($im, mt_rand(0, $width), mt_rand(0, $height), $fontcolor);
Image.class.php https://hg.codeplex.com/school15 | PHP | 518 lines
282        $borderColor = imagecolorallocate($im, 100, 100, 100);                    //???
283        $pointColor = imagecolorallocate($im, mt_rand(0, 255), mt_rand(0, 255), mt_rand(0, 255));                 //???
284
295                for ($i = 0; $i < 10; $i++) {
296                    imagearc($im, mt_rand(-10, $width), mt_rand(-10, $height), mt_rand(30, 300), mt_rand(20, 200), 55, 44, $pointColor);
297                }
340        for ($i = 0; $i < 10; $i++) {
341            imagearc($im, mt_rand(-10, $width), mt_rand(-10, $height), mt_rand(30, 300), mt_rand(20, 200), 55, 44, $stringColor);
342        }
365            $fontcolor = imagecolorallocate($im, mt_rand(0, 255), mt_rand(0, 255), mt_rand(0, 255));
366            imagearc($im, mt_rand(-10, $width), mt_rand(-10, $height), mt_rand(30, 300), mt_rand(20, 200), 55, 44, $fontcolor);
367        }
368        for ($i = 0; $i < 255; $i++) {
369            $fontcolor = imagecolorallocate($im, mt_rand(0, 255), mt_rand(0, 255), mt_rand(0, 255));
370            imagesetpixel($im, mt_rand(0, $width), mt_rand(0, $height), $fontcolor);
populateSeedData.php https://bitbucket.org/cviolette/sugarcrm.git | PHP | 510 lines
1<?php
2if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
42// it's not found fall back on en_us
43if(file_exists("include/language/{$current_language}.lang.php")){
44    require_once("include/language/{$current_language}.lang.php");
46else {
47    require_once("include/language/en_us.lang.php");
48}
48}
49require_once('install/UserDemoData.php');
50require_once('install/TeamDemoData.php');
52global $sugar_demodata;
53if(file_exists("install/demoData.{$current_language}.php")){
54   require_once("install/demoData.{$current_language}.php");
56else {
57   require_once("install/demoData.en_us.php");
58}
populateSeedData.php https://github.com/mikmagic/sugarcrm_dev.git | PHP | 507 lines
1<?php
2if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
42// it's not found fall back on en_us
43if(file_exists("include/language/{$current_language}.lang.php")){
44    require_once("include/language/{$current_language}.lang.php");
46else {
47    require_once("include/language/en_us.lang.php");
48}
48}
49require_once('install/UserDemoData.php');
50require_once('install/TeamDemoData.php');
52global $sugar_demodata;
53if(file_exists("install/demoData.{$current_language}.php")){
54   require_once("install/demoData.{$current_language}.php");
56else {
57   require_once("install/demoData.en_us.php");
58}
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21