自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(4502)
  • 收藏
  • 关注

转载 MediaWiki安装随记

1.安装apache与php7。 注意:1.应该选择vc版本一直的apache与php7。php一般选择threadsafe版本 2.windows安装完成php7后,应该先stop再start不要直接restart,会导致环境变量无法刷新。2.php7最低配置 开启扩展:fileinfo、mbstring、openssl、intl、(...

2019-08-31 20:47:00 193

转载 Windows下的PHP开发环境搭建——PHP线程安全与非线程安全、Apache版本选择,及详解五种运行模式。...

Windows下的PHP开发环境搭建——PHP线程安全与非线程安全、Apache版本选择,及详解五种运行模式。今天为在Windows下建立PHP开发环境,在考虑下载何种PHP版本时,遭遇一些让我困惑的情况,为了解决这些困惑,不出意料地牵扯出更多让我困惑的问题。为了将这些困惑一网打尽,我花了一下午加一晚上的时间查阅了大量资料,并做了一番实验后,终于把这些困惑全都搞得清清楚楚了...

2019-08-31 14:49:00 68

转载 (Easy) BackTracking Permutations- Algorithm

Description:A permutation, also called an “arrangement number” or “order,” is a rearrangement of the elements of an ordered list S into a one-to-one correspondence with S itself. A string of le...

2019-08-30 17:36:00 77

转载 (Easy) BackTracking- Rat in a Maze. LeetCode

Description:A Maze is given as N*N binary matrix of blocks where source block is the upper left most block i.e., maze[0][0] and destination block is lower rightmost block i.e., maze[N-1][N-1]. ...

2019-08-30 15:45:00 99

转载 (Easy) Backtracking: N-Queen Problems- Algorithm

Description:Solution:class Main { public static void main(String[] args) { System.out.println("Hello world!"); int size = 8; char [][] map = new char[size][...

2019-08-30 13:49:00 80

转载 tr -d命令删除与字符无关的符号

echo "/192.168"| tr -d '/'结果:192.168转载于:https://www.cnblogs.com/cheyunhua/p/11433588.html

2019-08-30 10:30:00 779

转载 (Easy) Find Pivot Index - LeetCode

Description:Given an array of integers nums, write a method that returns the "pivot" index of this array.We define the pivot index as the index where the sum of the numbers to the left of t...

2019-08-30 10:10:00 63

转载 (Easy) Rotate Array - LeetCode

Description:Solution:class Solution { public void rotate(int[] nums, int k) { List<Integer> arr = new ArrayList<Integer>(); for(i...

2019-08-30 09:58:00 63

转载 树莓派3B+红外配置

sudo apt-get install lirc/etc/lirc/lirc_options.conf#driver = devinputdriver = default#device = /dev/lirc0device = auto  In GPIO20OUT GPIO21dtoverlay=lirc-rpi,gpio_out...

2019-08-29 17:43:00 302

转载 (Easy) Arranging Coins - LeetCode

Description:You have a total of n coins that you want to form in a staircase shape, where every k-th row must have exactly k coins.Given n, find the total number of full staircase rows that...

2019-08-29 17:35:00 61

转载 (Easy) Relative Ranks - LeetCode

Description:Given scores of N athletes, find their relative ranks and the people with the top three highest scores, who will be awarded medals: "Gold Medal", "Silver Medal" and "Bronze Medal"...

2019-08-29 16:54:00 54

转载 (Easy) Reverse Only Letters - LeetCode

Description:Given a string S, return the "reversed" string where all characters that are not a letterstay in the same place, and all letters reverse their positions.Example 1:Input: ...

2019-08-29 15:58:00 68

转载 (Easy) Search in Binary Tree - LeetCode

Description:Given the root node of a binary search tree (BST) and a value. You need to find the node in the BST that the node's value equals the given value. Return the subtree rooted with t...

2019-08-29 14:50:00 59

转载 (Easy) Sum of Square Numbers - LeetCode

Description:Given a non-negative integer c, your task is to decide whether there're two integers a and b such that a2 + b2 = c.Example 1:Input: 5Output: TrueExplanation: 1 * 1 + 2 * ...

2019-08-29 14:08:00 63

转载 (Easy) Valid Boomerang - LeetCode

Description:A boomerang is a set of 3 points that are all distinct and not in a straight line.Given a listof three points in the plane, return whether these points are a boomerang.Exa...

2019-08-29 12:51:00 70

转载 CentOS7搭建时间服务器-chrony

系统:centos7防火墙:关闭防火墙和selinux软件:chronycentos6我们一直用的ntp时间服务器,虽然到CentOS7上也可以装ntp。但是各种问题。所以建议centos7使用chrony同步工具。服务端配置:1.安装chrony软件[root@server ~]# yum install chrony -y...

2019-08-29 09:38:00 479

转载 (Easy) Valid Palindrome -LeetCode

Description:Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.Note:For the purpose of this problem, we define empty string as valid...

2019-08-28 18:16:00 72

转载 (Easy) Removed Linked List Element (LeetCode)

Description:Remove all elements from a linked list of integers that have value val.Example:Input: 1->2->6->3->4->5->6, val = 6Output: 1->2->3->4->5...

2019-08-28 17:27:00 73

转载 nginx日志分割脚本

此文档只针对linux分割nginx日志nginx日志不自动带日志分割功能,需要自己写脚本分割日志,并加入到每日任务中,定期分割、存储、删除日志此脚本包括,日志分割、保存、删除、重建日志文件#!/bin/bash#date +%Y%m%d%H%M%SYEAR=`date +%Y`MONTH=`date +%m`DAY=`date +%d`HO...

2019-08-28 17:26:00 243

转载 linux(centos7.0以上版本)安装 mysql-5.7.24-linux-glibc2.12-x86_64.tar 版本的mysql

1:查看 linux下是否有老版本的mysql(有删除)查找old mysql:rpm -qa | grep mysql卸载:卸载命令:rpm –ev {包名}——:rpm -ev mysql-community-common-5.7.23-1.el7.x86_64查找老版本mysql相关的安装目录命令:find / -name mysql若查找到相关...

2019-08-28 10:30:00 147

转载 mysql 后台运行命令

nohup mysql -u sa -pabcd1234 -e 'source /db.sql' &转载于:https://www.cnblogs.com/ahuo/p/11421388.html

2019-08-27 23:11:00 2264

转载 (Easy) Delete Node in a Linked List - LeetCode

Description:Write a function to delete a node (except the tail) in a singly linked list, given only access to that node.Given linked list --head =[4,5,1,9], which looks like following:...

2019-08-27 18:28:00 52

转载 (Easy) Reverse linked list LeetCode

Description:Reverse a singly linked list.Example:Input: 1->2->3->4->5->NULLOutput: 5->4->3->2->1->NULLFollow up:A linked list can be reversed either ...

2019-08-27 18:02:00 71

转载 (Easy) Middle of the Linked List - LeetCode

Description:Given a non-empty, singlylinked list with head node head, returnamiddle node of linked list.If there are two middle nodes, return the second middle node.Example 1:In...

2019-08-27 17:04:00 66

转载 (Easy) Add to Array-Form of Integer (LeetCode)

Description:For a non-negative integer X, thearray-form of Xis an array of its digits in left to right order. For example, if X = 1231, then the array form is[1,2,3,1].Given the array-f...

2019-08-27 16:38:00 57

转载 Kubernetes容器集群管理环境 - Prometheus监控篇

一、Prometheus介绍之前已经详细介绍了Kubernetes集群部署篇,今天这里重点说下Kubernetes监控方案-Prometheus+Grafana。Prometheus(普罗米修斯)是一个开源系统监控和警报工具,最初是在SoundCloud建立的。自2012年成立以来,许多公司和组织都采用了普罗米修斯,该项目拥有一个非常活跃的开发者和用户社区。它现在是一个独立的开放源码项目...

2019-08-27 16:03:00 900

转载 Jumpserver双机高可用环境部署笔记

之前在IDC部署了Jumpserver堡垒机环境,作为登陆线上服务器的统一入口。后面运行一段时间后,发现Jumpserver服务器的CPU负载使用率高达80%以上,主要是python程序对CPU的消耗比较大,由于是单机部署,处于安全考虑,急需要部署一套Jumpserver双机高可用环境,实现LB+HA的降低负载和故障转移的目的。以下记录了环境部署的过程:1...

2019-08-27 15:59:00 501

转载 人性化的HTTP命令行工具——HTTPie

Httpie 是什么Httpie (aych-tee-tee-pie)是一个 HTTP 的命令行客户端。其目标是让 CLI 和 web 服务之间的交互尽可能的人性化。你可以用它很方便的用 http 的命令调试接口,最常用的应该就是 GET 和 POST 了。接口是什么举个简单形象的例子,如果有一家宠物店卖动物口粮,比如猫粮狗粮,那么出售粮食就是一个接口,来的是猫就卖猫粮,来的...

2019-08-27 10:53:00 88

转载 详解Django rest_framework实现RESTful API

这篇文章主要介绍了详解Django rest_framework实现RESTful API,小编觉得挺不错的,现在分享给大家,也给大家做个参考。一起跟随小编过来看看吧一、什么是REST面向资源是REST最明显的特征,资源是一种看待服务器的方式,将服务器看作是由很多离散的资源组成。每个资源是服务器上一个可命名的抽象概念。因为资源是一个抽象的概念,所以它不仅仅能代表服务器文件系统...

2019-08-26 16:46:00 213

转载 (LeetCode) Binary Search - LeetCode

Description:Given a sorted (in ascending order) integer array nums of n elements and a target value, write a function to search target in nums. If target exists, then return its index, otherw...

2019-08-26 16:23:00 55

转载 springboot笔记10——整合Redis

依赖 <dependencies> <!--web依赖--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-sta...

2019-08-26 16:08:00 136

转载 (Easy) Binary Prefix Divisible by 5. LeetCode (to be continued)

Description:Given an array A of 0s and 1s, consider N_i: the i-th subarray from A[0] to A[i]interpretedas a binary number (from most-significant-bit to least-significant-bit.)Return a lis...

2019-08-26 15:51:00 100

转载 redis最大连接数

Well, it's a bit late for this post, but since I just spent a lot of time(the whole night) to configure a new redis server 3.0.6 on ubuntu 16.04. I think I should just write down how I do...

2019-08-26 11:20:00 1556

转载 (Easy) Rotate String- LeetCode

Description:We are given two strings,AandB.Ashift onAconsists of taking stringAand moving the leftmost character to the rightmost position. For example, ifA = 'abcde', then it wi...

2019-08-25 23:00:00 42

转载 EF Core 多个DbContext迁移命令

如果涉及多个项目,注意保持DbContext所在项目和启动项目关于数据库的包引用版本一致注意设置不同的DbContext迁移文件目录不同1.Enable-migrationsEntityFrameworkCore\Enable-migrations –ContextTypeName:Namespace.TestDbContext1 –MigrationDirectory:Migra...

2019-08-25 16:16:00 1833

转载 【2019.8.23】测试题目订正

T2:最大值与最小值众所周知,小葱同学擅长计算,尤其组合数但这个题和组合数什么关系。给定一张有向图,每个点有点权。试找到一条路径,使得该路径上的点权最大值减去点权最小值最大,问这个差最大是多少。  缩点后在DAG上DP,对每个dcc维护四个信息preMin/preMax/nxtMin/nxtMax,分别表示所有前驱、后继中的最大、最小点权,都要把这个dcc本身算在内。...

2019-08-24 21:58:00 81

转载 (Easy) Set Mismatch -LeetCode

Description:The set S originally contains numbers from 1 to n. But unfortunately, due to the data error, one of the numbers in the set got duplicated to another number in the set, which resul...

2019-08-23 18:13:00 47

转载 (Easy) Peak Index in a Mountain Array (LeetCode)

Description:Let's call an array A a mountainif the following properties hold:A.length >= 3There exists some 0 < i< A.length - 1 such that A[0] < A[1] < ... A[i-1] < A[...

2019-08-23 18:00:00 62

转载 (Easy) Sort Array By Parity (LeetCode)

Description:Given an array A of non-negative integers, return an array consisting of all the even elements of A, followed by all the odd elements of A.You may return any answer array that s...

2019-08-23 17:55:00 56

转载 (Easy) Mock Interview LeetCode;

Description:Given two arrays arr1 and arr2, the elements of arr2 are distinct, and all elements in arr2 are also in arr1.Sort the elements of arr1 such that the relative ordering of items ...

2019-08-23 17:07:00 67

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除