- 博客(234)
- 资源 (7)
- 收藏
- 关注
原创 理解docker的分层镜像实现 base 镜像共享(DockerFile)
Docker 镜像要采用这种分层结构最大的一个好处就是 - 共享资源。 比如:有多个镜像都从相同的 base 镜像构建而来,那么宿主机只需在磁盘上保存一份base镜像,同时内存中也只需加载一份 base 镜像,就可以为所有容器服务了。而且镜像的每一层都可以被共享。目录一、关于base镜像二、镜像、容器和存储驱动的关系三、最为典型的镜像的分层技术——aufs四、总结一、关于base镜像base 镜像有两层含义:不依赖其他镜像,从 scratch 构建...
2020-06-03 22:14:17
2272
转载 docker容器共享宿主机环境(目录挂载)
一、背景介绍 如果开发的服务均需要将打成docker镜像,可是随着服务越来越多,镜像也越来越多。每次制作镜像的时候都需要将依赖打进容器,这样一个jre的环境就是100多M。有一天突发奇想,容器能不能共用宿主机的环境?这样每次打镜像时体积就会少不少。二、测试 我们测试用的是java的web项目做的测试,框架用的springboot,由于集成了tomcat插件,所以web项目打成jar包即可运行。 1、在宿主机上安装jdk环境,目录在/home/softwares/jdk1.8.0_151
2020-06-03 21:23:06
3072
1
原创 关于Docker的跨平台
Docker 是一个开源的应用容器引擎,让开发者可以打包他们的应用以及依赖包到一个可移植的镜像中,然后发布到任何流行的Linux或Windows机器上,也可以实现虚拟化。容器是完全使用沙箱机制,相互之间不会有任何接口。 由定义引发思考:“发布到任何流行的Linux或Windows机器上”,为什么能跨平台?镜像跨平台还是Docker跨平台?跨平台意味着不用考虑宿主...
2020-04-08 12:19:47
3496
2
原创 SpringCloud学习(3)-------使用IDEA快速搭建Rest微服务项目
一、技术选型SpringCloud SpringBoot SpringCloud Alibaba JAVA Maven MySQl Hoxton.SR1 2.2.2.RELEASE 2.1.0.RELEASE JDK8 3.5及以上 5.7及以上 SpringBoot版本不断更新,如果单独开发一个SpringBoot项目,版本...
2020-04-05 18:05:50
562
原创 SpringCloud学习(2)-------2020SpringCloud组件的停更、升级和替换
一、之前SpringCloud常用的微服务落地技术组件 落地技术 服务的注册与发现 Eureka 服务的负载与调用 Ribbon 服务的负载与调用 Feign 服务的熔断降级 Hystrix 服务网关 Zuul 服务的分布式配置 SpringCloud Config 服务开发 SpringBoot ...
2020-04-05 15:26:58
1272
3
原创 SpringCloud学习(1)-------微服务与SpringCloud概念
目录一、微服务和微服务架构二、微服务和分布式服务三、微服务与SpringCloud四、SpringCloud和SpringBoot五、SpringCloud和Dubbon参考网址:SpringCloud中文网https://springcloud.cc/ SpringCloud中文社区http://springcloud.cn/ ...
2020-04-05 11:51:03
335
原创 m表示为一些不超过n的自然数之和
/*设m,n均为自然数,m可表示为一些不超过n的自然数之和,f(m,n)为这种表示方式的数目。例:f(5,3)=5,有五种表示方式:3+2,3+1+1,2+2+1,2+1+1+1,1+1+1+1+1*/#include<stdio.h>int f(int m, int n);int main(){ int m,n,ans; scanf("%d%d",...
2018-07-19 07:42:41
3525
2
转载 char varchar nvarchar
1. char 固定长度,最长n个字符。2. varchar 最大长度为n的可变字符串。(n为某一整数,不同数据库,最大长度n不同)char和varchar区别: varchar必char节省空间,但在效率上比char稍微差一些。 说varchar比char节省空间,是因为varchar是可变字符串,比如:用var
2017-05-22 10:08:53
321
原创 PreparedStatement中的execute、executeQuery和executeUpdate之间的区别
该 PreparedStatement接口继承Statement,并与之在两方面有所不同:PreparedStatement 实例包含已编译的 SQL 语句。这就是使语句“准备好”。包含于 PreparedStatement 对象中的 SQL 语句可具有一个或多个 IN 参数。IN参数的值在 SQL 语句创建时未被指定。相反的,该语句为每个 IN 参数保留一个问号(“?”)作为占位符。每个
2017-04-19 20:27:24
9071
原创 URL
URL==Uniform Resource Locator代表资源的地址信息//:/http://www.jikexueyuan.com/path/
2017-04-19 18:01:31
326
原创 jdbc的代码实现
Web工程中建立class文件:package cn.edu.hpu.jdbc;import java.sql.Connection;import java.sql.DriverManager;import java.sql.SQLException;public class JDBC { private String username="root"; private Str
2017-04-17 13:41:13
656
原创 request.getParameter("uname")和session.getAttribute("uname")有什么区别
前者是从request取数据,通俗说就是从浏览器取数据后者是从session取数据,也就是从服务器取自己的数据
2017-04-16 19:51:31
1589
原创 关于myeclipse中web project中文乱码的解决《过滤器Filter》
在使用HttpServletRequest.getParameter(String name)时我们可能会取得中文的乱码。问题描述:当利用getParameter()方法去取HTML元素中value值时当元素的value值为中文时用该方法取到的值可能为乱码。这时候我们需要的取得它的中文。 a) 方法一在利用getParameter方法之前添加如下语句 reques
2017-04-11 21:40:15
525
原创 service() doGet() doPost() 功能介绍
HttpServlet 里的三个方法:service(HttpServletRequest req, HttpServletResponse resp) doGet(HttpServletRequest req, HttpServletResponse resp)
2017-04-11 19:29:37
508
原创 HDU2266How Many Equations Can You Find(深搜)
How Many Equations Can You FindTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 641 Accepted Submission(s): 421Problem Description
2016-10-07 17:57:25
353
原创 POJ 1942 Paths on a Grid【组合数学】
Paths on a GridTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 24879 Accepted: 6185DescriptionImagine you are attending your math lesson at school
2016-10-06 19:53:23
259
原创 Light-oj 1080 - Binary Simulation(线段树区间更新)
1080 - Binary SimulationPDF (English)StatisticsForumTime Limit: 2 second(s)Memory Limit: 64 MBGiven a binary number, we are about to do some operation
2016-10-06 14:46:00
317
原创 树状数组
如果给定一个数组,要你求里面所有数的和,一般都会想到累加。但是当那个数组很大的时候,累加就显得太耗时了,时间复杂度为O(n),并且采用累加的方法还有一个局限,那就是,当修改掉数组中的元素后,仍然要你求数组中某段元素的和,就显得麻烦了。所以我们就要用到树状数组,他的时间复杂度为O(lgn),相比之下就快得多。下面就讲一下什么是树状数组: 一般讲到树状数组都会少不了下面这个图:
2016-10-03 22:35:26
227
原创 500B New Year Permutation(Floyd)
B. New Year Permutationtime limit per test 2 secondsmemory limit per test 256 megabytesinput standard inputoutput standard outputUser ainta has a permutation p1
2016-09-18 17:27:56
331
原创 500A. New Year Transportation
time limit per test 2 secondsmemory limit per test 256 megabytesinput standard inputoutput standard outputNew Year is coming in Line World! In this world, there are n
2016-09-18 17:22:48
276
原创 STL————-unique算法
一.unique函数类属性算法unique的作用是从输入序列中“删除”所有相邻的重复元素。该算法删除相邻的重复元素,然后重新排列输入范围内的元素,并且返回一个迭代器(容器的长度没变,只是元素顺序改变了),表示无重复的值范围得结束。#include#includeusing namespace std;int main(){ int n; int a[11100]
2016-09-14 17:54:48
537
原创 Codeforces Round #371 (Div. 2)
A. Meeting of Old Friendstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputToday an outstanding event is goin
2016-09-14 09:43:04
249
原创 Codeforces Round #370 (Div. 2)
A. Memory and Crowtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere are n integers b1, b2, ..., bn wri
2016-09-11 13:51:34
278
原创 LightOJ 1047 Neighbor House (DP 数字三角形变形)
DescriptionThe people of Mohammadpur have decided to paint each of their houses red, green, or blue. They've also decided that no two neighboring houses will be painted the same color. The neigh
2016-09-10 00:39:04
413
原创 STL————-lower_bound和upper_bound算法
参考地址: http://www.cnblogs.com/cobbliu/archive/2012/05/21/2512249.html 图解:ForwardIter lower_bound(ForwardIter first, ForwardIter last,const _Tp& val)算法返回一个非递减序列[first, last)中的第一个大于等于值val的位置。
2016-09-08 12:44:54
828
原创 Light OJ 1307 - Counting Triangles(lower_bound)
DescriptionYou are given N sticks having distinct lengths; you have to form some triangles using the sticks. A triangle is valid if its area is positive. Your task is to find the number of ways
2016-09-08 12:31:11
357
原创 LightOJ 1136 - Division by 3(找规律)
DescriptionThere is sequence 1, 12, 123, 1234, ..., 12345678910, ... . Now you are given two integers A and B, you have to find the number of integers from Ath number to Bth (inclusive) number
2016-09-07 18:01:43
903
原创 杭电-5253 连接的管道(最小生成树变形kruscal)
连接的管道Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2432 Accepted Submission(s): 880Problem Description老 Jack 有一片农田,以往几年都是
2016-08-24 21:32:50
260
原创 POJ-1383-Labyrinth(广搜最大直径)
LabyrinthTime Limit: 2000MS Memory Limit: 32768KTotal Submissions: 3990 Accepted: 1501DescriptionThe northern part of the Pyramid contains a very large and comp
2016-08-24 20:54:39
425
原创 杭电-2059 龟兔赛跑 (基础DP)
龟兔赛跑Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 16356 Accepted Submission(s): 6161Problem Description据说在很久很久以前,可怜的兔子经历了人生中最大的
2016-08-24 09:11:09
370
原创 Light-oj-1045 lightoj1045 - Digits of Factorial (N!不同进制的位数)
Time Limit: 2 second(s)Memory Limit: 32 MBFactorial (阶层)of an integer is defined by the following functionf(0) = 1f(n) = f(n - 1) * n, if(n> 0)So, factorial of 5 is 120. Bu
2016-08-23 21:43:26
338
原创 Light-oj-1282 Leading and Trailing(数学取位)
Leading and TrailingDescriptionYou are given two integers: n and k, your task is to find the most significant three digits, and least significant three digits of nk.Input
2016-08-23 21:12:31
332
原创 Light OJ - 1008 - Fibsieve`s Fantabulous Birthday (数学找规律)
Fibsieve had a fantabulous (yes, it's an actual word) birthday party this year. He had so many gifts that he was actually thinking of not having a party next year.Among these gifts there was an N
2016-08-23 20:15:22
271
原创 CodeForces 632B Alice, Bob, Two Teams
B. Alice, Bob, Two Teamstime limit per test1.5 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputAlice and Bob are playing a game
2016-08-23 10:45:42
240
原创 CodeForces 660A Co-prime Array (互质队列)
A. Co-prime Arraytime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given an array of n elements, you
2016-08-23 09:47:32
376
转载 二分图匹配—匈牙利算法
本文转载地址: http://blog.youkuaiyun.com/q3498233/article/details/5786225二分图:二分图是这样一个图,它的顶点可以分类两个集合X和Y,所有的边关联的两个顶点恰好一个属于集合X,另一个属于集合Y。二分图匹配:给定一个二分图G,在G的一个子图M中,M的边集中的任意两条边都不依附于同一个顶点,则称M是一个匹配。最大匹配:图中包含边数
2016-08-20 19:51:29
319
原创 杭电-1317 XYZZY(最短路+正向环)
XYZZYTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1701 Accepted Submission(s): 419Problem DescriptionIt has recently been
2016-08-19 09:52:57
416
原创 杭电-1498 50 years, 50 colors(二分匹配)
50 years, 50 colorsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2309 Accepted Submission(s): 1299Problem DescriptionOn Octorbe
2016-08-18 20:20:10
367
原创 CodeForces 601A The Two Routes(最短路径)
A. The Two Routestime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputIn Absurdistan, there are n towns (number
2016-08-18 15:53:50
331
原创 Codeforces Round #297 (Div. 2) D - Arthur and Walls (深搜)
D. Arthur and Wallstime limit per test2 secondsmemory limit per test512 megabytesinputstandard inputoutputstandard outputFinally it is a day when Arthur has eno
2016-08-18 11:38:04
275
SpringCloudAlibaba&springCloud及常用微服务组件.zip
2020-06-02
基于android的个人生活管家项目
2018-05-29
C++项目源码(本科C++课程设计)
2018-05-29
15级C语言课程设计通讯录管理系统
2018-05-29
CAD课程实验报告(三维雨伞的绘制)
2018-05-29
计算机网络课程设计-客户端FTP软件的设计与实现
2018-05-29
数据库课程设计 仓库物资管理系统(JAVAweb源码+mysql+设计报告)
2018-05-29
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人