转自:https://www.jianshu.com/p/9d3d0c64c894 最后一次更新日期: 2019/4/13 NumPy 是一个 Python 包。 它代表 “Numeric Python”。 它是一个由多维数组对象(ndarray)和用于处理数组的例程集合组成的库。 使用NumPy, ...
分类:
其他好文 时间:
2020-07-28 22:53:25
阅读次数:
155
方案一: 设置tranform/scale 首先设置内容固定宽度、自动高度(以下举例) width: 375px; height: auto; 通过获取窗口的宽度与固定宽度相除,获得缩放比例 const scaleValue=window.innerWidth / 375 在html层,添加一段sc ...
分类:
移动开发 时间:
2020-07-28 22:30:53
阅读次数:
105
#include <iostream> #include <map> using namespace std; typedef struct alertInfo { double alertUp; double alertDown; alertInfo(double up, double down) ...
分类:
其他好文 时间:
2020-07-28 22:25:22
阅读次数:
75
当进行拷贝或赋值操作时,每个shared_ptr都会纪录有多少个其他shared_ptr指向相同的对象: auto p = make_shared<int>(50);//p指向的对象只有p一个引用者 auto q = p; //p和q指向相同对象,此对象有两个引用者; 智能指针类能记录有多少个sha ...
分类:
编程语言 时间:
2020-07-28 22:13:59
阅读次数:
134
第一步,服务器准备 这里使用docker模拟几台服务器,分别命名为node2,node3,node4(使用镜像chenqionghe/ubuntu,密码统一为88888888),生产环境为ip或host docker run -d --name node2 -p 2223:22 chenqiongh ...
分类:
系统相关 时间:
2020-07-28 17:24:39
阅读次数:
97
首先先上代码 CSS.container { display: grid; grid-gap: 15px; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); grid-template-rows: repeat(2, 100px ...
分类:
Web程序 时间:
2020-07-28 14:25:33
阅读次数:
89
前言 该文是基于上篇《MySQL主从分离的实现》的代码层实现,所以本文配置的主数据库和从数据库的数据源都是在上篇博文中已经介绍了的。 动态选择数据源的配置 由于我们在写数据的时候需要使用主库的数据源,读的时候需要从库的数据源,我们可以在Spring源码中,通过DataSource可以找到Abstra ...
分类:
数据库 时间:
2020-07-28 10:03:12
阅读次数:
74
一、修改网络配置文件 #vim /etc/network/interfaces auto loiface lo inet loopback auto ens33iface ens33 inet manualauto br0iface br0 inet dhcp bridge_stp off brid ...
分类:
系统相关 时间:
2020-07-28 10:00:49
阅读次数:
104
数据准备: drop table if exists t1; /* 如果表t1存在则删除表t1 */ CREATE TABLE `t1` ( `id` int(11) NOT NULL AUTO_INCREMENT, `a` int(11) DEFAULT NULL, `b` int(11) NOT ...
分类:
其他好文 时间:
2020-07-28 00:03:44
阅读次数:
96
思路: 中序:左->根->右 1.需要一个建立一个栈,首先将左子树放入栈中 2.获取栈顶元素并进行节点判断是否有右子树 3. 代码: /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode ...
分类:
其他好文 时间:
2020-07-27 23:50:51
阅读次数:
62