/mnt/data/shnoulle/nginx/www/master/application/libraries/MersenneTwister.php(115)
103 */ 104 public function __construct($seed = null) 105 { 106 if ($seed === null) { 107 $seed = mt_rand(); 108 } 109 110 $this->setSeed($seed); 111 } 112 113 public function setSeed($seed) 114 { 115 $this->state[0] = $seed & 0xffffffff; 116 117 for ($i = 1; $i < 624; $i++) { 118 $this->state[$i] = (((0x6c078965 * ($this->state[$i - 1] ^ ($this->state[$i - 1] >> 30))) + $i)) & 0xffffffff; 119 } 120 121 $this->index = 0; 122 } 123 124 private function generateTwister() 125 { 126 for ($i = 0; $i < 624; $i++) { 127 $y = (($this->state[$i] & 0x1) + ($this->state[$i] & 0x7fffffff)) & 0xffffffff;
#0 |
+
–
/mnt/data/shnoulle/nginx/www/master/application/libraries/MersenneTwister.php(110): ls\mersenne\MersenneTwister->setSeed("") 105 { 106 if ($seed === null) { 107 $seed = mt_rand(); 108 } 109 110 $this->setSeed($seed); 111 } 112 113 public function setSeed($seed) 114 { 115 $this->state[0] = $seed & 0xffffffff; |
#1 |
+
–
/mnt/data/shnoulle/nginx/www/master/application/libraries/MersenneTwister.php(66): ls\mersenne\MersenneTwister->__construct("") 61 * @param int $seed 62 * @return void 63 */ 64 public static function init($seed) 65 { 66 self::$instance = new MersenneTwister($seed); 67 } 68 69 /** 70 * @return MersenneTwister 71 */ |
#2 |
+
–
/mnt/data/shnoulle/nginx/www/master/application/libraries/MersenneTwister.php(29): ls\mersenne\MersenneTwister::init("") 24 $table = \Yii::app()->db->schema->getTable('{{survey_'.$surveyid.'}}'); 25 if (isset($table->columns['seed'])) { 26 $_SESSION['survey_'.$surveyid]['startingValues']['seed'] = $seed; 27 } 28 } 29 MersenneTwister::init($seed); 30 } 31 32 /** 33 * Shuffle an array using MersenneTwister 34 * Argument NOT called by reference! |
#3 |
+
–
/mnt/data/shnoulle/nginx/www/master/application/helpers/frontend_helper.php(999): ls\mersenne\setSeed("298838") 0994 */ 0995 function randomizationGroupsAndQuestions($surveyid, $preview = false, $fieldmap = array()) 0996 { 0997 // Initialize the randomizer. Seed will be stored in response. 0998 // TODO: rewrite this THE YII WAY !!!! (application/third_party + internal config for namespace + aliases; etc) 0999 ls\mersenne\setSeed($surveyid); 1000 1001 $fieldmap = (empty($fieldmap)) ? $_SESSION['survey_'.$surveyid]['fieldmap'] : $fieldmap; 1002 1003 list($fieldmap, $randomized1) = randomizationGroup($surveyid, $fieldmap, $preview); // Randomization groups for groups 1004 list($fieldmap, $randomized2) = randomizationQuestion($surveyid, $fieldmap, $preview); // Randomization groups for questions |
#4 |
+
–
/mnt/data/shnoulle/nginx/www/master/application/controllers/survey/index.php(560): randomizationGroupsAndQuestions("298838") 555 if (!empty($oResponse->submitdate)) { 556 $_SESSION['survey_'.$surveyid]['maxstep'] = $_SESSION['survey_'.$surveyid]['totalsteps']; 557 } 558 559 loadanswers(); 560 randomizationGroupsAndQuestions($surveyid); 561 initFieldArray($surveyid, $_SESSION['survey_'.$surveyid]['fieldmap']); 562 } 563 } 564 } 565 } |
#5 |
+
–
/mnt/data/shnoulle/nginx/www/master/application/controllers/survey/index.php(24): index->action() 19 public $oTemplate; 20 21 public function run() 22 { 23 useFirebug(); 24 $this->action(); 25 } 26 27 public function action() 28 { 29 global $surveyid; |
#6 |
+
–
/mnt/data/shnoulle/nginx/www/master/framework/web/actions/CAction.php(76): index->run() 71 { 72 $method=new ReflectionMethod($this, 'run'); 73 if($method->getNumberOfParameters()>0) 74 return $this->runWithParamsInternal($this, $method, $params); 75 76 $this->run(); 77 return true; 78 } 79 80 /** 81 * Executes a method of an object with the supplied named parameters. |
#7 |
+
–
/mnt/data/shnoulle/nginx/www/master/framework/web/CController.php(308): CAction->runWithParams(array("r" => "survey/index", "sid" => "298838", "token" => "TEST", "newtest" => "Y", ...)) 303 { 304 $priorAction=$this->_action; 305 $this->_action=$action; 306 if($this->beforeAction($action)) 307 { 308 if($action->runWithParams($this->getActionParams())===false) 309 $this->invalidActionParams($action); 310 else 311 $this->afterAction($action); 312 } 313 $this->_action=$priorAction; |
#8 |
+
–
/mnt/data/shnoulle/nginx/www/master/framework/web/CController.php(286): CController->runAction(index) 281 * @see runAction 282 */ 283 public function runActionWithFilters($action,$filters) 284 { 285 if(empty($filters)) 286 $this->runAction($action); 287 else 288 { 289 $priorAction=$this->_action; 290 $this->_action=$action; 291 CFilterChain::create($this,$action,$filters)->run(); |
#9 |
+
–
/mnt/data/shnoulle/nginx/www/master/framework/web/CController.php(265): CController->runActionWithFilters(index, array()) 260 { 261 if(($parent=$this->getModule())===null) 262 $parent=Yii::app(); 263 if($parent->beforeControllerAction($this,$action)) 264 { 265 $this->runActionWithFilters($action,$this->filters()); 266 $parent->afterControllerAction($this,$action); 267 } 268 } 269 else 270 $this->missingAction($actionID); |
#10 |
+
–
/mnt/data/shnoulle/nginx/www/master/framework/web/CWebApplication.php(282): CController->run("index") 277 { 278 list($controller,$actionID)=$ca; 279 $oldController=$this->_controller; 280 $this->_controller=$controller; 281 $controller->init(); 282 $controller->run($actionID); 283 $this->_controller=$oldController; 284 } 285 else 286 throw new CHttpException(404,Yii::t('yii','Unable to resolve the request "{route}".', 287 array('{route}'=>$route===''?$this->defaultController:$route))); |
#11 |
+
–
/mnt/data/shnoulle/nginx/www/master/framework/web/CWebApplication.php(141): CWebApplication->runController("survey/index") 136 foreach(array_splice($this->catchAllRequest,1) as $name=>$value) 137 $_GET[$name]=$value; 138 } 139 else 140 $route=$this->getUrlManager()->parseUrl($this->getRequest()); 141 $this->runController($route); 142 } 143 144 /** 145 * Registers the core application components. 146 * This method overrides the parent implementation by registering additional core components. |
#12 |
+
–
/mnt/data/shnoulle/nginx/www/master/framework/base/CApplication.php(185): CWebApplication->processRequest() 180 public function run() 181 { 182 if($this->hasEventHandler('onBeginRequest')) 183 $this->onBeginRequest(new CEvent($this)); 184 register_shutdown_function(array($this,'end'),0,false); 185 $this->processRequest(); 186 if($this->hasEventHandler('onEndRequest')) 187 $this->onEndRequest(new CEvent($this)); 188 } 189 190 /** |
#13 |
+
–
/mnt/data/shnoulle/nginx/www/master/index.php(194): CApplication->run() 189 require_once APPPATH . 'core/LSYii_Application' . EXT; 190 191 $config = require_once(APPPATH . 'config/internal' . EXT); 192 193 Yii::$enableIncludePath = false; 194 Yii::createApplication('LSYii_Application', $config)->run(); 195 196 /* End of file index.php */ 197 /* Location: ./index.php */ |