自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

转载 【leetcode】1169. Invalid Transactions

题目如下:A transaction ispossibly invalidif:the amount exceeds $1000, or;if it occurs within (and including) 60 minutes of another transaction with the same name in a different city.E...

2019-08-31 22:21:00 184

转载 【leetcode】1170. Compare Strings by Frequency of the Smallest Character

题目如下:Let's define a functionf(s)over a non-empty strings, which calculates the frequency of the smallest character ins. For example,ifs = "dcce"thenf(s) = 2because the smallest chara...

2019-08-31 22:17:00 167

转载 【leetcode】1171. Remove Zero Sum Consecutive Nodes from Linked List

题目如下:Given theheadof a linked list, we repeatedly delete consecutive sequences of nodes that sum to0until there are no such sequences.After doing so, return the head of the final linked...

2019-08-31 22:11:00 97

转载 apache2_fastcgi_python

1. 前言之前有用的是apache2 + python + jon模块下的cgi, fcgi. 该框架搭建的服务器我没有找到能够让python程序持久运行的方法(作为一个服务).最近看了篇文档, 使apache2 + python + fastcgi搭建服务器. 这篇文档介绍的十分的详细.我在实践的过程中发现有些问题, 在这里记录一下防止以后配置时出错.2. 问...

2019-08-28 13:23:00 371

转载 对象浅析(一)

基于JAVA的对象浅析(一)想了解对象(object)是什么,最好先明白类(class)是什么1.class: 类是一个模板,它描述一类对象的行为和动态。比如说,人,人就具有属性,如姓名,性别,年龄,种族,身高,体重等。可以简单描述为:publicclassMan {String name;String sex;intage;...

2019-08-28 11:21:00 67

转载 MYSQL的安装教程(文字)

MYSQL的安装教程获取MYSQL,获取地址:https://dev.mysql.com/downloads/mysql/解压缩到你创建的指定目录,先创建my.ini配置文件,内容如下:[client]# 设置mysql客户端默认字符集default-character-set=utf8[mysqld]# 设置3306端口port = ...

2019-08-27 11:13:00 177

转载 helm安装kafka集群并测试其高可用性

介绍Kafka是由Apache软件基金会开发的一个开源流处理平台,由Scala和Java编写。Kafka是一种高吞吐量的分布式发布订阅消息系统,它可以处理消费者在网站中的所有动作流数据。 这种动作(网页浏览,搜索和其他用户的行动)是在现代网络上的许多社会功能的一个关键因素。 这些数据通常是由于吞吐量的要求而通过处理日志和日志聚合来解决。 对于像Hadoop一样的日志数据和离线分析系统...

2019-08-25 17:39:00 466

转载 Kubernetes集群开启Firewall

关于端口的官方说明:https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/install-kubeadm/k8s master需要开启以下端口firewall-cmd --permanent --add-port=6443/tcpfirewall-cmd --permanent --...

2019-08-23 20:47:00 857

转载 CentOS 7 中配置Firewall规则

1.防火墙简介动态防火墙后台程序firewalld提供了一个 动态管理的防火墙,用以支持网络“zones”,以分配对一个网络及其相关链接和界面一定程度的信任。它具备对IPv4和IPv6防火墙设置的支持。它支持以太网桥,并有分离运行时间和永久性配置选择。它还具备一个通向服务或者应用程序以直接增加防火墙规则的接口。2....

2019-08-23 20:05:00 631

转载 Cisco 交换机笔记

最近使用 Cisco L3(C3560X), L2(2960) 交换机搭建了 VLAN 环境,其中包括了 VLAN 的配置, VLAN 间的路由等,在此写篇笔记记录下。VLAN 结构 L3 Switch - Vlan10 - 192.168.10.1 255.255.255.0 - Vlan20 - 192.168.20.1 255.255.255.0...

2019-08-23 10:44:00 115

转载 【leetcode】622. Design Circular Queue

题目如下:Design your implementation of the circular queue. The circular queue is a linear data structure in which the operations are performed based on FIFO (First In First Out) principle and the...

2019-08-23 10:02:00 85

转载 【leetcode】114. Flatten Binary Tree to Linked List

题目如下:Given a binary tree, flatten it to a linked list in-place.For example, given the following tree: 1 / \ 2 5 / \ \3 4 6The flattened tree should look like:1...

2019-08-22 17:30:00 59

转载 【leetcode】227. Basic Calculator II

题目如下:Implement a basic calculator to evaluate a simple expression string.The expression string contains onlynon-negativeintegers,+,-,*,/operators and empty spaces. The integer divisi...

2019-08-22 16:18:00 70

转载 【leetcode】410. Split Array Largest Sum

题目如下:Given an array which consists of non-negative integers and an integerm, you can split the array intomnon-empty continuous subarrays. Write an algorithm to minimize the largest sum amo...

2019-08-22 14:40:00 60

转载 The Aggregate Magic Algorithms

http://aggregate.org/@techreport{magicalgorithms,author={Henry Gordon Dietz},title={{The Aggregate Magic Algorithms}},institution={University of Kentucky},howpublished={Aggregate.Org online tec...

2019-08-22 14:26:00 692

转载 剑指offer总结一:字符、数字重复问题

问题1:字符串中第一个不重复的字符题目描述请实现一个函数用来找出字符流中第一个只出现一次的字符。例如,当从字符流中只读出前两个字符"go"时,第一个只出现一次的字符是"g"。当从该字符流中读出前六个字符“google"时,第一个只出现一次的字符是"l"。输出描述:如果当前字符流没有存在出现一次的字符,返回#字符。解题思路:遍历字符串,用map保存每个字符出现的次数,map...

2019-08-22 11:12:00 80

转载 k8s namespace权限问题无法读取configmap

报错信息:Message: Forbidden!Configured service account doesn't have access. Service account may have been revoked. User "system:serviceaccount:mycomp-services-process:default" cannot get resource “...

2019-08-21 23:49:00 1352

转载 Ubuntu Server 16.04服务器版配置图解教程12 - 安装Nginx(源码包安装)

一。 什么是Nginx?Nginx("enginex")是一个高性能的HTTP和反向代理服务器,也是一个IMAP/POP3/SMTP代理服务器,在高连接并发的情况下Nginx是Apache服务器不错的替代品.其特点是占有内存少,并发能力强,事实上nginx的并发能力确实在同类型的网页服务器中表现较好.目前中国大陆使用nginx网站用户有:新浪、网易、腾讯,另...

2019-08-21 15:26:13 179

转载 Jenkins使用aqua-microscanner-plugin进行容器漏洞扫描

官方地址:https://github.com/jenkinsci/aqua-microscanner-pluginStep1在jenkins安装"Aqua MicroScanner"插件Step2系统设置配置token,token获取地址:https://microscanner.aquasec.com/signupStep3Pipeline中添加扫描脚...

2019-08-20 22:59:00 436

转载 【leetcode】1124. Longest Well-Performing Interval

题目如下:We are givenhours, a list of the number of hoursworked per day for a given employee.A day is considered to be atiring dayif and only if the number of hours worked is (strictly) gre...

2019-08-20 21:43:00 159

转载 计算机网络OSI模型

一、 理想模型-OSI 7层模型那么数据是如何传输的呢?看下图:上层的Header+DATA作为新的Data再次被封装,到达目的地后就像剥洋葱一样掐头(去尾)最终留下你所要传的数据。各层功能详细阐述请参考链接:https://blog.csdn.net/a369189453/article/details/81193661,这位博友总结的很详细。我简要概括一下:(1...

2019-08-20 17:16:00 75

转载 【leetcode】1144. Decrease Elements To Make Array Zigzag

题目如下:Given an arraynumsof integers, amoveconsists of choosing any element anddecreasing it by 1.An arrayAis azigzag arrayif either:Every even-indexed element is greater than ad...

2019-08-20 15:57:00 126

转载 数据库判断表、视图、存储过程是否存在语句

1.判断某个存储过程是否存在if exists(select 1 from sysobjects where name = 'XXXXXX' and xtype = 'P')begin drop proc XXXXXXendgo2.判断某张表是否存在if not Exists(select 1 from sysObjects where Id=OBJECT_ID(N'XXX...

2019-08-20 14:04:00 186

转载 【hackerrank】Type of Triangle

题目如下:Write a query identifying thetypeof each record in theTRIANGLEStable using its three side lengths. Output one of the following statements for each record in the table:Equil...

2019-08-20 13:47:00 152

转载 【hackerrank】Weather Observation Station 18

题目如下:Considerandto be two points on a2Dplane.happens to equal the minimum value inNorthern Latitude(LAT_NinSTATION).happens to equal the minimum value inWestern Longi...

2019-08-20 10:30:00 236

转载 【hackerrank】Placements

题目如下:You are given threetables:Students,FriendsandPackages.Studentscontains two columns:IDandName.Friendscontains two columns:IDandFriend_ID(IDof the ONLY best friend).Packa...

2019-08-20 10:22:00 97

转载 【leetcode】1155. Number of Dice Rolls With Target Sum

题目如下:You haveddice, and each die hasffaces numbered1, 2, ..., f.Return the number of possible ways (out offdtotal ways)modulo10^9 + 7to roll the dice so the sum of the face up num...

2019-08-19 13:59:00 107

转载 【leetcode】1156. Swap For Longest Repeated Character Substring

题目如下:Given a stringtext, we are allowed to swap two of the characters in the string. Find the length of the longest substring with repeated characters.Example 1:Input: text = "ababa"...

2019-08-19 13:54:00 112

转载 【leetcode】1154. Day of the Year

题目如下:Given a stringdaterepresenting aGregoriancalendardate formatted asYYYY-MM-DD, return the day number of the year.Example 1:Input: date = "2019-01-09"Output: 9Explanation:...

2019-08-19 13:44:00 116

转载 【leetcode】1160. Find Words That Can Be Formed by Characters

题目如下:You are given an array of stringswordsand a stringchars.A string isgoodifit can be formed bycharacters fromchars(each charactercan only be used once).Return the sum of leng...

2019-08-19 13:41:00 96

转载 【leetcode】1161. Maximum Level Sum of a Binary Tree

题目如下:Given therootof a binary tree, the level of its root is1,the level of its children is2,and so on.Return thesmallestlevelXsuch that the sum of all the values of nodes at level...

2019-08-19 13:39:00 119

转载 【leetcode】1162. As Far from Land as Possible

题目如下:Given an N x Ngridcontaining only values0and1, where0represents waterand1represents land, find a water cell such that its distance to the nearest land cell is maximized and ret...

2019-08-19 13:36:00 120

转载 【leetcode】1163. Last Substring in Lexicographical Order

题目如下:Given a strings, return the last substring ofsin lexicographical order.Example 1:Input: "abab"Output: "bab"Explanation: The substrings are ["a", "ab", "aba", "abab", "b", "...

2019-08-19 13:34:00 228

转载 (转) 专注才能高效

原文地址:https://www.cnblogs.com/ityouknow/p/11056637.html从2016年开始有规律的写博客以来,陆陆续续收到一些读者类似的问题:比如作为技术负责人,你为什么有那么多时间写博客;博主,你是每天都写博客写到很晚吗;可以聊聊你是如何做时间管理的吗?感觉输出的频率很高呀。既然大家这么好奇,那今天就聊聊吧。01 平时多积累先说一...

2019-08-18 17:08:00 73

转载 【C++】C++中的类模板

基础的类模板模板类的继承内部声明定义普通模板函数和友元模板函数内部声明友元模板函数+外部定义友元模板函数声明和定义分别在不同的文件(模板函数、模板友元)C++中有一个重要特性,那就是模板类型。类似于Objective-C中的泛型。C++通过类模板来实现泛型支持。1 基础的类模板类模板,可以定义相同的操作,拥有不同数据类型的成员属性。通常使用templa...

2019-08-17 14:48:00 68

转载 EveryOne Piano

http://www.everyonepiano.cn/转载于:https://www.cnblogs.com/lilei9110/p/11363535.html

2019-08-16 14:06:00 284

转载 c++11特性

0. 简介在c++11标准中, 语言本身和标准库都增加了很多新内容. 里面的某些特性, 会让你在代码编写时更优雅.我的环境:系统: ubuntu16.04g++版本: g++5.4.0使用c++11特性编译时需加参数 -std=gnu++11 或 -std=c++111. 特性1.1 nullptrNULL可以直接赋值给bool, int,...

2019-08-16 13:11:00 293

转载 【2019.8.12 慈溪模拟赛 T1】钥匙(key)(暴力DP)

暴力\(DP\)这题做法很多,有\(O(n^2)\)的,有\(O(n^2logn)\)的,还有徐教练的\(O(nlogn)\)的,甚至还有\(bzt\)的二分+线段树优化建图的费用流。我懒了点,反正数据范围这么小,就写了个\(O(n^2)\)的暴力\(DP\)。先将两个数组都排序,一个显然的性质,就是人选择钥匙时不可能相交。所以我们设\(f_{i,j}\)表示前\(i\)个人选...

2019-08-14 19:37:00 71

转载 flash 动态文本 html

AS代码 _root.txt_info.html = true;_root.txt_info.htmlText = "请让孩子遮住<font color='#0000ff'>右眼</font>,现在检查<font color='#ff0000'>左眼</font>。";转载于:https://www.cnblogs.com/hakuci/arc...

2019-08-14 00:00:37 129

转载 codeforces 816B Karen and Coffee (差分思想)

题目链接816B Karen and Coffee题目分析题意:有个人在学泡咖啡,因此看了很多关于泡咖啡温度的书,得到了n种推荐的泡咖啡温度范围[L1,R1] ,此人将有k种做法推荐的温度记为可用温度(个人翻译),然后给出q次询问,问区间[L2,R2]内的温度,有多少个温度是可用温度(每个整数代表一个温度)思路:一开始用的是线段树写的,不过姿势不对,TLE了,...

2019-08-13 16:17:00 105

空空如也

空空如也

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

TA关注的人

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