Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/php
<?php
$terms = [
"RRM的英文全称" => "Radio Resource Management",
"LTE最小调度周期是多长时间" => "1ms",
"LTE支持多种系统带宽,它们是(各带宽间用英文逗号间隔)" => "1.4MHz,3MHz,5MHz,10MHz,15MHz,20MHz",
"RAC的英文全称" => "Radio Admission Control",
"RBC的英文全称" => "Radio Bearer Control",
"DRA的英文全称" => "Dynamic Resource Allocation",
#!/usr/bin/php
<?php
$terms = [
"LTE网络规划重点场景是“五高一地”,指得是高校、高铁、高速、高架、高层和" => "地铁",
"LTE规划的建网目标是" => "热点区域连续覆盖",
"基站覆盖估算的目的是从覆盖的角度计算所需基站的数目,公式为规划覆盖面积除以" => "单基站的覆盖面积",
"LTE的覆盖能力的影响因素有:发射功率、频率、多天线、RB资源、带宽及信道配置、RRM算法、子帧结构和" => "配置",
"LTE使用高频段时,其覆盖范围变" => "小",
"容量计算是通过计算满足一定话务需求所需要的无线资源数目,进而计算出所需要的载波配置、" => "基站数目",
#!/usr/bin/php
<?php
$terms = [
"干扰发生影响的基本要素有三个:干扰源、传播途径和" => "被干扰源",
"控制共站干扰影响的三要素是:抑制干扰源、切断干扰传播途径,提高被干扰源敏感器件的" => "抗干扰性能",
"抑制干扰源的手段有:提高发射机的性能和" => "增加发射端滤波器",
"切断干扰传播途径的手段有:调整频点、设置保护带宽和" => "增加隔离度",
"提高被干扰源敏感器件的抗干扰性能的主要手段:" => "提高接收机的性能",
"空间隔离度需求由两个因素决定:发射端发送干扰大小和" => "接收机允许接收的最小干扰",
#!/usr/bin/php
<?php
$terms = [
"TD-LTE与WLAN系统共存的干扰隔离度要求为多少(dB)" => "87",
"TD-LTE与WLAN系统共存的空间距离要求为水平距离多少m" => "54",
"TD-LTE与WLAN系统共存的空间距离要求为垂直距离多少m" => "2.3",
"LTE相对3G“少一层,多一口”中的少一层是少了哪一层" => "RNC",
"LTE相对3G“少一层,多一口”中的多一口是多了哪个口" => "X2",
"采用256-QAM高阶调制技术时,每个符号能代表多少位比特的信息" => "8",
@hplc
hplc / check_web_servers.php
Created October 22, 2019 09:58
Check a bunch of web servers' online status.
<!DOCTYPE html>
<html>
<head>
<title>16CNetG5-2</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<?php
/* Contents of 16CNetG5-2.csv file like this:
@hplc
hplc / exam.php
Last active November 12, 2019 23:19
PHP Script to do exam.
#!/usr/bin/php
<?php
/* Contents of exam.csv file like this:
奈奎斯特定理是哪一年提出来的?,1928
已知无线电频率为1GHz,其波长为(单位为m):,0.3
已知WiFi的频率为2.4GHz,其波长为(单位为m):,0.125
已知WiFi的频率为5GHz,其波长为(单位为cm):,6
......
*/
@hplc
hplc / grab_coronavirus_infected_communities.php
Last active February 6, 2020 12:44
Get the name of coronavirus infected communities in Shenzhen and convert to JSON.
<?php
$url = 'http://sz.bendibao.com/news/202023/827759.htm';
$page = file_get_contents($url);
$page = substr($page, strpos($page, '<strong>福田区</strong>')); // Start position
$page = substr($page, 0, strpos($page, '确诊病例曾到过我的小区,怎么办?')); // End position
$page = preg_replace('/&nbsp;/', '', $page);
$page = str_replace('<section powered-by="xiumi.us" font-size:15px;letter-spacing:0.544px;background-color:#ffffff;text-align:center;word-wrap:break-word="" !important;"="" style="margin: 10px 0px; padding: 0px; max-width: 100%; box-sizing: border-box; color: rgb(51, 51, 51);">', '', $page);
// echo $page;
@hplc
hplc / coronavirus.html
Last active March 3, 2020 11:36
Display coronavirus infected communities of Shenzhn on Amap.
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
<link rel="shortcut icon" href="https://www.helloit.info/sites/www.helloit.info/files/helloit_0.ico" type="image/vnd.microsoft.icon" />
<style type="text/css">
body,html,#container{
height: 100%;
@hplc
hplc / monitor_atd.php
Created March 30, 2020 12:36
Monitor atd service and restart it if not running.
#!/usr/bin/php
<?php
$cmd = '/sbin/service atd';
$atd = `$cmd status`;
// var_dump($atd);
if (! preg_match('/is running/', $atd))
{
$result = `$cmd start`;
echo $result;
@hplc
hplc / monitor_ocserv.sh
Created April 1, 2020 08:36
Test ocserv running status in OpenWrt, and restart it if not.
#!/bin/sh
service=ocserv
if test $(netstat -na | grep 0.0.0.0:443 | wc -l) = 2
then
echo "$service is running!"
else
/etc/init.d/$service start
fi