Skip to content

Instantly share code, notes, and snippets.

@hplc
Last active June 21, 2019 01:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hplc/d809812eabfb0414a2dce6f26a688086 to your computer and use it in GitHub Desktop.
Save hplc/d809812eabfb0414a2dce6f26a688086 to your computer and use it in GitHub Desktop.
#!/usr/bin/php
<?php
$terms = [
"LTE网络规划重点场景是“五高一地”,指得是高校、高铁、高速、高架、高层和" => "地铁",
"LTE规划的建网目标是" => "热点区域连续覆盖",
"基站覆盖估算的目的是从覆盖的角度计算所需基站的数目,公式为规划覆盖面积除以" => "单基站的覆盖面积",
"LTE的覆盖能力的影响因素有:发射功率、频率、多天线、RB资源、带宽及信道配置、RRM算法、子帧结构和" => "配置",
"LTE使用高频段时,其覆盖范围变" => "小",
"容量计算是通过计算满足一定话务需求所需要的无线资源数目,进而计算出所需要的载波配置、" => "基站数目",
"话务需求,即话务模型,包括两个方面:用户行为和" => "业务特征",
"容量估算的三要素(三者间用中文顿号间隔)" => "话务模型、无线资源、资源占用方式",
"衡量无线系统的容量能力有两个维度:吞吐率和" => "用户数",
"在20MHz带宽内,LTE理论峰值速率,上行可达到" => "50Mbps",
"在20MHz带宽内,LTE理论峰值速率,下行可达到" => "100Mbps",
"在20MHz带宽内,LTE实测峰值速率,当天线配置为2x2时,下行可达到" => "80Mbps",
"在20MHz带宽内,LTE实测峰值速率,当天线配置为2x2时,上行可达到" => "20Mbps",
"LTE规划选址有两种情况:存在可利用的旧站址和" => "完全新建站址",
"对于无线网络规划仿真,一般包括:无线环境的仿真、网络设备的仿真和" => "用户业务过程的仿真",
"高铁以350km/h的速度移动,在D频段会产生多少Hz的多普勒频率偏移" => "1685",
"高铁以350km/h的速度移动,在F频段会产生多少Hz的多普勒频率偏移" => "1231",
"LTE信号穿透CRH5高铁车型,会有多少dB损耗" => "22",
"LTE信号穿透汽车,会有约多少dB损耗" => "10",
"高层场景,为了提高高层深度覆盖和小区吞吐率,有以下几种在方案:3D-MIMO技术,双路MIMO或错层MIMO方案," => "漏缆方案"
];
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