大道至简

人生苦短,我用Python.

LeetCode-Alg-278-First-bad-version

LeetCode-Alg-278-First-bad-version

1、题目 You are a product manager and currently leading a team to develop a new product. Unfortunately, the latest version of your product fails the quality check. Since each version is developed base...

LeetCode-ALg-561-ArrayPartitionI

Algorithm-Easy

1、题目 Given an array of 2n integers, your task is to group these integers into n pairs of integer, say (a1, b1), (a2, b2), ..., (an, bn) which makes sum of min(ai, bi) for all i from 1 to n as larg...

LeetCode-ALg-350-IntersectionofTwoArraysII

Algorithm-Easy

1、题目 Given two arrays, write a function to compute their intersection. Example 1: Input: nums1 = [1,2,2,1], nums2 = [2,2] Output: [2,2] Example 2: Input: nums1 = [4,9,5], nums2 = [9,4,9,8,4] ...

LeetCode-ALg-344-ReverseVowelsOfAString

Algorithm-Easy

1、题目 Write a function that takes a string as input and reverse only the vowels of a string. Example 1: Input: "hello" Output: "holle" Example 2: Input: "leetcode" Output: "leotcede" Note...

Ubuntu16.04安装VNC-Server

Ubuntu16.04安装VNC-Server

1 安装X11VNC sudo apt-get install x11vnc -y 2 配置登陆密码 sudo vu /lib/systemd/system/x11vnc.service 添加一下内容 [Unit] Description=Start x11vnc at startup. After=multi-user.target [Service] Type=simple Ex...

Hadoop集群搭建

Hadoop2.6.5集群搭建

1 环境准备 本次搭建Hadoop准备了四台服务器: 系统: Centos7 IP地址: 192.168.10.131 master 192.168.10.160 slave1 192.168.10.161 slave2 192.168.10.162 slave3 Java版本: Java1.8 Hadoop版本: Hadoop2.6.5 关...

web.xml3.1模板

web.xml3.1模板

<?xml version="1.0" encoding="UTF8"?> <web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.j...

Mysql5.7重置root密码

Mysql5.7重置root密码

注:在ubuntu16.04下操作,对于不同的发行版有不同的命令。 1、关闭mysql服务 service mysql stop #### 2、修改配置文件 vi /etc/mysql/mysql.conf.d/mysqld.cnf有些配置文件在/etc/my.cnf 在[mysqld]下面加上skip-grant-tables 保存并退出 #### 3、重启并修改密码 service m...

Centos7配置NFS

Centos7配置NFS

一、NFS网络文件系统 由SUN公司发布的分布式文件系统协议,它允许客户端像访问本地文件一样访问网络上的文件。 二、安装 客户端和服务端都需要安装nfs-utils包,建议在每一个节点上使用如ntp之类的时间同步守护进程以保持客户端和服务器之间的时间同步。 yum -y install nfs-utils rpcbind 三、配置 服务端 NFS需要查看/etc/exports文...

Centos7安装nginx

Centos7安装nginx

安装 sudo vi /etc/yum.repos.d/nginx.repo # Enter the following to the file [nginx] name=nginx repo baseurl=http://nginx.org/packages/centos/$releasever/$basearch/ gpgcheck=0 enabled=1 sudo yum mak...

< script src = " / js / bootstrap.min.js " >