PageRenderTime 2666ms queryFilters 0ms Sphinxql 2572ms GetByIds 63ms meta 0ms repositoryFilters 6ms languageFilters 0ms sourceFilters 1ms

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

Source

Language

Repository

TimeHelperTest.php https://bitbucket.org/omarsmak/html5-cloud-ide.git | PHP | 783 lines
6 *
7 * CakePHP(tm) Tests <http://book.cakephp.org/view/1196/Testing>
8 * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
13 * @copyright     Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
14 * @link          http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests
15 * @package       Cake.Test.Case.View.Helper
499		$this->assertTrue($result);
500		$result = $this->Time->isThisMonth(mktime(0, 0, 0, date('m'), mt_rand(1, 28), date('Y') - mt_rand(1, 12)));
501		$this->assertFalse($result);
501		$this->assertFalse($result);
502		$result = $this->Time->isThisMonth(mktime(0, 0, 0, date('m'), mt_rand(1, 28), date('Y') + mt_rand(1, 12)));
503		$this->assertFalse($result);
514		$this->assertTrue($result);
515		$result = $this->Time->isThisYear(mktime(0, 0, 0, mt_rand(1, 12), mt_rand(1, 28), date('Y')));
516		$this->assertTrue($result);
time.test.php https://github.com/mariuz/firetube.git | PHP | 639 lines
9 *
10 * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite>
11 * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
16 * @copyright     Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
17 * @link          https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests
18 * @package       cake
496		$this->assertTrue($result);
497		$result = $this->Time->isThisMonth(mktime(0, 0, 0, date('m'), mt_rand(1, 28), date('Y') - mt_rand(1, 12)));
498		$this->assertFalse($result);
498		$this->assertFalse($result);
499		$result = $this->Time->isThisMonth(mktime(0, 0, 0, date('m'), mt_rand(1, 28), date('Y') + mt_rand(1, 12)));
500		$this->assertFalse($result);
511		$this->assertTrue($result);
512		$result = $this->Time->isThisYear(mktime(0, 0, 0, mt_rand(1, 12), mt_rand(1, 28), date('Y')));
513		$this->assertTrue($result);
time.test.php https://github.com/MrRio/wildflower.git | 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);
time.test.php https://github.com/Forbin/cakephp2x.git | PHP | 654 lines
6 *
7 * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite>
8 * Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org)
13 * @copyright     Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org)
14 * @link          https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests
15 * @package       cake
508		$this->assertTrue($result);
509		$result = $this->Time->isThisMonth(mktime(0, 0, 0, date('m'), mt_rand(1, 28), date('Y') - mt_rand(1, 12)));
510		$this->assertFalse($result);
510		$this->assertFalse($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);
524		$this->assertTrue($result);
525		$result = $this->Time->isThisYear(mktime(0, 0, 0, mt_rand(1, 12), mt_rand(1, 28), date('Y')));
526		$this->assertTrue($result);
TimeHelperTest.php https://github.com/Bancha/cakephp.git | PHP | 802 lines
6 *
7 * CakePHP(tm) Tests <http://book.cakephp.org/view/1196/Testing>
8 * Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
13 * @copyright     Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
14 * @link          http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests
15 * @package       cake.tests.cases.libs.view.helpers
505		$this->assertTrue($result);
506		$result = $this->Time->isThisMonth(mktime(0, 0, 0, date('m'), mt_rand(1, 28), date('Y') - mt_rand(1, 12)));
507		$this->assertFalse($result);
507		$this->assertFalse($result);
508		$result = $this->Time->isThisMonth(mktime(0, 0, 0, date('m'), mt_rand(1, 28), date('Y') + mt_rand(1, 12)));
509		$this->assertFalse($result);
521		$this->assertTrue($result);
522		$result = $this->Time->isThisYear(mktime(0, 0, 0, mt_rand(1, 12), mt_rand(1, 28), date('Y')));
523		$this->assertTrue($result);
TimeHelperTest.php https://bitbucket.org/cargan/cakephp-portfolio | PHP | 799 lines
6 *
7 * CakePHP(tm) Tests <http://book.cakephp.org/view/1196/Testing>
8 * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
13 * @copyright     Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
14 * @link          http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests
15 * @package       Cake.Test.Case.View.Helper
499		$this->assertTrue($result);
500		$result = $this->Time->isThisMonth(mktime(0, 0, 0, date('m'), mt_rand(1, 28), date('Y') - mt_rand(1, 12)));
501		$this->assertFalse($result);
501		$this->assertFalse($result);
502		$result = $this->Time->isThisMonth(mktime(0, 0, 0, date('m'), mt_rand(1, 28), date('Y') + mt_rand(1, 12)));
503		$this->assertFalse($result);
514		$this->assertTrue($result);
515		$result = $this->Time->isThisYear(mktime(0, 0, 0, mt_rand(1, 12), mt_rand(1, 28), date('Y')));
516		$this->assertTrue($result);
time.test.php https://bitbucket.org/siya/needbear | PHP | 826 lines
6 *
7 * CakePHP(tm) Tests <http://book.cakephp.org/view/1196/Testing>
8 * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
13 * @copyright     Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
14 * @link          http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests
15 * @package       cake
514		$this->assertTrue($result);
515		$result = $this->Time->isThisMonth(mktime(0, 0, 0, date('m'), mt_rand(1, 28), date('Y') - mt_rand(1, 12)));
516		$this->assertFalse($result);
516		$this->assertFalse($result);
517		$result = $this->Time->isThisMonth(mktime(0, 0, 0, date('m'), mt_rand(1, 28), date('Y') + mt_rand(1, 12)));
518		$this->assertFalse($result);
530		$this->assertTrue($result);
531		$result = $this->Time->isThisYear(mktime(0, 0, 0, mt_rand(1, 12), mt_rand(1, 28), date('Y')));
532		$this->assertTrue($result);
time.test.php https://bitbucket.org/ducnv66/bbb-admin | PHP | 695 lines
10 *
11 * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite>
12 * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
18 * @copyright     Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
19 * @link          https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests
20 * @package       cake
554		$this->assertTrue($result);
555		$result = $this->Time->isThisMonth(mktime(0, 0, 0, date('m'), mt_rand(1, 28), date('Y') - mt_rand(1, 12)));
556		$this->assertFalse($result);
556		$this->assertFalse($result);
557		$result = $this->Time->isThisMonth(mktime(0, 0, 0, date('m'), mt_rand(1, 28), date('Y') + mt_rand(1, 12)));
558		$this->assertFalse($result);
570		$this->assertTrue($result);
571		$result = $this->Time->isThisYear(mktime(0, 0, 0, mt_rand(1, 12), mt_rand(1, 28), date('Y')));
572		$this->assertTrue($result);
installer.php git://github.com/gallery/gallery3.git | PHP | 270 lines
192    if (!function_exists("mysql_query") && !function_exists("mysqli_set_charset")) {
193      $errors[] = "Gallery 3 requires a MySQL database, but PHP doesn't have either the <a href=\"http://php.net/mysql\">MySQL</a> or the  <a href=\"http://php.net/mysqli\">MySQLi</a> extension.";
194    }
202    if (!(function_exists("spl_autoload_register"))) {
203      $errors[] = "PHP is missing <a href=\"http://php.net/spl\">Standard PHP Library (SPL)</a> support";
204    }
232    if (!function_exists("json_encode")) {
233      $errors[] = "PHP is missing the <a href=\"http://php.net/manual/en/book.json.php\">JavaScript Object Notation (JSON) extension</a>.  Please install it.";
234    }
236    if (!ini_get("short_open_tag")) {
237      $errors[] = "Gallery requires <a href=\"http://php.net/manual/en/ini.core.php\">short_open_tag</a> to be on.  Please enable it in your php.ini.";
238    }
240    if (!function_exists("ctype_alpha")) {
241      $errors[] = "Gallery requires the <a href=\"http://php.net/manual/en/book.ctype.php\">PHP Ctype</a> extension.  Please install it.";
242    }
captcha_gd.php git://github.com/phpbb/phpbb3.git | PHP | 2,638 lines
78			$denom = max(1.3, $denom);
79			$offset[$i] = phpbb_mt_rand(0, (int) round((1.5 * $width_avail) / $denom));
80			$width_avail -= $offset[$i];
88				$current_colour = $scheme[array_rand($scheme)];
89				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);
90			}
98				$current_colour = $scheme[array_rand($scheme)];
99				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);
100			}
279			6 => array(
280				array(mt_rand(0,1),mt_rand(0,1),mt_rand(0,1),mt_rand(0,1),mt_rand(0,1),0,mt_rand(0,1),mt_rand(0,1),mt_rand(0,1),mt_rand(0,1),mt_rand(0,1),0,mt_rand(0,1),mt_rand(0,1),mt_rand(0,1)),
281				array(0,0,0,0,0,0,0,mt_rand(0,1),0,0,0,0,0,0,0),
283				array(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
284				array(mt_rand(0,1),0,mt_rand(0,1),0,0,0,0,0,0,0,0,0,0,0,0),
285			),
PlanetData.php http://2moons.googlecode.com/svn/trunk/ | PHP | 47 lines
29$PlanetData		= array(
30	1	=> array('temp' => mt_rand(220, 260),	'fields' => mt_rand(95, 108),	'image' => array('trocken' => mt_rand(1, 10), 'wuesten' => mt_rand(1, 4))),
31	2	=> array('temp' => mt_rand(170, 210),	'fields' => mt_rand(97, 110),	'image' => array('trocken' => mt_rand(1, 10), 'wuesten' => mt_rand(1, 4))),
31	2	=> array('temp' => mt_rand(170, 210),	'fields' => mt_rand(97, 110),	'image' => array('trocken' => mt_rand(1, 10), 'wuesten' => mt_rand(1, 4))),
32	3	=> array('temp' => mt_rand(120, 160),	'fields' => mt_rand(98, 137),	'image' => array('trocken' => mt_rand(1, 10), 'wuesten' => mt_rand(1, 4))),
33	4	=> array('temp' => mt_rand(70, 110),	'fields' => mt_rand(123, 203),	'image' => array('dschjungel' => mt_rand(1, 10))),
37	8	=> array('temp' => mt_rand(30, 70),		'fields' => mt_rand(169, 246),	'image' => array('normaltemp' => mt_rand(1, 7))),
38	9	=> array('temp' => mt_rand(20, 60),		'fields' => mt_rand(161, 238),	'image' => array('normaltemp' => mt_rand(1, 7), 'wasser' => mt_rand(1, 9))),
39	10	=> array('temp' => mt_rand(10, 50),		'fields' => mt_rand(154, 224),	'image' => array('normaltemp' => mt_rand(1, 7), 'wasser' => mt_rand(1, 9))),
40	11	=> array('temp' => mt_rand(0, 40),		'fields' => mt_rand(148, 204),	'image' => array('normaltemp' => mt_rand(1, 7), 'wasser' => mt_rand(1, 9))),
41	12	=> array('temp' => mt_rand(-10, 30),	'fields' => mt_rand(136, 171),	'image' => array('normaltemp' => mt_rand(1, 7), 'wasser' => mt_rand(1, 9))),
42	13	=> array('temp' => mt_rand(-50, -10),	'fields' => mt_rand(109, 121),	'image' => array('eis' => mt_rand(1, 10))),
43	14	=> array('temp' => mt_rand(-90, -50),	'fields' => mt_rand(81, 93),	'image' => array('eis' => mt_rand(1, 10))),
44	15	=> array('temp' => mt_rand(-130, -90),	'fields' => mt_rand(65, 74),	'image' => array('eis' => mt_rand(1, 10)))
45);
Base.php git://github.com/fzaninotto/Faker.git | PHP | 612 lines
1<?php
2
36    {
37        return mt_rand(0, 9);
38    }
46    {
47        return mt_rand(1, 9);
48    }
88        if ($strict) {
89            return mt_rand(pow(10, $nbDigits - 1), $max);
90        }
91
92        return mt_rand(0, $max);
93    }
123
124        return round($min + mt_rand() / mt_getrandmax() * ($max - $min), $nbMaxDecimals);
125    }
captcha_gd.php https://code.google.com/p/mwenhanced/ | PHP | 2,640 lines
1<?php
2/**
65			list($min, $max) = $characters[$i]->range();
66			$sizes[$i] = mt_rand($min, $max);
67
89				$current_colour = $scheme[array_rand($scheme)];
90				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);
91			}
99				$current_colour = $scheme[array_rand($scheme)];
100				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);
101			}
280			6 => array(
281				array(mt_rand(0,1),mt_rand(0,1),mt_rand(0,1),mt_rand(0,1),mt_rand(0,1),0,mt_rand(0,1),mt_rand(0,1),mt_rand(0,1),mt_rand(0,1),mt_rand(0,1),0,mt_rand(0,1),mt_rand(0,1),mt_rand(0,1)),
282				array(0,0,0,0,0,0,0,mt_rand(0,1),0,0,0,0,0,0,0),
284				array(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
285				array(mt_rand(0,1),0,mt_rand(0,1),0,0,0,0,0,0,0,0,0,0,0,0),
286			),
darkness.php https://squirrelmail.svn.sourceforge.net/svnroot/squirrelmail | PHP | 141 lines
1<?php
2
8 * @copyright 2001-2011 The SquirrelMail Project Team
9 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
10 * @version $Id: darkness.php 14084 2011-01-06 02:44:03Z pdontthink $
16 * Load up the usual suspects.. */
17require_once(SM_PATH . 'functions/strings.php');
18
68</script>
69<?php
70}
76/** seed the random number generator **/
77sq_mt_randomize();
78
85    // Some background colors
86    $r = mt_rand(24,64);
87    $unique = true;
darkness.php https://squirrelmail.svn.sourceforge.net/svnroot/squirrelmail | PHP | 141 lines
1<?php
2
8 * @copyright &copy; 2001-2009 The SquirrelMail Project Team
9 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
10 * @version $Id: darkness.php 13548 2009-04-15 18:52:02Z jervfors $
16 * Load up the usual suspects.. */
17require_once(SM_PATH . 'functions/strings.php');
18
68</script>
69<?php
70}
76/** seed the random number generator **/
77sq_mt_randomize();
78
85    // Some background colors
86    $r = mt_rand(24,64);
87    $unique = true;
darkness.php https://squirrelmail.svn.sourceforge.net/svnroot/squirrelmail | PHP | 141 lines
1<?php
2
8 * @copyright &copy; 2001-2007 The SquirrelMail Project Team
9 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
10 * @version $Id: darkness.php 12602 2007-08-27 03:16:00Z jangliss $
16 * Load up the usual suspects.. */
17require_once(SM_PATH . 'functions/strings.php');
18
68</script>
69<?php
70}
76   /** seed the random number generator **/
77   sq_mt_randomize();
78
85      // Some background colors
86      $r = mt_rand(24,64);
87      $unique = true;
ShareHandler.class.php http://mollify.googlecode.com/svn/trunk/ | PHP | 126 lines
1<?php
2
12	
13	require_once("dao/ShareDao.class.php");
14	
59		private function showInvalidSharePage() {
60			include("pages/InvalidShare.php");
61			die();
91			
92			if (!$uploader) require_once("upload/http/PublicUploader.class.php");
93			else require_once($uploader."/PublicUploader.class.php");
118				return str_replace('-', '', trim(com_create_guid(), '{}'));
119			return sprintf('%04X%04X%04X%04X%04X%04X%04X%04X', mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(16384, 20479), mt_rand(32768, 49151), mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(0, 65535));
120		}
general.php http://sloodle.googlecode.com/svn/trunk/ | PHP | 1,124 lines
1<?php
2    
20    /** Include our email functionality. */
21    require_once(SLOODLE_LIBROOT.'/mail.php');
22
39            if (empty($CFG->loginhttps)) {
40                redirect($CFG->wwwroot .'/login/index.php');
41            } else {
42                $wwwroot = str_replace('http:','https:', $CFG->wwwroot);
43                redirect($wwwroot .'/login/index.php');
44            }
192
193       return add_to_log($courseid, null, $action, $CFG->wwwroot.'/mod/sloodle/toslurl.php?region='.urlencode($region).'&xyz='.$xyz, $userid, $info );
194       //return add_to_log($courseid, null, "ok", "ok", $userid, "ok");
226            $str = str_shuffle($str);
227            $char = mt_rand(0, $strlen);
228            $token .= $str[$char];
basic.php http://enaj.googlecode.com/svn/trunk/ | PHP | 424 lines
1<?php
2// $Id: basic.php 2360 2009-04-01 15:35:38Z dualface $
3
4require_once dirname(__FILE__) . '/_setup.php';
5
44        $author = new Author();
45        $author->name = 'name - ' . mt_rand();
46        $author->save();
65    {
66        $name = 'name - ' . mt_rand();
67        $author = new Author(array('name' => $name));
72
73        $new_name = 'name - new - ' . mt_rand();
74        $author->name = $new_name;
89        $author = new Author(array(
90            'name' => 'congcong - ' . mt_rand(),
91        ));
verify.class.php http://ownerpress.googlecode.com/svn/trunk/ | PHP | 408 lines
95				$c[0] = $c['red'];$c[1] = $c['green'];$c[2] = $c['blue'];
96				imagecopymerge($this->im, $imwm, 0, 0, mt_rand(0, 200 - $this->width), mt_rand(0, 80 - $this->height), imageSX($imwm), imageSY($imwm), 100);
97				imagedestroy($imwm);
136		for($i = 0; $i <= $linenums;$i++) {
137			$color = $this->color ? imagecolorallocate($this->im, mt_rand(0, 255), mt_rand(0, 255), mt_rand(0, 255)) : imagecolorallocate($this->im, $this->fontcolor[0], $this->fontcolor[1], $this->fontcolor[2]);
138			$x = mt_rand(0, $this->width);
214			{
215				$this->fontcolor = array(mt_rand(0, 255), mt_rand(0, 255), mt_rand(0, 255));
216				$this->shadow && $text_shadowcolor = imagecolorallocate($this->im, 0, 0, 0);
312		{
313			$this->color && $this->fontcolor = array(mt_rand(0, 255), mt_rand(0, 255), mt_rand(0, 255));
314			if($font[$i]['file'])
379				$a1 = substr('012', mt_rand(0, 2), 1).substr('012345', mt_rand(0, 5), 1);
380				$a2 = substr('012345', mt_rand(0, 5), 1).substr('0123', mt_rand(0, 3), 1);
381				mt_rand(0, 1) == 1 ? array_push($numbers[$i], $a1) : array_unshift($numbers[$i], $a1);
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21