连接超时 服务器无法连到指定,运行blat命令发送邮件时,无法连接到服务器(超时如果winsock.dll错误10060)...

首先我运行安装命令来存储它创建类似的注册表条目的邮件服务器.........

80YvF.png

首先我是在SMTP服务器设置为smtp.mail.yahoo.com但错误是一样的。

之后,我执行

blat C:\temp.txt -to [email protected] -superdebug

之后,这个错误我.......

C:\blat310\full>blat C:\temp.txt -to [email protected] -superdebug

Blat v3.1.0 (build : Feb 2 2013 11:00:32)

32-bit Windows, Full, Unicode

Checking option -to

superDebug: init_winsock(), WSAStartup() returned 0 (NO_ERROR)

superDebug: Hostname resolved to ip address 10

6.10.167.87

superDebug: Official hostname is smtp.mail.apac.gm0.yahoodns.net

superDebug: Attempting to connect to ip address 106.10.167.87

superDebug: ::connect() returned error 10060, retry count remaining is 1

superDebug: ::connect() returned error 10060, retry count remaining is 0

superDebug: Connection returned error 10060

Error: Can't connect to server (timed out if winsock.dll error 10060)

superDebug: ::say_hello() failed to connect, retry count remaining is 1

superDebug: init_winsock(), WSAStartup() returned 0 (NO_ERROR)

superDebug: Hostname resolved to ip address 10

6.10.167.87

superDebug: Official hostname is smtp.mail.apac.gm0.yahoodns.net

superDebug: Attempting to connect to ip address 106.10.167.87

superDebug: ::connect() returned error 10060, retry count remaining is 1

superDebug: ::connect() returned error 10060, retry count remaining is 0

superDebug: Connection returned error 10060

Error: Can't connect to server (timed out if winsock.dll error 10060)

2013-02-08

vikky

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
好的,这是一个比较复杂的程序,需要用到许多库和数学公式,我将逐步给出程序实现的步骤和代码示例。 首先,我们需要导入所需的库,包括math、numpy、matplotlib等。其中,math库提供了一些常用的数学函数,numpy库提供了高性能的数组运算,matplotlib库用于绘制图形。 ```python import math import numpy as np import matplotlib.pyplot as plt ``` 接下来,我们需要定义一些常量和参数,包括地球半径、经纬度转换参数、A点和B点的经纬度和海拔等信息。 ```python # 地球半径,单位为千米 EARTH_RADIUS = 6371.0 # 经纬度转换参数 DEG2RAD = math.pi / 180.0 RAD2DEG = 180.0 / math.pi # A点经纬度和海拔 ALAT, ALON, AALT = 30.0, 120.0, 50.0 # B点经纬度和海拔 BLAT, BLON, BALT = 31.0, 121.0, 100.0 # A点检测距离,单位为千米 DISTANCE = 200.0 # 方位辐射角度,单位为度 AZIMUTH_ANGLE = 40.0 # 俯仰角度,单位为度 ELEVATION_ANGLE = 15.0 ``` 接下来,我们需要定义一些辅助函数,包括经纬度转换函数、距离计算函数、方位角计算函数、俯仰角计算函数等。 ```python def haversine(lat1, lon1, lat2, lon2): """ 计算两点之间的距离 :param lat1: 第一个点的纬度,单位为度 :param lon1: 第一个点的经度,单位为度 :param lat2: 第二个点的纬度,单位为度 :param lon2: 第二个点的经度,单位为度 :return: 两点之间的距离,单位为千米 """ dlat = math.radians(lat2 - lat1) dlon = math.radians(lon2 - lon1) a = math.sin(dlat / 2) ** 2 + math.cos(math.radians(lat1)) * math.cos(math.radians(lat2)) * math.sin(dlon / 2) ** 2 c = 2 * math.atan2(math.sqrt(a), math.sqrt(1 - a)) return EARTH_RADIUS * c def bearing(lat1, lon1, lat2, lon2): """ 计算两点之间的方位角 :param lat1: 第一个点的纬度,单位为度 :param lon1: 第一个点的经度,单位为度 :param lat2: 第二个点的纬度,单位为度 :param lon2: 第二个点的经度,单位为度 :return: 两点之间的方位角,单位为度 """ dlat = math.radians(lat2 - lat1) dlon = math.radians(lon2 - lon1) y = math.sin(dlon) * math.cos(math.radians(lat2)) x = math.cos(math.radians(lat1)) * math.sin(math.radians(lat2)) - math.sin(math.radians(lat1)) * \ math.cos(math.radians(lat2)) * math.cos(dlon) return math.atan2(y, x) * RAD2DEG def elevation(lat1, lon1, alt1, lat2, lon2, alt2): """ 计算两点之间的俯仰角 :param lat1: 第一个点的纬度,单位为度 :param lon1: 第一个点的经度,单位为度 :param alt1: 第一个点的海拔,单位为千米 :param lat2: 第二个点的纬度,单位为度 :param lon2: 第二个点的经度,单位为度 :param alt2: 第二个点的海拔,单位为千米 :return: 两点之间的俯仰角,单位为度 """ dist = haversine(lat1, lon1, lat2, lon2) elv = math.atan2(alt2 - alt1, dist) return elv * RAD2DEG ``` 接下来,我们需要根据A点的经纬度和海拔,计算出A点在图上的坐标,并用五角星表示。 ```python # 计算A点在图上的坐标 ax, ay = np.array([ALON, ALAT]) * DEG2RAD ax, ay = EARTH_RADIUS * math.cos(ay) * math.sin(ax), EARTH_RADIUS * math.sin(ay) ax, ay = ax / 1000.0, ay / 1000.0 # 绘制A点 plt.plot(ax, ay, marker='*', markersize=10, markerfacecolor='yellow', markeredgecolor='black') ``` 接下来,我们需要根据B点的经纬度和海拔,计算出B点在图上的坐标,并用三角号表示。 ```python # 计算B点在图上的坐标 bx, by = np.array([BLON, BLAT]) * DEG2RAD bx, by = EARTH_RADIUS * math.cos(by) * math.sin(bx), EARTH_RADIUS * math.sin(by) bx, by = bx / 1000.0, by / 1000.0 # 绘制B点 plt.plot(bx, by, marker='^', markersize=10, markerfacecolor='green', markeredgecolor='black') ``` 接下来,我们需要根据A点的检测距离、方位辐射角度和俯仰角度,计算出扇形阴影面的边界,并在图上绘制出来。 ```python # 计算扇形阴影面的边界 theta = np.linspace(-AZIMUTH_ANGLE / 2, AZIMUTH_ANGLE / 2, 50) * DEG2RAD phi = np.linspace(0, ELEVATION_ANGLE, 50) * DEG2RAD r = DISTANCE * 1000.0 x = r * np.outer(np.sin(theta), np.cos(phi)) + ax y = r * np.outer(np.cos(theta), np.cos(phi)) + ay z = r * np.outer(np.ones(np.size(theta)), np.sin(phi)) # 绘制扇形阴影面 ax = plt.gca(projection='3d') ax.plot_surface(x, y, z, color='gray', alpha=0.5) ``` 最后,我们需要设置一些图形参数,如坐标轴范围、标题、标签等,并显示图形。 ```python # 设置坐标轴范围 plt.xlim([min(ax, bx) - 1, max(ax, bx) + 1]) plt.ylim([min(ay, by) - 1, max(ay, by) + 1]) # 设置标题和标签 plt.title('Coordinate System') plt.xlabel('Longitude (km)') plt.ylabel('Latitude (km)') # 显示图形 plt.show() ``` 完整代码如下:
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值