TRUNCATE TABLE `cdr`;
DELETE FROM `cdr` WHERE `calldate` < CURDATE() - INTERVAL 3 MONTH;
Звучит так, как будто бы лучше собрать другой компЕсли у вас z68, то таки да, гораздо лучше собрать современный комп.
import math
def main():
m_values = [40, 50, 60, 71, 76]
z_values = [160, 240, 320]
m1, r1, a1, z1 = 50, 50, 55, 400
m2, r2, a2, z2 = 76, 45, 125, 80
x1 = r1 * math.cos(math.radians(a1))
y1 = r1 * math.sin(math.radians(a1))
x2 = r2 * math.cos(math.radians(a2))
y2 = r2 * math.sin(math.radians(a2))
tx1 = -(m1 * x1 + m2 * x2)
tx2 = -(m1 * x1 * z1 + m2 * x2 * z2)
ty1 = -(m1 * y1 + m2 * y2)
ty2 = -(m1 * y1 * z1 + m2 * y2 * z2)
print("Поиск решения для систем:")
print(f"m3x1 + m4x2 = {tx1}")
print(f"m3z3x1 + m4z4x2 = {tx2}")
print("и")
print(f"m3y1 + m4y2 = {ty1}")
print(f"m3z3y1 + m4z4y2 = {ty2}")
for m3 in m_values:
for m4 in m_values:
for z3 in z_values:
for z4 in z_values:
d = m3 * m4 * (z4 - z3)
if d == 0:
continue;
x3 = (tx1 * z4 - tx2) * m4 / d
x4 = (tx2 - tx1 * z3) * m3 / d
y3 = (ty1 * z4 - ty2) * m4 / d
y4 = (ty2 - ty1 * z3) * m3 / d
r1 = math.sqrt(x3 * x3 + y3 * y3)
r2 = math.sqrt(x4 * x4 + y4 * y4)
if 42 <= r1 <= 88 and 42 <= r2 <= 88:
print("Найдено решение, удовлетворяющее условию 42 <= r <= 88:")
print(f" x3 = {x3:.2f}, x4 = {x4:.2f}")
print(f" y3 = {y3:.2f}, y4 = {y4:.2f}")
print(f" r1 = {r1:.2f}, r2 = {r2:.2f}")
print(f" Параметры: m3 = {m3}, m4 = {m4}, z3 = {z3}, z4 = {z4}")
return
print("Не найдено решений, удовлетворяющих условию 42 <= r <= 88.")
if __name__ == "__main__":
main()
Поиск решения для систем:
m3x1 + m4x2 = 527.6903214429624
m3z3x1 + m4z4x2 = -416645.92336539994
и
m3y1 + m4y2 = -4849.38010219083
m3z3y1 + m4z4y2 = -1043272.0436064599
Найдено решение, удовлетворяющее условию 42 <= r <= 88:
x3 = -62.63, x4 = 60.99
y3 = -33.42, y4 = -52.97
r1 = 70.99, r2 = 80.78
Параметры: m3 = 50, m4 = 60, z3 = 320, z4 = 160
CREATE TABLE `cel` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
`eventtype` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
`eventtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`userdeftype` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
`cid_name` varchar(80) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
`cid_num` varchar(80) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
`cid_ani` varchar(80) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
`cid_rdnis` varchar(80) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
`cid_dnid` varchar(80) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
`exten` varchar(80) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
`context` varchar(80) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
`channame` varchar(80) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
`appname` varchar(80) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
`appdata` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci,
`amaflags` int NOT NULL,
`accountcode` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
`peeraccount` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
`uniqueid` varchar(150) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
`linkedid` varchar(150) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
`userfield` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
`peer` varchar(80) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
`extra` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
UNIQUE KEY `id` (`id`),
KEY `uniqueid` (`uniqueid`),
KEY `linkedid` (`linkedid`),
KEY `eventtime` (`eventtime`),
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci