## 2019/4/26 服务器故障排查

//编辑器增强功能
function add_more_buttons($buttons) {$buttons[] = 'hr'; //水平线
$buttons[] = 'fontselect'; //字体$buttons[] = 'fontsizeselect'; //字号
$buttons[] = 'styleselect'; //样式，格式$buttons[] = 'wp_page'; //分页符
$buttons[] = 'cut'; //剪切$buttons[] = 'backcolor'; //背景色
return $buttons; } add_filter("mce_buttons_3", "add_more_buttons");//------------>在这一行发生冲突 //添加字体 function add_fontfamily($initArray){
$initArray['font_formats'] ="幼圆='幼圆';英文可爱字体=comic sans ms,sans-serif;微软雅黑='微软雅黑';宋体='宋体';黑体='黑体';仿宋='仿宋';楷体='楷体';隶书='隶书';Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=v erdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats"; return$initArray;
}

function.php的冲突直接导致了PHP编译生成的html的首行不是<!DOCTYPE html>

## 1.int/float to string/array:

C语言提供了几个标准库函数，可以将任意类型(整型、长整型、浮点型等)的数字转换为字符串，下面列举了各函数的方法及其说明。
● itoa()：将整型值转换为字符串。
● ltoa()：将长整型值转换为字符串。
● ultoa()：将无符号长整型值转换为字符串。
● gcvt()：将浮点型数转换为字符串，取四舍五入。
● ecvt()：将双精度浮点型值转换为字符串，转换结果中不包含十进制小数点。
● fcvt()：指定位数为转换精度，其余同ecvt()。

## 2. string/array to int/float

C/C++语言提供了几个标准库函数，可以将字符串转换为任意类型(整型、长整型、浮点型等)。

● atof()：将字符串转换为双精度浮点型值。
● atoi()：将字符串转换为整型值。
● atol()：将字符串转换为长整型值。
● strtod()：将字符串转换为双精度浮点型值，并报告不能被转换的所有剩余数字。
● strtol()：将字符串转换为长整值，并报告不能被转换的所有剩余数字。
● strtoul()：将字符串转换为无符号长整型值，并报告不能被转换的所有剩余数字。

## 【模拟/字符串】DRM Messages

DRM Encryption is a new kind of encryption. Given an encrypted string (which we’ll call a DRM
message), the decryption process involves three steps: Divide, Rotate and Merge. This process is
described in the following example with the DRM message “EWPGAJRB”:
Divide — First, divide the message in half to “EWPG” and “AJRB”.
Rotate — For each half, calculate its rotation value by summing up the values of each character
(A = 0, B = 1, . . . Z = 25). The rotation value of “EWPG” is 4 + 22 + 15 + 6 = 47. Rotate each
character in “EWPG” 47 positions forward (wrapping from Z to A when necessary) to obtain the
new string “ZRKB”. Following the same process on “AJRB” results in “BKSC”.
Merge — The last step is to combine these new strings (“ZRKB” and “BKSC”) by rotating each character
in the first string by the value of the corresponding character in the second string. For the first
position, rotating ‘Z’ by ‘B’ means moving it forward 1 character, which wraps it around to ‘A’.
Continuing this process for every character results in the final decrypted message, “ABCD”.
Input
The input file contains several test cases, each of them as described below.
The input contains a single DRM message to be decrypted. All characters in the string are uppercase
letters and the string’s length is even and ≤ 15000.
Output
For each test case, display the decrypted DRM message.
Sample Input
EWPGAJRB
UEQBJPJCBUDGBNKCAHXCVERXUCVK
Sample Output
ABCD
ACMECNACONTEST