>>> from datetime import date
>>> today = date.today()
>>> today
datetime.date(2022, 12, 12)
>>> lastbirthday = date(today.year, 6, 14)
>>> today - lastbirthday
datetime.timedelta(days=181)
>>> today >= lastbirthday
True
>>> lastbirthday = date(today.year+1, 6, 14)
>>> today >= lastbirthday
False
>>> lastbirthday - today
datetime.timedelta(days=184)
>>>
leah@asus-zenbook ~> ipcalc 192.168.200.0/24
Address: 192.168.200.0 11000000.10101000.11001000. 00000000
Netmask: 255.255.255.0 = 24 11111111.11111111.11111111. 00000000
Wildcard: 0.0.0.255 00000000.00000000.00000000. 11111111
=>
Network: 192.168.200.0/24 11000000.10101000.11001000. 00000000
HostMin: 192.168.200.1 11000000.10101000.11001000. 00000001
HostMax: 192.168.200.254 11000000.10101000.11001000. 11111110
Broadcast: 192.168.200.255 11000000.10101000.11001000. 11111111
Hosts/Net: 254 Class C, Private Internet
Далее каждую ночь база данных доменов будет обновляться. На двух процессорах E5-2690v2 с 225 гигабайтами памяти процесс обновления БД з анимает 3-6 часов.
SELECT * FROM Products
WHERE Date BETWEEN 1669013940394 AND 1669618553557;
from datetime import datetime, timedelta, timestamp
day = '12/Oct/2013'
dt = datetime.strptime(day, '%d/%b/%Y')
start = dt - timedelta(days=dt.weekday())
end = start + timedelta(days=6)
print(start.strftime('%d/%b/%Y'))
print(end.strftime('%d/%b/%Y'))
print(int(timestamp(start)*1000))
print(int(timestamp(end)*1000))
pactl load-module module-combine-sink ......
sink_name=<name of the sink> sink_properties=<properties for the sink> slaves=<sinks to combine> rate=<sample rate> channels=<number of channels> channel_map=<channel map>
public class Main {
public static void main(String[] args) {
Scanner In = new Scanner(System.in);
System.out.print("Введите a: ");
int A = In.nextInt();
System.out.print("Введите b: ");
int B = In.nextInt();
try {
sum(A, B);
}catch(ArithmeticException e) {
System.out.println(e.getMessage());
}
}
static int sum(int a,int b) /* не уверен, что нужно */ throws ArithmeticException {
if (a<0) {
throw new ArithmeticException("a меньше 0");
} else if (b<0) { // моя очепятка детектед.... чеккед и корректед
throw new ArithmeticException("b меньше 0");
}
return a+b;
}