_setIsActive = () => {
this._lastInteraction = new Date();
this.props.navigation.setParams({
showAppBar: 'flex',
});
_setIsInactive = () => {
this.setState({ timeWentInactive: new Date() });
this.props.navigation.setParams({
showAppBar: 'none',
});
return (
<View style={{ display: this.props.params.showAppBar }}>
<Appbar.Header>
>>> import ipaddress
>>> list_of_ips = ['10.0.0.0', '10.0.0.1', '10.0.0.2', '10.0.0.3', '10.0.0.5']
>>> nets = [ipaddress.ip_network(_ip) for _ip in list_of_ips]
>>> cidrs = ipaddress.collapse_addresses(nets)
>>> print(list(cidrs))
[IPv4Network('10.0.0.0/30'), IPv4Network('10.0.0.5/32')]
>>>
Это из области: у меня есть нож, но я хочу начать им забивать гвозди. Не порежусь ли я при этом?
Почему бы не использовать готовые решения:
https://stackoverflow.com/questions/23169509/mongo...