- 博客(69)
- 资源 (2)
- 收藏
- 关注
原创 Windows 下免安装 PostgreSQL 16、PostGIS 安装
【代码】Windows 下免安装 PostgreSQL 16、PostGIS 安装。
2025-03-15 20:00:59
325
原创 Ubuntu 24.04.2 允许 root 登录桌面、 ssh 远程、允许 Ubuntu 客户机与主机拖拽传递文件
修改 /etc/pam.d/gdm-autologin , /etc/pam.d/gdm-password。修改 /etc/ssh/sshd_config。
2025-03-10 14:20:40
415
原创 Ubuntu 24.04.2 安装 PostgreSQL 16 、PostGIS 3
【代码】Ubuntu 安装 PostgreSQL 16 、PostGIS 3。
2025-03-10 13:13:00
321
原创 为解决用户端缓存问题给 html 中的 js, css 添加/替换版本号
为解决用户端缓存问题给 html 中的 js, css 添加/替换版本号python with_version.py input.html v=0.0.1 output.htmlimport bs4import sysdef param_merge(vstr, pstr): vsplit = vstr.split('=') pdict = {} for pkey in pstr.split('&'): psplit = pkey.split('='
2021-12-04 22:25:52
479
转载 用 nginx 转发一个端口上的 http 应用
Running on http://localhost:6816/3. 访问 http://localhost:6815/6816/localized-tiles/index.html#/map2d
2021-11-02 14:29:16
265
原创 vue 消息总线解耦 bus.$on(), bus.$emit(), bus.$off
bus 是一个 Vue 对象<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Doc.
2021-10-31 19:18:47
678
转载 vue router 屏蔽 push 重复路由报错
// 0. 如果使用模块化机制编程,导入Vue和VueRouter,要调用 Vue.use(VueRouter)// 1. 定义 (路由) 组件。// 可以从其他文件 import 进来const Foo = { template: '<div>foo</div>'}const Bar = { template: '<div>bar</div>'}// 2. 定义路由// 每个路由应该映射一个组件。 其中"component" 可以是/
2021-10-22 07:37:50
459
原创 postgresql 用函数返回表多行
postgresql 用函数返回表多行postgresql 用函数返回表多行1. 这种写法返回需要声明 t(id int4, name varchar...) 必须带类型2. 无需返回声明,但是字段重名需重命名postgresql 用函数返回表多行1. 这种写法返回需要声明 t(id int4, name varchar…) 必须带类型例子drop function if exists public.xzqh_get_siblings_and_children(in varchar);create
2021-10-07 16:06:59
937
原创 IndexedDB 的简单使用
这里写自定义目录标题indexedDB参考第一个例子第二个例子indexedDB参考浏览器数据库 IndexedDB 入门教程 - 阮一峰的网络日志(基本概念)使用 IndexedDB - Web API 接口参考 | MDN (主要参考)IDBDatabase - Web API 接口参考 | MDNIDBObjectStore - Web API 接口参考 | MDNHTML5 indexedDB前端本地存储数据库实例教程 « 张鑫旭-鑫空间-鑫生活第一个例子仿写 localSto
2021-07-30 17:08:26
384
原创 postgis 常用 sql 20210707
drop table if exists public."position";CREATE TABLE public."position" ( id serial NOT NULL, "name" varchar(255) NOT NULL DEFAULT 'unnamed'::character varying, geom geometry NOT NULL, CONSTRAINT position_pk PRIMARY KEY (id));insert into public."pos
2021-07-07 12:58:24
428
原创 postgresql 触发器例子(学生,课程,班级,选课)
postgresql 触发器例子(学生,课程,班级,选课)课程表-- 课程表 coursedrop table if exists public.course;CREATE TABLE public.course ( id serial NOT NULL, couse_id varchar(100) null, "name" varchar(100) NULL, CONSTRAINT course_pk PRIMARY KEY (id));COMMENT ON COLUMN pu.
2021-06-10 09:49:06
1905
转载 centos 7 安装 node.js (不编译,二进制安装)
centos 7 安装 node.js (不编译,二进制安装)官网 https://nodejs.org/zh-cn/download/ 下载 Linux 二进制文件,得到 node-v14.17.0-linux-x64.tar.xz解压至 /usr/node-v14.17.0-linux-x64编辑 /etc/profile ,文件末尾添加 export PATH=$PATH:'/usr/node-v14.17.0-linux-x64/bin'source /etc/profile 无需重启.
2021-05-19 22:04:01
415
原创 iview 组件属性 “change-on-select” 在 props 中转为了 changeOnSelect
带有 “-” 的属性名在 props 中按驼峰命名法被转换<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale
2021-04-16 11:51:41
906
转载 CentOS 7 GNOME 使用免安装 VSCode
CentOS 7 GNOME 使用免安装 VSCode.tar.gz下载 vscode 的 tar.gz 压缩包 https://code.visualstudio.com/#alt-downloads解压到 /usr 下,生成 /usr/VSCode-linux-x64./code --no-sandbox 如果是 root如果报错 /lib64/libstdc++.so.6: version `CXXABI_1.3.9’ not found 解决方案执行 strings /usr/lib.
2021-03-10 12:18:48
605
1
转载 CentOS 7 编译安装 Nginx
CentOS 7 编译安装 Nginx https://www.cnblogs.com/liujuncm5/p/6713784.html确认有 gcc ,无则 yum install gcc-c++yum install -y pcre pcre-develyum install -y zlib zlib-develyum install -y openssl openssl-devel在 http://nginx.org/en/download.html 下载 stable version .
2021-03-06 08:24:35
182
转载 CentOS 7 安装 Anaconda3
CentOS 7 安装 Anaconda3官网下载 Anaconda3-2019.03-Linux-x86_64.shyum install -y bzip2bash Anaconda3-2019.03-Linux-x86_64.shcd /root 执行 ls -avim .bashrc输入i,文件结尾追加一行 export PATH="/root/anaconda3/bin:$PATH",按esc,输入:wq保存并退出source /root/.bashrc查看目前的源目录conda.
2021-03-06 08:20:42
306
转载 centos7 gnome postgresql-11 + postgis31_11 + pgadmin4-deskto
安装 PostgreSQL 11 官网安装链接yum install https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm 装了这个 rpm ,才能 yum searchyum install -y postgresql11yum install -y postgresql11-server/usr/pgsql-11/bin/postgresql-.
2021-03-06 08:15:26
508
原创 CentOS 7 安装 Mariadb 10.5
Centos 7 GNOME 安装 Mariadbyum install -y mariadb mariadb-serversystemctl start mariadbsystemctl restart mariadbsystemctl stop mariadb修改端口,第四行加 port=46303 10000~60000 为宜[mysqld]datadir=/var/lib/mysqlsocket=/var/lib/mysql/mysql.sockport=46303# Disa.
2021-03-05 17:12:27
786
转载 centos 7 播放此文件需要 MPEG-4 ACC 解码器…… 问题的解决方案
1. yum -y install epel-release&&rpm -Uvhhttp://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm2.yum -y install gstreamer-ffmpegyum -y install gstreamer-plugins-uglyyum -y install gstreamer-plugins-bad...
2021-03-04 16:50:10
1759
1
原创 spring boot MySQL 8.0.12 application.properties
1. application.properties中spring.datasource.url=jdbc:mysql://127.0.0.1:3306/my_new_table_1?useUnicode=true&characterEncoding=utf8&serverTimezone=UTC&useSSL=false 其中my_new_table_1是数据库名...
2018-10-22 15:26:17
1057
原创 n×n棋盘上n皇后问题
code:// N Queen Problem: n queen, n row, n colomn, all possible queen placements.#include #include #define VALID 0#define INVALID -1#define QUEEN 1void create_board(int **& board, int n){
2017-04-06 18:11:31
494
原创 归并排序(非递归)
#include #include using namespace std;// 要求[i1, j1], [i2, j2]两段已经排序template void _merge(T a[], unsigned i1, unsigned j1, unsigned i2, unsigned j2){ if (i2 == i1) return; unsigned pos = i1
2017-03-11 12:45:38
433
原创 douglas peucker递归分治
vs2015 c++11 standard or later1. geometry.h#ifndef GEOMERTY_H_#define GEOMETRY_H_#include union Point{ struct { float x, y; }; float compo[2];};typedef std::deque PointList;#e
2017-02-26 17:23:33
486
原创 int * const *, const int * const *, const int **
1. 必须先明确的概念:char const * 等价于 const char *2. int * const * 能修改一级指针指向的内容(一级指针类型为int *),但不能改变一级指针。可以理解为(int *) const * 即 const (int *) * ,(类比char const * 即 const char *,不能改char;同理此处不能改int *,不过可以改int *指向的内容)3. const int * const * 不能修改一级指针指向的内容(一级指针类型为const
2017-02-23 07:29:58
851
转载 windows10和ubuntu16.04双系统下时间不同步解决方法
windows10和ubuntu16.04双系统下时间不同步解决方法: sudo apt-get install ntpdatesudo ntpdate time.windows.comsudo hwclock --localtime --systohc
2017-02-17 16:57:10
319
转载 x86和x64下boost库安装与配置
1.网上下载boost库2.vs2015开发人员命令提示中运行bootstrap.bat3.x86安装则输入命令: b2.exe --prefix=D:\boost\x86 --build-type=complete --build-dir=build_tmp toolset=msvc-14.0 address-model=32 install ("D:\boost
2017-02-08 07:23:38
2320
原创 全局函数指针数组typedef和成员函数指针数组类内外部typedef
#include #include // 1.对全局函数指针数组typedeftypedef void(*FuncType01)();typedef FuncType01 Func01Array[2];void foo() { std::cout << "void foo()" << std::endl;}void bar(){ std::cout << "void b
2017-02-05 23:21:44
612
转载 boost::filesystem常用功能
boost库文档system_complete(path); 返回完整路径(相对路径 + 当前路径)exists(path); 目录是否存在is_directory(path);is_directory(file_status); 是否是路径is_empty(path); 文件夹是否为空,必须保证路径存在,否则抛异常is_regular_file(path);is_re
2017-02-03 15:50:27
14570
转载 纯虚析构函数必须有定义(可以是空的)
纯虚析构函数必须有定义(可以是空的),一般就给一个空的#include class A{public: explicit A(int x) : m_nX(x) {} virtual ~A() = 0;// 纯虚析构函数必须有定义并且会执行 virtual void f1() = 0 /*{ std::cout << "A::f1()" << std::endl; }*/;// 纯
2017-01-16 19:04:57
1540
转载 重装系统后“最近历史文件”为空的解决办法
例如vs起始页“最近”一栏为空(红色方框)办法:1. win + R输入:regedit 2. 打开下面的键值: HKEY_CURRENT_USER/Software/Microsoft/Windows/CurrentVersion/Policies/Explorer将 NoRecentDocsHistory 设置为 0 (点击右键修改)
2017-01-14 15:20:00
1733
1
原创 vs2012使用向导创建和使用dll
一、制作dll1.选择Win32项目命名为"mydll"2.选择dll,勾选导出符号(这样就有示例模板了)。3.会生成一系列文件,实际上用到的只有mydll.h,mydll.cpp两个文件,里边有三个例子,一个是全局变量示例,一个是全局函数例子,还有一个是类,只要在他的基础上改就行了,下面演示hello world:mydll.h文件:// 下列 ifdef 块是创
2017-01-12 18:37:45
487
转载 标准c/c++获得某文件夹下所有文件名(包括子文件夹中的)
#include #include #include #include void getFiles(const std::string & path, std::vector & files){ //文件句柄 long hFile = 0; //文件信息,_finddata_t需要io.h头文件 struct _finddata_t fileinfo; std::string
2017-01-09 18:04:28
4002
转载 给struct或union成员两个名称,其中一个用数组元素表示
#include struct Point2d{ union { float pos[3]; struct { float x, y, w; }; };};void main(){ // 1.pos[]数组和x, y, w使用同一片区域,这就使每个分量有了两个名字pos[0] = x, pos[1] = y, pos[2] = w Point2d p2
2016-12-23 19:19:10
671
转载 stl中的全排列算法
1. 需先排序,从小到大用next_permutation float c[] = {1.2f, 32.2f, -1.3f}; std::sort(c, c + 3); do { printf("%.2f %.2f %.2f\n", c[0], c[1], c[2]); } while (std::next_permutation(c, c + 3));2. 从大到小
2016-12-18 09:45:28
320
原创 四面体简单光照渲染+漫游(使用多个ConstantBuffer减小带宽)
建立了三个ConstantBuffer,一个是每一帧都需要从cpu传过来的用来旋转的world矩阵,一个是摄影机操作后传过来的view矩阵,还有一个是只传过来一次的projection矩阵和两个方向光的向量1.lighting.fx// Constant Buffer Variablescbuffer CBChangesEveryFrame : register( b0 ){ mat
2016-12-13 13:15:47
1901
原创 D3D11四面体简单方向光光照渲染
初始化设备大致分这几个步骤:1.Create device2.Create swap chain3.Create a render target view4.Create depth stencil texture5.Create the depth stencil view6.Setup the viewport7.Compile and create the ver
2016-12-12 13:36:32
1149
原创 幂集问题(即求全组合,全部子集问题)
8、若S是n个元素的集合,则S的幂集P(S)定义为S的所有子集的集合。例如,S=(a,b,c),P(S)={(),(a),(b),(c),(a,b),(a,c),(b,c),(a,b,c)}。给定S,写一递归算法求P(S)。(本题20分)#include #include // 《数据结构》严蔚敏P150 例6.3void PrintPowerSet(int i, int n){
2016-11-30 14:42:49
1482
原创 判断二维线段相交
#include typedef struct Point {float x, y;} Vector;struct Line {Point p1, p2;};bool iscross(const Line & l1, const Line & l2, Point * pOut = nullptr){ Vector v1 = {l1.p2.x - l1.p1.x, l1.p2.y -
2016-11-29 21:36:30
441
原创 日期作差
// 1、编写一个程序,求用户输入的开始时间到终止时间之间相距的天数。(本题15分)#include struct Date{ int year; int month; int day;};// 判断是否为闰年bool is366(int year){ return year % 100 == 0 && year % 400 == 0 || year % 100 != 0
2016-11-29 20:48:48
339
MySQL-8.0.12下载安装配置方法
2018-10-17
MySQL8.0.12下载安装配置方法
2018-10-17
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人