solar's recent timeline updates
solar

solar

V2EX member #5006, joined on 2011-01-09 18:51:13 +08:00
[西安] 出个 Apple TV 3 包邮顺丰 300 块
二手交易  •  solar  •  Jun 4, 2016  •  Lastly replied by xiaopavatar
6
出 Gemini 2 激活码一枚
二手交易  •  solar  •  May 17, 2016  •  Lastly replied by shily
3
[西安]出小米空气净化器 600 块
二手交易  •  solar  •  Aug 6, 2015  •  Lastly replied by solar
7
白色 iPhone 6 64G 想换个相同配置黑色的
物物交换  •  solar  •  Jul 14, 2015  •  Lastly replied by solar
7
sendmail 特别慢,怎么破?
问与答  •  solar  •  Jun 22, 2014  •  Lastly replied by kkxxxxxxx
4
看看你是第几号 V2EXer
V2EX  •  solar  •  Jun 15, 2014  •  Lastly replied by ShunYea
33
求助:关于 varnish 配置的问题
Varnish  •  solar  •  May 30, 2014  •  Lastly replied by solar
5
[求助] MongoDB 无法自启动
问与答  •  solar  •  Apr 21, 2014  •  Lastly replied by solar
1
求助:MAC 上到底如何配置 vsftpd
问与答  •  solar  •  Nov 27, 2014  •  Lastly replied by godontop
2
solar's recent replies
假设你已经有了区域的 geometry 数据,下面是一个示例接口:

from flask import Flask, request, jsonify
from shapely.geometry import Point, Polygon

app = Flask(__name__)

# 定义一个多边形区域,这里以一个简单的四边形为例
polygon_coords = [(30.6167, 104.0667), (30.6167, 104.1667), (30.7167, 104.1667), (30.7167, 104.0667)]
polygon = Polygon(polygon_coords)

@app.route('/is_point_in_polygon', methods=['POST'])
def is_point_in_polygon():
data = request.json
lat = data.get('lat')
lon = data.get('lon')

if lat is None or lon is None:
return jsonify({'error': 'Please provide both latitude and longitude'}), 400

point = Point(lon, lat) # 注意:shapely 的 Point 构造函数参数顺序是(x, y),即(lon, lat)

is_inside = polygon.contains(point)

return jsonify({'inside': is_inside})

if __name__ == '__main__':
app.run(debug=True)
Nov 2, 2022
Replied to a topic by noginger macOS 升级 12.0.1 后, moom 无法使用了?
应该是破解版的不能用。我 macOS Ventura 13.0 , 下载官方试用版正常使用。
好多经典游戏 奈斯
建议把手机供起来
@mxT52CRuqR6o5 现代浏览器默认不支持 Flash 了,Chrome 更是彻底禁用了,连手动开启的选项都没了。
Dec 3, 2021
Replied to a topic by 3kkkk 程序员 京东没有 robots.txt 是怎样防止爬虫抓取的
robots.txt 只是个君子协议而已,并没有法律效力或强制性的。
spring 一把梭
May 18, 2020
Replied to a topic by hejw19970413 程序员 各位大佬,周末平时都是在干嘛呀?
带娃
数据库存的是 UTC 时间, 到前端要转换一下的。
@jorneyr 800 贵了吧 500 吧 ……
About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2656 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 22ms · UTC 14:26 · PVG 22:26 · LAX 07:26 · JFK 10:26
♥ Do have faith in what you're doing.