线上nginx 平滑添加新模块;如(--with-http_realip_module)
nginx 添加模块 1.查看当前nginx信息(配置文件路径,启动用户...) ps aux | grep nginx 2.查看当前nginx已启用的模块(记录模块信息,安装路径) ./nginx -V 3.官网下载对应版本的nginx源码包(http://nginx.org/) http://nginx.org/en/download.html 4.上传到服务器解压编译 --with-http_realip_module 是nginx自带的模块,如是第三方模块下载,并关注对应的版本匹配问题
vue实践推荐 vue实践推荐
vue实践推荐 1.vue (1)组件 每个组件单独分成文件,如A.vue文件实现A组件; 除index.vue之外文件名推荐大写开头如BaseHeader.vue或横线连接base-header.vue; 基础组件名可以共用相同的前缀,如BaseButton; 组件名应该倾向于完整单词而不是缩写; 组件名推荐多个单词,如TodoItem代替Todo;html模板中引用推荐todo-item prop定义尽量详细,如指定其类型,必填与否; props: {
status: {
ty
vue 开发系列(十) VUE 作用域插槽
使用场景 官方解释,有时让插槽内容能够访问子组件中才有的数据是很有用的。比如我们在使用ant-design-vue 的表格控件时。 <a-table-column title="注释" dataIndex="comment" >
<template slot-scope="text, record">
<rx-textbox v-model="record.comment" ></rx-textbox>
MySQL5.6在CentOS7下RPM包安装
Mysql的镜像源有国内和国外之分,国外主要用的是官网的http://repo.mysql.com/yum/;国内主要是搜狐和一所大学的;地址分别是:http://mirrors.sohu.com/mysql/和http://mirrors.ustc.edu.cn/mysql-ftp/Downloads/;区别点在于国内的资源下载速度快,缺点就是有些资源跟官网名字不对称,让人不容易与官网资源找到对应的文件,查找时一头雾水;国外官网的资源则是标准的,但是下载速度却慢成龟速(几KB,甚至几百字节)
ArrayList和LinkedList的底层代码实现思想
ArrayList是Java众多集合类中的一个,实现List接口,List的父接口是Collection。ArrayList底层的数据结构是线性表中的顺序表,底层是一个长度可以动态增长的数组。数组有很多缺点,ArrayList弥补了数组的缺点。 源码: 1)transient Object[] elementData;,是一个数组的引用,用来指向底层数组;private int size;用来表示ArrayList中真实元素的个数,每次增加和删除元素size的值都要变化。 2)public c
Kth Smallest Number in Sorted Matrix
Description Find the kth smallest number in a row and column sorted matrix. Each row and each column of the matrix is incremental. Example Example 1: Input:
[
[1 ,5 ,7],
[3 ,7 ,8],
[4 ,8 ,9],
]
k = 4
Output: 5
Example 2: Input:
[
关于go module
从Go 1.11开始引入module,用于版本管理。 通过使用module,工程目录的位置不用必须放在GOPATH下。 当前版本是1.13,下文中将以Go1.13为例介绍module。 在Go 1.13中,继续使用临时环境变量GO111MODULE来设置是否使用module。 1.关于GO111MODULE GO111MODULE 可设置为off, on, 或auto (默认)。 1.1 GO111MODULE=on 如果GO111MODULE=on, go command 将使用module
docker 构建自己的image 镜像文件
docker build 构建自己的镜像文件。 1、在本地工程中运行生成一个springboot的可运行的jar。 因为我习惯用eclipse,所以在eclipse下新建一个springboot的工程,firstSpringboot的工程。 maven配置文件中,注意:必须指定生成文件后运行的主函数mian,否则可能导致的结果是无法访问main函数的错误。 maven配置的pom.xml文件 <project xmlns="http://maven.apache.org/POM/4.0.0"
修复一个mysqlbinlog_flashback不支持json格式问题
修复一个mysqlbinlog_flashback不支持json格式问题 , 有问题可以反馈留言 , 如下盘: 最简单的例子为 python mysqlbinlog_back.py --host="127.0.0.1" --username="root" --port=43306 --password="" --schema=test --table="test5" 下面是程序输出结果 ls -l log/* -rw-r--r-- 1 root root 2592 Nov 9 15:44 lo
Continuous Subarray Sum II
Description Given an circular integer array (the next element of the last element is the first element), find a continuous subarray in it, where the sum of numbers is the biggest. Your code should return the index of the first number and the index o
Flatten Nested List Iterator
Description Given a nested list of integers, implement an iterator to flatten it. Each element is either an integer, or a list -- whose elements may also be integers or other lists. You don't need to implement the remove method. Example Example1 Inp
代码重构方向原则指导 代码重构方向原则指导 代码重构方向原则指导 代码重构方向原则指导 代码重构方向原则指导 代码重构方向原则指导 代码重构方向原则指
代码重构方向原则指导 重构是 一种对软件进行修改的行为,但它并不改变软件的功能特征,而是通过让软件程序更清晰,更简洁和更条理来改进软件的质量。代码重构之于软件,相当于结构修改之于散文。每次人们对如何对代码进行重构的讨论就像是讨论如果对一篇文学作品进行修订一样无休无止。所有人都知道应该根据项目的自身情况来对代码进行重构,而重构是无止境的。莫扎特从来不不对他的作品进行修订,特罗洛普对自己作品修订的恰到好处,大多数作家认为他们俩这样做都是合适的,但他们的合适对于 你我来说未必是合适的。 最常见的基本
前端随心记--------项目上线简单流程
必备条件 一台Linux(CentOS/Ubuntu)服务器 一款Web服务器(Nginx/Apache/Tomcat) 一个属于自己的独立域名(cn/com/org/...) 服务器类型 Linux(CentOS/Ubuntu/Redhat/....) Windows(Win Server/Win7/Win10/...) 阿里云购买服务器(个人/企业) 使用Gitbash连接服务器 使用ssh user@remote_ip 连接服务器 Web服务器的选择 Ng
Nuts & Bolts Problem
Description Given a set of n nuts of different sizes and n bolts of different sizes. There is a one-one mapping between nuts and bolts. Comparison of a nut to another nut or a bolt to another bolt is not allowed. It means nut can only be compared wi
CentOS设置静态IP及Samba等基础设置 centos7设置静态IP地址 samba实现文件共享
1. CentOS7设置静态IP CentOS的网卡IP配置文件/etc/sysconfig/network-scripts/ifcfg-网卡名字。 配置参数解析: BOOTPROTO="static" # 使用静态IP地址,默认为dhcp
IPADDR="19.37.33.66" # 设置的静态IP地址
NETMASK="255.255.255.0" # 子网掩码
GATEWAY="19.37.33.1" # 网关地址
DNS1="192.168.241.2" # DNS服务器
Submatrix Sum
Description Given an integer matrix, find a submatrix where the sum of numbers is zero. Your code should return the coordinate of the left-up and right-down number. If there are multiple answers, you can return any of them. Example Example 1: Input:
今日推荐
周排行