1.windows 命令
1.1.查看端口
netstat -aon|findstr ":8081"
1.2.关闭进程
taskkill /T /F /PID 9088
1.3 windos 重启bat
@echo off
set port=8821
for /f "tokens=1-5" %%i in ('netstat -ano^|findstr ":%port%"') do (
echo kill the process %%m who use the port
taskkill /pid %%m -t -f
goto start
)
:start
START /b .\jre\bin\javaw -jar radar-0.0.1-SNAPSHOT.jar --server.port=%port%>radar.log
exit
2.二分查找
二分查找可看陈优化的暴力计算。通常用于求得结果所在的值域于其对应的一个值的值域呈单调关系的情况,比如求满足某条件时的最大最小值。
3.postgis这两句sql是否等效?
SELECT ST_GeomFromEWKT('SRID=4269;LINESTRING(-71.160281 42.258729,-71.160837 42.259113,-71.161144 42.25932)');
SELECT ('SRID=4269;LINESTRING(-71.160281 42.258729,-71.160837 42.259113,-71.161144 42.25932)'::geometry);
:: 为强转符号
等价于
SELECT CAST('SRID=4269;LINESTRING(-71.160281 42.258729,-71.160837 42.259113,-71.161144 42.25932)' AS geometry);