自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(76)
  • 问答 (1)
  • 收藏
  • 关注

原创 swap之vector的特化

最近遇到了vector的swap的操作,此前对于该部分并没有了解过,此处主要是通过实验、阅读源码以及网上一些博客后进行总结关于swap此处写了个非常简单的demo#include <iostream>#include <vector>using namespace std;void printVec(const vector<int> &vec) { cout << "vector members: "; for(a.

2020-08-16 15:44:26 324

原创 系统分析与设计 作业6

练习资源:Asg-RH.pdf使用 UMLet 建模使用类图,分别对 Asg_RH 文档中 Make Reservation 用例以及 Payment 用例开展领域建模。然后,根据上述模型,给出建议的数据表以及主要字段,特别是主键和外键注意事项:对象必须是名词、特别是技术名词、报表、描述类的处理;关联必须有多重性、部分有名称与导航方向属性要注意计算字段数据建模,为...

2019-06-16 15:28:08 371

原创 系统分析与设计 作业5

使用 UMLet 建模:1、根据订旅馆建模文档,Asg-RH.pdf:绘制用例图模型(到子用例)给出 make reservation 用例的活动图2、根据课程练习“投递员使用投递箱给收件人快递包裹”的业务场景分别用多泳道图建模三个场景的业务过程x科技公司发明了投递柜,它们自建了投递柜以及远程控制系统。注册的投递员在推广期免费使用投递柜。由于缺乏资源,仅能使用y...

2019-05-25 14:46:22 268

原创 系统分析与设计 作业4

简答题用例的概念use case is a collection of related success and failure scenarios that describe an actor using a system to support a goal.用例是相关成功和失败场景的集合,用来描述使用系统来达到一个目的的参与者。用例和场景的关系?什么是主场景或happy pa...

2019-05-22 17:23:00 385

原创 腾讯云| Nginx安装与配置HTTPS

腾讯云| Nginx安装与配置HTTPS最近在写项目的时候,在将后台服务器部署到腾讯云后,因为前端是小程序,微信小程序开发对于正常使用必须基于HTTPS请求,因此需要配置HTTPS。本来是使用比较简单openssl进行配置使用,使用第三方免费的SSL证书,但是由于自己配置的证书不稳定,不能被校验通过,服务功能不能正常使用。因此选择申请腾讯云服务器的SSL证书使用,后台的服务器框架为Flask...

2019-05-11 17:43:58 1898

原创 Flask服务器部署的踩坑记录

今天在腾讯云进行flask后台进行配置的时候,按照官方的方法无论如何都无法访问到服务器官方关于外部可访问的服务器配置快速入门 — Flask 0.10.1 文档如果你运行了这个服务器,你会发现它只能从你自己的计算机上访问,网络中其它任何的地方都不能访问。在调试模式下,用户可以在你的计算机上执行任意 Python 代码。因此,这个行为是默认的。如果你禁用了 debug 或信任你所在网络...

2019-05-02 16:59:08 1998

原创 Golang实现简单的API网关

在最近的一个项目中,采用了微服务架构-go-kit进行后端的开发。在微服务架构风格中,一个大应用被拆分成为了多个小的服务系统提供出来,这些小的系统他们可以自成体系,也就是说这些小系统可以拥有自己的数据库,框架甚至语言等,因此我们需要设计一个API 网关(API Gataway),其实网上已经有较多现成的实现框架,但是本项目的需求是比较简单的,因此将使用Golang自行实现。实现API网关是一...

2019-04-25 23:53:33 11550

原创 系统分析与设计 作业3

简述瀑布模型、增量模型、螺旋模型(含原型方法),并分析优缺点从项目特点、风险特征、人力资源利用角度思考瀑布模型瀑布模型是将软件生存周期的各项活动规定为按固定顺序而连接的若干阶段工作,形如瀑布流水,最终得到软件产品。优点:定义了软件开发基本流程与活动,降低软件开发的复杂程度,提高软件开发过程的透明性,提高开发过程的可管理性。缺点:强调过程活动的线性顺序,缺乏灵活性,尤其无法解...

2019-04-14 20:46:32 194

原创 系统分析与设计 作业2

简答题用简短的语言给出对分析、设计的理解分析的主要任务基于客户的大致需求,对其进行研究和提取更加具体详细的核心内容,其强调的是对问题的调查和需求的研究,而不是解决方案。设计的主要任务是基于分析的成果,构建出合理的满足要求的模型或者解决方案,其强调满足要求的概念解决方案(在软件和硬件中),而不是其实现用一句话描述面向对象的分析与设计的优势分析人员不必是“语言专家”,他们不需要掌握其他...

2019-03-30 16:59:40 274

原创 系统分析与设计 作业 1

软件工程的定义应用计算机科学理论和技术以及工程管理原则和方法,按预算和进度,实现满足用户要求的软件产品的定义、开发、和维护的工程或进行研究的学科解释导致 software crisis 本质原因、表现,述说克服软件危机的方法软件危机(software crisis)本质原因主要是用户需求不明确、软件开发过程缺乏正确的理论指导、软件开发的规模越来越大且软件开发的复杂度越来越高,其根源为软件的...

2019-03-09 21:22:00 240

原创 使用GA算法解决TSP问题

源代码传送门文章目录Genetic Algorithm导言GA算法流程初始化种群个体适应度计算选择交叉变异效果总结遗传算法的优化思路GA与SA的比较Genetic Algorithm遗传算法(Genetic Algorithm, GA)是Holland在20世纪60年代末提出的,是受遗传学中自然选择和遗传机制启发发展起来的一种搜索算法。它的基本思想是使用模拟生物和人类进化的方法求解复杂...

2019-02-12 12:02:30 3622 1

原创 A*算法总结

源代码传送门文章目录A*算法导言利用A*算法解决八数码问题八数码问题 比较两种估计函数测试对比验证h1(n)的单调性以及验证凡A*算法挑选出来求后继的点n必定满足 `h(ni)≤1+h(nj)`利用A*算法求解九数码问题能否达到目标状态的判断方法A*算法A* 算法,A*(A-Star)算法是一种静态路网中求解最短路径最有效的直接搜索方法,也是解决许多搜索问题的有效算法。算法中的距离估算...

2019-01-24 23:21:25 2248

原创 DApp开发遇到问题以及解决

文章目录前言Vue如何使用Web3创建账号失败问题前言本次博客简单记录下开发DApp过程中遇到的一些问题,以及相应的解决方案,因此写的也是很随意,仅供参考项目地址Vue如何使用Web3安装Web3的依赖npm install web3@^0.20.0 --save项目里创建全局web3对象写一个插件,例如命名为Web3.jsimport Web3 from &amp;amp;amp;quot;web3&amp;amp;amp;quot;...

2018-12-24 21:44:15 785

原创 Capacitated Facility Location Problem

项目地址介绍Suppose there are n facilities and m customers. We wish to choose:which of the n facilities to openthe assignment of customers to facilitiesThe objective is to minimize the sum of the o...

2018-12-23 01:56:10 466

原创 服务计算 - 6 BoltDB学习与简单剖析

BoltDB 介绍Bolt is a pure Go key/value store inspired by Howard Chu’s LMDB project. The goal of the project is to provide a simple, fast, and reliable database for projects that don’t require a full d...

2018-12-14 21:31:29 780

原创 LeetCode: 132. Palindrome Partitioning II

132. Palindrome Partitioning II题目Given a string s, partition s such that every substring of the partition is a palindrome.Return the minimum cuts needed for a palindrome partitioning of s.Example:...

2018-12-06 16:02:01 141

原创 LeetCode: 57. Insert Interval

57. Insert Interval题目Given a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary).You may assume that the intervals were initially sorted according to the...

2018-12-06 14:56:43 143

原创 LeetCode: 123. Best Time to Buy and Sell Stock III

123. Best Time to Buy and Sell Stock III题目 Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may comple...

2018-12-02 16:33:39 2325

原创 LeetCode: 115. Distinct Subsequences

题目Given a string S and a string T, count the number of distinct subsequences of Swhich equals T.A subsequence of a string is a new string which is formed from the original string by deleting some ...

2018-11-24 20:50:29 104

原创 LeetCode: 120. Triangle

120. Triangle题目 Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below. For example, given the following triangle [ ...

2018-11-20 20:38:47 134

原创 LeetCode: 97. Interleaving String

97. Interleaving String题目 Given s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2. Example 1: Input: s1 = &amp;amp;quot;aabcc&amp;amp;quot;, s2 = &amp;amp;quot;dbbca&amp;amp;quot;, s3 = &amp;amp;quot;aadbbc

2018-11-16 22:37:12 128

原创 服务计算 - 5 Go语言net/http源码解读

背景要提net/http标准库可以分为客户端和服务器两个部分。以下是net/http标准库的各个组成部分的关于客户端和服务端的一个划分:图片来源 - 《Go Web编程》如何开始阅读源码,首先我们需要了解一下http包的执行流程:主要步骤:创建Listen Socket, 监听指定的端口, 等待客户端请求到来Listen Socket接受客户端的请求, 得到Client So...

2018-11-16 21:01:00 399

原创 LeetCode: 95. Unique Binary Search Trees II

95. Unique Binary Search Trees II题目 Given an integer n, generate all structurally unique BST's (binary search trees) that store values 1 ...&amp;amp;nbsp;n. Example: Input: 3 Output: [ &amp;amp;nbsp;...

2018-11-13 19:32:42 119

原创 LeetCode: 87. Scramble String

87. Scramble String题目 Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively. Below is one possible representation of s1 = &quot;great&quot;: ...

2018-11-06 19:31:16 113

原创 LeetCode: 63. Unique Paths II

63. Unique Paths II题目A robot is located at the top-left corner of a m x n grid (marked ‘Start’ in the diagram below).The robot can only move either down or right at any point in time. The robot i...

2018-11-06 13:34:32 136

原创 区块链初探

区块链报告0. 实验环境虚拟机: ubuntu-17.10.1-desktop-amd64go的版本: go1.111. 以太坊的安装,安装geth客户端geth是用go语言写的,编译geth源码需要go语言和C语言编译器,因此需要先安装go语言,go语言版本推荐用go1.7及以上,go语言的安装配置教程。将github仓库克隆源文件:git clone https:/...

2018-11-05 20:32:57 1673

原创 服务计算 - 4 持续集成服务 Travis CI

服务计算 - 4 持续集成服务 Travis CI1. 什么是持续集成服务Travis CI 提供的是持续集成服务(Continuous Integration,简称 CI)。它绑定 Github 上面的项目,只要有新的代码,就会自动抓取。然后,提供一个运行环境,执行测试,完成构建,还能部署到服务器。持续集成指的是只要代码有变更,就自动运行构建和测试,反馈运行结果。确保符合预期以后,再将...

2018-11-04 21:22:49 214

原创 LeetCode: 32. Longest Valid Parentheses

32. Longest Valid Parentheses题目Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring.Example 1:Input: &amp;quot;(()&amp;quot;Output: ...

2018-11-04 17:44:16 137

原创 LeetCode: 72. Edit Distance

72. Edit Distance题目Given two words word1 and word2, find the minimum number of operations required to convert word1 to word2.You have the following 3 operations permitted on a word:Insert a cha...

2018-10-30 20:06:42 171

原创 LeetCode: 55. Jump Game

55. Jump Game题目Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your maximum jump length at that position...

2018-10-26 15:43:32 147

原创 LeetCode: 330. Patching Array

330. Patching Array题目Given a sorted positive integer array nums and an integer n, add/patch elements to the array such that any number in range [1, n] inclusive can be formed by the sum of some el...

2018-10-26 12:03:27 208

原创 Android开发 - Notification的使用

Android开发 - Notification的使用本博客例子来自-Project-FoodListAndroid 8.0 新特性Android 8.0 新特性NotificationChannel是android8.0新增的特性,如果App的targetSDKVersion &amp;amp;gt;= 26,没有设置channel通知渠道的话,就会导致通知无法展示。private void cr...

2018-10-19 22:08:56 198

原创 Android开发 - Broadcast的使用

Android开发 - Broadcast的使用前言1. Android 8.0 新特性2. 静态广播2.1. 接收器2.2. 注册2.3. 发送广播Android 8.0 静态广播3. 动态广播3.1. 接收器3.2. 注册广播3.3. 注销广播3.4. 发送广播Android开发 - Broadcast的使用前言本博客示例代码详情...

2018-10-19 20:37:03 946

原创 LeetCode:134. Gas Station

134. Gas Station题目There are N gas stations along a circular route, where the amount of gas at station i is gas[i].You have a car with an unlimited gas tank and it costs cost[i] of gas to travel f...

2018-10-18 13:49:00 120

原创 LeetCode:210. Course Schedule II

题目There are a total of n courses you have to take, labeled from 0 to n-1.Some courses may have prerequisites, for example to take course 0 you have to first take course 1, which is expressed as a...

2018-10-16 23:56:26 145

原创 Android开发 - 页面跳转和数据传递

Android开发 - 页面跳转以及数据传递记录代码详情参阅Project-FoodList教程:页面需要先在AndroidManifest.xml中注册,否则会造成闪退页面注册教程与讲解页面跳转以及传递数据详述使用startActivityForResult方法。然后利用onActivityResult方法处理返回的结果跳转需要传递信息使用到Intend机制,将需要被...

2018-10-16 20:42:31 3745

原创 Android开发 - 基本UI设计

文章目录Android开发 - 基本UI设计1. 页面部分占用1/N的情况2. 分割线的实现Android开发 - 基本UI设计本博客记录本人在安卓开发时候遇到的一些UI设计的问题以及解决方法记录来自Project-FoodList1. 页面部分占用1/N的情况示例:完整界面 界面顶部要求顶部界面只占1/3解决方案使用线性布局,其属性android:orienta...

2018-10-16 20:17:43 4262

原创 LeetCode:207. Course Schedule

207. Course Schedule题目There are a total of n courses you have to take, labeled from 0 to n-1.Some courses may have prerequisites, for example to take course 0 you have to first take course 1, whi...

2018-10-12 23:58:25 157

原创 LeetCode:785. Is Graph Bipartite?

785. Is Graph Bipartite?题目Given an undirected graph, return true if and only if it is bipartite.Recall that a graph is bipartite if we can split it’s set of nodes into two independent subsets A a...

2018-10-12 00:12:30 152

原创 服务计算 - 3 Golang开发Linux命令行实用程序 - selpg

文章目录Golang开发Linux命令行实用程序 - selpg1. 介绍2. 设计与实现2.1 设计思路2.2 功能模块划分与实现4 参考文献Golang开发Linux命令行实用程序 - selpg1. 介绍Linux命令行使用程序 - selpg,这个名称代表SELect PaGes。selpg允许用户指定从输入文本抽取的页的范围,这些输入文本可以来自文件或另一个进程。关于sel...

2018-10-11 19:10:42 307

空空如也

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

TA关注的人

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