私信  •  关注

Nate

Nate 最近回复了
4 年前
回复了 Nate 创建的主题 » ajax响应后如何在jquery中刷新表单[duplicate]

你可以用 document.getElementById("addform").reset(); 重置窗体

8 年前
回复了 Nate 创建的主题 » 在linux服务器上运行d3和python脚本文件

我在我的VPS上试过,然后用 alias 命令对我有效:

server {
  listen 80;
  server_name   something.nateeagle.com;

  location /something {
    alias /home/neagle/something;
    index index.html index.htm;
  }
}
5 年前
回复了 Nate 创建的主题 » 如何比较python中ser.readline()的输出?

通过检查答案是否在读取值的子字符串中,我可以让它工作:

while 1:
time.sleep(1)
ser.write(u.encode('utf-8'))
print('ACK sent')
res = ser.readline()
result = res.find('ON')
if result > -1:
    print('Pass')
else:
    print('Try again')enter code here