Last active
June 21, 2019 01:39
-
-
Save hplc/739635f0ac465a972ce640a8522c4a37 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/php | |
<?php | |
$terms = [ | |
"干扰发生影响的基本要素有三个:干扰源、传播途径和" => "被干扰源", | |
"控制共站干扰影响的三要素是:抑制干扰源、切断干扰传播途径,提高被干扰源敏感器件的" => "抗干扰性能", | |
"抑制干扰源的手段有:提高发射机的性能和" => "增加发射端滤波器", | |
"切断干扰传播途径的手段有:调整频点、设置保护带宽和" => "增加隔离度", | |
"提高被干扰源敏感器件的抗干扰性能的主要手段:" => "提高接收机的性能", | |
"空间隔离度需求由两个因素决定:发射端发送干扰大小和" => "接收机允许接收的最小干扰", | |
"从网络性能上讲,LTE与2G、3G能够共站址的两个前提是:规划的覆盖范围相同和" => "系统间的干扰可控制", | |
"TD-LTE与WLAN系统共存的干扰隔离度要求为多少(dB)" => "87", | |
"TD-LTE与WLAN系统共存的空间距离要求为水平距离多少m" => "54", | |
"TD-LTE与WLAN系统共存的空间距离要求为垂直距离多少m" => "2.3", | |
"无线网络优化解决问题的过程分三步:网络数据收集、网络问题分析和" => "网络问题解决", | |
"从无线制式的角度来看,无线网优的问题可以分为:GSM、WCDMA/TD-SCDMA、WLAN和什么等" => "LTE", | |
"从无线网络性能的角度上来看,无线网络优化可以分为四个层次(各层次间用中文逗号间隔)" => "用户级,业务级,网络级,网元级", | |
"OMC的英文全称为" => "Operation & Maintenance Center", | |
"CAPEX的英文全称为" => "Capital Expenditure", | |
"OPEX的英文全称为" => "Operation Expenditure", | |
"SON的英文全称为" => "Self Organizing Networks", | |
"从网络的生命周期来看,SON的功能包括:自规划、自部署、自优化和什么等多方面的能力" => "自维护", | |
"从SON对参数的管理作用来看,SON包括两项大的工作:网络参数的自配置和" => "网络参数的自优化", | |
"LTE网络优化维护中业务级优化的三多一少问题是指(用中文逗号间隔)" => "多场景,多业务,多网元,资源少" | |
]; | |
system("clear"); | |
$name = readline("Input Your Exam Name(Like: 04-张三): "); | |
system("date"); | |
$time_start = time(); | |
$count = count($terms); | |
echo PHP_EOL; | |
echo "Hello, $name!"; | |
echo PHP_EOL; | |
$line = "Init"; | |
$i = 0; | |
// while ($term = current($terms)) { | |
// $key = key($terms); | |
while ($key = array_rand($terms)) { | |
$term = $terms[$key]; | |
$i++; | |
while ($line !== $term) { | |
if ($line !== "Init") { | |
echo "Wrong! Try again!" . PHP_EOL; | |
} | |
$line = readline("$i/$count. $key: "); | |
} | |
echo "Good!"; | |
$line = "Init"; | |
echo PHP_EOL; | |
// next($terms); | |
unset($terms[$key]); | |
} | |
system("date"); | |
$time_end = time(); | |
echo PHP_EOL; | |
$seconds = $time_end - $time_start; | |
echo "$name, you finished the test in " . $seconds . " seconds!"; | |
echo PHP_EOL; | |
echo "Great!!!"; | |
echo PHP_EOL; | |
$content = "$name: $seconds seconds, " . date('Y-m-d H:i:s', $time_start) . ', ' . date('Y-m-d H:i:s', $time_end) . "\n"; | |
file_put_contents('./' . basename(__FILE__, '.php') . '.log', $content, FILE_APPEND | LOCK_EX); | |
while (true) { readline(); } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment