function distribute(arr, val) {
let n = arr.length;
let dVal = val;
while (dVal > 0) {
let d = dVal / n;
dVal = 0;
for (let i = 0; i < arr.length; i += 1) {
if (arr[i] === 1) {
continue;
}
arr[i] += d;
if (arr[i] < 1) {
continue;
}
dVal += arr[i] - 1;
arr[i] = 1;
n -= 1;
if (n === 0) {
return undefined;
}
}
}
return arr;
}
$ dig +trace www.aktobe-edu.kz
; <<>> DiG 9.12.1 <<>> +trace www.aktobe-edu.kz
;; global options: +cmd
. 498444 IN NS a.root-servers.net.
. 498444 IN NS b.root-servers.net.
. 498444 IN NS c.root-servers.net.
. 498444 IN NS d.root-servers.net.
. 498444 IN NS e.root-servers.net.
. 498444 IN NS f.root-servers.net.
. 498444 IN NS g.root-servers.net.
. 498444 IN NS h.root-servers.net.
. 498444 IN NS i.root-servers.net.
. 498444 IN NS j.root-servers.net.
. 498444 IN NS k.root-servers.net.
. 498444 IN NS l.root-servers.net.
. 498444 IN NS m.root-servers.net.
. 498444 IN RRSIG NS 8 0 518400 20221010050000 20220927040000 20826 . E5aHqAj0MqKBkUBMP7OC3GDjnnr2T1unuV9Qy29b4VAYj7onRsOJypPn MDlXlFx1PcnOxOR3ATfuJnvKp+e7jOTsX7XJNo3NKhlin+dzdL12q9Rg /D3kutjO6eDFBySaJU9fzt4yFa92hZclEiZSk87GkTZPfkV1k9exgP0U NszN9caQfChOt9/jS+0d8LAO9ZWdiPWeB+d/cXwm+wtE4YmV0eUjmuPw ZOGBLKX6EYSoYBm2gLK4ObAGb9OXgty5ub85RVdwTIIegRHHD0YisYYS 0YiPos4LCDlUgRDWIOicz4a44ThQ5Q59HuZmCgYCIJbGH8u2nmfcYPru xfv8Bw==
;; Received 1137 bytes from 127.0.0.1#53(127.0.0.1) in 0 ms
kz. 172800 IN NS ns1.nic.kz.
kz. 172800 IN NS ns.nic.kz.
kz. 86400 IN NSEC la. NS RRSIG NSEC
kz. 86400 IN RRSIG NSEC 8 1 86400 20221010050000 20220927040000 20826 . RQSFc1pWPq1s+sHh7f4YkBy8Bgr5lGw0s/UlFrktVIpAWpEFK93F710b orNboQ8k2tzEezqOuM8A57ew50zWSoK4Ug8CJPWmRh0/jZJvczrpyAev CpDWqeoeWSdm1bKJ/fGHVtnp8ho91AffVdAqTOjTG69APgK/L4RVuSXY p/rD98Fb0HOPe5xTq/bbpLtn4udwcowJESo51n0bDgOKMZFqaCE54GHD 26pEAngTasy6gV3v7yJnIZfe6krgQgs/OCmXk6IDqpcWebF3Qr9gcmQ7 XsXbQXBDc4m1ab8D0dv9Dpu2p11U71R3djqNb5qSpzz6g5ElvJAp0GPK rYXfuQ==
;; Received 516 bytes from 192.112.36.4#53(g.root-servers.net) in 122 ms
aktobe-edu.kz. 86400 IN NS ns1.aktobe-edu.kz.
aktobe-edu.kz. 86400 IN NS ns2.aktobe-edu.kz.
;; Received 142 bytes from 185.79.212.7#53(ns1.nic.kz) in 84 ms
www.aktobe-edu.kz. 100 IN CNAME aktobe-edu.kz.
aktobe-edu.kz. 100 IN A 178.91.234.10
aktobe-edu.kz. 100 IN NS ns1.aktobe-edu.kz.
;; Received 138 bytes from 178.91.234.10#53(ns2.aktobe-edu.kz) in 91 ms
$ nmap -Pn 178.91.234.10
Starting Nmap 7.70 ( https://nmap.org ) at 2022-09-27 17:11 MSK
Nmap scan report for 178.91.234.10
Host is up (0.089s latency).
Not shown: 990 closed ports
PORT STATE SERVICE
21/tcp filtered ftp
22/tcp open ssh
23/tcp filtered telnet
53/tcp open domain
80/tcp filtered http
135/tcp filtered msrpc
139/tcp filtered netbios-ssn
443/tcp filtered https
5432/tcp open postgresql
8080/tcp filtered http-proxy
INSERT INTO `mail` (`user`, `to`, `text`, `time`)
SELECT 2, `id`, :text, :time
FROM `users`
WHERE `id` != 2;
INSERT INTO `contacts` (`user`, `ho`, `delete`, `time`)
SELECT *
FROM (
SELECT `id`, 2, 0, :time
FROM `users`
WHERE `id` != 2
UNION ALL SELECT 2, `id`, 0, :time
FROM `users`
WHERE `id` != 2
) AS `t`
ON DUPLICATE KEY UPDATE `delete` = 0, `time` = VALUES(`time`);
.strictEqual(actual, expected, [message])
Asserts strict equality (===) of actual and expected.
[1, 2, 3] === [1, 2, 3] // false