PGSQL

查看所有表及备注

WITH T2 AS(
SELECT relname AS c_table_name, CAST(obj_description(relfilenode,'pg_class') AS VARCHAR) AS c_comment
FROM pg_class
)
SELECT tableowner AS t_owner,schemaname AS t_schema,tablename AS t_name,T2.*
FROM pg_tables AS T1
LEFT JOIN T2 ON T2.c_table_name = T1.tablename
WHERE T1.tablename NOT LIKE 'pg_%'
AND T1.schemaname IN ('schema_xxxx','schema_xxxx','schema_xxxx')

PostgreSQL 创建类似 MySQL 自增主键

-- CREATE SEQUENCE sys_user_userid_seq INCREMENT 1 START 100 MINVALUE 100 MAXVALUE 99999999 CACHE 1;
alter table sys_user alter column user_id set default nextval('sys_user_userid_seq');

PostgreSQL 返回其参数中第一个非空表达式 COALESCE
select COALESCE(null,null,’0′)

string_agg
select string_agg(col,',') ,cola from table_a group by cola


SELECT * FROM table01 WHERE col01= ANY(STRING_TO_ARRAY('aaaa,sss,bbb',','))

apple-m1-tensflow

mac 终端下,执行以下命令,即可安装brew:
/usr/bin/ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”

参考
https://github.com/conda-forge/miniforge/#download
https://github.com/apple/tensorflow_macos/releases/tag/v0.1alpha1
https://claytonpilat.medium.com/tutorial-tensorflow-on-an-m1-mac-using-jupyter-notebooks-and-miniforge-dbb0ef67bf90

 

brew 提示错误 fatal: Could not resolve HEAD to a revision 
解决方式参考:
git -C $(brew --repository homebrew/core) checkout master
git -C $(brew --repository homebrew/core) reset --hard HEAD.

1. 安装docker

1.1 下载,打开,拖到 Application

MacM1# softwareupdate –install-rosetta
https://docs.docker.com/desktop/mac/apple-silicon/

1.2 [Google] docker for mac更换国内镜像源

https://blog.csdn.net/w605283073/article/details/105061455
https://docker.mirrors.ustc.edu.cn
https://hub-mirror.c.163.com

1.3 【Docker】
MacM1# docker run -d –privileged=true –name=armpy37_v2 -it arm64v8/python:3.7-bullseye bash

#docker虚拟机内运行
armpy37#

cp -a /etc/apt/sources.list /etc/apt/sources.list.bak
sed -i “s@http://ftp.debian.org@https://repo.huaweicloud.com@g” /etc/apt/sources.list
sed -i “s@http://deb.debian.org@https://repo.huaweicloud.com@g” /etc/apt/sources.list
sed -i “s@http://security.debian.org@https://repo.huaweicloud.com@g” /etc/apt/sources.list

apt-get update
apt-get install -y apt-transport-https ca-certificates
apt-get install -y python3-tables-dbg python3-tables-lib
apt-get install -y r-bioc-hdf5array r-bioc-rhdf5 r-bioc-rhdf5filters r-bioc-rhdf5lib
apt-get install -y r-cran-hdf5 r-cran-hdf5r vitables libhdf5-dev libhdf5-103 hdf5-tools h5utils hdf5-helpers
apt-get install -y xmpi openmpi-bin libxmpi4-dev mpi-default-dev libhdf5-openmpi-dev libhdf5-mpi-dev
apt-get install -y cmake

pip config set global.index-url https://repo.huaweicloud.com/repository/pypi/simple
pip config set global.trusted-host repo.huaweicloud.com

pip install stable-baselines
pip install versioned-hdf5

wget https://repo.rock-chips.com/pypi/simple/tensorflow/tensorflow-1.14.0-cp37-none-linux_aarch64.whl
pip install tensorflow-1.14.0-cp37-none-linux_aarch64.whl

cd /usr/local/lib/python3.7/site-packages/tensorflow/contrib/ && cp __init__.py __init__.py.backup
sed -i ‘s/if os.name/#if os.name/g’ /usr/local/lib/python3.7/site-packages/tensorflow/contrib/__init__.py
sed -i ‘s/from tensorflow.contrib import cloud/#from tensorflow.contrib import cloud/g’ /usr/local/lib/python3.7/site-packages/tensorflow/contrib/__init__.py

cd /dev/shm/ && wget https://apnode.win/cd/TestFPS.zip
cd /dev/shm/ && unzip TestFPS.zip && python TestFPS.PY

 
brew install fftw
brew install openblas
OPENBLAS=”$(brew –prefix openblas)” pip install numpy pandas
$ brew install python@3.9
$ brew install openblas
$ OPENBLAS=”$(brew –prefix openblas)” MACOSX_DEPLOYMENT_TARGET=11.1 python3 -m pip install cython –no-use-pep517
$ OPENBLAS=”$(brew –prefix openblas)” MACOSX_DEPLOYMENT_TARGET=11.1 python3 -m pip install numpy –no-use-pep517
$ OPENBLAS=”$(brew –prefix openblas)” MACOSX_DEPLOYMENT_TARGET=11.1 python3 -m pip install pandas –no-use-pep517
$ OPENBLAS=”$(brew –prefix openblas)” MACOSX_DEPLOYMENT_TARGET=11.1 python3 -m pip install pybind11 –no-use-pep517
$ OPENBLAS=”$(brew –prefix openblas)” MACOSX_DEPLOYMENT_TARGET=11.1 python3 -m pip install scipy –no-use-pep517
$ brew install libjpeg zlib
$ python3 -m pip install pillow
$ python3 -m pip install matplotlib
OPENBLAS=”$(brew –prefix openblas)” pip install numpy
 
OPENBLAS=”$(brew –prefix openblas)” pip install scipy

brew install pkg-config
brew install openblas gfortran
brew install hdf5
export OPENBLAS=/opt/homebrew/opt/openblas/lib/

https://stackoverflow.com/questions/65745683/how-to-install-scipy-on-apple-silicon-arm-m1

pip config set global.index-url https://repo.huaweicloud.com/repository/pypi/simple
pip config set global.extra-index-url https://repo.rock-chips.com/pypi/simple

arch -x86_64 /bin/bash -c “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)”

docker nvidia

docker run –runtime=nvidia –rm nvidia/cuda:9.0-base nvidia-smi

==============================
https://developer.nvidia.com/cuda-toolkit-archive
https://developer.nvidia.com/rdp/cudnn-archive
参考:
https://www.jianshu.com/p/0b2c094724a0
https://github.com/NVIDIA/nvidia-docker/wiki/nvidia-docker
https://nvidia.github.io/nvidia-docker/

https://www.jianshu.com/p/f25ccedb996e
https://blog.csdn.net/submarineas/article/details/108477031

 

gym stable_baselines tensorflow 1.14

pip install stable_baselines

Spring项目推荐

参考:
https://cloud.tencent.com/developer/article/1465684
https://github.com/linlinjava/litemall
https://gitee.com/xiandafu/springboot-plus
https://gitee.com/jishenghua/JSH_ERP
https://gitee.com/shownsheep/taotao-shop
https://gitee.com/mumu-osc/NiceFish
https://gitee.com/catshen/zscat_sw
https://github.com/lenve/VBlog
https://gitee.com/52itstyle/spring-boot-seckill
https://gitee.com/52itstyle/spring-boot-pay
https://github.com/lenve/vhr

https://gitee.com/BuLaoRen/beauty_ssm

教材项目
https://gitee.com/ityouknow/spring-boot-examples.git
https://gitee.com/baomidou/dynamic-datasource-spring-boot-starter.git

webgis-xyz-tile

<!DOCTYPE connections>
<qgsXYZTilesConnections version="1.0">
    <xyztiles name="必应卫星" authcfg="" url="http://ecn.t3.tiles.virtualearth.net/tiles/a{q}.jpeg?g=1" referer="" zmax="19" password="" zmin="1" username=""/>
    <xyztiles name="Esri卫星" authcfg="" url="https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}" referer="" zmax="17" password="" zmin="0" username=""/>
    <xyztiles name="Esri矢量" authcfg="" url="https://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/tile/{z}/{y}/{x}" referer="" zmax="17" password="" zmin="0" username=""/>
    <xyztiles name="Esri地形" authcfg="" url="https://server.arcgisonline.com/ArcGIS/rest/services/World_Terrain_Base/MapServer/tile/{z}/{y}/{x}" referer="" zmax="13" password="" zmin="0" username=""/>
     <xyztiles name="谷歌矢量" authcfg="" url="https://mt1.google.com/vt/lyrs=m&x={x}&y={y}&z={z}" referer="" zmax="19" password="" zmin="0" username=""/>
    <xyztiles name="谷歌卫星" authcfg="" url="https://mt1.google.com/vt/lyrs=s&x={x}&y={y}&z={z}" referer="" zmax="19" password="" zmin="0" username=""/>
    <xyztiles name="OpenStreetMap矢量" authcfg="" url="https://tile.openstreetmap.org/{z}/{x}/{y}.png" referer="" zmax="19" password="" zmin="0" username=""/>
     <xyztiles name="OpenStreetMap地形" authcfg="" url="https://tile.opentopomap.org/{z}/{x}/{y}.png" referer="Kartendaten: © OpenStreetMap-Mitwirkende, SRTM | Kartendarstellung: © OpenTopoMap (CC-BY-SA)" zmax="17" password="" zmin="1" username=""/>
    <xyztiles name="google地形" authcfg="" url="http://mt0.google.cn/vt/lyrs=t&hl=zh-CN&gl=cn&x={x}&y={y}&z={z}" referer="" zmax="18" password="" zmin="0" username=""/>
    <xyztiles name="天地图影像" authcfg="" url="http://t0.tianditu.com/img_w/wmts?service=wmts&request=GetTile&version=1.0.0&LAYER=img&tileMatrixSet=w&TileMatrix={z}&TileRow={y}&TileCol={x}&style=default&format=tiles&tk=40b190683706230fade806c1ac8c14e8" referer="" zmax="18" password="" zmin="0" username=""/>
    <xyztiles name="天地图注记" authcfg="" url="http://t0.tianditu.com/cva_w/wmts?service=wmts&request=GetTile&version=1.0.0&LAYER=cva&tileMatrixSet=w&TileMatrix={z}&TileRow={y}&TileCol={x}&style=default&format=tiles&tk=40b190683706230fade806c1ac8c14e8" referer="" zmax="18" password="" zmin="0" username=""/>
    <xyztiles name="天地图矢量" authcfg="" url="http://t0.tianditu.com/vec_w/wmts?service=wmts&request=GetTile&version=1.0.0&LAYER=vec&tileMatrixSet=w&TileMatrix={z}&TileRow={y}&TileCol={x}&style=default&format=tiles&tk=40b190683706230fade806c1ac8c14e8" referer="" zmax="18" password="" zmin="0" username=""/>
    <xyztiles name="高德卫星" authcfg="" url="https://webst01.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}" referer="" zmax="18" password="" zmin="0" username=""/>
    <xyztiles name="高德路网" authcfg="" url="https://wprd01.is.autonavi.com/appmaptile?x={x}&y={y}&z={z}&lang=zh_cn&size=1&scl=2&style=8&ltype=11" referer="" zmax="18" password="" zmin="0" username=""/>
</qgsXYZTilesConnections>
OpenTopoMap
https://tile.opentopomap.org/{z}/{x}/{y}.png
(See comment below for attribution)
OpenStreetMap
http://tile.openstreetmap.org/{z}/{x}/{y}.png
Google Hybrid
https://mt1.google.com/vt/lyrs=y&x={x}&y={y}&z={z}
Google Satellite
https://mt1.google.com/vt/lyrs=s&x={x}&y={y}&z={z}
Google Road
https://mt1.google.com/vt/lyrs=m&x={x}&y={y}&z={z}
(Codes for other tile types from Google found here)
Bing Aerial
http://ecn.t3.tiles.virtualearth.net/tiles/a{q}.jpeg?g=1

 

OpenLayer 加载天地图
如:http://t3.tianditu.cn/img_c/wmts?service=wmts&request=GetTile&version=1.0.0&LAYER=img&tileMatrixSet=c&TileMatrix=6&TileRow=9&TileCol=53&style=default&format=tiles //正确的写法是:http://t3.tianditu.cn/img_c/wmts?service=wmts{%26}request=GetTile{%26}version=1.0.0{%26}LAYER=img{%26}tileMatrixSet=c{%26}TileMatrix={z}{%26}TileRow={y}{%26}TileCol={x}{%26}style=default{%26}format=tiles

https://t4.tianditu.gov.cn/vec_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=vec&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TILECOL=1711&TILEROW=835&TILEMATRIX=11&tk=cec2a9c687df31dd4fe17abfa5579eff
https://t0.tianditu.gov.cn/cva_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=cva&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TILECOL=1711&TILEROW=835&TILEMATRIX=11&tk=cec2a9c687df31dd4fe17abfa5579eff

XYZ-Tile 天地图
https://t4.tianditu.gov.cn/vec_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=vec&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TILECOL={x}&TILEROW={y}&TILEMATRIX={z}&tk=cec2a9c687df31dd4fe17abfa5579eff

 

 

参考: https://gis.stackexchange.com/questions/20191/adding-basemaps-from-google-or-bing-in-qgis
参考: https://newbedev.com/adding-basemaps-from-google-or-bing-in-qgis
参考: https://blog.csdn.net/QGISClass/article/details/107459636
参考: https://www.cnblogs.com/HandyLi/p/11137367.html