不要以為我是汽車發燒友,我還是較喜歡步行、騎單車和坐地鐵的,愈低碳就愈好吧。
但看見這台奔馳(Mercedes-Benz)的復古跑車SLK Gullwing,又真的令我眼前一亮,那對雙翼齊飛的車門,打開起來真的很有氣勢。
很小很小的時候,我就是
Here's something it's time to say outright.
If you're getting the impression from previous entries that you can't have any fun any morewith all of those viral marketing tricks that people are so fond of,you'd be correct. Viral marketing is one of those poisoned well ideas,like affiliate marketing ; too manyspammers have hit too many people and systems for you to do it unlessyou are really good at doing it very lightly.
(You can get a certain amount of
As sort of promised in the last entry , here'sthe Python code to look up IPv4 and IPv6 addresses for a host, using getaddrinfo() . As usual, this is condensed for WanderingThoughts and omits a modicum of error checking.
import socket
def gethostips(host, type=None): ips = set() if type: types = (type,) else: types = (socket.AF_INET, socket.AF_INET6) for t in types: try:
Since I've been immersing myself in IPv6 I've naturally becomeinterested in finding out the IPv6 addresses of hosts, which means getaddrinfo() . In many ways, getaddrinfo() is a great API; it'swonderfully tuned for giving you exactly the information you need inorder to make connections to places. In other ways, it's less than idealand how to use its API is unclear.
(For the rest of this, I'm going to assume that you'